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

Contents of /dev-python/PyQt4/PyQt4-4.7.7-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Mon Feb 20 23:55:07 2012 UTC (7 years, 11 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Add <upstream> tag to metadata. Cleanup old ebuilds and patches.

(Portage version: 2.2.0_alpha87/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20