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