Gentoo Archives: gentoo-commits

From: "Michael Palimaka (kensington)" <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/PyQt4: PyQt4-4.9.6-r2.ebuild ChangeLog
Date: Tue, 29 Jan 2013 18:44:24
Message-Id: 20130129184420.003A92171D@flycatcher.gentoo.org
1 kensington 13/01/29 18:44:19
2
3 Modified: ChangeLog
4 Added: PyQt4-4.9.6-r2.ebuild
5 Log:
6 Migrate to the new python eclass.
7
8 (Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key 675D0D2C)
9
10 Revision Changes Path
11 1.207 dev-python/PyQt4/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/PyQt4/ChangeLog?rev=1.207&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/PyQt4/ChangeLog?rev=1.207&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/PyQt4/ChangeLog?r1=1.206&r2=1.207
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-python/PyQt4/ChangeLog,v
20 retrieving revision 1.206
21 retrieving revision 1.207
22 diff -u -r1.206 -r1.207
23 --- ChangeLog 27 Dec 2012 04:20:42 -0000 1.206
24 +++ ChangeLog 29 Jan 2013 18:44:19 -0000 1.207
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-python/PyQt4
27 -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/ChangeLog,v 1.206 2012/12/27 04:20:42 pesa Exp $
29 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/ChangeLog,v 1.207 2013/01/29 18:44:19 kensington Exp $
31 +
32 +*PyQt4-4.9.6-r2 (29 Jan 2013)
33 +
34 + 29 Jan 2013; Michael Palimaka <kensington@g.o> +PyQt4-4.9.6-r2.ebuild:
35 + Migrate to the new python eclass.
36
37 27 Dec 2012; Davide Pesavento <pesa@g.o> PyQt4-4.9.6-r1.ebuild:
38 Improve pyqt4_use_enable() as suggested by Arfrever.
39
40
41
42 1.1 dev-python/PyQt4/PyQt4-4.9.6-r2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/PyQt4/PyQt4-4.9.6-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/PyQt4/PyQt4-4.9.6-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: PyQt4-4.9.6-r2.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/PyQt4-4.9.6-r2.ebuild,v 1.1 2013/01/29 18:44:19 kensington Exp $
52
53 EAPI=5
54 PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2} )
55
56 inherit eutils qt4-r2 python-r1 toolchain-funcs
57
58 DESCRIPTION="Python bindings for the Qt toolkit"
59 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
60
61 if [[ ${PV} == *_pre* ]]; then
62 MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
63 SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
64 else
65 MY_P="PyQt-x11-gpl-${PV}"
66 SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
67 fi
68
69 LICENSE="|| ( GPL-2 GPL-3 )"
70 SLOT="0"
71 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
72
73 IUSE="X dbus debug declarative doc examples help kde multimedia opengl phonon script scripttools sql svg webkit xmlpatterns"
74 REQUIRED_USE="
75 declarative? ( X )
76 help? ( X )
77 multimedia? ( X )
78 opengl? ( X )
79 phonon? ( X )
80 scripttools? ( X script )
81 sql? ( X )
82 svg? ( X )
83 webkit? ( X )
84 "
85
86 # Minimal supported version of Qt.
87 QT_PV="4.8.0:4"
88
89 RDEPEND="
90 ${PYTHON_DEPS}
91 >=dev-python/sip-4.14.2:=[${PYTHON_USEDEP}]
92 >=x11-libs/qt-core-${QT_PV}
93 X? (
94 >=x11-libs/qt-gui-${QT_PV}[dbus?]
95 >=x11-libs/qt-test-${QT_PV}
96 )
97 dbus? (
98 >=dev-python/dbus-python-0.80
99 >=x11-libs/qt-dbus-${QT_PV}
100 )
101 declarative? ( >=x11-libs/qt-declarative-${QT_PV} )
102 help? ( >=x11-libs/qt-assistant-${QT_PV} )
103 multimedia? ( >=x11-libs/qt-multimedia-${QT_PV} )
104 opengl? ( >=x11-libs/qt-opengl-${QT_PV} )
105 phonon? (
106 kde? ( media-libs/phonon )
107 !kde? ( || ( >=x11-libs/qt-phonon-${QT_PV} media-libs/phonon ) )
108 )
109 script? ( >=x11-libs/qt-script-${QT_PV} )
110 sql? ( >=x11-libs/qt-sql-${QT_PV} )
111 svg? ( >=x11-libs/qt-svg-${QT_PV} )
112 webkit? ( >=x11-libs/qt-webkit-${QT_PV} )
113 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_PV} )
114 "
115 DEPEND="${RDEPEND}
116 dbus? ( virtual/pkgconfig )
117 "
118
119 S=${WORKDIR}/${MY_P}
120
121 src_prepare() {
122 qt4-r2_src_prepare
123
124 # Support qreal on arm architecture (bug 322349).
125 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
126
127 # Use proper include directory for phonon.
128 sed -i -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
129 configure.py || die
130
131 if ! use dbus; then
132 sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
133 fi
134
135 python_copy_sources
136
137 preparation() {
138 pushd "${BUILD_DIR}" > /dev/null
139 if [[ ${EPYTHON} == python3.* ]]; then
140 rm -fr pyuic/uic/port_v2
141 else
142 rm -fr pyuic/uic/port_v3
143 fi
144 popd > /dev/null
145 }
146 python_foreach_impl preparation
147 }
148
149 pyqt4_use_enable() {
150 use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
151 }
152
153 src_configure() {
154 configuration() {
155 pushd "${BUILD_DIR}" > /dev/null
156 local myconf=(
157 "${PYTHON}" configure.py
158 --confirm-license
159 --bindir="${EPREFIX}/usr/bin"
160 --destdir="${EPREFIX}$(python_get_sitedir)"
161 --sipdir="${EPREFIX}/usr/share/sip"
162 --assume-shared
163 --no-timestamp
164 --qsci-api
165 $(use debug && echo --debug)
166 --enable=QtCore
167 --enable=QtNetwork
168 --enable=QtXml
169 $(pyqt4_use_enable X QtDesigner) $(use X || echo --no-designer-plugin)
170 $(pyqt4_use_enable X QtGui)
171 $(pyqt4_use_enable X QtTest)
172 $(pyqt4_use_enable dbus QtDBus)
173 $(pyqt4_use_enable declarative)
174 $(pyqt4_use_enable help)
175 $(pyqt4_use_enable multimedia)
176 $(pyqt4_use_enable opengl QtOpenGL)
177 $(pyqt4_use_enable phonon phonon)
178 $(pyqt4_use_enable script)
179 $(pyqt4_use_enable scripttools QtScriptTools)
180 $(pyqt4_use_enable sql)
181 $(pyqt4_use_enable svg)
182 $(pyqt4_use_enable webkit QtWebKit)
183 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
184 AR="$(tc-getAR) cqs"
185 CC="$(tc-getCC)"
186 CFLAGS="${CFLAGS}"
187 CFLAGS_RELEASE=
188 CXX="$(tc-getCXX)"
189 CXXFLAGS="${CXXFLAGS}"
190 CXXFLAGS_RELEASE=
191 LINK="$(tc-getCXX)"
192 LINK_SHLIB="$(tc-getCXX)"
193 LFLAGS="${LDFLAGS}"
194 LFLAGS_RELEASE=
195 RANLIB=
196 STRIP=
197 )
198 echo "${myconf[@]}"
199 "${myconf[@]}" || die
200
201 local mod
202 for mod in QtCore \
203 $(use X && echo QtDesigner QtGui) \
204 $(use dbus && echo QtDBus) \
205 $(use declarative && echo QtDeclarative) \
206 $(use opengl && echo QtOpenGL); do
207 # Run eqmake4 inside the qpy subdirectories to respect
208 # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
209 pushd qpy/${mod} > /dev/null || return
210 eqmake4 $(ls w_qpy*.pro)
211 popd > /dev/null || return
212
213 # Fix insecure runpaths.
214 sed -i -e "/^LFLAGS\s*=/ s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
215 ${mod}/Makefile || die "Failed to fix rpath for ${mod}"
216 done
217
218 # Avoid stripping of libpythonplugin.so.
219 if use X; then
220 pushd designer > /dev/null || return
221 eqmake4 python.pro
222 popd > /dev/null || return
223 fi
224
225 popd > /dev/null
226 }
227 python_foreach_impl configuration
228 }
229
230 src_compile() {
231 compilation() {
232 pushd "${BUILD_DIR}" > /dev/null
233 default
234 popd > /dev/null
235 }
236 python_foreach_impl compilation
237 }
238
239 src_install() {
240 installation() {
241 pushd "${BUILD_DIR}" > /dev/null
242 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
243 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
244 popd > /dev/null
245
246 mv "${ED}"/usr/bin/pyuic4{,-${EPYTHON}} || die
247 python_optimize
248 }
249 python_foreach_impl installation
250
251 dosym python-exec /usr/bin/pyuic4
252 dodoc NEWS THANKS
253
254 if use doc; then
255 dohtml -r doc/html/*
256 fi
257
258 if use examples; then
259 insinto /usr/share/doc/${PF}
260 doins -r examples
261 fi
262 }