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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Tue Feb 21 01:06:46 2012 UTC (7 years, 11 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +1 -1 lines
FILE REMOVED
Restrict pypy for older versions too.

(Portage version: 2.2.0_alpha87/cvs/Linux x86_64)

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.7.3.ebuild,v 1.14 2012/02/20 14:24:02 patrick Exp $
4
5 EAPI="2"
6 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="*-jython"
9
10 inherit qt4-r2 python toolchain-funcs
11
12 MY_P="PyQt-x11-gpl-${PV/_pre/-snapshot-}"
13 QTVER="4.6.2" # minimal Qt version this is supposed to work with
14
15 DESCRIPTION="A set of Python bindings for the Qt toolkit"
16 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
17 SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
18
19 SLOT="0"
20 LICENSE="|| ( GPL-2 GPL-3 )"
21 KEYWORDS="alpha amd64 ~arm ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
22 IUSE="X assistant +dbus debug doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
23
24 DEPEND=">=dev-python/sip-4.10
25 >=x11-libs/qt-core-${QTVER}:4
26 >=x11-libs/qt-script-${QTVER}:4
27 >=x11-libs/qt-test-${QTVER}:4
28 X? ( >=x11-libs/qt-gui-${QTVER}:4[dbus?] )
29 assistant? ( >=x11-libs/qt-assistant-${QTVER}:4 )
30 dbus? (
31 >=dev-python/dbus-python-0.80
32 >=x11-libs/qt-dbus-${QTVER}:4
33 )
34 multimedia? ( >=x11-libs/qt-multimedia-${QTVER}:4 )
35 opengl? ( >=x11-libs/qt-opengl-${QTVER}:4 )
36 phonon? (
37 !kde? ( || ( >=x11-libs/qt-phonon-${QTVER}:4 media-libs/phonon ) )
38 kde? ( media-libs/phonon )
39 )
40 sql? ( >=x11-libs/qt-sql-${QTVER}:4 )
41 svg? ( >=x11-libs/qt-svg-${QTVER}:4 )
42 webkit? ( >=x11-libs/qt-webkit-${QTVER}:4 )
43 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QTVER}:4 )"
44 RDEPEND="${DEPEND}"
45 RESTRICT_PYTHON_ABIS="3.2" # doesn't build with python:3.2 (yet), bug 292419
46
47 S=${WORKDIR}/${MY_P}
48
49 PATCHES=(
50 "${FILESDIR}/${PN}-4.6.1-configure-multilib.patch"
51 "${FILESDIR}/${PN}-4.7.2-configure.py.patch"
52 )
53
54 src_prepare() {
55 use prefix || EPREFIX=
56
57 if ! use dbus; then
58 sed -i -e 's,^\([[:blank:]]\+\)check_dbus(),\1pass,' \
59 "${S}"/configure.py || die
60 fi
61
62 # Patch to support qreal for arm architecture
63 # wrt bug #322349
64 use arm && epatch "${FILESDIR}/${P}-qreal_float_support.patch"
65
66 qt4-r2_src_prepare
67
68 # Use proper include dir
69 sed -e "s|/usr/include|${EPREFIX}/usr/include|g" \
70 -i configure.py
71
72 python_copy_sources
73
74 preparation() {
75 if [[ "${PYTHON_ABI:0:1}" == "3" ]]; then
76 rm -fr pyuic/uic/port_v2
77 else
78 rm -fr pyuic/uic/port_v3
79 fi
80 }
81 python_execute_function -s preparation
82 }
83
84 pyqt4_use_enable() {
85 use $1 && echo "--enable=${2:-$1}"
86 }
87
88 src_configure() {
89 use prefix || EPREFIX=
90
91 configuration() {
92 local myconf="$(PYTHON) configure.py
93 --confirm-license
94 --bindir=${EPREFIX}/usr/bin
95 --destdir=${EPREFIX}$(python_get_sitedir)
96 --sipdir=${EPREFIX}/usr/share/sip
97 --qsci-api
98 $(use debug && echo '--debug')
99 --enable=QtCore
100 --enable=QtNetwork
101 --enable=QtScript
102 --enable=QtTest
103 --enable=QtXml
104 $(pyqt4_use_enable X QtGui)
105 $(pyqt4_use_enable X QtDesigner)
106 $(pyqt4_use_enable X QtScriptTools)
107 $(pyqt4_use_enable assistant QtAssistant)
108 $(pyqt4_use_enable assistant QtHelp)
109 $(pyqt4_use_enable multimedia QtMultimedia)
110 $(pyqt4_use_enable opengl QtOpenGL)
111 $(pyqt4_use_enable phonon)
112 $(pyqt4_use_enable sql QtSql)
113 $(pyqt4_use_enable svg QtSvg)
114 $(pyqt4_use_enable webkit QtWebKit)
115 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
116 CC=$(tc-getCC) CXX=$(tc-getCXX)
117 LINK=$(tc-getCXX) LINK_SHLIB=$(tc-getCXX)
118 CFLAGS='${CFLAGS}' CXXFLAGS='${CXXFLAGS}' LFLAGS='${LDFLAGS}'"
119 echo ${myconf}
120 eval ${myconf} || return 1
121
122 for mod in QtCore $(use X && echo 'QtDesigner QtGui'); do
123 # Run eqmake4 inside the qpy subdirs to prevent
124 # stripping and many other QA issues
125 pushd qpy/${mod} > /dev/null || die
126 eqmake4 $(ls w_qpy*.pro)
127 popd > /dev/null || die
128
129 # Fix insecure runpaths
130 sed -i -e "/^LFLAGS/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
131 ${mod}/Makefile || die "failed to fix rpath issues"
132 done
133
134 # Fix pre-stripping of libpythonplugin.so
135 if use X; then
136 cd "${BUILDDIR}"/designer
137 eqmake4 python.pro
138 fi
139 }
140 python_execute_function -s configuration
141 }
142
143 src_compile() {
144 python_src_compile
145 }
146
147 src_install() {
148 installation() {
149 # INSTALL_ROOT is needed for the QtDesigner module,
150 # the other Makefiles use DESTDIR.
151 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
152 }
153 python_execute_function -s installation
154
155 dodoc doc/pyqt4ref.txt NEWS THANKS || die
156
157 if use doc; then
158 dohtml -r doc/* || die
159 fi
160
161 if use examples; then
162 insinto /usr/share/doc/${PF}
163 doins -r examples || die
164 fi
165 }
166
167 pkg_postinst() {
168 python_mod_optimize PyQt4
169 }
170
171 pkg_postrm() {
172 python_mod_cleanup PyQt4
173 }

  ViewVC Help
Powered by ViewVC 1.1.20