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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Sun Dec 19 18:51:55 2010 UTC (9 years, 2 months ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
Delete older ebuilds.

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

  ViewVC Help
Powered by ViewVC 1.1.20