Magellan Linux

Annotation of /branches/magellan-next/extras/pyqt4/pyqt4-4.7.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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