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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Sep 8 23:30:31 2010 UTC (9 years, 5 months ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bump. Remove old ebuild

(Portage version: 2.2_rc77/cvs/Linux x86_64)

1 # Copyright 1999-2010 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.7.2.ebuild,v 1.2 2010/04/23 01:59:06 tampakrap Exp $
4
5 EAPI="2"
6 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
7 SUPPORT_PYTHON_ABIS="1"
8
9 inherit qt4-r2 python toolchain-funcs
10
11 MY_P="PyQt-x11-gpl-${PV/_pre/-snapshot-}"
12 QTVER="4.6.2" # minimal Qt version this is supposed to work with
13
14 DESCRIPTION="A set of Python bindings for the Qt toolkit"
15 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
16 SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
17
18 SLOT="0"
19 LICENSE="|| ( GPL-2 GPL-3 )"
20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
21 IUSE="X assistant +dbus debug doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
22
23 DEPEND=">=dev-python/sip-4.10
24 >=x11-libs/qt-core-${QTVER}:4
25 >=x11-libs/qt-script-${QTVER}:4
26 >=x11-libs/qt-test-${QTVER}:4
27 X? ( >=x11-libs/qt-gui-${QTVER}:4[dbus?] )
28 assistant? ( >=x11-libs/qt-assistant-${QTVER}:4 )
29 dbus? (
30 >=dev-python/dbus-python-0.80
31 >=x11-libs/qt-dbus-${QTVER}:4
32 )
33 multimedia? ( >=x11-libs/qt-multimedia-${QTVER}:4 )
34 opengl? ( >=x11-libs/qt-opengl-${QTVER}:4 )
35 phonon? (
36 !kde? ( || ( >=x11-libs/qt-phonon-${QTVER}:4 media-sound/phonon ) )
37 kde? ( media-sound/phonon )
38 )
39 sql? ( >=x11-libs/qt-sql-${QTVER}:4 )
40 svg? ( >=x11-libs/qt-svg-${QTVER}:4 )
41 webkit? ( >=x11-libs/qt-webkit-${QTVER}:4 )
42 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QTVER}:4 )"
43 RDEPEND="${DEPEND}"
44 RESTRICT_PYTHON_ABIS="3.2" # doesn't build with python:3.2 (yet), bug 292419
45
46 S=${WORKDIR}/${MY_P}
47
48 PATCHES=(
49 "${FILESDIR}/${PN}-4.6.1-configure-multilib.patch"
50 "${FILESDIR}/${PN}-4.7.2-configure.py.patch"
51 )
52
53 src_prepare() {
54 use prefix || EPREFIX=
55
56 if ! use dbus; then
57 sed -i -e 's,^\([[:blank:]]\+\)check_dbus(),\1pass,' \
58 "${S}"/configure.py || die
59 fi
60
61 qt4-r2_src_prepare
62
63 # Use proper include dir
64 sed -e "s|/usr/include|${EPREFIX}/usr/include|g" \
65 -i configure.py
66
67 python_copy_sources
68
69 preparation() {
70 if [[ "${PYTHON_ABI:0:1}" == "3" ]]; then
71 rm -fr pyuic/uic/port_v2
72 else
73 rm -fr pyuic/uic/port_v3
74 fi
75 }
76 python_execute_function -s preparation
77 }
78
79 pyqt4_use_enable() {
80 use $1 && echo "--enable=${2:-$1}"
81 }
82
83 src_configure() {
84 use prefix || EPREFIX=
85
86 configuration() {
87 local myconf="$(PYTHON) configure.py
88 --confirm-license
89 --bindir=${EPREFIX}/usr/bin
90 --destdir=${EPREFIX}$(python_get_sitedir)
91 --sipdir=${EPREFIX}/usr/share/sip
92 --qsci-api
93 $(use debug && echo '--debug')
94 --enable=QtCore
95 --enable=QtNetwork
96 --enable=QtScript
97 --enable=QtTest
98 --enable=QtXml
99 $(pyqt4_use_enable X QtGui)
100 $(pyqt4_use_enable X QtDesigner)
101 $(pyqt4_use_enable X QtScriptTools)
102 $(pyqt4_use_enable assistant QtAssistant)
103 $(pyqt4_use_enable assistant QtHelp)
104 $(pyqt4_use_enable multimedia QtMultimedia)
105 $(pyqt4_use_enable opengl QtOpenGL)
106 $(pyqt4_use_enable phonon)
107 $(pyqt4_use_enable sql QtSql)
108 $(pyqt4_use_enable svg QtSvg)
109 $(pyqt4_use_enable webkit QtWebKit)
110 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
111 CC=$(tc-getCC) CXX=$(tc-getCXX)
112 LINK=$(tc-getCXX) LINK_SHLIB=$(tc-getCXX)
113 CFLAGS='${CFLAGS}' CXXFLAGS='${CXXFLAGS}' LFLAGS='${LDFLAGS}'"
114 echo ${myconf}
115 eval ${myconf} || return 1
116
117 for mod in QtCore $(use X && echo 'QtDesigner QtGui'); do
118 # Run eqmake4 inside the qpy subdirs to prevent
119 # stripping and many other QA issues
120 pushd qpy/${mod} > /dev/null || die
121 eqmake4 $(ls w_qpy*.pro)
122 popd > /dev/null || die
123
124 # Fix insecure runpaths
125 sed -i -e "/^LFLAGS/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
126 ${mod}/Makefile || die "failed to fix rpath issues"
127 done
128
129 # Fix pre-stripping of libpythonplugin.so
130 if use X; then
131 cd "${BUILDDIR}"/designer
132 eqmake4 python.pro
133 fi
134 }
135 python_execute_function -s configuration
136 }
137
138 src_compile() {
139 python_src_compile
140 }
141
142 src_install() {
143 installation() {
144 # INSTALL_ROOT is needed for the QtDesigner module,
145 # the other Makefiles use DESTDIR.
146 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
147 }
148 python_execute_function -s installation
149
150 dodoc doc/pyqt4ref.txt NEWS THANKS || die
151
152 if use doc; then
153 dohtml -r doc/* || die
154 fi
155
156 if use examples; then
157 insinto /usr/share/doc/${PF}
158 doins -r examples || die
159 fi
160 }
161
162 pkg_postinst() {
163 python_mod_optimize PyQt4
164 }
165
166 pkg_postrm() {
167 python_mod_cleanup PyQt4
168 }

  ViewVC Help
Powered by ViewVC 1.1.20