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

Contents of /dev-python/PyQt4/PyQt4-4.9.6-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (show annotations) (download)
Wed Dec 25 19:53:54 2013 UTC (6 years, 2 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 17A85C72)

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.6-r2.ebuild,v 1.20 2013/10/31 13:47:01 mgorny Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
7
8 inherit eutils qt4-r2 python-r1 toolchain-funcs
9
10 DESCRIPTION="Python bindings for the Qt toolkit"
11 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
12
13 if [[ ${PV} == *_pre* ]]; then
14 MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
15 SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
16 else
17 MY_P="PyQt-x11-gpl-${PV}"
18 SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
19 fi
20
21 LICENSE="|| ( GPL-2 GPL-3 )"
22 SLOT="0"
23 KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
24
25 IUSE="X dbus debug declarative doc examples help kde multimedia opengl phonon script scripttools sql svg webkit xmlpatterns"
26 REQUIRED_USE="
27 declarative? ( X )
28 help? ( X )
29 multimedia? ( X )
30 opengl? ( X )
31 phonon? ( X )
32 scripttools? ( X script )
33 sql? ( X )
34 svg? ( X )
35 webkit? ( X )
36 "
37
38 # Minimal supported version of Qt.
39 QT_PV="4.8.0:4"
40
41 RDEPEND="
42 ${PYTHON_DEPS}
43 dev-lang/python-exec:0[${PYTHON_USEDEP}]
44 >=dev-python/sip-4.14.2:=[${PYTHON_USEDEP}]
45 >=dev-qt/qtcore-${QT_PV}
46 X? (
47 >=dev-qt/qtgui-${QT_PV}[dbus(+)?]
48 || ( dev-qt/designer:4 <dev-qt/qtgui-4.8.5:4 )
49 >=dev-qt/qttest-${QT_PV}
50 )
51 dbus? (
52 >=dev-python/dbus-python-0.80[${PYTHON_USEDEP}]
53 >=dev-qt/qtdbus-${QT_PV}
54 )
55 declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
56 help? ( >=dev-qt/qthelp-${QT_PV} )
57 multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
58 opengl? ( >=dev-qt/qtopengl-${QT_PV} )
59 phonon? (
60 kde? ( media-libs/phonon )
61 !kde? ( || ( >=dev-qt/qtphonon-${QT_PV} media-libs/phonon ) )
62 )
63 script? ( >=dev-qt/qtscript-${QT_PV} )
64 sql? ( >=dev-qt/qtsql-${QT_PV} )
65 svg? ( >=dev-qt/qtsvg-${QT_PV} )
66 webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
67 xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
68 "
69 DEPEND="${RDEPEND}
70 dbus? ( virtual/pkgconfig )
71 "
72
73 S=${WORKDIR}/${MY_P}
74
75 src_prepare() {
76 qt4-r2_src_prepare
77
78 # Support qreal on arm architecture (bug 322349).
79 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
80
81 # Use proper include directory for phonon.
82 sed -i -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
83 configure.py || die
84
85 if ! use dbus; then
86 sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
87 fi
88
89 python_copy_sources
90
91 preparation() {
92 if [[ ${EPYTHON} == python3.* ]]; then
93 rm -fr pyuic/uic/port_v2
94 else
95 rm -fr pyuic/uic/port_v3
96 fi
97 }
98 python_foreach_impl run_in_build_dir preparation
99 }
100
101 pyqt4_use_enable() {
102 use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
103 }
104
105 src_configure() {
106 configuration() {
107 local myconf=(
108 "${PYTHON}" configure.py
109 --confirm-license
110 --bindir="${EPREFIX}/usr/bin"
111 --destdir="$(python_get_sitedir)"
112 --sipdir="${EPREFIX}/usr/share/sip"
113 --assume-shared
114 --no-timestamp
115 --qsci-api
116 $(use debug && echo --debug)
117 --enable=QtCore
118 --enable=QtNetwork
119 --enable=QtXml
120 $(pyqt4_use_enable X QtDesigner) $(use X || echo --no-designer-plugin)
121 $(pyqt4_use_enable X QtGui)
122 $(pyqt4_use_enable X QtTest)
123 $(pyqt4_use_enable dbus QtDBus)
124 $(pyqt4_use_enable declarative)
125 $(pyqt4_use_enable help)
126 $(pyqt4_use_enable multimedia)
127 $(pyqt4_use_enable opengl QtOpenGL)
128 $(pyqt4_use_enable phonon phonon)
129 $(pyqt4_use_enable script)
130 $(pyqt4_use_enable scripttools QtScriptTools)
131 $(pyqt4_use_enable sql)
132 $(pyqt4_use_enable svg)
133 $(pyqt4_use_enable webkit QtWebKit)
134 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
135 AR="$(tc-getAR) cqs"
136 CC="$(tc-getCC)"
137 CFLAGS="${CFLAGS}"
138 CFLAGS_RELEASE=
139 CXX="$(tc-getCXX)"
140 CXXFLAGS="${CXXFLAGS}"
141 CXXFLAGS_RELEASE=
142 LINK="$(tc-getCXX)"
143 LINK_SHLIB="$(tc-getCXX)"
144 LFLAGS="${LDFLAGS}"
145 LFLAGS_RELEASE=
146 RANLIB=
147 STRIP=
148 )
149 echo "${myconf[@]}"
150 "${myconf[@]}" || die
151
152 local mod
153 for mod in QtCore \
154 $(use X && echo QtDesigner QtGui) \
155 $(use dbus && echo QtDBus) \
156 $(use declarative && echo QtDeclarative) \
157 $(use opengl && echo QtOpenGL); do
158 # Run eqmake4 inside the qpy subdirectories to respect
159 # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
160 pushd qpy/${mod} > /dev/null || return
161 eqmake4 $(ls w_qpy*.pro)
162 popd > /dev/null || return
163
164 # Fix insecure runpaths.
165 sed -i -e "/^LFLAGS\s*=/ s:-Wl,-rpath,${BUILD_DIR}/qpy/${mod}::" \
166 ${mod}/Makefile || die "failed to fix rpath for ${mod}"
167 done
168
169 # Avoid stripping of libpythonplugin.so.
170 if use X; then
171 pushd designer > /dev/null || return
172 eqmake4 python.pro
173 popd > /dev/null || return
174 fi
175 }
176 python_foreach_impl run_in_build_dir configuration
177 }
178
179 src_compile() {
180 python_foreach_impl run_in_build_dir default
181 }
182
183 src_install() {
184 installation() {
185 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
186 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
187 mv "${ED}"/usr/bin/pyuic4{,-${EPYTHON}} || die
188 python_optimize
189 }
190 python_foreach_impl run_in_build_dir installation
191
192 dosym python-exec /usr/bin/pyuic4
193 dodoc NEWS THANKS
194
195 if use doc; then
196 dohtml -r doc/html/*
197 fi
198
199 if use examples; then
200 insinto /usr/share/doc/${PF}
201 doins -r examples
202 fi
203 }

  ViewVC Help
Powered by ViewVC 1.1.20