/[gentoo-x86]/dev-python/PyQt4/PyQt4-4.10.2.ebuild
Gentoo

Contents of /dev-python/PyQt4/PyQt4-4.10.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Mon May 19 18:07:12 2014 UTC (5 years, 9 months ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +1 -1 lines
FILE REMOVED
Drop the old versions that required python-exec:0.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/PyQt4-4.10.2.ebuild,v 1.16 2013/12/23 15:31:02 ago Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
7
8 inherit eutils qt4-r2 python-r1 toolchain-funcs
9
10 DESCRIPTION="Python bindings for the Qt toolkit"
11 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
12
13 if [[ ${PV} == *_pre* ]]; then
14 MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
15 SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
16 else
17 MY_P="PyQt-x11-gpl-${PV}"
18 SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
19 fi
20
21 LICENSE="|| ( GPL-2 GPL-3 )"
22 SLOT="0"
23 KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
24
25 IUSE="X dbus debug declarative doc examples help kde multimedia opengl phonon script scripttools sql svg webkit xmlpatterns"
26 REQUIRED_USE="
27 ${PYTHON_REQUIRED_USE}
28 declarative? ( X )
29 help? ( X )
30 multimedia? ( X )
31 opengl? ( X )
32 phonon? ( X )
33 scripttools? ( X script )
34 sql? ( X )
35 svg? ( X )
36 webkit? ( X )
37 "
38
39 # Minimal supported version of Qt.
40 QT_PV="4.8.0:4"
41
42 RDEPEND="
43 ${PYTHON_DEPS}
44 dev-lang/python-exec:0[${PYTHON_USEDEP}]
45 >=dev-python/sip-4.14.3:=[${PYTHON_USEDEP}]
46 >=dev-qt/qtcore-${QT_PV}
47 X? (
48 >=dev-qt/qtgui-${QT_PV}
49 || ( dev-qt/designer:4 <dev-qt/qtgui-4.8.5:4 )
50 >=dev-qt/qttest-${QT_PV}
51 )
52 dbus? (
53 >=dev-python/dbus-python-0.80[${PYTHON_USEDEP}]
54 >=dev-qt/qtdbus-${QT_PV}
55 )
56 declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
57 help? ( >=dev-qt/qthelp-${QT_PV} )
58 multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
59 opengl? ( >=dev-qt/qtopengl-${QT_PV} )
60 phonon? (
61 kde? ( media-libs/phonon )
62 !kde? ( || ( >=dev-qt/qtphonon-${QT_PV} media-libs/phonon ) )
63 )
64 script? ( >=dev-qt/qtscript-${QT_PV} )
65 sql? ( >=dev-qt/qtsql-${QT_PV} )
66 svg? ( >=dev-qt/qtsvg-${QT_PV} )
67 webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
68 xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
69 "
70 DEPEND="${RDEPEND}
71 dbus? ( virtual/pkgconfig )
72 "
73
74 S=${WORKDIR}/${MY_P}
75
76 src_prepare() {
77 qt4-r2_src_prepare
78
79 # Support qreal on arm architecture (bug 322349).
80 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
81
82 # Allow building against KDE's phonon (bug 433944 and others).
83 sed -i \
84 -e "s:VideoWidget()\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/qt4/QtGui\"]:" \
85 -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
86 configure.py || die
87
88 if ! use dbus; then
89 sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
90 fi
91
92 python_copy_sources
93
94 preparation() {
95 if [[ ${EPYTHON} == python3.* ]]; then
96 rm -fr pyuic/uic/port_v2
97 else
98 rm -fr pyuic/uic/port_v3
99 fi
100 }
101 python_foreach_impl run_in_build_dir preparation
102 }
103
104 pyqt4_use_enable() {
105 use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
106 }
107
108 src_configure() {
109 configuration() {
110 local myconf=(
111 "${PYTHON}" configure.py
112 --confirm-license
113 --bindir="${EPREFIX}/usr/bin"
114 --destdir="$(python_get_sitedir)"
115 --sipdir="${EPREFIX}/usr/share/sip"
116 --assume-shared
117 --no-timestamp
118 --qsci-api
119 $(use debug && echo --debug)
120 --enable=QtCore
121 --enable=QtNetwork
122 --enable=QtXml
123 $(pyqt4_use_enable X QtDesigner) $(use X || echo --no-designer-plugin)
124 $(pyqt4_use_enable X QtGui)
125 $(pyqt4_use_enable X QtTest)
126 $(pyqt4_use_enable dbus QtDBus)
127 $(pyqt4_use_enable declarative)
128 $(pyqt4_use_enable help)
129 $(pyqt4_use_enable multimedia)
130 $(pyqt4_use_enable opengl QtOpenGL)
131 $(pyqt4_use_enable phonon phonon)
132 $(pyqt4_use_enable script)
133 $(pyqt4_use_enable scripttools QtScriptTools)
134 $(pyqt4_use_enable sql)
135 $(pyqt4_use_enable svg)
136 $(pyqt4_use_enable webkit QtWebKit)
137 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
138 AR="$(tc-getAR) cqs"
139 CC="$(tc-getCC)"
140 CFLAGS="${CFLAGS}"
141 CFLAGS_RELEASE=
142 CXX="$(tc-getCXX)"
143 CXXFLAGS="${CXXFLAGS}"
144 CXXFLAGS_RELEASE=
145 LINK="$(tc-getCXX)"
146 LINK_SHLIB="$(tc-getCXX)"
147 LFLAGS="${LDFLAGS}"
148 LFLAGS_RELEASE=
149 RANLIB=
150 STRIP=
151 )
152 echo "${myconf[@]}"
153 "${myconf[@]}" || die
154
155 local mod
156 for mod in QtCore \
157 $(use X && echo QtDesigner QtGui) \
158 $(use dbus && echo QtDBus) \
159 $(use declarative && echo QtDeclarative) \
160 $(use opengl && echo QtOpenGL); do
161 # Run eqmake4 inside the qpy subdirectories to respect
162 # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
163 pushd qpy/${mod} > /dev/null || return
164 eqmake4 $(ls w_qpy*.pro)
165 popd > /dev/null || return
166
167 # Fix insecure runpaths.
168 sed -i -e "/^LFLAGS\s*=/ s:-Wl,-rpath,${BUILD_DIR}/qpy/${mod}::" \
169 ${mod}/Makefile || die "failed to fix rpath for ${mod}"
170 done
171
172 # Avoid stripping of libpythonplugin.so.
173 if use X; then
174 pushd designer > /dev/null || return
175 eqmake4 python.pro
176 popd > /dev/null || return
177 fi
178 }
179 python_parallel_foreach_impl run_in_build_dir configuration
180 }
181
182 src_compile() {
183 python_foreach_impl run_in_build_dir default
184 }
185
186 src_install() {
187 installation() {
188 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
189 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
190 mv "${ED}"/usr/bin/pyuic4{,-${EPYTHON}} || die
191 python_optimize
192 }
193 python_foreach_impl run_in_build_dir installation
194
195 dosym python-exec /usr/bin/pyuic4
196 dodoc NEWS THANKS
197
198 if use doc; then
199 dohtml -r doc/html/*
200 fi
201
202 if use examples; then
203 insinto /usr/share/doc/${PF}
204 doins -r examples
205 fi
206 }

  ViewVC Help
Powered by ViewVC 1.1.20