Magellan Linux

Contents of /trunk/extras/qt4/qt4-4.5.1-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2009 - (show annotations) (download)
Thu Jun 11 17:02:39 2009 UTC (15 years, 4 months ago) by niro
File size: 8151 byte(s)
-keep qconfig.pri and linux-g++ specfiles on x86_64
1 # $Id$
2
3 PNAME="qt4"
4 PVER="4.5.1"
5 PBUILD="r3"
6
7 PCATEGORIE="x11-libs"
8 STATE="unstable"
9
10 DESCRIPTION="Qt: Cross-Platform Rich Client Development Framework."
11 HOMEPAGE="http://trolltech.com/products/qt/"
12
13 DEPEND=">= dev-libs/expat-2
14 >= x11-libs/libICE-1
15 >= x11-libs/libSM-1.1
16 >= x11-libs/libX11-1.2
17 >= x11-libs/libXau-1
18 >= x11-libs/libxcb-1.2
19 >= x11-libs/libXcursor-1.1
20 >= x11-libs/libXdmcp-1
21 >= x11-libs/libXext-1
22 >= x11-libs/libXfixes-4
23 >= x11-libs/libXft-2.1
24 >= x11-libs/libXi-1.2
25 >= x11-libs/libXinerama-1
26 >= x11-libs/libXrandr-1.3
27 >= x11-libs/libXrender-0.9
28 >= media-libs/libjpeg-6b
29 >= media-libs/libmng-1.0.10
30 >= media-libs/libpng-1.2.36
31 >= media-libs/lcms-1.18
32 >= media-libs/freetype-2.3.9
33 >= media-libs/fontconfig-2.6
34 >= net-print/cups-1.3
35 >= sys-libs/zlib-1.2
36 >= media-libs/giflib-4.1
37 >= sys-apps/dbus-1.2
38 >= virtual/opengl
39 >= media-libs/nas-1.9
40 >= dev-libs/openssl-0.9.8
41 >= dev-db/sqlite-3.6"
42
43 SDEPEND=">= sys-dev/bison-2.4
44 >= x11-proto/xineramaproto-1.1
45 >= x11-proto/xextproto-7
46 >= x11-proto/inputproto-1.5
47 >= dev-util/pkgconfig-0.23"
48
49 SRCFILE="${PNAME/4/}-x11-opensource-src-${PVER}.tar.bz2"
50 SRCDIR="${BUILDDIR}/${PNAME/4/}-x11-opensource-src-${PVER}"
51
52 sminclude mtools
53
54 SRC_URI=(
55 ftp://ftp.trolltech.com/qt/source/${SRCFILE}
56 mirror://${PNAME}/${SRCFILE}
57 mirror://${PNAME}/qt-${PVER}-qt-copy_svg-rendering-regression.patch
58 mirror://${PNAME}/qt-${PVER}-qt-copy_fix-qpixmapcache-leak.patch
59 mirror://${PNAME}/qt-${PVER}-no-hardcoded_fonts.patch
60 )
61
62 UP2DATE="updatecmd ftp://ftp.trolltech.com/qt/source/ | grep qt-x11-opensource-src | lasttarball"
63
64 ## global vars ##
65 export QTDIR=${SRCDIR}
66 export LD_LIBRARY_PATH=${QTDIR}/lib
67 export PATH=${QTDIR}/bin:${PATH}
68 export PLATFORM=linux-g++
69 [[ ${ARCH} = x86_64 ]] && export PLATFORM=linux-g++-64
70 # install prefix
71 export QT_PREFIX=/opt/${PNAME}
72
73 src_prepare()
74 {
75 munpack ${SRCFILE} || die
76 cd ${SRCDIR}
77
78 # no hardcoded font-aliases
79 # see: https://cvs.fedoraproject.org/viewvc/rpms/qt4/F-8/qt-x11-opensource-src-4.3.4-no-hardcoded-font-aliases.patch?view=markup
80 mpatch qt-${PVER}-no-hardcoded_fonts.patch || die
81
82 # fix broken kde plasma themes
83 # see: https://bugs.kde.org/show_bug.cgi?id=192914
84 mpatch qt-${PVER}-qt-copy_svg-rendering-regression.patch || die
85
86 # fix Qpixmap memory leak
87 # https://bugs.kde.org/show_bug.cgi?id=183191
88 mpatch qt-${PVER}-qt-copy_fix-qpixmapcache-leak.patch || die
89
90 # set our cflags and fix up our header and lib locations
91 cd ${SRCDIR}/mkspecs/${PLATFORM}
92 sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
93 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
94 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
95 -e 's:$(QTDIR)/include:&/qt:' \
96 -e "s:\$(QTDIR)/lib:\$(QTDIR)/$(mlibdir):" \
97 qmake.conf \
98 || die
99
100 # fix libdir to lib64 on 64bit arches
101 sed -i "s:/lib$:/$(mlibdir):" qmake.conf || die
102
103 # disable rpath
104 sed -i "s:QMAKE_RPATH.*=.*:QMAKE_RPATH=:" qmake.conf || die
105
106 # get rid of /usr/X11R6
107 sed -i "s:X11R6/::" qmake.conf || die
108
109 # same goes for the g++ definitions
110 # they where moved to an extra file with qt4
111 cd ${SRCDIR}/mkspecs/common
112 sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CPPFLAGS} ${CFLAGS} ${ASFLAGS}:" \
113 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CPPFLAGS} ${CXXFLAGS} ${ASFLAGS}:" \
114 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
115 -e 's:$(QTDIR)/include:&/qt:' \
116 -e "s:\$(QTDIR)/lib:\$(QTDIR)/$(mlibdir):" \
117 g++.conf \
118 || die
119
120 # fix libdir to lib64 on 64bit arches
121 sed -i "s:/lib$:/$(mlibdir):" g++.conf || die
122
123 # disable rpath
124 sed -i "s:QMAKE_RPATH.*=.*:QMAKE_RPATH=:" g++.conf || die
125
126 # get rid of /usr/X11R6
127 sed -i "s:X11R6/::" linux.conf || die
128 }
129
130 src_compile()
131 {
132 cd ${SRCDIR}
133
134 # add missing lib64 search path on 64bit arches
135 local myconf
136 [[ $(mlibdir) != lib ]] && myconf="-L/usr/$(mlibdir)"
137
138 # enable this only for binutils >=2.18
139 [[ $(ld -v | sed 's/.*\ \([0-9].[0-9].*\)/\1/') > 2.17 ]] && myconf="${myconf} -reduce-relocations"
140
141 ./configure \
142 -prefix ${QT_PREFIX} \
143 -sysconfdir /etc/${PNAME} \
144 -datadir ${QT_PREFIX}/share/qt \
145 -docdir ${QT_PREFIX}/share/doc/qt-${PVER} \
146 -headerdir ${QT_PREFIX}/include/qt \
147 -plugindir ${QT_PREFIX}/$(mlibdir)/qt/plugins \
148 -libdir ${QT_PREFIX}/$(mlibdir) \
149 -datadir ${QT_PREFIX}/share/qt \
150 -translationdir ${QT_PREFIX}/share/qt/translations \
151 -confirm-license \
152 -opensource \
153 -platform ${PLATFORM} \
154 -xplatform ${PLATFORM} \
155 -verbose \
156 -silent \
157 -fast \
158 -release \
159 -no-separate-debug-info \
160 -optimized-qmake \
161 -system-libjpeg \
162 -system-libmng \
163 -system-libpng \
164 -system-zlib \
165 -system-nas-sound \
166 -system-sqlite \
167 -nomake examples \
168 -nomake demos \
169 -nomake docs \
170 -no-rpath \
171 -qt3support \
172 -stl \
173 -lpthread \
174 -largefile \
175 -sm \
176 -xrender \
177 -opengl \
178 -qt-gif \
179 -cups \
180 -dbus-linked \
181 -openssl \
182 -no-phonon \
183 ${myconf} \
184 || die
185
186 mmake all || die
187 }
188
189 src_install()
190 {
191 cd ${SRCDIR}
192 mmake INSTALL_ROOT=${BINDIR} install || die
193
194 # remove broken qmake link and install binary
195 if [ -L ${BINDIR}/${QT_PREFIX}/bin/qmake ]
196 then
197 echo "removing broken qmake symlink"
198 rm -f ${BINDIR}/${QT_PREFIX}/bin/qmake || die
199 echo "installing qmake binary"
200 minstallexec ${SRCDIR}/qmake/qmake ${QT_PREFIX}/bin || die
201 fi
202
203 # remove broken linux-g++ link if exists
204 if [ -L ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/${PLATFORM}/${PLATFORM} ]
205 then
206 echo "removing broken ${PLATFORM} symlink"
207 rm ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/${PLATFORM}/${PLATFORM} || die
208 fi
209
210 # install some missing binaries
211 # minstallexec ${SRCDIR}/bin/qtrename140 ${QT_PREFIX}/bin || die
212 minstallexec ${SRCDIR}/bin/uic ${QT_PREFIX}/bin || die
213 minstallexec ${SRCDIR}/bin/findtr ${QT_PREFIX}/bin || die
214 # minstallexec ${SRCDIR}/bin/qt20fix ${QT_PREFIX}/bin || die
215
216 # qmake cache file
217 sed "s:${SRCDIR}:${QT_PREFIX}:g" ${SRCDIR}/.qmake.cache > ${BINDIR}/${QT_PREFIX}/share/qt/.qmake.cache || die
218
219 # some needed symlinks
220 mlink libqt-mt.so ${QT_PREFIX}/$(mlibdir)/libqt.so || die
221 # symlink qmake to qmakeMAJversion
222 mlink qmake ${QT_PREFIX}/bin/qmake${PVER:0:1} || die
223
224 # remove unneeded specs
225 echo "removing unneeded specs ..."
226 install -d ${BUILDDIR}/keep
227 mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/default ${BUILDDIR}/keep || die
228 mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/common ${BUILDDIR}/keep || die
229 mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/features ${BUILDDIR}/keep || die
230 mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/qws ${BUILDDIR}/keep || die
231 mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/${PLATFORM} ${BUILDDIR}/keep || die
232 if [[ ${ARCH} = x86_64 ]]
233 then
234 mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/linux-g++ ${BUILDDIR}/keep || die
235 fi
236 mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/qconfig.pri ${BUILDDIR}/keep || die
237 rm -rf ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/* || die
238 mv ${BUILDDIR}/keep/* ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs || die
239
240 # docs
241 minstalldocs GPL* changes-${PVER} LICENSE* OPENSOURCE* README* || die
242
243 # # man
244 # cp -r doc/man ${BINDIR}/${QT_PREFIX}/share || die
245 # gzip -r9 ${BINDIR}/${QT_PREFIX}/share/man || die
246 #
247 # # don't want the tutorial anymore, too big
248 # rm -rf ${BINDIR}/${QT_PREFIX}/share/doc/qt-${PVER}/html || die
249 # # don't want the demos too
250 # rm -rf ${BINDIR}/${QT_PREFIX}/demos || die
251
252 # environ vars
253 minstalldir /etc/env.d || die
254 echo "QMAKESPEC=\"${PLATFORM}\"" > ${BINDIR}/etc/env.d/45${PNAME} || die
255 echo "QTDIR=\"${QT_PREFIX}\"" >> ${BINDIR}/etc/env.d/45${PNAME} || die
256
257 if [[ ${QT_PREFIX} != /usr ]]
258 then
259 # overwrite the env file here, there may be one in user
260 # and we want this as system-wide default
261 :> ${BINDIR}/etc/env.d/45${PNAME} || die
262 echo "PATH=\"${QT_PREFIX}/bin\"" >> ${BINDIR}/etc/env.d/45${PNAME} || die
263 echo "ROOTPATH=\"${QT_PREFIX}/bin\"" >> ${BINDIR}/etc/env.d/45${PNAME} || die
264 echo "LDPATH=\"${QT_PREFIX}/$(mlibdir)\"" >> ${BINDIR}/etc/env.d/45${PNAME} || die
265 echo "MANPATH=\"${QT_PREFIX}/share/man\"" >> ${BINDIR}/etc/env.d/45${PNAME} || die
266 echo "PKG_CONFIG_PATH=\"${QT_PREFIX}/$(mlibdir)/pkgconfig\"" >> ${BINDIR}/etc/env.d/45${PNAME} || die
267 fi
268 }

Properties

Name Value
svn:keywords Id