Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8617 - (show annotations) (download)
Mon Jul 25 14:02:12 2011 UTC (12 years, 9 months ago) by niro
File size: 2546 byte(s)
-enabled qtdeclarative support, needed by kde-base/kdebindings4-4.6
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 >= x11-libs/qt4-declarative-4.7"
29
30 SRCFILE="PyQt-x11-gpl-${PVER}.tar.gz"
31 SRCDIR="${BUILDDIR}/PyQt-x11-gpl-${PVER}"
32
33 # pull in mbuild to have a normal src_install()
34 sminclude qt4 python mbuild
35
36 SRC_URI=(
37 http://www.riverbankcomputing.com/static/Downloads/PyQt4/${SRCFILE}
38 mirror://${PNAME}/${SRCFILE}
39 mirror://${PNAME}/${PNAME}-${PVER}-egl.patch
40 )
41
42 UP2DATE="updatecmd ${HOMEPAGE}/download | firsttarball gz"
43
44 src_prepare()
45 {
46 munpack ${SRCFILE} || die
47 cd ${SRCDIR}
48
49 # fix build with egl enabled
50 mpatch ${PNAME}-${PVER}-egl.patch || die
51
52 # respect kde-phonon includes (/usr/include/phonon)
53 if [[ -z $(magequery -n qt4-phonon) ]]
54 then
55 local kde4prefix="$(kde4-config --prefix)"
56 local phononinc="${kde4prefix}/include/phonon"
57 sed -i "/generate_code(\"phonon\")/s:phonon\":&,extra_include_dirs=[\"${phononinc}\"]:" configure.py || die
58 fi
59 }
60
61 src_compile()
62 {
63 cd ${SRCDIR}
64
65 local use_distcc
66 [[ ${SMAGE_USE_DISTCC} = true ]] && use_distcc="-c"
67 # warning: needs more than 256mb to compile successfully
68 python configure.py \
69 --confirm-license \
70 --qsci-api \
71 -q ${QMAKE} \
72 -d /usr/$(mlibdir)/python$(get_python_version)/site-packages \
73 -n /usr/include \
74 -b /usr/bin \
75 -v /usr/share/sip \
76 -w \
77 ${use_distcc} \
78 -e QtCore \
79 -e QtNetwork \
80 -e QtScript \
81 -e QtTest \
82 -e QtXml \
83 -e QtGui \
84 -e QtDesigner \
85 -e QtAssistant \
86 -e QtHelp \
87 -e QtOpenGL \
88 -e phonon \
89 -e QtSql \
90 -e QtSvg \
91 -e QtWebKit \
92 -e QtXmlPatterns \
93 -e QtDeclarative \
94 || die
95
96 # fix insecure runpath
97 local i
98 for i in QtDesigner QtGui QtCore
99 do
100 sed -i "/^LFLAGS/s:-Wl,-rpath,${SRCDIR}/qpy/${i}::" ${SRCDIR}/${i}/Makefile || die
101 done
102
103 mmake || die
104 }
105
106 src_install()
107 {
108 cd ${SRCDIR}
109
110 # INSTALL_ROOT is needed for the QtDesigner module,
111 # the other Makefiles use DESTDIR.
112 mmake DESTDIR=${BINDIR} INSTALL_ROOT=${BINDIR} install || die
113
114 minstalldocs ChangeLog GPL* LICENSE* NEWS OPENSOURCE-NOTICE.TXT README THANKS || die
115 }