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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (show annotations) (download)
Mon Jul 9 13:25:50 2012 UTC (7 years, 7 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.0_alpha116/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.1.ebuild,v 1.21 2012/06/14 07:22:35 yngwin Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="*"
7 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
8 SUPPORT_PYTHON_ABIS="1"
9 RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
10
11 inherit eutils 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 ~amd64-linux ~x86-linux"
25 IUSE="X assistant +dbus debug doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
26
27 DEPEND="<dev-python/sip-4.13
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 multimedia? ( >=x11-libs/qt-multimedia-${QT_VER}:4 )
38 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 ) )
39 phonon? (
40 !kde? ( || ( >=x11-libs/qt-phonon-${QT_VER}:4 media-libs/phonon ) )
41 kde? ( media-libs/phonon )
42 )
43 sql? ( >=x11-libs/qt-sql-${QT_VER}:4 )
44 svg? ( >=x11-libs/qt-svg-${QT_VER}:4 )
45 webkit? ( >=x11-libs/qt-webkit-${QT_VER}:4 )
46 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_VER}:4 )"
47 RDEPEND="${DEPEND}"
48
49 S=${WORKDIR}/${MY_P}
50
51 PATCHES=(
52 "${FILESDIR}/${PN}-4.6.1-configure-multilib.patch"
53 "${FILESDIR}/${PN}-4.7.2-configure.py.patch"
54 )
55
56 src_prepare() {
57 if ! use dbus; then
58 sed -e "s/^\([[:blank:]]\+\)check_dbus()/\1pass/" -i configure.py || die "sed configure.py failed"
59 fi
60
61 # Support qreal for arm architecture (bug #322349).
62 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
63
64 qt4-r2_src_prepare
65
66 # Use proper include directory.
67 sed -e "s:/usr/include:${EPREFIX}/usr/include:g" -i configure.py || die "sed configure.py failed"
68
69 python_copy_sources
70
71 preparation() {
72 if [[ "$(python_get_version --major)" == "3" ]]; then
73 rm -fr pyuic/uic/port_v2
74 else
75 rm -fr pyuic/uic/port_v3
76 fi
77 }
78 python_execute_function -s preparation
79 }
80
81 pyqt4_use_enable() {
82 use $1 && echo "--enable=${2:-$1}"
83 }
84
85 src_configure() {
86 configuration() {
87 local myconf=("$(PYTHON)"
88 configure.py
89 --confirm-license
90 --bindir="${EPREFIX}/usr/bin"
91 --destdir="${EPREFIX}$(python_get_sitedir)"
92 --sipdir="${EPREFIX}/usr/share/sip"
93 --qsci-api
94 $(use debug && echo --debug)
95 --enable=QtCore
96 --enable=QtNetwork
97 --enable=QtScript
98 --enable=QtTest
99 --enable=QtXml
100 $(pyqt4_use_enable X QtGui)
101 $(pyqt4_use_enable X QtDesigner)
102 $(pyqt4_use_enable X QtScriptTools)
103 # QtAssistant module is not available with Qt >=4.7.0.
104 $(pyqt4_use_enable assistant QtAssistant)
105 $(pyqt4_use_enable assistant QtHelp)
106 $(pyqt4_use_enable multimedia QtMultimedia)
107 $(pyqt4_use_enable opengl QtOpenGL)
108 $(pyqt4_use_enable phonon)
109 $(pyqt4_use_enable sql QtSql)
110 $(pyqt4_use_enable svg QtSvg)
111 $(pyqt4_use_enable webkit QtWebKit)
112 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
113 CC="$(tc-getCC)"
114 CXX="$(tc-getCXX)"
115 LINK="$(tc-getCXX)"
116 LINK_SHLIB="$(tc-getCXX)"
117 CFLAGS="${CFLAGS}"
118 CXXFLAGS="${CXXFLAGS}"
119 LFLAGS="${LDFLAGS}")
120 echo "${myconf[@]}"
121 "${myconf[@]}" || return 1
122
123 local mod
124 for mod in QtCore $(use X && echo QtDesigner QtGui); do
125 # Run eqmake4 inside the qpy subdirectories to avoid stripping and many other QA issues.
126 pushd qpy/${mod} > /dev/null || return 1
127 eqmake4 $(ls w_qpy*.pro)
128 popd > /dev/null || return 1
129
130 # Fix insecure runpaths.
131 sed -e "/^LFLAGS/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" -i ${mod}/Makefile || die "Fixing of rpaths failed"
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, 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 "dodoc failed"
155
156 if use doc; then
157 dohtml -r doc/* || die "dohtml failed"
158 fi
159
160 if use examples; then
161 insinto /usr/share/doc/${PF}
162 doins -r examples || die "doins failed"
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