dev-python/PythonQt: python3_7, EAPI 7, fix revdep, tests
authorVladimir Pavljuchenkov (SpiderX) <spiderx@spiderx.dp.ua>
Sun, 16 Feb 2020 21:11:52 +0000 (23:11 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 26 Feb 2020 11:45:51 +0000 (12:45 +0100)
1. add github reference in metadata
2. move to EAPI 7
3. add python3_7
4. add tests
5. add missed app-arch/unzip
6. don't build tests and examples
7. remove webkit USE flag

Closes: https://bugs.gentoo.org/708700
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua>
Closes: https://github.com/gentoo/gentoo/pull/14680
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
dev-python/PythonQt/PythonQt-3.2-r1.ebuild [new file with mode: 0644]
dev-python/PythonQt/metadata.xml

diff --git a/dev-python/PythonQt/PythonQt-3.2-r1.ebuild b/dev-python/PythonQt/PythonQt-3.2-r1.ebuild
new file mode 100644 (file)
index 0000000..5ca6174
--- /dev/null
@@ -0,0 +1,95 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+MY_P=${PN}${PV}
+
+inherit qmake-utils python-single-r1 virtualx
+
+DESCRIPTION="A dynamic Python binding for the Qt framework"
+HOMEPAGE="https://mevislab.github.io/pythonqt"
+SRC_URI="mirror://sourceforge/pythonqt/pythonqt/${P}/${MY_P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples +extensions test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="${PYTHON_DEPS}
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtwidgets:5
+       extensions? (
+               dev-qt/designer:5
+               dev-qt/qtdeclarative:5[widgets]
+               dev-qt/qtmultimedia:5[widgets]
+               dev-qt/qtnetwork:5
+               dev-qt/qtopengl:5
+               dev-qt/qtprintsupport:5
+               dev-qt/qtsql:5
+               dev-qt/qtsvg:5
+               dev-qt/qtxml:5
+               dev-qt/qtxmlpatterns:5 )"
+DEPEND="${RDEPEND}
+       dev-qt/qtxml:5"
+BDEPEND="app-arch/unzip
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )
+       test? ( dev-qt/qttest:5 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+       default
+
+       if ! use examples ; then
+               sed -i '/SUBDIRS/s/examples//' PythonQt.pro || die "sed for examples"
+       fi
+       if ! use extensions ; then
+               sed -i '/SUBDIRS/s/extensions//' PythonQt.pro || die "sed for extensions"
+       fi
+       if ! use test ; then
+               sed -i '/SUBDIRS/s/tests//' PythonQt.pro || die "sed for test"
+       fi
+
+       # Remove webkit support
+       sed -i '/qtHaveModule(webkit):CONFIG += PythonQtWebKit/d' \
+               extensions/PythonQt_QtAll/PythonQt_QtAll.pro \
+               || die "sed for webkit"
+
+       # Unset python version to use python-config
+       sed -i "/unix:PYTHON_VERSION=/s/2.7//" build/python.prf \
+               || die "sed for python version"
+}
+
+src_configure() {
+       eqmake5 CONFIG+="$(usex debug debug release '' '')" PREFIX="${ED}"/usr
+}
+
+src_test() {
+       LD_PRELOAD="${S}"/lib/libPythonQt-Qt5-Python"$(usex debug _d '' '' '')".so.3 \
+               virtx ./lib/PythonQtTest"$(usex debug _d '' '' '')"
+}
+
+src_install() {
+       einstalldocs
+
+       # Includes
+       insinto /usr/include/PythonQt
+       doins -r src/*.h
+       insinto /usr/include/PythonQt/gui
+       doins -r src/gui/*.h
+
+       if use extensions ; then
+               insinto /usr/include/PythonQt/extensions/PythonQt_QtAll
+               doins -r extensions/PythonQt_QtAll/*.h
+       fi
+
+       # Libraries
+       dolib.so lib/libPythonQt*
+}
index 1b4473ec0080169d2c5c4885569f4c535af891de..32c82921dccc9c1932894c705b028ef44d334fec 100644 (file)
@@ -9,18 +9,18 @@
                <email>proxy-maint@gentoo.org</email>
                <name>Proxy Maintainers</name>
        </maintainer>
-       <longdescription>
-PythonQt is a dynamic Python binding for the Qt framework.
-It offers an easy way to embed the Python scripting language into your C++ Qt applications.
-The focus of PythonQt is on embedding Python into an existing C++ application,
-not on writing the whole application completely in Python.
+       <longdescription lang="en">
+       PythonQt is a dynamic Python binding for the Qt framework.
+       It offers an easy way to embed the Python scripting language into
+       your C++ Qt applications. The focus of PythonQt is on embedding Python
+       into an existing C++ application, not on writing the whole application
+       completely in Python.
        </longdescription>
        <use>
                <flag name="extensions">Install extensions</flag>
        </use>
        <upstream>
-               <changelog>https://sourceforge.net/p/pythonqt/news/</changelog>
-               <doc>http://pythonqt.sourceforge.net/index.html</doc>
+               <remote-id type="github">MeVisLab/pythonqt</remote-id>
                <remote-id type="sourceforge">pythonqt</remote-id>
        </upstream>
 </pkgmetadata>