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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Dec 13 15:49:01 2009 UTC (10 years, 2 months ago) by yngwin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
  Remove obsolete versions. Pin 4.5.4 on correct sip and Qt versions. Remove
  qt3support useflag description from metadata, as it is no longer in use.
(Portage version: 2.2_rc56/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.5.2.ebuild,v 1.1 2009/07/14 19:29:14 hwoarang Exp $
4
5 EAPI="2"
6
7 inherit distutils python qt4
8
9 MY_P=PyQt-x11-gpl-${PV}
10 QTVER="4.5.1"
11
12 DESCRIPTION="A set of Python bindings for the Qt toolkit"
13 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/"
14 SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
15
16 SLOT="0"
17 LICENSE="|| ( GPL-2 GPL-3 )"
18 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
19 IUSE="X assistant +dbus debug doc examples kde opengl phonon sql svg webkit xmlpatterns"
20
21 DEPEND=">=dev-python/sip-4.8.1
22 >=x11-libs/qt-core-${QTVER}:4
23 >=x11-libs/qt-script-${QTVER}:4
24 >=x11-libs/qt-test-${QTVER}:4
25 X? ( >=x11-libs/qt-gui-${QTVER}:4[dbus?] )
26 assistant? ( >=x11-libs/qt-assistant-${QTVER}:4 )
27 dbus? (
28 >=dev-python/dbus-python-0.80
29 >=x11-libs/qt-dbus-${QTVER}:4
30 )
31 opengl? ( >=x11-libs/qt-opengl-${QTVER}:4 )
32 phonon? (
33 !kde? ( || ( >=x11-libs/qt-phonon-${QTVER}:4 media-sound/phonon ) )
34 kde? ( media-sound/phonon )
35 )
36 sql? ( >=x11-libs/qt-sql-${QTVER}:4 )
37 svg? ( >=x11-libs/qt-svg-${QTVER}:4 )
38 webkit? ( >=x11-libs/qt-webkit-${QTVER}:4 )
39 xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QTVER}:4 )"
40 RDEPEND="${DEPEND}"
41
42 S="${WORKDIR}/${MY_P}"
43
44 PATCHES=(
45 "${FILESDIR}/configure.py.patch"
46 )
47
48 pyqt4_use_enable() {
49 use $1 && echo "--enable=${2:-$1}"
50 }
51
52 src_prepare() {
53 if ! use dbus; then
54 sed -i -e 's,^\([[:blank:]]\+\)check_dbus(),\1pass,' \
55 "${S}"/configure.py || die
56 fi
57 qt4_src_prepare
58
59 # Remove this code after removing Python 2 from the tree.
60 python_version
61 if [[ "${PYVER:0:1}" == "3" ]]; then
62 rm -fr pyuic/uic/port_v2
63 else
64 rm -fr pyuic/uic/port_v3
65 fi
66 }
67
68 src_configure() {
69 distutils_python_version
70
71 local myconf="${python} configure.py
72 --confirm-license
73 --bindir=/usr/bin
74 --destdir=$(python_get_sitedir)
75 --sipdir=/usr/share/sip
76 $(use debug && echo '--debug')
77 --enable=QtCore
78 --enable=QtNetwork
79 --enable=QtScript
80 --enable=QtTest
81 --enable=QtXml
82 $(pyqt4_use_enable X QtGui)
83 $(pyqt4_use_enable X QtDesigner)
84 $(pyqt4_use_enable assistant QtAssistant)
85 $(pyqt4_use_enable assistant QtHelp)
86 $(pyqt4_use_enable opengl QtOpenGL)
87 $(pyqt4_use_enable phonon)
88 $(pyqt4_use_enable sql QtSql)
89 $(pyqt4_use_enable svg QtSvg)
90 $(pyqt4_use_enable webkit QtWebKit)
91 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)"
92 echo ${myconf}
93 ${myconf} || die "configuration failed"
94
95 # Fix insecure runpath
96 if use X ; then
97 for pkg in QtDesigner QtGui QtCore; do
98 sed -i -e "/^LFLAGS/s:-Wl,-rpath,${S}/qpy/${pkg}::" \
99 "${S}"/${pkg}/Makefile || die "failed to fix rpath issues"
100 done
101 fi
102 }
103
104 src_install() {
105 python_need_rebuild
106 # INSTALL_ROOT is needed for the QtDesigner module,
107 # the other Makefiles use DESTDIR.
108 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install || die "installation failed"
109
110 dodoc ChangeLog NEWS THANKS || die
111
112 if use doc; then
113 dohtml -r doc/html/* || die
114 fi
115
116 if use examples; then
117 insinto /usr/share/doc/${PF}
118 doins -r examples || die
119 fi
120 }

  ViewVC Help
Powered by ViewVC 1.1.20