Magellan Linux

Contents of /branches/R11-stable/extras/pyqt4/pyqt4-4.10.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18244 - (show annotations) (download)
Thu Jun 27 10:05:33 2013 UTC (10 years, 11 months ago) by niro
File size: 2490 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="pyqt4"
4 PVER="4.10.2"
5 PBUILD="r1"
6
7 PCAT="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.14
14 >= dev-python/qscintilla-qt4-2.7
15 >= virtual/opengl
16 >= virtual/phonon
17 >= x11-libs/qt4-core-4.8
18 >= x11-libs/qt4-dbus-4.8
19 >= x11-libs/qt4-gui-4.8
20 >= x11-libs/qt4-opengl-4.8
21 >= x11-libs/qt4-script-4.8
22 >= x11-libs/qt4-sql-4.8
23 >= x11-libs/qt4-svg-4.8
24 >= x11-libs/qt4-test-4.8
25 >= x11-libs/qt4-webkit-4.8
26 >= x11-libs/qt4-xmlpatterns-4.8
27 >= x11-libs/qt4-assistant-4.8
28 >= x11-libs/qt4-declarative-4.8"
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 msetfeature "!check"
36
37 SRC_URI=(
38 sourceforge://${PNAME/4/}/${SRCFILE}
39 mirror://${PNAME}/${SRCFILE}
40 mirror://${PNAME}/${PNAME}-4.8.6-egl.patch
41 )
42
43 UP2DATE="updatecmd ${HOMEPAGE}/download | firsttarball gz"
44
45 src_prepare()
46 {
47 munpack ${SRCFILE} || die
48 cd ${SRCDIR}
49
50 # fix build with egl enabled
51 mpatch ${PNAME}-4.8.6-egl.patch || die
52
53 # respect kde-phonon includes (/usr/include/phonon)
54 if [[ -z $(magequery -n qt4-phonon) ]]
55 then
56 local kde4prefix="$(kde4-config --prefix)"
57 local phononinc="${kde4prefix}/include/phonon"
58 sed -i "/generate_code(\"phonon\")/s:phonon\":&,extra_include_dirs=[\"${phononinc}\"]:" configure.py || die
59 fi
60 }
61
62 src_compile()
63 {
64 cd ${SRCDIR}
65
66 local use_distcc
67 [[ ${SMAGE_USE_DISTCC} = true ]] && use_distcc="-c"
68 # warning: needs more than 256mb to compile successfully
69 python configure.py \
70 --confirm-license \
71 --qsci-api \
72 -q ${QMAKE} \
73 -d $(get_python_libdir) \
74 -n /usr/include \
75 -b /usr/bin \
76 -v /usr/share/sip \
77 -w \
78 ${use_distcc} \
79 -e QtCore \
80 -e QtNetwork \
81 -e QtScript \
82 -e QtTest \
83 -e QtXml \
84 -e QtGui \
85 -e QtDesigner \
86 -e QtAssistant \
87 -e QtHelp \
88 -e QtOpenGL \
89 -e phonon \
90 -e QtSql \
91 -e QtSvg \
92 -e QtWebKit \
93 -e QtXmlPatterns \
94 -e QtDeclarative \
95 || die
96
97 # fix insecure runpath
98 local i
99 for i in QtDesigner QtGui QtCore
100 do
101 sed -i "/^LFLAGS/s:-Wl,-rpath,${SRCDIR}/qpy/${i}::" ${SRCDIR}/${i}/Makefile || die
102 done
103
104 mmake || die
105 }
106
107 src_install()
108 {
109 cd ${SRCDIR}
110
111 # INSTALL_ROOT is needed for the QtDesigner module,
112 # the other Makefiles use DESTDIR.
113 mmake DESTDIR=${BINDIR} INSTALL_ROOT=${BINDIR} install || die
114
115 minstalldocs ChangeLog GPL* LICENSE* NEWS OPENSOURCE-NOTICE.TXT README THANKS || die
116 }