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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Mon Feb 20 23:55:07 2012 UTC (8 years ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Add <upstream> tag to metadata. Cleanup old ebuilds and patches.

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

  ViewVC Help
Powered by ViewVC 1.1.20