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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Sun Oct 28 15:59:18 2012 UTC (7 years, 3 months ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key B4AFF2C2)

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.4.ebuild,v 1.13 2012/05/21 19:34:29 floppym 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 declarative doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
26
27 DEPEND="=dev-python/sip-4.12*
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.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
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
68
69 python_copy_sources
70
71 preparation() {
72 if [[ $(python_get_version -l --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 QtDesigner)
101 $(pyqt4_use_enable X QtGui)
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 declarative QtDeclarative)
107 $(pyqt4_use_enable multimedia QtMultimedia)
108 $(pyqt4_use_enable opengl QtOpenGL)
109 $(pyqt4_use_enable phonon)
110 $(pyqt4_use_enable sql QtSql)
111 $(pyqt4_use_enable svg QtSvg)
112 $(pyqt4_use_enable webkit QtWebKit)
113 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
114 CC="$(tc-getCC)"
115 CXX="$(tc-getCXX)"
116 LINK="$(tc-getCXX)"
117 LINK_SHLIB="$(tc-getCXX)"
118 CFLAGS="${CFLAGS}"
119 CXXFLAGS="${CXXFLAGS}"
120 LFLAGS="${LDFLAGS}")
121 echo "${myconf[@]}"
122 "${myconf[@]}" || return 1
123
124 local mod
125 for mod in QtCore \
126 $(use X && echo QtDesigner QtGui) \
127 $(use declarative && echo QtDeclarative) \
128 $(use opengl && echo QtOpenGL); do
129 # Run eqmake4 inside the qpy subdirectories to respect
130 # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
131 pushd qpy/${mod} > /dev/null || return 1
132 eqmake4 $(ls w_qpy*.pro)
133 popd > /dev/null || return 1
134
135 # Fix insecure runpaths.
136 sed -e "/^LFLAGS[[:space:]]*=/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
137 -i ${mod}/Makefile || die "Failed to fix runpath for ${mod}"
138 done
139
140 # Avoid stripping of libpythonplugin.so.
141 if use X; then
142 pushd designer > /dev/null || return 1
143 eqmake4 python.pro
144 popd > /dev/null || return 1
145 fi
146 }
147 python_execute_function -s configuration
148 }
149
150 src_compile() {
151 python_src_compile
152 }
153
154 src_install() {
155 installation() {
156 # INSTALL_ROOT is needed for the QtDesigner module, other Makefiles use DESTDIR.
157 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
158 }
159 python_execute_function -s installation
160
161 dodoc NEWS THANKS || die "dodoc failed"
162
163 if use doc; then
164 dohtml -r doc/html/* || die "dohtml failed"
165 fi
166
167 if use examples; then
168 insinto /usr/share/doc/${PF}
169 doins -r examples || die "doins failed"
170 fi
171 }
172
173 pkg_postinst() {
174 python_mod_optimize PyQt4
175 }
176
177 pkg_postrm() {
178 python_mod_cleanup PyQt4
179 }

  ViewVC Help
Powered by ViewVC 1.1.20