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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Sep 1 20:20:00 2010 UTC (9 years, 5 months ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Drop old bogus ebuild. Drop RESTRICT_PYTHON_ABIS from latest ebuild

(Portage version: 2.2_rc72/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20