Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/PyQt5/
Date: Fri, 27 Dec 2019 03:33:55
Message-Id: 1577417618.f61b4783e65e60e6735184538ad766e4f9b4d81e.pesa@gentoo
1 commit: f61b4783e65e60e6735184538ad766e4f9b4d81e
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 27 02:49:02 2019 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 27 03:33:38 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f61b4783
7
8 dev-python/PyQt5: add 5.14.0
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>
12
13 dev-python/PyQt5/Manifest | 1 +
14 dev-python/PyQt5/PyQt5-5.14.0.ebuild | 204 +++++++++++++++++++++++++++++++++++
15 2 files changed, 205 insertions(+)
16
17 diff --git a/dev-python/PyQt5/Manifest b/dev-python/PyQt5/Manifest
18 index df625ed928f..1fcd3be1bba 100644
19 --- a/dev-python/PyQt5/Manifest
20 +++ b/dev-python/PyQt5/Manifest
21 @@ -1,2 +1,3 @@
22 DIST PyQt5-5.13.2.tar.gz 3162810 BLAKE2B 383aaa3f1f51ed618a3b6475432a96f6a8f89ad4d97197fe87469e0a69e1db79c762965adfacdf92cc43d1bb2eb5e2790f6bdb7e8b288f0feade828bf8e30090 SHA512 9a16450d8fe2a7e94e182ebb03cc785c6de516e356251753abfb79af3958230043f2db59750cde0a6f1fd6cf5568eb8b7ae76d5a3fbcfe9f7807e02867973b55
23 +DIST PyQt5-5.14.0.tar.gz 3241670 BLAKE2B 31993807173328b66a585458dd739663388b75ca413a0ac3497fd0e6d922d9438e9bbdc5fdec23752d8ad40542a45453d851775863b771ccad798e3193af8ceb SHA512 f8ff37d55305fba358e4d3f1db216eeffe8031a49c980f7331bfc460f45d8bcc219bce0249fd6932f422e1b7b3b4107d6c04140803faf473bc18f26ec313ad5d
24 DIST PyQt5_gpl-5.12.2.tar.gz 3147205 BLAKE2B ad0b09548521ceff869bb44cfceb0c2cf31338f46c76da23582f7949fdcc0e8feee3cc0dc0610e8152dfbc701c3ac765eea7898f5061775a92e2601c5b7ea8ca SHA512 dc23bb7dacb305d4f9a630f2b5c3809d5d6734ba234c9941a3c44c770af8534dd737160dbe007a1f15d5c90e2e52419dd749b3ef942b4e71917c1cea2220a666
25
26 diff --git a/dev-python/PyQt5/PyQt5-5.14.0.ebuild b/dev-python/PyQt5/PyQt5-5.14.0.ebuild
27 new file mode 100644
28 index 00000000000..51fd9952da4
29 --- /dev/null
30 +++ b/dev-python/PyQt5/PyQt5-5.14.0.ebuild
31 @@ -0,0 +1,204 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} )
38 +inherit multibuild python-r1 qmake-utils
39 +
40 +DESCRIPTION="Python bindings for the Qt framework"
41 +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro"
42 +
43 +MY_P=${PN}-${PV/_pre/.dev}
44 +if [[ ${PV} == *_pre* ]]; then
45 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
46 +else
47 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
48 +fi
49 +
50 +LICENSE="GPL-3"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
53 +
54 +# TODO: QtNfc, QtRemoteObjects (Qt >= 5.12)
55 +IUSE="bluetooth dbus debug declarative designer examples gles2 gui help location multimedia
56 + network networkauth opengl positioning printsupport sensors serialport sql +ssl svg
57 + testlib webchannel webkit websockets widgets x11extras xmlpatterns"
58 +
59 +# The requirements below were extracted from configure.py
60 +# and from the output of 'grep -r "%Import " "${S}"/sip'
61 +REQUIRED_USE="
62 + ${PYTHON_REQUIRED_USE}
63 + bluetooth? ( gui )
64 + declarative? ( gui network )
65 + designer? ( widgets )
66 + help? ( gui widgets )
67 + location? ( positioning )
68 + multimedia? ( gui network )
69 + networkauth? ( network )
70 + opengl? ( gui widgets )
71 + positioning? ( gui )
72 + printsupport? ( gui widgets )
73 + sensors? ( gui )
74 + serialport? ( gui )
75 + sql? ( widgets )
76 + svg? ( gui widgets )
77 + testlib? ( widgets )
78 + webchannel? ( network )
79 + webkit? ( gui network printsupport widgets )
80 + websockets? ( network )
81 + widgets? ( gui )
82 + xmlpatterns? ( network )
83 +"
84 +
85 +# Minimal supported version of Qt.
86 +QT_PV="5.10:5"
87 +
88 +RDEPEND="
89 + ${PYTHON_DEPS}
90 + >=dev-python/PyQt5-sip-4.19.20:=[${PYTHON_USEDEP}]
91 + >=dev-qt/qtcore-${QT_PV}
92 + >=dev-qt/qtxml-${QT_PV}
93 + virtual/python-enum34[${PYTHON_USEDEP}]
94 + bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
95 + dbus? (
96 + dev-python/dbus-python[${PYTHON_USEDEP}]
97 + >=dev-qt/qtdbus-${QT_PV}
98 + )
99 + declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
100 + designer? ( >=dev-qt/designer-${QT_PV} )
101 + gui? ( >=dev-qt/qtgui-${QT_PV}[gles2=] )
102 + help? ( >=dev-qt/qthelp-${QT_PV} )
103 + location? ( >=dev-qt/qtlocation-${QT_PV} )
104 + multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
105 + network? ( >=dev-qt/qtnetwork-${QT_PV}[ssl=] )
106 + networkauth? ( >=dev-qt/qtnetworkauth-${QT_PV} )
107 + opengl? ( >=dev-qt/qtopengl-${QT_PV} )
108 + positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
109 + printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
110 + sensors? ( >=dev-qt/qtsensors-${QT_PV} )
111 + serialport? ( >=dev-qt/qtserialport-${QT_PV} )
112 + sql? ( >=dev-qt/qtsql-${QT_PV} )
113 + svg? ( >=dev-qt/qtsvg-${QT_PV} )
114 + testlib? ( >=dev-qt/qttest-${QT_PV} )
115 + webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
116 + webkit? ( dev-qt/qtwebkit:5[printsupport] )
117 + websockets? ( >=dev-qt/qtwebsockets-${QT_PV} )
118 + widgets? ( >=dev-qt/qtwidgets-${QT_PV} )
119 + x11extras? ( >=dev-qt/qtx11extras-${QT_PV} )
120 + xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
121 +"
122 +DEPEND="${RDEPEND}
123 + >=dev-python/sip-4.19.20[${PYTHON_USEDEP}]
124 + dbus? ( virtual/pkgconfig )
125 +"
126 +
127 +S=${WORKDIR}/${MY_P}
128 +
129 +pyqt_use_enable() {
130 + use "$1" || return
131 +
132 + if [[ $# -eq 1 ]]; then
133 + echo --enable=Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}
134 + else
135 + shift
136 + echo ${@/#/--enable=}
137 + fi
138 +}
139 +
140 +src_configure() {
141 + configuration() {
142 + local myconf=(
143 + "${PYTHON}"
144 + "${S}"/configure.py
145 + $(usex debug '--debug --qml-debug --trace' '')
146 + --verbose
147 + --confirm-license
148 + --qmake="$(qt5_get_bindir)"/qmake
149 + --bindir="${EPREFIX}/usr/bin"
150 + --qsci-api
151 + --enable=QtCore
152 + --enable=QtXml
153 + $(pyqt_use_enable bluetooth)
154 + $(pyqt_use_enable dbus QtDBus)
155 + $(usex dbus '' --no-python-dbus)
156 + $(pyqt_use_enable declarative QtQml QtQuick $(usex widgets QtQuickWidgets ''))
157 + $(usex declarative '' --no-qml-plugin)
158 + $(pyqt_use_enable designer)
159 + $(usex designer '' --no-designer-plugin)
160 + $(usex gles2 '--disable-feature=PyQt_Desktop_OpenGL' '')
161 + $(pyqt_use_enable gui)
162 + $(pyqt_use_enable gui $(use gles2 && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
163 + $(pyqt_use_enable help)
164 + $(pyqt_use_enable location)
165 + $(pyqt_use_enable multimedia QtMultimedia $(usex widgets QtMultimediaWidgets ''))
166 + $(pyqt_use_enable network)
167 + $(pyqt_use_enable networkauth QtNetworkAuth)
168 + $(pyqt_use_enable opengl QtOpenGL)
169 + $(pyqt_use_enable positioning)
170 + $(pyqt_use_enable printsupport QtPrintSupport)
171 + $(pyqt_use_enable sensors)
172 + $(pyqt_use_enable serialport QtSerialPort)
173 + $(pyqt_use_enable sql)
174 + $(usex ssl '' '--disable-feature=PyQt_SSL')
175 + $(pyqt_use_enable svg)
176 + $(pyqt_use_enable testlib QtTest)
177 + $(pyqt_use_enable webchannel QtWebChannel)
178 + $(pyqt_use_enable webkit QtWebKit QtWebKitWidgets)
179 + $(pyqt_use_enable websockets QtWebSockets)
180 + $(pyqt_use_enable widgets)
181 + $(pyqt_use_enable x11extras QtX11Extras)
182 + $(pyqt_use_enable xmlpatterns QtXmlPatterns)
183 + )
184 + echo "${myconf[@]}"
185 + "${myconf[@]}" || die
186 +
187 + # Fix parallel install failure
188 + if python_is_python3; then
189 + sed -i -e '/INSTALLS += distinfo/i distinfo.depends = install_subtargets install_pep484_stubs install_qscintilla_api' \
190 + ${PN}.pro || die
191 + else
192 + sed -i -e '/INSTALLS += distinfo/i distinfo.depends = install_subtargets install_qscintilla_api' \
193 + ${PN}.pro || die
194 + fi
195 +
196 + # Run eqmake to respect toolchain and build flags
197 + eqmake5 -recursive ${PN}.pro
198 + }
199 + python_foreach_impl run_in_build_dir configuration
200 +}
201 +
202 +src_compile() {
203 + python_foreach_impl run_in_build_dir default
204 +}
205 +
206 +src_install() {
207 + installation() {
208 + local tmp_root=${D}/${PN}_tmp_root
209 + emake INSTALL_ROOT="${tmp_root}" install
210 +
211 + local bin_dir=${tmp_root}${EPREFIX}/usr/bin
212 + local exe
213 + for exe in pylupdate5 pyrcc5 pyuic5; do
214 + python_doexe "${bin_dir}/${exe}"
215 + rm "${bin_dir}/${exe}" || die
216 + done
217 +
218 + local uic_dir=${tmp_root}$(python_get_sitedir)/${PN}/uic
219 + if python_is_python3; then
220 + rm -r "${uic_dir}"/port_v2 || die
221 + else
222 + rm -r "${uic_dir}"/port_v3 || die
223 + fi
224 +
225 + multibuild_merge_root "${tmp_root}" "${D}"
226 + python_optimize
227 + }
228 + python_foreach_impl run_in_build_dir installation
229 +
230 + einstalldocs
231 +
232 + if use examples; then
233 + dodoc -r examples
234 + fi
235 +}