Magellan Linux

Contents of /branches/magellan-next/extras/pyqt4/pyqt4-4.7.7-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7223 - (show annotations) (download)
Mon Oct 11 19:07:18 2010 UTC (13 years, 7 months ago) by niro
File size: 2613 byte(s)
-fixed compilation of kdebindings4-python-4.5.1
1 # $Id: pyqt4-4.7-r1.smage2 4831 2010-02-11 22:22:09Z niro $
2
3 PNAME="pyqt4"
4 PVER="4.7.7"
5 PBUILD="r2"
6
7 PCATEGORIE="dev-python"
8 STATE="unstable"
9
10 DESCRIPTION="Python Qt bindings."
11 HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/"
12
13 DEPEND=">= dev-lang/python-2.7
14 >= dev-python/sip-4.10
15 >= dev-python/qscintilla-qt4-2.4.5
16 >= virtual/opengl
17 >= virtual/phonon
18 >= x11-libs/qt4-core-4.7
19 >= x11-libs/qt4-dbus-4.7
20 >= x11-libs/qt4-gui-4.7
21 >= x11-libs/qt4-opengl-4.7
22 >= x11-libs/qt4-script-4.7
23 >= x11-libs/qt4-sql-4.7
24 >= x11-libs/qt4-svg-4.7
25 >= x11-libs/qt4-test-4.7
26 >= x11-libs/qt4-webkit-4.7
27 >= x11-libs/qt4-xmlpatterns-4.7
28 >= x11-libs/qt4-assistant-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}-fix-scpk-and-flags.patch
40 )
41
42 UP2DATE="updatecmd ${HOMEPAGE}/download | firsttarball gz"
43
44 src_prepare()
45 {
46 munpack ${SRCFILE} || die
47 cd ${SRCDIR}
48
49 # fixes build of kdebindings4-python
50 mpatch ${PNAME}-${PVER}-fix-scpk-and-flags.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 || die
94
95 # fix insecure runpath
96 local i
97 for i in QtDesigner QtGui QtCore
98 do
99 sed -i "/^LFLAGS/s:-Wl,-rpath,${SRCDIR}/qpy/${i}::" ${SRCDIR}/${i}/Makefile || die
100 done
101
102 mmake || die
103 }
104
105 src_install()
106 {
107 cd ${SRCDIR}
108
109 # INSTALL_ROOT is needed for the QtDesigner module,
110 # the other Makefiles use DESTDIR.
111 mmake DESTDIR=${BINDIR} INSTALL_ROOT=${BINDIR} install || die
112
113 minstalldocs ChangeLog GPL* LICENSE* NEWS OPENSOURCE-NOTICE.TXT README THANKS || die
114 }