1.1 --- a/qt/qt.spec Fri Jan 09 19:02:45 2009 +0100 1.2 +++ b/qt/qt.spec Sat Jan 10 08:57:33 2009 +0100 1.3 @@ -33,10 +33,12 @@ 1.4 Group: Development 1.5 License: GPL 1.6 Version: 4.4.3 1.7 -Release: 20081215 1.8 +Release: 20090106 1.9 1.10 # build options 1.11 %option with_tools yes 1.12 +%option with_mysql no 1.13 +%option with_pgsql no 1.14 %option with_shared no 1.15 %option with_examples no 1.16 1.17 @@ -54,6 +56,14 @@ 1.18 PreReq: openssl, zlib, libiconv, sqlite, dbus 1.19 BuildPreReq: fontconfig, freetype 1.20 PreReq: fontconfig, freetype 1.21 +%if "%{with_mysql}" == "yes" 1.22 +BuildPreReq: mysql 1.23 +PreReq: mysql 1.24 +%endif 1.25 +%if "%{with_pgsql}" == "yes" 1.26 +BuildPreReq: postgresql 1.27 +PreReq: postgresql 1.28 +%endif 1.29 AutoReq: no 1.30 AutoReqProv: no 1.31 Provides: QTSDK 1.32 @@ -129,6 +139,9 @@ 1.33 -e 's;^mac:\(LIBS\);\1;' \ 1.34 config.tests/unix/iconv/iconv.pro 1.35 %{l_shtool} subst \ 1.36 + -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ 1.37 + src/sql/drivers/drivers.pri 1.38 + %{l_shtool} subst \ 1.39 -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ 1.40 -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ 1.41 -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ 1.42 @@ -189,12 +202,20 @@ 1.43 -shared \ 1.44 -platform $platcomp \ 1.45 -no-sql-ibase \ 1.46 +%if "%{with_mysql}" == "yes" 1.47 -qt-sql-mysql \ 1.48 +%else 1.49 + -no-sql-mysql \ 1.50 +%endif 1.51 +%if "%{with_pgsql}" == "yes" 1.52 + -qt-sql-psql \ 1.53 +%else 1.54 + -no-sql-psql \ 1.55 +%endif 1.56 -no-sql-odbc \ 1.57 - -no-sql-psql \ 1.58 + -system-sqlite \ 1.59 + -qt-sql-sqlite \ 1.60 -no-sql-sqlite2 \ 1.61 - -qt-sql-sqlite \ 1.62 - -system-sqlite \ 1.63 -openssl-linked \ 1.64 -xmlpatterns \ 1.65 -svg \ 1.66 @@ -258,12 +279,20 @@ 1.67 -static \ 1.68 -platform $platcomp \ 1.69 -no-sql-ibase \ 1.70 +%if "%{with_mysql}" == "yes" 1.71 -qt-sql-mysql \ 1.72 +%else 1.73 + -no-sql-mysql \ 1.74 +%endif 1.75 +%if "%{with_pgsql}" == "yes" 1.76 + -qt-sql-psql \ 1.77 +%else 1.78 + -no-sql-psql \ 1.79 +%endif 1.80 -no-sql-odbc \ 1.81 - -no-sql-psql \ 1.82 + -system-sqlite \ 1.83 + -qt-sql-sqlite \ 1.84 -no-sql-sqlite2 \ 1.85 - -qt-sql-sqlite \ 1.86 - -system-sqlite \ 1.87 -openssl-linked \ 1.88 -xmlpatterns \ 1.89 -svg \