diff --git a/multilib-config.patch b/multilib-config.patch new file mode 100644 index 0000000..f2757fa --- /dev/null +++ b/multilib-config.patch @@ -0,0 +1,40 @@ +unixODBC's configure tends to pick the wrong libraries on a multilib +machine. Force it to use the location reported by /etc/profile.d/qt.sh +which we invoke in the specfile (yeah, a crude hack...) + + +diff -Naur unixODBC-2.2.12.orig/qt.m4 unixODBC-2.2.12/qt.m4 +--- unixODBC-2.2.12.orig/qt.m4 2006-05-16 13:42:26.000000000 -0400 ++++ unixODBC-2.2.12/qt.m4 2007-04-20 12:32:55.000000000 -0400 +@@ -207,30 +207,7 @@ + + # Ensure we have the lib dir... + if test "x$qt_libraries" = "x" ; then +- # see if it is relative to the includes +- qt_tree="$qt_includes" +- while test "x$qt_tree" != "x" ; do +- # first go around will fail... +- if expr "$QTVERSION" '>=' "040000" > /dev/null ; then +- if ls $qt_tree/lib/libQt* > /dev/null 2> /dev/null ; then +- qt_libraries=$qt_tree/lib +- break +- else +- # lop off tail of path +- dnl not as portable as it should be... +- qt_tree="`dirname $qt_tree`" +- fi +- else +- if ls $qt_tree/lib/libqt* > /dev/null 2> /dev/null ; then +- qt_libraries=$qt_tree/lib +- break +- else +- # lop off tail of path +- dnl not as portable as it should be... +- qt_tree="`dirname $qt_tree`" +- fi +- fi +- done ++ qt_libraries="$QTLIB" + fi + + # Use QTVERSION and gotthread to set libs we need... diff --git a/unixODBC.spec b/unixODBC.spec index 422fcde..0c54f48 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,7 +1,7 @@ Summary: A complete ODBC driver manager for Linux Name: unixODBC Version: 2.2.12 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL Group: System Environment/Libraries URL: http://www.unixODBC.org/ @@ -11,6 +11,7 @@ Source1: odbcinst.ini Source2: ODBCConfig.desktop Source3: DataManager.desktop Patch1: depcomp.patch +Patch2: multilib-config.patch Patch4: parserupdate.patch Patch5: nortldglobal.patch Patch6: unixODBC-2.2.11-stricmp.patch @@ -51,6 +52,7 @@ This package contains components for the ODBCConfig and DataManager %prep %setup -q %patch1 -p1 +%patch2 -p1 %patch4 -p1 %patch6 -p1 @@ -172,6 +174,9 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Fri Apr 20 2007 Tom Lane 2.2.12-3 +- Make configure find correct Qt libraries when building on a multilib machine + * Mon Apr 16 2007 Tom Lane 2.2.12-2 - Drop BuildRequires for kdelibs-devel Resolves: #152717