Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19483 - (show annotations) (download)
Mon Sep 16 09:36:08 2013 UTC (10 years, 8 months ago) by niro
File size: 2375 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="pyqt4"
4 PVER="4.10.3"
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.15
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 )
41
42 UP2DATE="updatecmd ${HOMEPAGE}/download | firsttarball gz"
43
44 src_prepare()
45 {
46 munpack ${SRCFILE} || die
47 cd ${SRCDIR}
48
49 # respect kde-phonon includes (/usr/include/phonon)
50 if [[ -z $(magequery -n qt4-phonon) ]]
51 then
52 local kde4prefix="$(kde4-config --prefix)"
53 local phononinc="${kde4prefix}/include/phonon"
54 sed -i "/generate_code(\"phonon\")/s:phonon\":&,extra_include_dirs=[\"${phononinc}\"]:" configure.py || die
55 fi
56 }
57
58 src_compile()
59 {
60 cd ${SRCDIR}
61
62 local use_distcc
63 [[ ${SMAGE_USE_DISTCC} = true ]] && use_distcc="-c"
64 # warning: needs more than 256mb to compile successfully
65 python configure.py \
66 --confirm-license \
67 --qsci-api \
68 -q ${QMAKE} \
69 -d $(get_python_libdir) \
70 -n /usr/include \
71 -b /usr/bin \
72 -v /usr/share/sip \
73 -w \
74 ${use_distcc} \
75 -e QtCore \
76 -e QtNetwork \
77 -e QtScript \
78 -e QtTest \
79 -e QtXml \
80 -e QtGui \
81 -e QtDesigner \
82 -e QtAssistant \
83 -e QtHelp \
84 -e QtOpenGL \
85 -e phonon \
86 -e QtSql \
87 -e QtSvg \
88 -e QtWebKit \
89 -e QtXmlPatterns \
90 -e QtDeclarative \
91 || die
92
93 # fix insecure runpath
94 local i
95 for i in QtDesigner QtGui QtCore
96 do
97 sed -i "/^LFLAGS/s:-Wl,-rpath,${SRCDIR}/qpy/${i}::" ${SRCDIR}/${i}/Makefile || die
98 done
99
100 mmake || die
101 }
102
103 src_install()
104 {
105 cd ${SRCDIR}
106
107 # INSTALL_ROOT is needed for the QtDesigner module,
108 # the other Makefiles use DESTDIR.
109 mmake DESTDIR=${BINDIR} INSTALL_ROOT=${BINDIR} install || die
110
111 minstalldocs ChangeLog GPL* LICENSE* NEWS OPENSOURCE-NOTICE.TXT README THANKS || die
112 }