Magellan Linux

Contents of /branches/magellan-next/extras/pyqt4/pyqt4-4.8.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8572 - (show annotations) (download)
Fri Jul 22 11:05:05 2011 UTC (12 years, 9 months ago) by niro
File size: 2382 byte(s)
-removed deprecated patches
1 # $Id$
2
3 PNAME="pyqt4"
4 PVER="4.8.4"
5 PBUILD="r1"
6
7 PCATEGORIE="dev-python"
8
9 DESCRIPTION="Python Qt bindings."
10 HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/"
11
12 DEPEND=">= dev-lang/python-2.7
13 >= dev-python/sip-4.12
14 >= dev-python/qscintilla-qt4-2.5
15 >= virtual/opengl
16 >= virtual/phonon
17 >= x11-libs/qt4-core-4.7
18 >= x11-libs/qt4-dbus-4.7
19 >= x11-libs/qt4-gui-4.7
20 >= x11-libs/qt4-opengl-4.7
21 >= x11-libs/qt4-script-4.7
22 >= x11-libs/qt4-sql-4.7
23 >= x11-libs/qt4-svg-4.7
24 >= x11-libs/qt4-test-4.7
25 >= x11-libs/qt4-webkit-4.7
26 >= x11-libs/qt4-xmlpatterns-4.7
27 >= x11-libs/qt4-assistant-4.7"
28
29 SRCFILE="PyQt-x11-gpl-${PVER}.tar.gz"
30 SRCDIR="${BUILDDIR}/PyQt-x11-gpl-${PVER}"
31
32 # pull in mbuild to have a normal src_install()
33 sminclude qt4 python mbuild
34
35 SRC_URI=(
36 http://www.riverbankcomputing.com/static/Downloads/PyQt4/${SRCFILE}
37 mirror://${PNAME}/${SRCFILE}
38 )
39
40 UP2DATE="updatecmd ${HOMEPAGE}/download | firsttarball gz"
41
42 src_prepare()
43 {
44 munpack ${SRCFILE} || die
45 cd ${SRCDIR}
46
47 # respect kde-phonon includes (/usr/include/phonon)
48 if [[ -z $(magequery -n qt4-phonon) ]]
49 then
50 local kde4prefix="$(kde4-config --prefix)"
51 local phononinc="${kde4prefix}/include/phonon"
52 sed -i "/generate_code(\"phonon\")/s:phonon\":&,extra_include_dirs=[\"${phononinc}\"]:" configure.py || die
53 fi
54 }
55
56 src_compile()
57 {
58 cd ${SRCDIR}
59
60 local use_distcc
61 [[ ${SMAGE_USE_DISTCC} = true ]] && use_distcc="-c"
62 # warning: needs more than 256mb to compile successfully
63 python configure.py \
64 --confirm-license \
65 --qsci-api \
66 -q ${QMAKE} \
67 -d /usr/$(mlibdir)/python$(get_python_version)/site-packages \
68 -n /usr/include \
69 -b /usr/bin \
70 -v /usr/share/sip \
71 -w \
72 ${use_distcc} \
73 -e QtCore \
74 -e QtNetwork \
75 -e QtScript \
76 -e QtTest \
77 -e QtXml \
78 -e QtGui \
79 -e QtDesigner \
80 -e QtAssistant \
81 -e QtHelp \
82 -e QtOpenGL \
83 -e phonon \
84 -e QtSql \
85 -e QtSvg \
86 -e QtWebKit \
87 -e QtXmlPatterns \
88 || die
89
90 # fix insecure runpath
91 local i
92 for i in QtDesigner QtGui QtCore
93 do
94 sed -i "/^LFLAGS/s:-Wl,-rpath,${SRCDIR}/qpy/${i}::" ${SRCDIR}/${i}/Makefile || die
95 done
96
97 mmake || die
98 }
99
100 src_install()
101 {
102 cd ${SRCDIR}
103
104 # INSTALL_ROOT is needed for the QtDesigner module,
105 # the other Makefiles use DESTDIR.
106 mmake DESTDIR=${BINDIR} INSTALL_ROOT=${BINDIR} install || die
107
108 minstalldocs ChangeLog GPL* LICENSE* NEWS OPENSOURCE-NOTICE.TXT README THANKS || die
109 }