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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Oct 23 11:37:58 2010 UTC (9 years, 3 months ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Delete older ebuilds.

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.5.ebuild,v 1.2 2010/09/01 20:20:00 hwoarang 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.11
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
45 S=${WORKDIR}/${MY_P}
46
47 PATCHES=(
48 "${FILESDIR}/${PN}-4.6.1-configure-multilib.patch"
49 "${FILESDIR}/${PN}-4.7.2-configure.py.patch"
50 )
51
52 src_prepare() {
53 use prefix || EPREFIX=
54
55 if ! use dbus; then
56 sed -i -e 's,^\([[:blank:]]\+\)check_dbus(),\1pass,' \
57 "${S}"/configure.py || die
58 fi
59
60 # Patch to support qreal for arm architecture
61 # wrt bug #322349
62 use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
63
64 qt4-r2_src_prepare
65
66 # Use proper include dir
67 sed -e "s|/usr/include|${EPREFIX}/usr/include|g" \
68 -i configure.py
69
70 python_copy_sources
71
72 preparation() {
73 if [[ "${PYTHON_ABI:0:1}" == "3" ]]; then
74 rm -fr pyuic/uic/port_v2
75 else
76 rm -fr pyuic/uic/port_v3
77 fi
78 }
79 python_execute_function -s preparation
80 }
81
82 pyqt4_use_enable() {
83 use $1 && echo "--enable=${2:-$1}"
84 }
85
86 src_configure() {
87 use prefix || EPREFIX=
88
89 configuration() {
90 local myconf="$(PYTHON) configure.py
91 --confirm-license
92 --bindir="${EPREFIX}"/usr/bin
93 --destdir="${EPREFIX}"$(python_get_sitedir)
94 --sipdir="${EPREFIX}"/usr/share/sip
95 --qsci-api
96 $(use debug && echo '--debug')
97 --enable=QtCore
98 --enable=QtNetwork
99 --enable=QtScript
100 --enable=QtTest
101 --enable=QtXml
102 $(pyqt4_use_enable X QtGui)
103 $(pyqt4_use_enable X QtDesigner)
104 $(pyqt4_use_enable X QtScriptTools)
105 $(pyqt4_use_enable assistant QtAssistant)
106 $(pyqt4_use_enable assistant QtHelp)
107 $(pyqt4_use_enable multimedia QtMultimedia)
108 $(pyqt4_use_enable opengl QtOpenGL)
109 $(pyqt4_use_enable phonon)
110 $(pyqt4_use_enable sql QtSql)
111 $(pyqt4_use_enable svg QtSvg)
112 $(pyqt4_use_enable webkit QtWebKit)
113 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
114 CC=$(tc-getCC) CXX=$(tc-getCXX)
115 LINK=$(tc-getCXX) LINK_SHLIB=$(tc-getCXX)
116 CFLAGS='${CFLAGS}' CXXFLAGS='${CXXFLAGS}' LFLAGS='${LDFLAGS}'"
117 echo ${myconf}
118 eval ${myconf} || return 1
119
120 for mod in QtCore $(use X && echo 'QtDesigner QtGui'); do
121 # Run eqmake4 inside the qpy subdirs to prevent
122 # stripping and many other QA issues
123 pushd qpy/${mod} > /dev/null || die
124 eqmake4 $(ls w_qpy*.pro)
125 popd > /dev/null || die
126
127 # Fix insecure runpaths
128 sed -i -e "/^LFLAGS/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
129 ${mod}/Makefile || die "failed to fix rpath issues"
130 done
131
132 # Fix pre-stripping of libpythonplugin.so
133 if use X; then
134 cd "${BUILDDIR}"/designer
135 eqmake4 python.pro
136 fi
137 }
138 python_execute_function -s configuration
139 }
140
141 src_compile() {
142 python_src_compile
143 }
144
145 src_install() {
146 installation() {
147 # INSTALL_ROOT is needed for the QtDesigner module,
148 # the other Makefiles use DESTDIR.
149 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
150 }
151 python_execute_function -s installation
152
153 dodoc doc/pyqt4ref.txt NEWS THANKS || die
154
155 if use doc; then
156 dohtml -r doc/* || die
157 fi
158
159 if use examples; then
160 insinto /usr/share/doc/${PF}
161 doins -r examples || die
162 fi
163 }
164
165 pkg_postinst() {
166 python_mod_optimize PyQt4
167 }
168
169 pkg_postrm() {
170 python_mod_cleanup PyQt4
171 }

  ViewVC Help
Powered by ViewVC 1.1.20