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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Aug 12 08:58:25 2009 UTC (10 years, 6 months ago) by hwoarang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Added patch for removing items from QGraphicsLinearLayout. Fixes bug 280634
(Portage version: 2.2_rc38/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.4-r1.ebuild,v 1.1 2009/08/05 22:27:25 hwoarang Exp $
4
5 EAPI="2"
6 SUPPORT_PYTHON_ABIS="1"
7
8 inherit python qt4
9
10 MY_P=PyQt-x11-gpl-${PV}
11 QTVER="4.5.1"
12
13 DESCRIPTION="A set of Python bindings for the Qt toolkit"
14 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/"
15 SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
16
17 SLOT="0"
18 LICENSE="|| ( GPL-2 GPL-3 )"
19 KEYWORDS="~alpha ~amd64 ~hppa ~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.8.2
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
43 S="${WORKDIR}/${MY_P}"
44
45 PATCHES=(
46 "${FILESDIR}/configure.py.patch"
47 )
48
49 src_prepare() {
50 if ! use dbus; then
51 sed -i -e 's,^\([[:blank:]]\+\)check_dbus(),\1pass,' \
52 "${S}"/configure.py || die
53 fi
54 qt4_src_prepare
55
56 python_copy_sources
57
58 preparation() {
59 if [[ "${PYTHON_ABI:0:1}" == "3" ]]; then
60 rm -fr pyuic/uic/port_v2
61 else
62 rm -fr pyuic/uic/port_v3
63 fi
64 }
65 python_execute_function -s preparation
66 }
67
68 pyqt4_use_enable() {
69 use $1 && echo "--enable=${2:-$1}"
70 }
71
72 src_configure() {
73 configuration() {
74 local myconf="$(PYTHON) configure.py
75 --confirm-license
76 --bindir=/usr/bin
77 --destdir=$(python_get_sitedir)
78 --sipdir=/usr/share/sip
79 $(use debug && echo '--debug')
80 --enable=QtCore
81 --enable=QtNetwork
82 --enable=QtScript
83 --enable=QtTest
84 --enable=QtXml
85 $(pyqt4_use_enable X QtGui)
86 $(pyqt4_use_enable X QtDesigner)
87 $(pyqt4_use_enable assistant QtAssistant)
88 $(pyqt4_use_enable assistant QtHelp)
89 $(pyqt4_use_enable opengl QtOpenGL)
90 $(pyqt4_use_enable phonon)
91 $(pyqt4_use_enable sql QtSql)
92 $(pyqt4_use_enable svg QtSvg)
93 $(pyqt4_use_enable webkit QtWebKit)
94 $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
95 CC=$(tc-getCC) CXX=$(tc-getCXX)
96 CFLAGS='${CFLAGS}' CXXFLAGS='${CXXFLAGS}' LFLAGS='${LDFLAGS}'"
97 echo ${myconf}
98 eval ${myconf} || return 1
99
100 # Fix insecure runpath.
101 for mod in QtCore $(use X && echo "QtDesigner QtGui"); do
102 # Run eqmake4 to inside the qpy subdirs to prevent
103 # stripping and many QA issues
104 pushd qpy/${mod} > /dev/null || die
105 eqmake4 $(ls w_qpy*.pro)
106 popd > /dev/null || die
107 sed -i -e "/^LFLAGS/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" ${mod}/Makefile || die "Failed to fix rpath issues"
108 done
109
110 # Fix pre-stripping of libpythonplugin.so
111 if use X; then
112 cd "${BUILDDIR}"/designer
113 eqmake4 python.pro
114 fi
115 }
116 python_execute_function -s configuration
117 }
118
119 src_compile() {
120 python_execute_function -d -s
121 }
122
123 src_install() {
124 python_need_rebuild
125
126 installation() {
127 # INSTALL_ROOT is needed for the QtDesigner module,
128 # the other Makefiles use DESTDIR.
129 emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
130 }
131 python_execute_function -s installation
132
133 dodoc ChangeLog doc/pyqt4ref.txt NEWS THANKS || die
134
135 if use doc; then
136 dohtml -r doc/* || die
137 fi
138
139 if use examples; then
140 insinto /usr/share/doc/${PF}
141 doins -r examples || die
142 fi
143 }
144
145 pkg_postinst() {
146 python_mod_optimize PyQt4
147 }
148
149 pkg_postrm() {
150 python_mod_cleanup PyQt4
151 }

  ViewVC Help
Powered by ViewVC 1.1.20