19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
21 ## SUCH DAMAGE. |
21 ## SUCH DAMAGE. |
22 ## |
22 ## |
23 |
23 |
|
24 # FIXME: MSvB: It appears that bugs in current versions of binutils |
|
25 # FIXME: MSvB: fail to properly link Qt object code, resulting in |
|
26 # FIXME: MSvB: 'ld: libQt*.so: pthread_mutex...: invalid version 6 |
|
27 # FIXME: MSvB: libQt*.so: could not read symbols: Bad value' |
|
28 # FIXME: MSvB: The effects of these bugs are platform dependent. |
|
29 # FIXME: MSvB: Solaris 11 IA-32 builds fail while Linux 2.6.25.18 |
|
30 # FIXME: MSvB: AMD64 builds succeed. |
|
31 # FIXME: MSvB: |
|
32 # FIXME: MSvB: The webkit is flawed in Qt 4.4.3, and has been disabled |
|
33 # FIXME: MSvB: in this build until a new release corrects the problem. |
24 |
34 |
25 # package information |
35 # package information |
26 Name: qt |
36 Name: qt |
27 Summary: Cross-platform Application Framework |
37 Summary: Cross-platform Application Framework |
28 URL: http://www.trolltech.com/products/qt/ |
38 URL: http://www.trolltech.com/products/qt/ |
140 config.tests/unix/iconv/iconv.pro |
144 config.tests/unix/iconv/iconv.pro |
141 %{l_shtool} subst \ |
145 %{l_shtool} subst \ |
142 -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ |
146 -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ |
143 src/sql/drivers/drivers.pri |
147 src/sql/drivers/drivers.pri |
144 %{l_shtool} subst \ |
148 %{l_shtool} subst \ |
|
149 -e "s;QMAKE_CXXFLAGS += \$\$QT_CFLAGS_GLIB;INCPATH += `pkg-config --cflags-only-I glib-2.0 gthread-2.0 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
|
150 src/corelib/kernel/kernel.pri \ |
|
151 src/gui/kernel/kernel.pri |
|
152 %{l_shtool} subst \ |
|
153 -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
|
154 -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
|
155 -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_SQLITE;INCPATH += `pkg-config --cflags-only-I sqlite3 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
|
156 src/sql/drivers/drivers.pri |
|
157 %{l_shtool} subst \ |
|
158 -e "s;QMAKE_CXXFLAGS += \$\$QT_CFLAGS_DBUS;INCPATH += `pkg-config --cflags-only-I dbus-1 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
|
159 src/dbus/dbus.pro |
|
160 %{l_shtool} subst \ |
145 -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ |
161 -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ |
146 -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ |
162 -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ |
147 -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
163 -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
148 -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \ |
164 -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \ |
149 -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ |
165 -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ |
150 mkspecs/qws/*/qmake.conf \ |
166 mkspecs/qws/*/qmake.conf \ |
151 mkspecs/*/*.conf |
167 mkspecs/*/*.conf |
152 %{l_shtool} subst \ |
168 %{l_shtool} subst \ |
153 -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ |
169 -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ |
154 src/corelib/corelib.pro |
170 src/corelib/corelib.pro |
155 %{l_shtool} subst \ |
171 %{l_shtool} subst \ |
156 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
172 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \ |
157 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \ |
173 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \ |
158 mkspecs/qws/solaris*/qmake.conf \ |
174 mkspecs/qws/solaris*/qmake.conf \ |
159 mkspecs/solaris*/qmake.conf |
175 mkspecs/solaris*/qmake.conf |
160 %{l_shtool} subst \ |
176 %{l_shtool} subst \ |
161 -e 's; *\.\./3rdparty/freetype/.*;;g' \ |
177 -e 's; *\.\./3rdparty/freetype/.*;;g' \ |
162 -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ |
178 -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ |
171 %build |
187 %build |
172 # protect against sloppy code inclusion of all unused subprojects |
188 # protect against sloppy code inclusion of all unused subprojects |
173 rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win* |
189 rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win* |
174 |
190 |
175 case "%{l_platform -t}" in |
191 case "%{l_platform -t}" in |
176 *-aix* ) platcomp="aix-g++" ;; |
192 sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;; |
177 *-freebsd* ) platcomp="freebsd-g++" ;; |
193 i?86-sunos* ) platcomp="solaris-g++" ;; |
178 *-hpux* ) platcomp="hpux-g++" ;; |
194 amd64-linux* ) platcomp="linux-g++-64" ;; |
179 *-irix* ) platcomp="irix-g++" ;; |
195 i?86-linux* ) platcomp="linux-g++" ;; |
180 *64-linux* ) platcomp="linux-g++-64" ;; |
196 amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;; |
181 *-linux* ) platcomp="linux-g++" ;; |
197 *-aix* ) platcomp="aix-g++" ;; |
182 *-darwin* ) platcomp="macx-g++" ;; |
198 *-darwin* ) platcomp="macx-g++" ;; |
183 *-sunos* ) platcomp="solaris-g++" ;; |
199 *-hpux* ) platcomp="hpux-g++" ;; |
184 * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; |
200 *-irix* ) platcomp="irix-g++" ;; |
|
201 * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; |
185 esac |
202 esac |
186 |
203 |
187 %if "%{with_shared}" == "yes" |
204 %if "%{with_shared}" == "yes" |
188 # optional shared build (precedes mandatory static build) |
205 # optional shared build (precedes mandatory static build) |
189 echo 'yes' | ./configure \ |
206 echo 'yes' | ./configure \ |
190 -prefix %{l_prefix} \ |
207 -prefix %{l_prefix} \ |
191 -bindir %{l_prefix}/bin \ |
208 -bindir %{l_prefix}/bin \ |
192 -libdir %{l_prefix}/lib/qt \ |
209 -libdir %{l_prefix}/lib/qt \ |
193 -docdir %{l_prefix}/share/qt/doc \ |
210 -docdir %{l_prefix}/share/qt/doc \ |
194 -headerdir %{l_prefix}/include \ |
211 -headerdir %{l_prefix}/include \ |
195 -plugindir %{l_prefix}/share/qt/plugins \ |
212 -plugindir %{l_prefix}/lib/qt/plugins \ |
196 -datadir %{l_prefix}/share/qt \ |
213 -datadir %{l_prefix}/share/qt \ |
197 -translationdir %{l_prefix}/share/qt/translations \ |
214 -translationdir %{l_prefix}/share/qt/translations \ |
198 -sysconfdir %{l_prefix}/etc/qt \ |
215 -sysconfdir %{l_prefix}/etc/qt \ |
199 -examplesdir %{l_prefix}/share/qt/examples \ |
216 -examplesdir %{l_prefix}/share/qt/examples \ |
200 -demosdir %{l_prefix}/share/qt/demos \ |
217 -demosdir %{l_prefix}/share/qt/demos \ |
201 -release \ |
218 -release \ |
202 -shared \ |
219 -shared \ |
|
220 -platform $platcomp \ |
|
221 -no-sql-ibase \ |
|
222 %if "%{with_mysql}" == "yes" |
|
223 -qt-sql-mysql \ |
|
224 -plugin-sql-mysql \ |
|
225 %else |
|
226 -no-sql-mysql \ |
|
227 %endif |
|
228 %if "%{with_pgsql}" == "yes" |
|
229 -qt-sql-psql \ |
|
230 -plugin-sql-psql \ |
|
231 %else |
|
232 -no-sql-psql \ |
|
233 %endif |
|
234 -no-sql-odbc \ |
|
235 -system-sqlite \ |
|
236 -qt-sql-sqlite \ |
|
237 -plugin-sql-sqlite \ |
|
238 -no-sql-sqlite2 \ |
|
239 -openssl-linked \ |
|
240 -xmlpatterns \ |
|
241 -svg \ |
|
242 -no-webkit \ |
|
243 -system-zlib \ |
|
244 -qt-gif \ |
|
245 -system-libpng \ |
|
246 -system-libmng \ |
|
247 -system-libjpeg \ |
|
248 -system-libtiff \ |
|
249 -rpath \ |
|
250 -no-cups \ |
|
251 -iconv \ |
|
252 -pch \ |
|
253 -dbus-linked \ |
|
254 -opengl \ |
|
255 -xrender \ |
|
256 -fontconfig \ |
|
257 -freetype \ |
|
258 -no-glib |
|
259 |
|
260 # default options are implicitly used, for example... |
|
261 #-no-fast -exceptions -accessibility -stl -qt3support -nis |
|
262 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
|
263 |
|
264 # carry out shared build procedure |
|
265 ( cd src |
|
266 %{l_make} %{l_mflags -O} \ |
|
267 sub-moc sub-rcc sub-uic |
|
268 %{l_make} %{l_mflags -O} \ |
|
269 sub-corelib sub-xml sub-network sub-gui sub-sql \ |
|
270 sub-script sub-testlib sub-qt3support sub-dbus \ |
|
271 sub-opengl sub-xmlpatterns sub-svg sub-plugins |
|
272 ) || exit $? |
|
273 |
|
274 # cache shared libs and initialize the build configuration, which |
|
275 # would otherwise still contain references to our shared libs build |
|
276 %{l_shtool} mkdir -f -p -m 755 dynamic |
|
277 mv lib/* dynamic/ |
|
278 ( cd qmake |
|
279 %{l_make} %{l_mflags} distclean |
|
280 ) || exit $? |
|
281 rm -f .qmake.cache |
|
282 %endif |
|
283 |
|
284 # mandatory static build (follows optional shared build) |
|
285 echo 'yes' | ./configure \ |
|
286 -prefix %{l_prefix} \ |
|
287 -bindir %{l_prefix}/bin \ |
|
288 -libdir %{l_prefix}/lib \ |
|
289 -docdir %{l_prefix}/share/qt/doc \ |
|
290 -headerdir %{l_prefix}/include \ |
|
291 -plugindir %{l_prefix}/lib/qt/plugins \ |
|
292 -datadir %{l_prefix}/share/qt \ |
|
293 -translationdir %{l_prefix}/share/qt/translations \ |
|
294 -sysconfdir %{l_prefix}/etc/qt \ |
|
295 -examplesdir %{l_prefix}/share/qt/examples \ |
|
296 -demosdir %{l_prefix}/share/qt/demos \ |
|
297 -release \ |
|
298 -static \ |
203 -platform $platcomp \ |
299 -platform $platcomp \ |
204 -no-sql-ibase \ |
300 -no-sql-ibase \ |
205 %if "%{with_mysql}" == "yes" |
301 %if "%{with_mysql}" == "yes" |
206 -qt-sql-mysql \ |
302 -qt-sql-mysql \ |
207 %else |
303 %else |
235 -xrender \ |
331 -xrender \ |
236 -fontconfig \ |
332 -fontconfig \ |
237 -freetype \ |
333 -freetype \ |
238 -no-glib |
334 -no-glib |
239 |
335 |
240 # sadly, the webkit is broken in Qt 4.4.3. |
336 # default options are implicitly used, for example... |
241 # default options are implicitly used, und zwar... |
|
242 #-no-fast -exceptions -accessibility -stl -qt3support -nis |
|
243 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
|
244 |
|
245 # carry out shared build procedure |
|
246 ( cd src |
|
247 %{l_make} %{l_mflags -O} \ |
|
248 sub-moc sub-rcc sub-uic |
|
249 %{l_make} %{l_mflags -O} \ |
|
250 sub-corelib sub-xml sub-network sub-gui sub-sql \ |
|
251 sub-script sub-testlib sub-qt3support sub-dbus \ |
|
252 sub-opengl sub-xmlpatterns sub-svg sub-plugins |
|
253 ) || exit $? |
|
254 |
|
255 # cache shared libs and initialize the build configuration, which |
|
256 # would otherwise still contain references to our shared libs build |
|
257 %{l_shtool} mkdir -f -p -m 755 dynamic |
|
258 mv lib/* dynamic/ |
|
259 ( cd qmake |
|
260 %{l_make} %{l_mflags} distclean |
|
261 ) || exit $? |
|
262 rm -f .qmake.cache |
|
263 %endif |
|
264 |
|
265 # mandatory static build (follows optional shared build) |
|
266 echo 'yes' | ./configure \ |
|
267 -prefix %{l_prefix} \ |
|
268 -bindir %{l_prefix}/bin \ |
|
269 -libdir %{l_prefix}/lib \ |
|
270 -docdir %{l_prefix}/share/qt/doc \ |
|
271 -headerdir %{l_prefix}/include \ |
|
272 -plugindir %{l_prefix}/share/qt/plugins \ |
|
273 -datadir %{l_prefix}/share/qt \ |
|
274 -translationdir %{l_prefix}/share/qt/translations \ |
|
275 -sysconfdir %{l_prefix}/etc/qt \ |
|
276 -examplesdir %{l_prefix}/share/qt/examples \ |
|
277 -demosdir %{l_prefix}/share/qt/demos \ |
|
278 -release \ |
|
279 -static \ |
|
280 -platform $platcomp \ |
|
281 -no-sql-ibase \ |
|
282 %if "%{with_mysql}" == "yes" |
|
283 -qt-sql-mysql \ |
|
284 %else |
|
285 -no-sql-mysql \ |
|
286 %endif |
|
287 %if "%{with_pgsql}" == "yes" |
|
288 -qt-sql-psql \ |
|
289 %else |
|
290 -no-sql-psql \ |
|
291 %endif |
|
292 -no-sql-odbc \ |
|
293 -system-sqlite \ |
|
294 -qt-sql-sqlite \ |
|
295 -no-sql-sqlite2 \ |
|
296 -openssl-linked \ |
|
297 -xmlpatterns \ |
|
298 -svg \ |
|
299 -no-webkit \ |
|
300 -system-zlib \ |
|
301 -qt-gif \ |
|
302 -system-libpng \ |
|
303 -system-libmng \ |
|
304 -system-libjpeg \ |
|
305 -system-libtiff \ |
|
306 -rpath \ |
|
307 -no-cups \ |
|
308 -iconv \ |
|
309 -pch \ |
|
310 -dbus-linked \ |
|
311 -opengl \ |
|
312 -xrender \ |
|
313 -fontconfig \ |
|
314 -freetype \ |
|
315 -no-glib |
|
316 |
|
317 # default options are implicitly used, und zwar... |
|
318 #-no-fast -exceptions -accessibility -stl -qt3support -nis |
337 #-no-fast -exceptions -accessibility -stl -qt3support -nis |
319 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
338 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
320 |
339 |
321 # carry out static build procedure |
340 # carry out static build procedure |
322 %{l_make} %{l_mflags -O} sub-src |
341 %{l_make} %{l_mflags -O} sub-src |
363 # install shared libs and symlinks |
382 # install shared libs and symlinks |
364 %{l_shtool} mkdir -f -p -m 755 \ |
383 %{l_shtool} mkdir -f -p -m 755 \ |
365 $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
384 $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
366 %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
385 %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
367 |
386 |
|
387 # offer limited support of pkg-config(1) for shared libs |
|
388 %{l_shtool} subst \ |
|
389 -e "s;\(moc_location[^=]*=\).*;\1%{l_prefix}/bin/moc;" \ |
|
390 -e "s;\(uic_location[^=]*=\).*;\1%{l_prefix}/bin/uic;" \ |
|
391 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig |
|
392 |
368 # explain nonstandard shared library placement |
393 # explain nonstandard shared library placement |
369 ( echo "This directory contains optional shared libraries as" |
394 ( echo "This OpenPKG Qt build is using the with_shared option." |
|
395 echo "" |
|
396 echo "This directory contains optional shared libraries as" |
370 echo "defined by the OpenPKG build specification. Although" |
397 echo "defined by the OpenPKG build specification. Although" |
371 echo "shared libraries are only optionally built (see the" |
398 echo "shared libraries have been optionally built (see the" |
372 echo "build time 'with_shared yes' option), static libraries" |
399 echo "build time 'with_shared yes' option), static libraries" |
373 echo "are built and installed in the parent 'lib' directory." |
400 echo "were built by default as usual, and installed in the" |
|
401 echo "standard library directory %{l_prefix}/lib." |
|
402 echo "" |
|
403 echo "To build applications using shared libraries instead," |
|
404 echo "please direct pkg-config(1) to use the properdefinitions" |
|
405 echo "by setting the environment variable PKG_CONFIG_PATH to " |
|
406 echo "%{l_prefix}/lib/qt/dynamic/pkgconfig." |
374 ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README |
407 ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README |
375 |
408 |
376 # do not support pkg-config(1) with shared libs |
|
377 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/qt/pkgconfig |
|
378 |
|
379 # remove temporary dynamic link paths |
409 # remove temporary dynamic link paths |
380 %{l_shtool} subst \ |
410 %{l_shtool} subst \ |
381 -e 's;\(QMAKE_PRL_BUILD_DIR[^=][^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \ |
411 -e 's;\(QMAKE_PRL_BUILD_DIR[^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \ |
382 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl |
412 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl |
383 %endif |
413 %endif |
384 |
414 |
385 # determine internal file listing |
415 # determine internal file listing |
386 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
416 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
387 %{l_files_std} \ |
417 %{l_files_std} \ |
388 '%doc %{l_prefix}/share/qt/doc/*' \ |
418 '%doc %{l_prefix}/share/qt/doc/*/*' \ |
389 '%not %dir %{l_prefix}/lib/pkgconfig' |
419 '%not %dir %{l_prefix}/lib/pkgconfig' |
390 |
420 |
391 %files -f files |
421 %files -f files |
392 |
422 |
393 %clean |
423 %clean |