commit:     b000af3faf1c55ad4952c91e3669bdf342994069
Author:     Dongxu Li <dongxuli2011 <AT> gmail <DOT> com>
AuthorDate: Wed Aug 26 16:00:09 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Aug 26 16:00:57 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=b000af3f

media-gfx/librecad: version bump 2.0.8

 media-gfx/librecad/ChangeLog             |  4 ++
 media-gfx/librecad/librecad-2.0.8.ebuild | 65 ++++++++++++++++++++++++++++++++
 media-gfx/librecad/librecad-9999.ebuild  | 42 ++++++++++++++++-----
 3 files changed, 102 insertions(+), 9 deletions(-)

diff --git a/media-gfx/librecad/ChangeLog b/media-gfx/librecad/ChangeLog
index f1965b1..c810091 100644
--- a/media-gfx/librecad/ChangeLog
+++ b/media-gfx/librecad/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header$
 
+  26 Aug 2015; Dongxu Li <[email protected]>
+  +librecad-2.0.8.ebuild librecad-9999.ebuild:
+  version bump: 2.0.8, qt5 support
+
   05 Apr 2015; Dongxu Li <[email protected]>
   librecad-2.0.7.ebuild librecad-9999.ebuild:
   fixed doc and appdata installation

diff --git a/media-gfx/librecad/librecad-2.0.8.ebuild 
b/media-gfx/librecad/librecad-2.0.8.ebuild
new file mode 100644
index 0000000..cd17775
--- /dev/null
+++ b/media-gfx/librecad/librecad-2.0.8.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qmake-utils
+
+DESCRIPTION="Generic 2D CAD program"
+HOMEPAGE="http://www.librecad.org/";
+SRC_URI="https://github.com/LibreCAD/LibreCAD/archive/${PV/_/}.zip -> ${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="3d debug doc tools qt4 +qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+DEPEND="
+       qt4? (
+                   dev-qt/qtcore:4
+                   dev-qt/qtgui:4
+                   dev-qt/qtsvg:4
+                   dev-qt/qthelp:4
+       )
+       qt5? (
+                   dev-qt/qtcore:5
+                   dev-qt/qtgui:5
+                   dev-qt/qthelp:5
+                   dev-qt/qtsvg:5
+                   dev-qt/qtwidgets:5
+                   dev-qt/qtxml:5
+       )
+
+       dev-libs/boost
+       dev-cpp/muParser
+       media-libs/freetype"
+
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/LibreCAD-${PV}"
+
+src_prepare() {
+       # currently RS_VECTOR3D causes an internal compiler error on GCC-4.8
+       use 3d || sed -i -e '/RS_VECTOR2D/ s/^#//' librecad/src/src.pro || die
+}
+
+src_configure() {
+           if use qt4; then
+                   eqmake4 -r
+                       else
+                   eqmake5 -r
+           fi
+}
+
+src_install() {
+       dobin unix/librecad
+       use tools && dobin unix/ttf2lff
+       insinto /usr/share/${PN}
+       doins -r unix/resources/*
+       use doc && dohtml -r librecad/support/doc/*
+       insinto /usr/share/appdata
+       doins unix/appdata/librecad.appdata.xml
+       doicon librecad/res/main/"${PN}".png
+       make_desktop_entry ${PN} LibreCAD ${PN} Graphics
+}

diff --git a/media-gfx/librecad/librecad-9999.ebuild 
b/media-gfx/librecad/librecad-9999.ebuild
index 4858c75..0c63626 100644
--- a/media-gfx/librecad/librecad-9999.ebuild
+++ b/media-gfx/librecad/librecad-9999.ebuild
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit qt4-r2 eutils git-r3
+inherit eutils git-r3 qmake-utils
 
 DESCRIPTION="Generic 2D CAD program"
 HOMEPAGE="http://www.librecad.org/";
@@ -14,24 +14,48 @@ EGIT_REPO_URI="https://github.com/LibreCAD/LibreCAD.git";
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS=""
-IUSE="debug doc"
+IUSE="3d debug doc tools qt4 +qt5"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+DEPEND="
+       qt4? (
+                   dev-qt/qtcore:4
+                   dev-qt/qtgui:4
+                   dev-qt/qtsvg:4
+                   dev-qt/qthelp:4
+       )
+       qt5? (
+                   dev-qt/qtcore:5
+                   dev-qt/qtgui:5
+                   dev-qt/qthelp:5
+                   dev-qt/qtsvg:5
+                   dev-qt/qtwidgets:5
+                   dev-qt/qtxml:5
+       )
 
-DEPEND="${RDEPEND}
-       dev-qt/qtgui:4
-       dev-qt/qthelp:4
-       dev-qt/qtsvg:4
        dev-libs/boost
        dev-cpp/muParser
        media-libs/freetype"
 
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/LibreCAD-${PV}"
+
 src_prepare() {
-       #sed -i -e "s:\\\$\+system(git describe --tags):9999:" src/src.pro
-       #enable C++11 by default
-       sed -i -e '/RS_VECTOR2D/ s/^#//' librecad/src/src.pro || die
+       # currently RS_VECTOR3D causes an internal compiler error on GCC-4.8
+       use 3d || sed -i -e '/RS_VECTOR2D/ s/^#//' librecad/src/src.pro || die
+}
+
+src_configure() {
+           if use qt4; then
+                   eqmake4 -r
+                       else
+                   eqmake5 -r
+           fi
 }
 
 src_install() {
        dobin unix/librecad
+       use tools && dobin unix/ttf2lff
        insinto /usr/share
        doins -r unix/appdata
        insinto /usr/share/${PN}

Reply via email to