x11-libs/qwtpolar: Add USE=qt4,qt5 and fix DEPENDs, EAPI 6
authorAndreas Sturmlechner <asturm@gentoo.org>
Mon, 23 Jan 2017 02:29:33 +0000 (03:29 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Mon, 23 Jan 2017 02:37:59 +0000 (03:37 +0100)
Gentoo-bug: 597458

SRC_URI: Prefer upstream's tar.bz2
Switch to qmake-utils.

Package-Manager: portage-2.3.0

x11-libs/qwtpolar/Manifest
x11-libs/qwtpolar/metadata.xml
x11-libs/qwtpolar/qwtpolar-1.1.1-r1.ebuild [new file with mode: 0644]

index 7060a66d809af3b0e96da0cd130ed56cc259fed0..15f6be24436a24ce3f5523c8128030c3c4f2761e 100644 (file)
@@ -1,4 +1,5 @@
 DIST qwtpolar-0.1.0.tar.bz2 768348 SHA256 af08b0106b1f7187db02dfd7e36f59ad185fbe72d72c62a6c91e9f492127a481 SHA512 8a11a64d52547fd801a78874daa806540c5efa5828ee7783a1d468cc09667b1b87edcafa134b8c1b8c818c5bcb04f7e42ac836b10f165d002cc90e68294479f5 WHIRLPOOL 6ef7de2a2cf6df068e309fe0d1d60aba5f05fa2cf6733a4fd0df2205a1f029d8781623411a2100666102a51d64787a8154764a6719950881bfaf2840b5cf3b6a
 DIST qwtpolar-1.0.0.zip 636765 SHA256 046cb0378134dbec76fc60435f93fe433c155087a03114eb1b96b605ee0e1e76 SHA512 94536af39e3658d56758d201a29c2e0aaec109ca37b3f9a4e7e7722ea7f63f45e31026d112b384b8e75008c93d10a070ebaa85c0c745a7d11529f7d1de10d4ba WHIRLPOOL 3c8a5d4ffbb8e4b9fc4cfbab3f7faaa1d7c16833c79b43633ded63f89f6efe80b2961985f0ce3d26ede52c48fae934a65616f5b18ecfd03b932225de6b0abae9
 DIST qwtpolar-1.1.0.zip 939175 SHA256 21ba860195985bfcb4e54da6a48aba4f7db44f01a6f26bbe6ffa9123802b78df SHA512 48bc5da93ed18aa83907651569245b77a6bce43e9e87d38f4531fecb20d74bdce4b0a18cee0722065637577cd73937ed8e3b5253df5262347ac382b1673233c0 WHIRLPOOL ba09b46a9da8604feb55bee31d2d336fbe746f2c1b3fb44ec4356f50860d03c713e2049421669a0bf67656afc241e5153c8dd2619d3745b699bfae1316db641c
+DIST qwtpolar-1.1.1.tar.bz2 565546 SHA256 6168baa9dbc8d527ae1ebf2631313291a1d545da268a05f4caa52ceadbe8b295 SHA512 5b752e5426ae15740737277c2ba244cab947c54d573b4eedd1f54359b6eab1fa738d40f68f6c806106d01596eabc9f6d7ee825dde11a4925bebd643f42021621 WHIRLPOOL e03906b22f06d6ea42ab0609d28a578be70c4d5c9a71d0cb00f40e2630f2868890085434e4f2833280db2c445eaefc16bfd321a3d4f5cc9e1538a608fd1d727b
 DIST qwtpolar-1.1.1.zip 939433 SHA256 41a820400af25190bf6a1a49d49410f9bd8423fabde2f2028b52086b640b4e27 SHA512 d3dfffa2f305be6ee51caf42fe08b5374d78a8916e91055974565b6dc7d7fe0b3fd166de06bc7a6c634a340a94abd27774186238c4a63096522b20576bccac67 WHIRLPOOL 2794b99fb613c1fe33056d107b11d1252a990c464230af57c844519fcb85e2ba60958d1937f8ea0244fdc7d7923a8d85617a2efe3ecb580e8624af1ca73288bd
index 86b6ec2a509b2262f1a21634a1c5f366b1a35916..5b5806a77b80c0a51a7ce3a65e5f59a2b63021e8 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-  <maintainer type="project">
-    <email>sci-geosciences@gentoo.org</email>
-    <name>Gentoo Geosciences Project</name>
-  </maintainer>
-  <upstream>
-    <remote-id type="sourceforge">qwtpolar</remote-id>
-  </upstream>
+       <maintainer type="project">
+               <email>sci-geosciences@gentoo.org</email>
+               <name>Gentoo Geosciences Project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="sourceforge">qwtpolar</remote-id>
+       </upstream>
 </pkgmetadata>
diff --git a/x11-libs/qwtpolar/qwtpolar-1.1.1-r1.ebuild b/x11-libs/qwtpolar/qwtpolar-1.1.1-r1.ebuild
new file mode 100644 (file)
index 0000000..205777e
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit qmake-utils
+
+DESCRIPTION="Library for displaying values on a polar coordinate system"
+HOMEPAGE="http://qwtpolar.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="qwt"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="qt4 qt5"
+
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+RDEPEND="
+       qt4? ( x11-libs/qwt:6=[designer,qt4(+),svg] )
+       qt5? ( x11-libs/qwt:6=[designer,qt5,svg] )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+       default
+
+       local qtplugindir=$(qt4_get_plugindir)
+       use qt5 && qtplugindir=$(qt5_get_plugindir)
+
+       sed \
+               -e "/QWT_POLAR_INSTALL_PREFIX /s:=.*$:= ${EPREFIX}/usr:g" \
+               -e "/QWT_POLAR_INSTALL_LIBS/s:lib:$(get_libdir):g" \
+               -e "/QWT_POLAR_INSTALL_DOCS/s:doc:share/doc/${PF}:g" \
+               -e "/QWT_POLAR_INSTALL_PLUGINS/s:=.*$:= ${qtplugindir}/designer/:g" \
+               -e "/QWT_POLAR_INSTALL_FEATURES/s:=.*$:= ${qtplugindir}/features/:g" \
+               -e "/= QwtPolarDesigner/ d" \
+               -e "/= QwtPolarExamples/d" \
+               -i ${PN}config.pri || die
+
+       sed \
+               -e "s:{QWT_POLAR_ROOT}/lib:{QWT_POLAR_ROOT}/$(get_libdir):" \
+               -i src/src.pro || die
+       echo "INCLUDEPATH += ${EPREFIX}/usr/include/qwt6" >> src/src.pro
+       cat >> designer/designer.pro <<- EOF
+       INCLUDEPATH += "${EPREFIX}"/usr/include/qwt6
+       LIBS += -L"${S}/$(get_libdir)"
+       EOF
+}
+
+src_configure() {
+       if use qt5; then
+               eqmake5
+       else
+               eqmake4
+       fi
+}
+
+src_install() {
+       emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
+       einstalldocs
+}