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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Sep 21 12:14:58 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 bogus version

(Portage version: 2.2_rc83/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.6.ebuild,v 1.2 2010/09/10 22:02:27 arfrever Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="*"
7 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
8 SUPPORT_PYTHON_ABIS="1"
9
10 inherit qt4-r2 python toolchain-funcs
11
12 MY_P="PyQt-x11-gpl-${PV/_pre/-snapshot-}"
13 QTVER="4.6.2" # minimal Qt version this is supposed to work with
14
15 DESCRIPTION="A set of Python bindings for the Qt toolkit"
16 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
17 SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
18
19 SLOT="0"
20 LICENSE="|| ( GPL-2 GPL-3 )"
21 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
22 IUSE="X assistant +dbus debug doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
23
24 DEPEND=">=dev-python/sip-4.11
25 >=x11-libs/qt-core-${QTVER}:4
26 >=x11-libs/qt-script-${QTVER}:4
27 >=x11-libs/qt-test-${QTVER}:4
28 X? ( >=x11-libs/qt-gui-${QTVER}:4[dbus?] )
29 assistant? ( >=x11-libs/qt-assistant-${QTVER}:4 )
30 dbus? (
31 >=dev-python/dbus-python-0.80
32 >=x11-libs/qt-dbus-${QTVER}:4
33 )
34 multimedia? ( >=x11-libs/qt-multimedia-${QTVER}:4 )
35 opengl? ( >=x11-libs/qt-opengl-${QTVER}:4 )
36 phonon? (
37 !kde? ( || ( >=x11-libs/qt-phonon-${QTVER}:4 media-sound/phonon ) )
38 kde? ( media-sound/phonon )
39 )
40 sql? ( >=x11-libs/qt-sql-${QTVER}:4 )
41 svg? ( >=x11-libs/qt-svg-${QTVER}:4 )
42 webkit? ( >=x11-libs/qt-webkit-${QTVER}:4 )
43 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QTVER}:4 )"
44 RDEPEND="${DEPEND}"
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 if ! use dbus; then
55 sed -i -e 's,^\([[:blank:]]\+\)check_dbus(),\1pass,' \
56 "${S}"/configure.py || die
57 fi
58
59 # Patch to support qreal for arm architecture
60 # wrt bug #322349
61 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
62
63 qt4-r2_src_prepare
64
65 # Use proper include dir
66 sed -e "s|/usr/include|${EPREFIX}/usr/include|g" \
67 -i configure.py
68
69 python_copy_sources
70
71 preparation() {
72 if [[ "$(python_get_version --major)" == "3" ]]; then
73 rm -fr pyuic/uic/port_v2
74 else
75 rm -fr pyuic/uic/port_v3
76 fi
77 }
78 python_execute_function -s preparation
79 }
80
81 pyqt4_use_enable() {
82 use $1 && echo "--enable=${2:-$1}"
83 }
84
85 src_configure() {
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