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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat Sep 13 01:39:25 2014 UTC (5 years, 5 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Stop using dohtml, remove old.

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

1 # Copyright 1999-2014 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-r3.ebuild,v 1.4 2014/06/20 14:01:12 idella4 Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} )
7
8 inherit eutils multibuild 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-python/sip-4.15*:=[${PYTHON_USEDEP}]
46 >=dev-qt/qtcore-${QT_PV}
47 X? (
48 >=dev-qt/qtgui-${QT_PV}
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 designer? ( || ( dev-qt/designer:4 <dev-qt/qtgui-4.8.5:4 ) )
57 help? ( >=dev-qt/qthelp-${QT_PV} )
58 multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
59 opengl? ( >=dev-qt/qtopengl-${QT_PV} )
60 phonon? (
61 kde? ( media-libs/phonon )
62 !kde? ( || ( >=dev-qt/qtphonon-${QT_PV} media-libs/phonon ) )
63 )
64 script? ( >=dev-qt/qtscript-${QT_PV} )
65 sql? ( >=dev-qt/qtsql-${QT_PV} )
66 svg? ( >=dev-qt/qtsvg-${QT_PV} )
67 webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
68 xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
69 "
70 DEPEND="${RDEPEND}
71 dbus? ( virtual/pkgconfig )
72 "
73
74 S=${WORKDIR}/${MY_P}
75
76 src_prepare() {
77 # Support qreal on arm architecture (bug 322349).
78 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
79
80 # Allow building against KDE's phonon (bug 433944 and others).
81 sed -i \
82 -e "s:VideoWidget()\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/qt4/QtGui\"]:" \
83 -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
84 configure.py || die
85
86 if ! use dbus; then
87 sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
88 fi
89
90 python_copy_sources
91
92 preparation() {
93 if [[ ${EPYTHON} == python3.* ]]; then
94 rm -fr pyuic/uic/port_v2
95 else
96 rm -fr pyuic/uic/port_v3
97 fi
98 }
99 python_foreach_impl run_in_build_dir preparation
100 }
101
102 pyqt4_use_enable() {
103 use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
104 }
105
106 src_configure() {
107 configuration() {
108 local myconf=(
109 "${PYTHON}" configure.py
110 --confirm-license
111 --bindir="${EPREFIX}/usr/bin"
112 --destdir="$(python_get_sitedir)"
113 --sipdir="${EPREFIX}/usr/share/sip"
114 --assume-shared
115 --no-timestamp
116 --qsci-api
117 $(use debug && echo --debug)
118 --enable=QtCore
119 --enable=QtNetwork
120 --enable=QtXml
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 designer) $(use designer || echo --no-designer-plugin)
126 $(pyqt4_use_enable help)
127 $(pyqt4_use_enable multimedia)
128 $(pyqt4_use_enable opengl QtOpenGL)
129 $(pyqt4_use_enable phonon phonon)
130 $(pyqt4_use_enable script)
131 $(pyqt4_use_enable scripttools QtScriptTools)
132 $(pyqt4_use_enable sql)
133 $(pyqt4_use_enable svg)
134 $(pyqt4_use_enable webkit QtWebKit)
135 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
136 AR="$(tc-getAR) cqs"
137 CC="$(tc-getCC)"
138 CFLAGS="${CFLAGS}"
139 CFLAGS_RELEASE=
140 CXX="$(tc-getCXX)"
141 CXXFLAGS="${CXXFLAGS}"
142 CXXFLAGS_RELEASE=
143 LINK="$(tc-getCXX)"
144 LINK_SHLIB="$(tc-getCXX)"
145 LFLAGS="${LDFLAGS}"
146 LFLAGS_RELEASE=
147 RANLIB=
148 STRIP=
149 )
150 echo "${myconf[@]}"
151 "${myconf[@]}" || die
152
153 local mod
154 for mod in QtCore \
155 $(use X && echo QtGui) \
156 $(use dbus && echo QtDBus) \
157 $(use declarative && echo QtDeclarative) \
158 $(use designer && echo QtDesigner) \
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
163 eqmake4 $(ls w_qpy*.pro)
164 popd > /dev/null || return
165
166 # Fix insecure runpaths.
167 sed -i -e "/^LFLAGS\s*=/ s:-Wl,-rpath,${BUILD_DIR}/qpy/${mod}::" \
168 ${mod}/Makefile || die "failed to fix rpath for ${mod}"
169 done
170
171 # Avoid stripping of libpythonplugin.so.
172 if use designer; then
173 pushd designer > /dev/null || return
174 eqmake4 python.pro
175 popd > /dev/null || return
176 fi
177 }
178 python_parallel_foreach_impl run_in_build_dir configuration
179 }
180
181 src_compile() {
182 python_foreach_impl run_in_build_dir default
183 }
184
185 src_install() {
186 installation() {
187 local tmp_root=${D%/}/tmp
188
189 # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
190 emake DESTDIR="${tmp_root}" INSTALL_ROOT="${tmp_root}" install
191
192 python_doexe "${tmp_root}${EPREFIX}"/usr/bin/pyuic4
193 rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic4 || die
194
195 multibuild_merge_root "${tmp_root}" "${D}"
196 python_optimize
197 }
198 python_foreach_impl run_in_build_dir installation
199
200 dodoc NEWS THANKS
201
202 if use doc; then
203 dohtml -r doc/html/*
204 fi
205
206 if use examples; then
207 insinto /usr/share/doc/${PF}
208 doins -r examples
209 fi
210 }

  ViewVC Help
Powered by ViewVC 1.1.20