From e4e675f05911c58444c5c45003f7e450e46e5c5e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 21 Aug 2009 20:31:26 +0000 Subject: [PATCH] Switch to building against qt4; fix misdeclaration of SQLBIGINT and SQLUBIGINT. --- import.log | 1 - odbcinst.ini | 6 ++++-- odbcint64-config.patch | 26 +++++++++++++++++++++++++ unixODBC.spec | 44 ++++++++++++++++++++---------------------- 4 files changed, 51 insertions(+), 26 deletions(-) delete mode 100644 import.log create mode 100644 odbcint64-config.patch diff --git a/import.log b/import.log deleted file mode 100644 index b9275c8..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -unixODBC-2_2_14-4_fc10:HEAD:unixODBC-2.2.14-4.fc10.src.rpm:1244546569 diff --git a/odbcinst.ini b/odbcinst.ini index f19c0d1..29ea10a 100644 --- a/odbcinst.ini +++ b/odbcinst.ini @@ -1,6 +1,4 @@ # Example driver definitions -# Note: on a 64-bit machine, change /usr/lib to /usr/lib64 -# # Driver from the postgresql-odbc package # Setup from the unixODBC package @@ -8,6 +6,8 @@ Description = ODBC for PostgreSQL Driver = /usr/lib/psqlodbc.so Setup = /usr/lib/libodbcpsqlS.so +Driver64 = /usr/lib64/psqlodbc.so +Setup64 = /usr/lib64/libodbcpsqlS.so FileUsage = 1 @@ -17,4 +17,6 @@ FileUsage = 1 Description = ODBC for MySQL Driver = /usr/lib/libmyodbc5.so Setup = /usr/lib/libodbcmyS.so +Driver64 = /usr/lib64/libmyodbc5.so +Setup64 = /usr/lib64/libodbcmyS.so FileUsage = 1 diff --git a/odbcint64-config.patch b/odbcint64-config.patch new file mode 100644 index 0000000..902a656 --- /dev/null +++ b/odbcint64-config.patch @@ -0,0 +1,26 @@ +Fix output of odbc_config --header, per bug #518623. +This error results in SQLBIGINT and SQLUBIGINT being misdefined as +int, where they need to be [unsigned] long or long long. + + +diff -Naur unixODBC-2.2.14.orig/exe/odbc-config.c unixODBC-2.2.14/exe/odbc-config.c +--- unixODBC-2.2.14.orig/exe/odbc-config.c 2008-05-20 08:58:17.000000000 -0400 ++++ unixODBC-2.2.14/exe/odbc-config.c 2009-08-21 14:15:35.000000000 -0400 +@@ -66,12 +66,15 @@ + printf( "#ifndef HAVE_LONG_LONG\n #define HAVE_LONG_LONG\n#endif\n" ); + #endif + ++#define xstr(s) str(s) ++#define str(s) #s ++ + #ifdef ODBCINT64 +- printf( "#ifndef ODBCINT64\n #define ODBCINT64\n#endif\n" ); ++ printf( "#ifndef ODBCINT64\n #define ODBCINT64 %s\n#endif\n", xstr(ODBCINT64) ); + #endif + + #ifdef UODBCINT64 +- printf( "#ifndef UODBCINT64\n #define UODBCINT64\n#endif\n" ); ++ printf( "#ifndef UODBCINT64\n #define UODBCINT64 %s\n#endif\n", xstr(UODBCINT64) ); + #endif + + #ifdef DISABLE_INI_CACHING diff --git a/unixODBC.spec b/unixODBC.spec index a32a7de..c49ca14 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,7 +1,7 @@ Summary: A complete ODBC driver manager for Linux Name: unixODBC Version: 2.2.14 -Release: 5%{?dist} +Release: 6%{?dist} Group: System Environment/Libraries URL: http://www.unixODBC.org/ # Programs are GPL, libraries are LGPL, except News Server library is GPL. @@ -10,8 +10,8 @@ License: GPLv2+ and LGPLv2+ Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz Source1: odbcinst.ini Source2: ODBCConfig.desktop -Source3: DataManager.desktop Source4: conffile.h + Patch1: depcomp.patch Patch2: multilib-config.patch Patch3: warning-cleanup.patch @@ -19,10 +19,11 @@ Patch6: export-symbols.patch Patch7: libtool-config.patch Patch8: so-version-bump.patch Patch9: keep-typedefs.patch +Patch10: odbcint64-config.patch Conflicts: iodbc BuildRequires: libX11-devel libXt-devel libXext-devel -BuildRequires: qt3-devel readline-devel +BuildRequires: qt4-devel readline-devel BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex BuildRequires: desktop-file-utils BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -48,8 +49,8 @@ Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %description kde -This package contains components for the ODBCConfig and DataManager -(KDE) components of unixODBC. +This package contains components for the ODBCConfig +(KDE) component of unixODBC. %prep %setup -q @@ -60,6 +61,8 @@ This package contains components for the ODBCConfig and DataManager %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 + chmod 0644 Drivers/MiniSQL/*.c chmod 0644 Drivers/nn/*.c chmod 0644 Drivers/template/*.c @@ -75,11 +78,9 @@ libtoolize --install || libtoolize %build # pick up qt path -export QTDIR= -. /etc/profile.d/qt.sh +export PATH="%{_qt4_bindir}:$PATH" # clean up old moc files -(cd ODBCConfig && rm -f mclass*.cpp) -(cd DataManager && rm -f mclass*.cpp) +(cd odbcinstQ4 && rm -f mC*.cpp) aclocal automake --add-missing @@ -90,13 +91,12 @@ CFLAGS="%{optflags} -fno-strict-aliasing" CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS -%configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes --enable-drivers --enable-ltdllib +%configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes --enable-drivers --enable-ltdllib --with-qt-programs="%{_qt4_bindir}" --with-qt-libraries="%{_qt4_libdir}" make all %install # pick up qt path -export QTDIR= -. /etc/profile.d/qt.sh +export PATH="%{_qt4_bindir}:$PATH" rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications @@ -104,14 +104,9 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps make DESTDIR=$RPM_BUILD_ROOT install install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} -cp DataManager/LinuxODBC.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps -cp DataManager/ODBC.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps/odbc.xpm -cp DataManagerII/LinuxODBC.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps -cp DataManagerII/ODBC.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps/odbc.xpm # installing *.desktop files desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2} -desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE3} # multilib header hacks # we only apply this to known Red Hat multilib arches, per bug #181335 @@ -177,13 +172,7 @@ rm -rf $RPM_BUILD_ROOT %files kde %defattr(-,root,root) %{_bindir}/ODBCConfig -%{_bindir}/DataManager -%{_bindir}/DataManagerII -%{_bindir}/odbctest %{_datadir}/applications/ODBCConfig.desktop -%{_datadir}/applications/DataManager.desktop -%{_datadir}/pixmaps/LinuxODBC.xpm -%{_datadir}/pixmaps/odbc.xpm %{_libdir}/libodbcinstQ*so %{_libdir}/libodbcinstQ*so.* @@ -194,6 +183,15 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Fri Aug 21 2009 Tom Lane 2.2.14-6 +- Switch to building against qt4, not qt3. This means the DataManager, + DataManagerII, and odbctest applications are gone. +Resolves: #514064 +- Use Driver64/Setup64 to eliminate need for hand-adjustment of odbcinst.ini +Resolves: #514688 +- Fix misdeclaration of SQLBIGINT and SQLUBIGINT in generated header files +Resolves: #518623 + * Sun Jul 26 2009 Fedora Release Engineering - 2.2.14-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild