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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Sun Oct 28 15:59:18 2012 UTC (2 years ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +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.9.1.ebuild,v 1.14 2012/07/09 17:18:24 armin76 Exp $
4
5 EAPI=4
6
7 PYTHON_DEPEND="*"
8 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
9 SUPPORT_PYTHON_ABIS="1"
10 RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
11
12 inherit eutils toolchain-funcs qt4-r2 python
13
14 # Minimal supported version of Qt.
15 QT_VER="4.7.2"
16
17 DESCRIPTION="Python bindings for the Qt toolkit"
18 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
19
20 if [[ ${PV} == *_pre* ]]; then
21 MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
22 SRC_URI="http://www.gentoo-el.org/~hwoarang/distfiles/${MY_P}.tar.gz"
23 else
24 MY_P="PyQt-x11-gpl-${PV}"
25 SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
26 fi
27
28 LICENSE="|| ( GPL-2 GPL-3 )"
29 SLOT="0"
30 KEYWORDS="alpha amd64 ~arm ia64 ~ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux"
31 IUSE="X assistant dbus debug declarative doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
32
33 REQUIRED_USE="
34 assistant? ( X )
35 declarative? ( X )
36 multimedia? ( X )
37 opengl? ( X )
38 phonon? ( X )
39 sql? ( X )
40 svg? ( X )
41 webkit? ( X )
42 "
43
44 RDEPEND="
45 >=dev-python/sip-4.13.1
46 >=x11-libs/qt-core-${QT_VER}:4
47 >=x11-libs/qt-script-${QT_VER}:4
48 X? (
49 >=x11-libs/qt-gui-${QT_VER}:4[dbus?]
50 >=x11-libs/qt-test-${QT_VER}:4
51 )
52 assistant? ( >=x11-libs/qt-assistant-${QT_VER}:4 )
53 dbus? (
54 >=dev-python/dbus-python-0.80
55 >=x11-libs/qt-dbus-${QT_VER}:4
56 )
57 declarative? ( >=x11-libs/qt-declarative-${QT_VER}:4 )
58 multimedia? ( >=x11-libs/qt-multimedia-${QT_VER}:4 )
59 opengl? (
60 >=x11-libs/qt-opengl-${QT_VER}:4
61 || ( >=x11-libs/qt-opengl-4.8.0:4 <x11-libs/qt-opengl-4.8.0:4[-egl] )
62 )
63 phonon? (
64 !kde? ( || ( >=x11-libs/qt-phonon-${QT_VER}:4 media-libs/phonon ) )
65 kde? ( media-libs/phonon )
66 )
67 sql? ( >=x11-libs/qt-sql-${QT_VER}:4 )
68 svg? ( >=x11-libs/qt-svg-${QT_VER}:4 )
69 webkit? ( >=x11-libs/qt-webkit-${QT_VER}:4 )
70 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_VER}:4 )
71 "
72 DEPEND="${RDEPEND}
73 dbus? ( virtual/pkgconfig )
74 "
75
76 S=${WORKDIR}/${MY_P}
77
78 PATCHES=(
79 "${FILESDIR}/${PN}-4.7.2-configure.py.patch"
80 )
81
82 PYTHON_VERSIONED_EXECUTABLES=("/usr/bin/pyuic4")
83
84 src_prepare() {
85 if ! use dbus; then
86 sed -e 's/^\([[:blank:]]\+\)check_dbus()/\1pass/' -i configure.py || die
87 fi
88
89 # Support qreal for arm architecture (bug #322349).
90 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
91
92 qt4-r2_src_prepare
93
94 # Use proper include directory.
95 sed -e "s:/usr/include:${EPREFIX}/usr/include:g" -i configure.py || die
96
97 python_copy_sources
98
99 preparation() {
100 if [[ $(python_get_version -l --major) == 3 ]]; then
101 rm -fr pyuic/uic/port_v2
102 else
103 rm -fr pyuic/uic/port_v3
104 fi
105 }
106 python_execute_function -s preparation
107 }
108
109 pyqt4_use_enable() {
110 use $1 && echo "--enable=${2:-$1}"
111 }
112
113 src_configure() {
114 configuration() {
115 local myconf=("$(PYTHON)"
116 configure.py
117 --confirm-license
118 --bindir="${EPREFIX}/usr/bin"
119 --destdir="${EPREFIX}$(python_get_sitedir)"
120 --sipdir="${EPREFIX}/usr/share/sip"
121 --assume-shared
122 --no-timestamp
123 --qsci-api
124 $(use debug && echo --debug)
125 --enable=QtCore
126 --enable=QtNetwork
127 --enable=QtScript
128 --enable=QtXml
129 $(pyqt4_use_enable X QtGui)
130 $(pyqt4_use_enable X QtDesigner) $(use X || echo --no-designer-plugin)
131 $(pyqt4_use_enable X QtScriptTools)
132 $(pyqt4_use_enable X QtTest)
133 $(pyqt4_use_enable assistant QtHelp)
134 $(pyqt4_use_enable dbus QtDBus)
135 $(pyqt4_use_enable declarative QtDeclarative)
136 $(pyqt4_use_enable multimedia QtMultimedia)
137 $(pyqt4_use_enable opengl QtOpenGL)
138 $(pyqt4_use_enable phonon)
139 $(pyqt4_use_enable sql QtSql)
140 $(pyqt4_use_enable svg QtSvg)
141 $(pyqt4_use_enable webkit QtWebKit)
142 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
143 CC="$(tc-getCC)"
144 CXX="$(tc-getCXX)"
145 LINK="$(tc-getCXX)"
146 LINK_SHLIB="$(tc-getCXX)"
147 CFLAGS="${CFLAGS}"
148 CXXFLAGS="${CXXFLAGS}"
149 LFLAGS="${LDFLAGS}")
150 echo "${myconf[@]}"
151 "${myconf[@]}" || die
152
153 local mod
154 for mod in QtCore \
155 $(use X && echo QtDesigner QtGui) \
156 $(use dbus && echo QtDBus) \
157 $(use declarative && echo QtDeclarative) \
158 $(use opengl && echo QtOpenGL); do
159 # Run eqmake4 inside the qpy subdirectories to respect
160 # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
161 pushd qpy/${mod} > /dev/null || return 1
162 eqmake4 $(ls w_qpy*.pro)
163 popd > /dev/null || return 1
164
165 # Fix insecure runpaths.
166 sed -e "/^LFLAGS[[:space:]]*=/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
167 -i ${mod}/Makefile || die "Failed to fix rpath for ${mod}"
168 done
169
170 # Avoid stripping of libpythonplugin.so.
171 if use X; then
172 pushd designer > /dev/null || return 1
173 eqmake4 python.pro
174 popd > /dev/null || return 1
175 fi
176 }
177 python_execute_function -s configuration
178 }
179
180 src_install() {
181 installation() {
182 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
183 emake DESTDIR="${T}/images/${PYTHON_ABI}" INSTALL_ROOT="${T}/images/${PYTHON_ABI}" install
184 }
185 python_execute_function -s installation
186 python_merge_intermediate_installation_images "${T}/images"
187
188 dodoc NEWS THANKS
189
190 if use doc; then
191 dohtml -r doc/html/*
192 fi
193
194 if use examples; then
195 insinto /usr/share/doc/${PF}
196 doins -r examples
197 fi
198 }
199
200 pkg_postinst() {
201 python_mod_optimize PyQt4
202
203 ewarn "When updating dev-python/PyQt4, you usually need to rebuild packages that depend on it,"
204 ewarn "such as dev-python/qscintilla-python and kde-base/pykde4. If you have app-portage/gentoolkit"
205 ewarn "installed, you can find these packages with \`equery d dev-python/PyQt4\`."
206 }
207
208 pkg_postrm() {
209 python_mod_cleanup PyQt4
210 }

  ViewVC Help
Powered by ViewVC 1.1.20