rpms/qt4/devel qt4.spec,1.6,1.7

Rex Dieter (rdieter) fedora-extras-commits at redhat.com
Tue Jun 20 16:41:29 UTC 2006


Author: rdieter

Update of /cvs/extras/rpms/qt4/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27930

Modified Files:
	qt4.spec 
Log Message:
* Tue Jun 20 2006 Rex Dieter <rexdieter[AT]users.sf.net> 4.1.3-9
- make each sql plugin optional



Index: qt4.spec
===================================================================
RCS file: /cvs/extras/rpms/qt4/devel/qt4.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- qt4.spec	9 Jun 2006 19:24:59 -0000	1.6
+++ qt4.spec	20 Jun 2006 16:41:29 -0000	1.7
@@ -2,7 +2,7 @@
 Summary: Qt GUI toolkit
 Name:	 qt4
 Version: 4.1.3
-Release: 8%{?dist}
+Release: 9%{?dist}
 
 License: GPL/QPL
 Group: 	 System Environment/Libraries
@@ -21,11 +21,13 @@
 Source23: qtdemo.desktop
 Source24: qtconfig.desktop
 
-## Optional bits
-# Build SQL plugins (mysql, unixodbc, postgresql, sqlite)
-%define buildSQL 1
-# define to build sqlite2 plugin (FIXME/TODO)
-#define sqlite2 1
+## optional plugin bits
+# set to -no-sql-<driver> to disable
+# set to -qt-sql-<driver> to enable *in* qt library
+%define mysql  -plugin-sql-mysql 
+%define odbc   -plugin-sql-odbc 
+%define psql   -plugin-sql-psql 
+%define sqlite -plugin-sql-sqlite 
 
 %define qt_dirname qt4
 %define qtdir %{_libdir}/%{qt_dirname}
@@ -48,27 +50,32 @@
 BuildRequires: freetype-devel
 BuildRequires: fontconfig-devel
 
-%define x_deps xorg-x11-devel libGL-devel libGLU-devel
+%define x_deps libGL-devel libGLU-devel
 %if "%{?fedora}" > "4"
 %define x_deps libICE-devel libSM-devel libXcursor-devel libXext-devel libXft-devel libXi-devel libXinerama-devel libXrandr-devel libXrender-devel libXt-devel libX11-devel xorg-x11-proto-devel libGL-devel libGLU-devel
 %endif
 BuildRequires: %{x_deps}
 
-%if %{buildSQL}
-# mysql
+%if "%{?mysql}" != "-no-sql-mysql"
 # mysql-devel < 4 build fails on 4.1.3+, not sure why... yet.  -- Rex
 BuildRequires: mysql-devel >= 4.0
 # If we get mysql3 to work, use mysql_config --cflags instead -- Rex
-%global mysql_include $(mysql_config --include || echo "-I%{_includedir}/mysql")
-%global mysql_libs    $(mysql_config --libs || echo "-L%{_libdir}/mysql")
+%global mysql_include $(mysql_config --include 2> /dev/null || echo "-I%{_includedir}/mysql")
+%global mysql_libs    $(mysql_config --libs 2> /dev/null || echo "-L%{_libdir}/mysql")
 %global mysql_ldflags $(echo %{mysql_libs} | perl -pi -e "s, -l/?\\\S+,,g")
+%endif
 
-# postgresql
+%if "%{?psql}" != "-no-sql-psql"
 BuildRequires: postgresql-devel
-# unixODBC
+%endif
+
+%if "%{?odbc}" != "-no-sql-odbc"
 BuildRequires: unixODBC-devel
-# sqlite
-BuildRequires: sqlite-devel
+%endif
+
+%if "%{?sqlite:1}" != "-no-sql-sqlite"
+# FIXME: currently BR not used, uses 3rd-party internal sources
+#BuildRequires: sqlite-devel
 %endif
 
 %description 
@@ -190,14 +197,10 @@
   -system-zlib \
   -system-libpng \
   -system-libjpeg \
-%if %{buildSQL}
-  -plugin-sql-mysql \
-  %{?mysql_include} \
-  %{?mysql_ldflags}  \
-  -plugin-sql-psql \
-  -plugin-sql-odbc \
-  -plugin-sql-sqlite \
-%endif
+  %{?mysql}  %{?mysql_include} %{?mysql_ldflags} \
+  %{?psql}   \
+  %{?odbc}   \
+  %{?sqlite} \
   -cups \
   -sm \
   -stl \
@@ -371,19 +374,25 @@
 %{_bindir}/qt*demo*
 %{_datadir}/applications/*qtdemo*.desktop
 
-%if %{buildSQL}
+%if "%{?odbc}" == "-plugin-sql-odbc"
 %files odbc 
 %defattr(-,root,root,-)
 %{qtdir}/plugins/sqldrivers/libqsqlodbc*
+%endif
 
+%if "%{?psql}" == "-plugin-sql-psql"
 %files postgresql 
 %defattr(-,root,root,-)
 %{qtdir}/plugins/sqldrivers/libqsqlpsql*
+%endif
 
+%if "%{?mysql}" == "-plugin-sql-mysql"
 %files mysql 
 %defattr(-,root,root,-)
 %{qtdir}/plugins/sqldrivers/libqsqlmysql*
+%endif
 
+%if "%{?sqlite}" == "-plugin-sql-sqlite"
 %files sqlite 
 %defattr(-,root,root,-)
 %{qtdir}/plugins/sqldrivers/libqsqlite*
@@ -391,6 +400,9 @@
 
 
 %changelog
+* Tue Jun 20 2006 Rex Dieter <rexdieter[AT]users.sf.net> 4.1.3-9
+- make each sql plugin optional
+
 * Fri Jun 09 2006 Rex Dieter <rexdieter[AT]users.sf.net> 4.1.3-8
 - qmake.conf: undefine QMAKE_STRIP to get useful -debuginfo (bug #193602)
 - move (not symlink) .pc files into %%_libdir/pkgconfig




More information about the scm-commits mailing list