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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Dec 30 18:08:19 2010 UTC (9 years, 3 months ago) by arfrever
Branch: MAIN
Changes since 1.1: +2 -2 lines
Require x11-libs/qt-opengl[-egl] until bug #344513 is fixed.

(Portage version: 2.2.0_alpha10_p22/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.8.1-r1.ebuild,v 1.1 2010/12/30 01:11:19 arfrever 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.11.2
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-sound/phonon ) )
42 kde? ( media-sound/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.6.1-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 QtGui)
102 $(pyqt4_use_enable X QtDesigner)
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); do
127 # Run eqmake4 inside the qpy subdirectories to avoid stripping and many other QA issues.
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/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" -i ${mod}/Makefile || die "Fixing of rpaths failed"
134 done
135
136 # Fix pre-stripping of libpythonplugin.so
137 if use X; then
138 cd "${BUILDDIR}/designer"
139 eqmake4 python.pro
140 fi
141 }
142 python_execute_function -s configuration
143 }
144
145 src_compile() {
146 python_src_compile
147 }
148
149 src_install() {
150 installation() {
151 # INSTALL_ROOT is needed for the QtDesigner module, other Makefiles use DESTDIR.
152 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
153 }
154 python_execute_function -s installation
155
156 dodoc doc/pyqt4ref.txt NEWS THANKS || die "dodoc failed"
157
158 if use doc; then
159 dohtml -r doc/* || die "dohtml failed"
160 fi
161
162 if use examples; then
163 insinto /usr/share/doc/${PF}
164 doins -r examples || die "doins failed"
165 fi
166 }
167
168 pkg_postinst() {
169 python_mod_optimize PyQt4
170 }
171
172 pkg_postrm() {
173 python_mod_cleanup PyQt4
174 }

  ViewVC Help
Powered by ViewVC 1.1.20