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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Feb 13 08:52:33 2013 UTC (7 years ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix double prefix; remove old.

(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 17A85C72)

1 # Copyright 1999-2012 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.9.6.ebuild,v 1.1 2012/12/10 11:20:38 pesa Exp $
4
5 EAPI=4
6
7 PYTHON_DEPEND="*"
8 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
9 SUPPORT_PYTHON_ABIS="1"
10 RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
11
12 inherit eutils toolchain-funcs qt4-r2 python
13
14 # Minimal supported version of Qt.
15 QT_VER="4.7.2"
16
17 DESCRIPTION="Python bindings for the Qt toolkit"
18 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
19
20 if [[ ${PV} == *_pre* ]]; then
21 MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
22 SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
23 else
24 MY_P="PyQt-x11-gpl-${PV}"
25 SRC_URI="mirror://sourceforge/pyqt/${PN}/PyQt-${PV}/${MY_P}.tar.gz"
26 fi
27
28 LICENSE="|| ( GPL-2 GPL-3 )"
29 SLOT="0"
30 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
31 IUSE="X assistant dbus debug declarative doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
32
33 REQUIRED_USE="
34 assistant? ( X )
35 declarative? ( X )
36 multimedia? ( X )
37 opengl? ( X )
38 phonon? ( X )
39 sql? ( X )
40 svg? ( X )
41 webkit? ( X )
42 "
43
44 RDEPEND="
45 >=dev-python/sip-4.14.2
46 >=x11-libs/qt-core-${QT_VER}:4
47 >=x11-libs/qt-script-${QT_VER}:4
48 X? (
49 >=x11-libs/qt-gui-${QT_VER}:4[dbus?]
50 >=x11-libs/qt-test-${QT_VER}:4
51 )
52 assistant? ( >=x11-libs/qt-assistant-${QT_VER}:4 )
53 dbus? (
54 >=dev-python/dbus-python-0.80
55 >=x11-libs/qt-dbus-${QT_VER}:4
56 )
57 declarative? ( >=x11-libs/qt-declarative-${QT_VER}:4 )
58 multimedia? ( >=x11-libs/qt-multimedia-${QT_VER}:4 )
59 opengl? (
60 >=x11-libs/qt-opengl-${QT_VER}:4
61 || ( >=x11-libs/qt-opengl-4.8.0:4 <x11-libs/qt-opengl-4.8.0:4[-egl] )
62 )
63 phonon? (
64 !kde? ( || ( >=x11-libs/qt-phonon-${QT_VER}:4 media-libs/phonon ) )
65 kde? ( media-libs/phonon )
66 )
67 sql? ( >=x11-libs/qt-sql-${QT_VER}:4 )
68 svg? ( >=x11-libs/qt-svg-${QT_VER}:4 )
69 webkit? ( >=x11-libs/qt-webkit-${QT_VER}:4 )
70 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_VER}:4 )
71 "
72 DEPEND="${RDEPEND}
73 dbus? ( virtual/pkgconfig )
74 "
75
76 S=${WORKDIR}/${MY_P}
77
78 PYTHON_VERSIONED_EXECUTABLES=("/usr/bin/pyuic4")
79
80 src_prepare() {
81 qt4-r2_src_prepare
82
83 # Support qreal on arm architecture (bug 322349).
84 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
85
86 # Use proper include directory for phonon.
87 sed -i -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
88 configure.py || die
89
90 if ! use dbus; then
91 sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
92 fi
93
94 python_copy_sources
95
96 preparation() {
97 if [[ $(python_get_version -l --major) == 3 ]]; then
98 rm -fr pyuic/uic/port_v2
99 else
100 rm -fr pyuic/uic/port_v3
101 fi
102 }
103 python_execute_function -s preparation
104 }
105
106 pyqt4_use_enable() {
107 use $1 && echo "--enable=${2:-$1}"
108 }
109
110 src_configure() {
111 configuration() {
112 local myconf=(
113 "$(PYTHON)" configure.py
114 --confirm-license
115 --bindir="${EPREFIX}/usr/bin"
116 --destdir="${EPREFIX}$(python_get_sitedir)"
117 --sipdir="${EPREFIX}/usr/share/sip"
118 --assume-shared
119 --no-timestamp
120 --qsci-api
121 $(use debug && echo --debug)
122 --enable=QtCore
123 --enable=QtNetwork
124 --enable=QtScript
125 --enable=QtXml
126 $(pyqt4_use_enable X QtGui)
127 $(pyqt4_use_enable X QtDesigner) $(use X || echo --no-designer-plugin)
128 $(pyqt4_use_enable X QtScriptTools)
129 $(pyqt4_use_enable X QtTest)
130 $(pyqt4_use_enable assistant QtHelp)
131 $(pyqt4_use_enable dbus QtDBus)
132 $(pyqt4_use_enable declarative QtDeclarative)
133 $(pyqt4_use_enable multimedia QtMultimedia)
134 $(pyqt4_use_enable opengl QtOpenGL)
135 $(pyqt4_use_enable phonon)
136 $(pyqt4_use_enable sql QtSql)
137 $(pyqt4_use_enable svg QtSvg)
138 $(pyqt4_use_enable webkit QtWebKit)
139 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
140 AR="$(tc-getAR) cqs"
141 CC="$(tc-getCC)"
142 CFLAGS="${CFLAGS}"
143 CFLAGS_RELEASE=
144 CXX="$(tc-getCXX)"
145 CXXFLAGS="${CXXFLAGS}"
146 CXXFLAGS_RELEASE=
147 LINK="$(tc-getCXX)"
148 LINK_SHLIB="$(tc-getCXX)"
149 LFLAGS="${LDFLAGS}"
150 LFLAGS_RELEASE=
151 RANLIB=
152 STRIP=
153 )
154 echo "${myconf[@]}"
155 "${myconf[@]}" || die
156
157 local mod
158 for mod in QtCore \
159 $(use X && echo QtDesigner QtGui) \
160 $(use dbus && echo QtDBus) \
161 $(use declarative && echo QtDeclarative) \
162 $(use opengl && echo QtOpenGL); do
163 # Run eqmake4 inside the qpy subdirectories to respect
164 # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
165 pushd qpy/${mod} > /dev/null || return
166 eqmake4 $(ls w_qpy*.pro)
167 popd > /dev/null || return
168
169 # Fix insecure runpaths.
170 sed -e "/^LFLAGS[[:space:]]*=/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
171 -i ${mod}/Makefile || die "Failed to fix rpath for ${mod}"
172 done
173
174 # Avoid stripping of libpythonplugin.so.
175 if use X; then
176 pushd designer > /dev/null || return
177 eqmake4 python.pro
178 popd > /dev/null || return
179 fi
180 }
181 python_execute_function -s configuration
182 }
183
184 src_install() {
185 installation() {
186 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
187 emake DESTDIR="${T}/images/${PYTHON_ABI}" INSTALL_ROOT="${T}/images/${PYTHON_ABI}" install
188 }
189 python_execute_function -s installation
190 python_merge_intermediate_installation_images "${T}/images"
191
192 dodoc NEWS THANKS
193
194 if use doc; then
195 dohtml -r doc/html/*
196 fi
197
198 if use examples; then
199 insinto /usr/share/doc/${PF}
200 doins -r examples
201 fi
202 }
203
204 pkg_postinst() {
205 python_mod_optimize PyQt4
206
207 ewarn "When updating dev-python/PyQt4, you usually need to rebuild packages that depend on it,"
208 ewarn "such as dev-python/qscintilla-python and kde-base/pykde4. If you have app-portage/gentoolkit"
209 ewarn "installed, you can find these packages with \`equery d dev-python/PyQt4\`."
210 }
211
212 pkg_postrm() {
213 python_mod_cleanup PyQt4
214 }

  ViewVC Help
Powered by ViewVC 1.1.20