diff -r 6aeed4ef015a -r caa04e02b103 qt/qt.spec --- a/qt/qt.spec Fri Jan 09 19:02:45 2009 +0100 +++ b/qt/qt.spec Sat Jan 10 08:57:33 2009 +0100 @@ -33,10 +33,12 @@ Group: Development License: GPL Version: 4.4.3 -Release: 20081215 +Release: 20090106 # build options %option with_tools yes +%option with_mysql no +%option with_pgsql no %option with_shared no %option with_examples no @@ -54,6 +56,14 @@ PreReq: openssl, zlib, libiconv, sqlite, dbus BuildPreReq: fontconfig, freetype PreReq: fontconfig, freetype +%if "%{with_mysql}" == "yes" +BuildPreReq: mysql +PreReq: mysql +%endif +%if "%{with_pgsql}" == "yes" +BuildPreReq: postgresql +PreReq: postgresql +%endif AutoReq: no AutoReqProv: no Provides: QTSDK @@ -129,6 +139,9 @@ -e 's;^mac:\(LIBS\);\1;' \ config.tests/unix/iconv/iconv.pro %{l_shtool} subst \ + -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ + src/sql/drivers/drivers.pri + %{l_shtool} subst \ -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ @@ -189,12 +202,20 @@ -shared \ -platform $platcomp \ -no-sql-ibase \ +%if "%{with_mysql}" == "yes" -qt-sql-mysql \ +%else + -no-sql-mysql \ +%endif +%if "%{with_pgsql}" == "yes" + -qt-sql-psql \ +%else + -no-sql-psql \ +%endif -no-sql-odbc \ - -no-sql-psql \ + -system-sqlite \ + -qt-sql-sqlite \ -no-sql-sqlite2 \ - -qt-sql-sqlite \ - -system-sqlite \ -openssl-linked \ -xmlpatterns \ -svg \ @@ -258,12 +279,20 @@ -static \ -platform $platcomp \ -no-sql-ibase \ +%if "%{with_mysql}" == "yes" -qt-sql-mysql \ +%else + -no-sql-mysql \ +%endif +%if "%{with_pgsql}" == "yes" + -qt-sql-psql \ +%else + -no-sql-psql \ +%endif -no-sql-odbc \ - -no-sql-psql \ + -system-sqlite \ + -qt-sql-sqlite \ -no-sql-sqlite2 \ - -qt-sql-sqlite \ - -system-sqlite \ -openssl-linked \ -xmlpatterns \ -svg \