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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat May 4 11:12:04 2013 UTC (6 years, 9 months ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!)

1 # Copyright 1999-2013 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.4-r1.ebuild,v 1.4 2013/03/03 00:36:24 hwoarang 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.3
46 >=dev-qt/qtcore-${QT_VER}:4
47 >=dev-qt/qtscript-${QT_VER}:4
48 X? (
49 >=dev-qt/qtgui-${QT_VER}:4[dbus?]
50 >=dev-qt/qttest-${QT_VER}:4
51 )
52 assistant? ( >=dev-qt/qthelp-${QT_VER}:4 )
53 dbus? (
54 >=dev-python/dbus-python-0.80
55 >=dev-qt/qtdbus-${QT_VER}:4
56 )
57 declarative? ( >=dev-qt/qtdeclarative-${QT_VER}:4 )
58 multimedia? ( >=dev-qt/qtmultimedia-${QT_VER}:4 )
59 opengl? (
60 >=dev-qt/qtopengl-${QT_VER}:4
61 || ( >=dev-qt/qtopengl-4.8.0:4 <dev-qt/qtopengl-4.8.0:4[-egl] )
62 )
63 phonon? (
64 !kde? ( || ( >=dev-qt/qtphonon-${QT_VER}:4 media-libs/phonon ) )
65 kde? ( media-libs/phonon )
66 )
67 sql? ( >=dev-qt/qtsql-${QT_VER}:4 )
68 svg? ( >=dev-qt/qtsvg-${QT_VER}:4 )
69 webkit? ( >=dev-qt/qtwebkit-${QT_VER}:4 )
70 xmlpatterns? ( >=dev-qt/qtxmlpatterns-${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 "${FILESDIR}/${P}-pyuic-custom-widgets.patch"
81 )
82
83 PYTHON_VERSIONED_EXECUTABLES=("/usr/bin/pyuic4")
84
85 src_prepare() {
86 if ! use dbus; then
87 sed -e 's/^\([[:blank:]]\+\)check_dbus()/\1pass/' -i configure.py || die
88 fi
89
90 # Support qreal for arm architecture (bug #322349).
91 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
92
93 qt4-r2_src_prepare
94
95 # Use proper include directory.
96 sed -e "s:/usr/include:${EPREFIX}/usr/include:g" -i configure.py || die
97
98 python_copy_sources
99
100 preparation() {
101 if [[ $(python_get_version -l --major) == 3 ]]; then
102 rm -fr pyuic/uic/port_v2
103 else
104 rm -fr pyuic/uic/port_v3
105 fi
106 }
107 python_execute_function -s preparation
108 }
109
110 pyqt4_use_enable() {
111 use $1 && echo "--enable=${2:-$1}"
112 }
113
114 src_configure() {
115 configuration() {
116 local myconf=("$(PYTHON)"
117 configure.py
118 --confirm-license
119 --bindir="${EPREFIX}/usr/bin"
120 --destdir="${EPREFIX}$(python_get_sitedir)"
121 --sipdir="${EPREFIX}/usr/share/sip"
122 --assume-shared
123 --no-timestamp
124 --qsci-api
125 $(use debug && echo --debug)
126 --enable=QtCore
127 --enable=QtNetwork
128 --enable=QtScript
129 --enable=QtXml
130 $(pyqt4_use_enable X QtGui)
131 $(pyqt4_use_enable X QtDesigner) $(use X || echo --no-designer-plugin)
132 $(pyqt4_use_enable X QtScriptTools)
133 $(pyqt4_use_enable X QtTest)
134 $(pyqt4_use_enable assistant QtHelp)
135 $(pyqt4_use_enable dbus QtDBus)
136 $(pyqt4_use_enable declarative QtDeclarative)
137 $(pyqt4_use_enable multimedia QtMultimedia)
138 $(pyqt4_use_enable opengl QtOpenGL)
139 $(pyqt4_use_enable phonon)
140 $(pyqt4_use_enable sql QtSql)
141 $(pyqt4_use_enable svg QtSvg)
142 $(pyqt4_use_enable webkit QtWebKit)
143 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
144 CC="$(tc-getCC)"
145 CXX="$(tc-getCXX)"
146 LINK="$(tc-getCXX)"
147 LINK_SHLIB="$(tc-getCXX)"
148 CFLAGS="${CFLAGS}"
149 CXXFLAGS="${CXXFLAGS}"
150 LFLAGS="${LDFLAGS}")
151 echo "${myconf[@]}"
152 "${myconf[@]}" || die
153
154 local mod
155 for mod in QtCore \
156 $(use X && echo QtDesigner QtGui) \
157 $(use dbus && echo QtDBus) \
158 $(use declarative && echo QtDeclarative) \
159 $(use opengl && echo QtOpenGL); do
160 # Run eqmake4 inside the qpy subdirectories to respect
161 # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
162 pushd qpy/${mod} > /dev/null || return 1
163 eqmake4 $(ls w_qpy*.pro)
164 popd > /dev/null || return 1
165
166 # Fix insecure runpaths.
167 sed -e "/^LFLAGS[[:space:]]*=/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
168 -i ${mod}/Makefile || die "Failed to fix rpath for ${mod}"
169 done
170
171 # Avoid stripping of libpythonplugin.so.
172 if use X; then
173 pushd designer > /dev/null || return 1
174 eqmake4 python.pro
175 popd > /dev/null || return 1
176 fi
177 }
178 python_execute_function -s configuration
179 }
180
181 src_install() {
182 installation() {
183 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
184 emake DESTDIR="${T}/images/${PYTHON_ABI}" INSTALL_ROOT="${T}/images/${PYTHON_ABI}" install
185 }
186 python_execute_function -s installation
187 python_merge_intermediate_installation_images "${T}/images"
188
189 dodoc NEWS THANKS
190
191 if use doc; then
192 dohtml -r doc/html/*
193 fi
194
195 if use examples; then
196 insinto /usr/share/doc/${PF}
197 doins -r examples
198 fi
199 }
200
201 pkg_postinst() {
202 python_mod_optimize PyQt4
203
204 ewarn "When updating dev-python/PyQt4, you usually need to rebuild packages that depend on it,"
205 ewarn "such as dev-python/qscintilla-python and kde-base/pykde4. If you have app-portage/gentoolkit"
206 ewarn "installed, you can find these packages with \`equery d dev-python/PyQt4\`."
207 }
208
209 pkg_postrm() {
210 python_mod_cleanup PyQt4
211 }

  ViewVC Help
Powered by ViewVC 1.1.20