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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Mon Jun 29 21:07:51 2015 UTC (4 years, 8 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Drop old version. As of now, sparc no longer has a stable PyQt4, see bug #523322 comment #15.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0xDADED6B2671CB57D!)

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

  ViewVC Help
Powered by ViewVC 1.1.20