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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Feb 13 08:52:33 2013 UTC (7 years ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +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-r1.ebuild,v 1.2 2012/12/27 04:20:42 pesa Exp $
4
5 EAPI=5
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 qt4-r2 python toolchain-funcs
13
14 DESCRIPTION="Python bindings for the Qt toolkit"
15 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
16
17 if [[ ${PV} == *_pre* ]]; then
18 MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
19 SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
20 else
21 MY_P="PyQt-x11-gpl-${PV}"
22 SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
23 fi
24
25 LICENSE="|| ( GPL-2 GPL-3 )"
26 SLOT="0"
27 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
28
29 IUSE="X dbus debug declarative doc examples help kde multimedia opengl phonon script scripttools sql svg webkit xmlpatterns"
30 REQUIRED_USE="
31 declarative? ( X )
32 help? ( X )
33 multimedia? ( X )
34 opengl? ( X )
35 phonon? ( X )
36 scripttools? ( X script )
37 sql? ( X )
38 svg? ( X )
39 webkit? ( X )
40 "
41
42 # Minimal supported version of Qt.
43 QT_PV="4.8.0:4"
44
45 RDEPEND="
46 >=dev-python/sip-4.14.2:=
47 >=x11-libs/qt-core-${QT_PV}
48 X? (
49 >=x11-libs/qt-gui-${QT_PV}[dbus?]
50 >=x11-libs/qt-test-${QT_PV}
51 )
52 dbus? (
53 >=dev-python/dbus-python-0.80
54 >=x11-libs/qt-dbus-${QT_PV}
55 )
56 declarative? ( >=x11-libs/qt-declarative-${QT_PV} )
57 help? ( >=x11-libs/qt-assistant-${QT_PV} )
58 multimedia? ( >=x11-libs/qt-multimedia-${QT_PV} )
59 opengl? ( >=x11-libs/qt-opengl-${QT_PV} )
60 phonon? (
61 kde? ( media-libs/phonon )
62 !kde? ( || ( >=x11-libs/qt-phonon-${QT_PV} media-libs/phonon ) )
63 )
64 script? ( >=x11-libs/qt-script-${QT_PV} )
65 sql? ( >=x11-libs/qt-sql-${QT_PV} )
66 svg? ( >=x11-libs/qt-svg-${QT_PV} )
67 webkit? ( >=x11-libs/qt-webkit-${QT_PV} )
68 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_PV} )
69 "
70 DEPEND="${RDEPEND}
71 dbus? ( virtual/pkgconfig )
72 "
73
74 S=${WORKDIR}/${MY_P}
75
76 PYTHON_VERSIONED_EXECUTABLES=("/usr/bin/pyuic4")
77
78 src_prepare() {
79 qt4-r2_src_prepare
80
81 # Support qreal on arm architecture (bug 322349).
82 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
83
84 # Use proper include directory for phonon.
85 sed -i -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 [[ $(python_get_version -l --major) == 3 ]]; then
96 rm -fr pyuic/uic/port_v2
97 else
98 rm -fr pyuic/uic/port_v3
99 fi
100 }
101 python_execute_function -s 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="${EPREFIX}$(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,${BUILDDIR}/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_execute_function -s configuration
180 }
181
182 src_install() {
183 installation() {
184 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
185 emake DESTDIR="${T}/images/${PYTHON_ABI}" INSTALL_ROOT="${T}/images/${PYTHON_ABI}" install
186 }
187 python_execute_function -s installation
188 python_merge_intermediate_installation_images "${T}/images"
189
190 dodoc NEWS THANKS
191
192 if use doc; then
193 dohtml -r doc/html/*
194 fi
195
196 if use examples; then
197 insinto /usr/share/doc/${PF}
198 doins -r examples
199 fi
200 }
201
202 pkg_postinst() {
203 python_mod_optimize PyQt4
204 }
205
206 pkg_postrm() {
207 python_mod_cleanup PyQt4
208 }

  ViewVC Help
Powered by ViewVC 1.1.20