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/PyQt4/
Date: Sun, 10 Jul 2016 16:01:17
Message-Id: 1468166334.0569b8570eb3acd5388438ca392b4b820dfd7f70.pesa@gentoo
1 commit: 0569b8570eb3acd5388438ca392b4b820dfd7f70
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 10 15:05:02 2016 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 10 15:58:54 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0569b857
7
8 dev-python/PyQt4: introduce USE=compat to install deprecated pyqtconfig
9
10 A few PyQt4 revdeps still require the deprecated pyqtconfig module at
11 build time. USE=compat re-enables the installation of pyqtconfig, so that
12 those packages continue to build against newer versions of PyQt4.
13
14 Gentoo-Bug: 526524
15 Gentoo-Bug: 527572
16 Gentoo-Bug: 536948
17
18 Package-Manager: portage-2.3.0
19
20 ...pre1606101416.ebuild => PyQt4-4.11.4-r1.ebuild} | 74 ++++++++++++++++------
21 ...6.ebuild => PyQt4-4.12_pre1606101416-r1.ebuild} | 54 +++++++++++++---
22 dev-python/PyQt4/metadata.xml | 1 +
23 3 files changed, 100 insertions(+), 29 deletions(-)
24
25 diff --git a/dev-python/PyQt4/PyQt4-4.12_pre1606101416.ebuild b/dev-python/PyQt4/PyQt4-4.11.4-r1.ebuild
26 similarity index 71%
27 copy from dev-python/PyQt4/PyQt4-4.12_pre1606101416.ebuild
28 copy to dev-python/PyQt4/PyQt4-4.11.4-r1.ebuild
29 index 929d3d1..da8bfd5 100644
30 --- a/dev-python/PyQt4/PyQt4-4.12_pre1606101416.ebuild
31 +++ b/dev-python/PyQt4/PyQt4-4.11.4-r1.ebuild
32 @@ -2,16 +2,16 @@
33 # Distributed under the terms of the GNU General Public License v2
34 # $Id$
35
36 -EAPI=6
37 +EAPI=5
38 PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
39
40 -inherit multibuild python-r1 qmake-utils
41 +inherit eutils multibuild python-r1 qmake-utils toolchain-funcs
42
43 DESCRIPTION="Python bindings for the Qt framework"
44 HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/intro
45 https://pypi.python.org/pypi/PyQt4"
46
47 -MY_P=${PN}_gpl_x11-${PV/_pre/.dev}
48 +MY_P=PyQt-x11-gpl-${PV/_pre/.dev}
49 if [[ ${PV} == *_pre* ]]; then
50 SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
51 else
52 @@ -22,7 +22,7 @@ LICENSE="GPL-3"
53 SLOT="0"
54 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
55
56 -IUSE="X dbus debug declarative designer doc examples help kde multimedia
57 +IUSE="X compat dbus debug declarative designer doc examples help kde multimedia
58 opengl phonon script scripttools sql svg testlib webkit xmlpatterns"
59 REQUIRED_USE="
60 ${PYTHON_REQUIRED_USE}
61 @@ -35,7 +35,7 @@ QT_PV="4.8.5:4"
62
63 RDEPEND="
64 ${PYTHON_DEPS}
65 - >=dev-python/sip-4.18:=[${PYTHON_USEDEP}]
66 + >=dev-python/sip-4.16.6:=[${PYTHON_USEDEP}]
67 >=dev-qt/qtcore-${QT_PV}
68 X? ( >=dev-qt/qtgui-${QT_PV} )
69 dbus? (
70 @@ -65,17 +65,17 @@ DEPEND="${RDEPEND}
71
72 S=${WORKDIR}/${MY_P}
73
74 -DOCS=( "${S}"/{ChangeLog,NEWS,THANKS} )
75 -PATCHES=(
76 - # Allow building against KDE's phonon (bug 525354)
77 - "${FILESDIR}/${PN}-4.11.2-phonon.patch"
78 -)
79 -
80 src_prepare() {
81 - # Support qreal on arm architecture (bug 322349)
82 - use arm && PATCHES+=("${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch")
83 + # Support qreal on arm architecture (bug 322349).
84 + use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
85 +
86 + # Allow building against KDE's phonon (bug 525354).
87 + epatch "${FILESDIR}/${PN}-4.11.2-phonon.patch"
88 +}
89
90 - default
91 +pyqt_run() {
92 + echo "$@"
93 + "${PYTHON}" "$@"
94 }
95
96 pyqt_use_enable() {
97 @@ -87,22 +87,18 @@ pyqt_use_enable() {
98 src_configure() {
99 configuration() {
100 local myconf=(
101 - "${PYTHON}"
102 - "${S}"/configure-ng.py
103 $(usex debug '--debug --trace' '')
104 --verbose
105 --confirm-license
106 --qmake="$(qt4_get_bindir)"/qmake
107 --bindir="${EPREFIX}/usr/bin"
108 --destdir="$(python_get_sitedir)"
109 - --sip-incdir="$(python_get_includedir)"
110 --qsci-api
111 --enable=QtCore
112 --enable=QtNetwork
113 --enable=QtXml
114 $(pyqt_use_enable X QtGui)
115 $(pyqt_use_enable dbus QtDBus)
116 - $(usex dbus '' --no-python-dbus)
117 $(pyqt_use_enable declarative)
118 $(pyqt_use_enable designer)
119 $(usex designer '' --no-designer-plugin)
120 @@ -118,8 +114,37 @@ src_configure() {
121 $(pyqt_use_enable webkit QtWebKit)
122 $(pyqt_use_enable xmlpatterns QtXmlPatterns)
123 )
124 - echo "${myconf[@]}"
125 - "${myconf[@]}" || die
126 +
127 + if use compat; then
128 + local compat_build_dir=${BUILD_DIR%/}-compat
129 + cp -Rp "${S}" "${compat_build_dir}" || die
130 + pushd "${compat_build_dir}" >/dev/null || die
131 +
132 + local mycompatconf=(
133 + "${myconf[@]}"
134 + AR="$(tc-getAR) cqs"
135 + CC="$(tc-getCC)"
136 + CFLAGS="${CFLAGS}"
137 + CFLAGS_RELEASE=
138 + CXX="$(tc-getCXX)"
139 + CXXFLAGS="${CXXFLAGS}"
140 + CXXFLAGS_RELEASE=
141 + LINK="$(tc-getCXX)"
142 + LINK_SHLIB="$(tc-getCXX)"
143 + LFLAGS="${LDFLAGS}"
144 + LFLAGS_RELEASE=
145 + RANLIB=
146 + STRIP=
147 + )
148 + pyqt_run configure.py "${mycompatconf[@]}" || die
149 +
150 + popd >/dev/null || die
151 + fi
152 +
153 + myconf+=(
154 + $(usex dbus '' --no-python-dbus)
155 + )
156 + pyqt_run "${S}"/configure-ng.py "${myconf[@]}" || die
157
158 eqmake4 -recursive ${PN}.pro
159 }
160 @@ -146,11 +171,18 @@ src_install() {
161 rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic4 || die
162
163 multibuild_merge_root "${tmp_root}" "${D}"
164 +
165 + if use compat; then
166 + local compat_build_dir=${BUILD_DIR%/}-compat
167 + python_moduleinto ${PN}
168 + python_domodule "${compat_build_dir}"/pyqtconfig.py
169 + fi
170 +
171 python_optimize
172 }
173 python_foreach_impl run_in_build_dir installation
174
175 - einstalldocs
176 + dodoc ChangeLog NEWS THANKS
177 use doc && dodoc -r doc/html
178
179 if use examples; then
180
181 diff --git a/dev-python/PyQt4/PyQt4-4.12_pre1606101416.ebuild b/dev-python/PyQt4/PyQt4-4.12_pre1606101416-r1.ebuild
182 similarity index 79%
183 rename from dev-python/PyQt4/PyQt4-4.12_pre1606101416.ebuild
184 rename to dev-python/PyQt4/PyQt4-4.12_pre1606101416-r1.ebuild
185 index 929d3d1..aa0be01 100644
186 --- a/dev-python/PyQt4/PyQt4-4.12_pre1606101416.ebuild
187 +++ b/dev-python/PyQt4/PyQt4-4.12_pre1606101416-r1.ebuild
188 @@ -5,7 +5,7 @@
189 EAPI=6
190 PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
191
192 -inherit multibuild python-r1 qmake-utils
193 +inherit multibuild python-r1 qmake-utils toolchain-funcs
194
195 DESCRIPTION="Python bindings for the Qt framework"
196 HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/intro
197 @@ -22,7 +22,7 @@ LICENSE="GPL-3"
198 SLOT="0"
199 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
200
201 -IUSE="X dbus debug declarative designer doc examples help kde multimedia
202 +IUSE="X compat dbus debug declarative designer doc examples help kde multimedia
203 opengl phonon script scripttools sql svg testlib webkit xmlpatterns"
204 REQUIRED_USE="
205 ${PYTHON_REQUIRED_USE}
206 @@ -78,6 +78,11 @@ src_prepare() {
207 default
208 }
209
210 +pyqt_run() {
211 + echo "$@"
212 + "${PYTHON}" "$@"
213 +}
214 +
215 pyqt_use_enable() {
216 use "$1" || return
217
218 @@ -87,22 +92,18 @@ pyqt_use_enable() {
219 src_configure() {
220 configuration() {
221 local myconf=(
222 - "${PYTHON}"
223 - "${S}"/configure-ng.py
224 $(usex debug '--debug --trace' '')
225 --verbose
226 --confirm-license
227 --qmake="$(qt4_get_bindir)"/qmake
228 --bindir="${EPREFIX}/usr/bin"
229 --destdir="$(python_get_sitedir)"
230 - --sip-incdir="$(python_get_includedir)"
231 --qsci-api
232 --enable=QtCore
233 --enable=QtNetwork
234 --enable=QtXml
235 $(pyqt_use_enable X QtGui)
236 $(pyqt_use_enable dbus QtDBus)
237 - $(usex dbus '' --no-python-dbus)
238 $(pyqt_use_enable declarative)
239 $(pyqt_use_enable designer)
240 $(usex designer '' --no-designer-plugin)
241 @@ -118,8 +119,38 @@ src_configure() {
242 $(pyqt_use_enable webkit QtWebKit)
243 $(pyqt_use_enable xmlpatterns QtXmlPatterns)
244 )
245 - echo "${myconf[@]}"
246 - "${myconf[@]}" || die
247 +
248 + if use compat; then
249 + local compat_build_dir=${BUILD_DIR%/}-compat
250 + cp -Rp "${S}" "${compat_build_dir}" || die
251 + pushd "${compat_build_dir}" >/dev/null || die
252 +
253 + local mycompatconf=(
254 + "${myconf[@]}"
255 + AR="$(tc-getAR) cqs"
256 + CC="$(tc-getCC)"
257 + CFLAGS="${CFLAGS}"
258 + CFLAGS_RELEASE=
259 + CXX="$(tc-getCXX)"
260 + CXXFLAGS="${CXXFLAGS}"
261 + CXXFLAGS_RELEASE=
262 + LINK="$(tc-getCXX)"
263 + LINK_SHLIB="$(tc-getCXX)"
264 + LFLAGS="${LDFLAGS}"
265 + LFLAGS_RELEASE=
266 + RANLIB=
267 + STRIP=
268 + )
269 + pyqt_run configure.py "${mycompatconf[@]}" || die
270 +
271 + popd >/dev/null || die
272 + fi
273 +
274 + myconf+=(
275 + --sip-incdir="$(python_get_includedir)"
276 + $(usex dbus '' --no-python-dbus)
277 + )
278 + pyqt_run "${S}"/configure-ng.py "${myconf[@]}" || die
279
280 eqmake4 -recursive ${PN}.pro
281 }
282 @@ -146,6 +177,13 @@ src_install() {
283 rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic4 || die
284
285 multibuild_merge_root "${tmp_root}" "${D}"
286 +
287 + if use compat; then
288 + local compat_build_dir=${BUILD_DIR%/}-compat
289 + python_moduleinto ${PN}
290 + python_domodule "${compat_build_dir}"/pyqtconfig.py
291 + fi
292 +
293 python_optimize
294 }
295 python_foreach_impl run_in_build_dir installation
296
297 diff --git a/dev-python/PyQt4/metadata.xml b/dev-python/PyQt4/metadata.xml
298 index 1c9b581..9fe84c5 100644
299 --- a/dev-python/PyQt4/metadata.xml
300 +++ b/dev-python/PyQt4/metadata.xml
301 @@ -7,6 +7,7 @@
302 </maintainer>
303 <use>
304 <flag name="X">Build bindings for the QtGui module</flag>
305 + <flag name="compat">Install the deprecated pyqtconfig module for backward compatibility</flag>
306 <flag name="dbus">Build bindings for the QtDBus module</flag>
307 <flag name="declarative">Build bindings for the QtDeclarative module</flag>
308 <flag name="designer">Build bindings for the QtDesigner module and enable the designer plugin</flag>