Switch to building against qt4; fix misdeclaration of SQLBIGINT and

SQLUBIGINT.
This commit is contained in:
Tom Lane 2009-08-21 20:31:26 +00:00
parent d4010528a4
commit e4e675f059
4 changed files with 51 additions and 26 deletions

View File

@ -1 +0,0 @@
unixODBC-2_2_14-4_fc10:HEAD:unixODBC-2.2.14-4.fc10.src.rpm:1244546569

View File

@ -1,6 +1,4 @@
# Example driver definitions # Example driver definitions
# Note: on a 64-bit machine, change /usr/lib to /usr/lib64
#
# Driver from the postgresql-odbc package # Driver from the postgresql-odbc package
# Setup from the unixODBC package # Setup from the unixODBC package
@ -8,6 +6,8 @@
Description = ODBC for PostgreSQL Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1 FileUsage = 1
@ -17,4 +17,6 @@ FileUsage = 1
Description = ODBC for MySQL Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc5.so Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so Setup = /usr/lib/libodbcmyS.so
Driver64 = /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1 FileUsage = 1

26
odbcint64-config.patch Normal file
View File

@ -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

View File

@ -1,7 +1,7 @@
Summary: A complete ODBC driver manager for Linux Summary: A complete ODBC driver manager for Linux
Name: unixODBC Name: unixODBC
Version: 2.2.14 Version: 2.2.14
Release: 5%{?dist} Release: 6%{?dist}
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.unixODBC.org/ URL: http://www.unixODBC.org/
# Programs are GPL, libraries are LGPL, except News Server library is GPL. # 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 Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz
Source1: odbcinst.ini Source1: odbcinst.ini
Source2: ODBCConfig.desktop Source2: ODBCConfig.desktop
Source3: DataManager.desktop
Source4: conffile.h Source4: conffile.h
Patch1: depcomp.patch Patch1: depcomp.patch
Patch2: multilib-config.patch Patch2: multilib-config.patch
Patch3: warning-cleanup.patch Patch3: warning-cleanup.patch
@ -19,10 +19,11 @@ Patch6: export-symbols.patch
Patch7: libtool-config.patch Patch7: libtool-config.patch
Patch8: so-version-bump.patch Patch8: so-version-bump.patch
Patch9: keep-typedefs.patch Patch9: keep-typedefs.patch
Patch10: odbcint64-config.patch
Conflicts: iodbc Conflicts: iodbc
BuildRequires: libX11-devel libXt-devel libXext-devel 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: automake autoconf libtool libtool-ltdl-devel bison flex
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -48,8 +49,8 @@ Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description kde %description kde
This package contains components for the ODBCConfig and DataManager This package contains components for the ODBCConfig
(KDE) components of unixODBC. (KDE) component of unixODBC.
%prep %prep
%setup -q %setup -q
@ -60,6 +61,8 @@ This package contains components for the ODBCConfig and DataManager
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1
chmod 0644 Drivers/MiniSQL/*.c chmod 0644 Drivers/MiniSQL/*.c
chmod 0644 Drivers/nn/*.c chmod 0644 Drivers/nn/*.c
chmod 0644 Drivers/template/*.c chmod 0644 Drivers/template/*.c
@ -75,11 +78,9 @@ libtoolize --install || libtoolize
%build %build
# pick up qt path # pick up qt path
export QTDIR= export PATH="%{_qt4_bindir}:$PATH"
. /etc/profile.d/qt.sh
# clean up old moc files # clean up old moc files
(cd ODBCConfig && rm -f mclass*.cpp) (cd odbcinstQ4 && rm -f mC*.cpp)
(cd DataManager && rm -f mclass*.cpp)
aclocal aclocal
automake --add-missing automake --add-missing
@ -90,13 +91,12 @@ CFLAGS="%{optflags} -fno-strict-aliasing"
CXXFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS 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 make all
%install %install
# pick up qt path # pick up qt path
export QTDIR= export PATH="%{_qt4_bindir}:$PATH"
. /etc/profile.d/qt.sh
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
@ -104,14 +104,9 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} 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 # installing *.desktop files
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2} desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2}
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE3}
# multilib header hacks # multilib header hacks
# we only apply this to known Red Hat multilib arches, per bug #181335 # we only apply this to known Red Hat multilib arches, per bug #181335
@ -177,13 +172,7 @@ rm -rf $RPM_BUILD_ROOT
%files kde %files kde
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/ODBCConfig %{_bindir}/ODBCConfig
%{_bindir}/DataManager
%{_bindir}/DataManagerII
%{_bindir}/odbctest
%{_datadir}/applications/ODBCConfig.desktop %{_datadir}/applications/ODBCConfig.desktop
%{_datadir}/applications/DataManager.desktop
%{_datadir}/pixmaps/LinuxODBC.xpm
%{_datadir}/pixmaps/odbc.xpm
%{_libdir}/libodbcinstQ*so %{_libdir}/libodbcinstQ*so
%{_libdir}/libodbcinstQ*so.* %{_libdir}/libodbcinstQ*so.*
@ -194,6 +183,15 @@ rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%changelog %changelog
* Fri Aug 21 2009 Tom Lane <tgl@redhat.com> 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 <rel-eng@lists.fedoraproject.org> - 2.2.14-5 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild