unixodbc2-nox stable port information

Package: unixodbc2-nox
Version: 2.2.12
Revision: 4
###
Depends: readline5-shlibs (>= 5.0-1004), %N-shlibs (= %v-%r)
BuildDepends: readline5 (>= 5.0-1004), libiconv-dev, fink (>= 0.24.12)
BuildDependsOnly: True
Conflicts: unixodbc, unixodbc-nox, unixodbc2
Replaces: unixodbc, unixodbc-nox, unixodbc2
###
CustomMirror: <<
Primary: http://www.unixodbc.com/
Secondary: ftp://ftp.easysoft.com/pub/beta/unixODBC/
<<
###
Source: mirror:custom:unixODBC-%v.tar.gz
Source-MD5: 9a116aad4059c31d231b626ffdf1869a
###
PatchFile: %n.patch
PatchFile-MD5: afd19b17715e73dc3da3a675509a06e4
PatchScript: <<
### FIX shared lib loading
patch -p1 < %{PatchFile}
### FIX libltdl linking
perl -pi -e 's,-flat_namespace -undefined suppress,-undefined dynamic_lookup,g' libltdl/configure
perl -pi -e 's,-all_load \$convenience,-all_load,g' libltdl/configure
perl -pi -e 's,\$nonopt \$\(test \"x\$module\" = xyes \&\& echo -bundle \|\| echo -dynamiclib\) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs\$linker_flags -install_name \$rpath/\$soname \$verstring,\$nonopt \$\(test \"x\$module\" = xyes \&\& echo -bundle \$allow_undefined_flag \|\| echo -dynamiclib\) -o \$lib \$libobjs \$deplibs\$linker_flags \$\(test \"x\$module\" \!= xyes \&\& echo -install_name \$rpath/\$soname \$verstring\),g' libltdl/configure
### FIX main linking
perl -pi -e 's,-flat_namespace -undefined suppress,-undefined dynamic_lookup,g' configure
perl -pi -e 's,-all_load \$convenience,-all_load,g' configure
perl -pi -e 's,need_relink=yes,need_relink=no,g' ltmain.sh
perl -pi -e 's,\$nonopt \$\(test \"x\$module\" = xyes \&\& echo -bundle \|\| echo -dynamiclib\) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs\$linker_flags -install_name \$rpath/\$soname \$verstring,\$nonopt \$\(test \"x\$module\" = xyes \&\& echo -bundle \$allow_undefined_flag \|\| echo -dynamiclib\) -o \$lib \$libobjs \$deplibs\$linker_flags \$\(test \"x\$module\" \!= xyes \&\& echo -install_name \$rpath/\$soname \$verstring\),g' libltdl/configure
### Not sure why this was set to i386 for OSX??
perl -pi -e 's,i386,sys,g' Drivers/txt/SQLTables.c
### Loadable modules shouldn't be versioned
cd Drivers; for i in `find . -name Makefile\*`; do perl -pi -e 's,version-info( [1-2]:0:0)?,avoid-version,g' $i; done
perl -pi -e 's,-avoid-version,-avoid-version -module,g' Drivers/template/Makefile.in
cd DRVConfig; for i in `find . -name Makefile\*`; do perl -pi -e 's,version-info( [1-2]:0:0)?,avoid-version,g' $i; done
perl -pi -e 's,version-info( [1-2]:0:0)?,avoid-version,g' odbcinstQ/Makefile.in
perl -pi -e 's,version-info \@LIB_VERSION\@,avoid-version,g' samples/Makefile.in

### Fix for broken libtool on 10.5
perl -pi -e 's,-export-dynamic \\,-export-dynamic,g' DriverManager/Makefile.in
perl -pi -e 's,[\s]+-export-symbols \@srcdir\@/DriverManager.exp\n,,g' DriverManager/Makefile.in
perl -pi -e 's,-export-dynamic \\,-export-dynamic,g' autotest/Makefile.in
perl -pi -e 's,[\s]+-export-symbols \@srcdir\@/gtrtst.exp\s\n,,g' autotest/Makefile.in
perl -pi -e 's,-export-symbols \@srcdir\@/cur.exp ,,g' cur/Makefile.in
perl -pi -e 's,-export-dynamic \\,-export-dynamic,g' odbcinst/Makefile.in
perl -pi -e 's,[\s]+-export-symbols \@srcdir\@/odbcinst.exp\n,,g' odbcinst/Makefile.in
perl -pi -e 's,[\s]+-export-symbols \@srcdir\@/odbcinstQ.exp \\\n,,g' odbcinstQ/Makefile.in
<<
###
GCC: 4.0
###
DocFiles: COPYING ChangeLog
###
UseMaxBuildJobs: false
ConfigureParams: --disable-stats --with-libiconv-prefix=%p --disable-gui --with-pic --enable-shared --disable-static --mandir=%i/share/man --infodir=%p/share/info --libexecdir=%p/lib --disable-dependency-tracking
###
InstallScript: <<
make install prefix=%i
mv %i/bin/isql %i/bin/isql.unixodbc
mv %i/include/sql.h %i/include/sql.h.unixodbc
mv %i/include/sqlext.h %i/include/sqlext.h.unixodbc
mv %i/include/sqltypes.h %i/include/sqltypes.h.unixodbc
<<
###
SplitOff: <<
Package: %N-shlibs
Depends: libiconv
Conflicts: unixodbc-shlibs, unixodbc-nox-shlibs, unixodbc2-shlibs
Replaces: unixodbc (<= 2.2.1-2), unixodbc-nox (<= 2.2.1-1), unixodbc-shlibs, unixodbc-nox-shlibs, unixodbc2-shlibs
Files: <<
lib/lib*.*.dylib
<<
Shlibs: <<
%p/lib/libgtrtst.1.dylib 2.0.0 %n (>= 2.2.5-11)
%p/lib/libodbc.1.dylib 2.0.0 %n (>= 2.2.5-11)
%p/lib/libodbccr.1.dylib 2.0.0 %n (>= 2.2.11-10)
%p/lib/libodbcinst.1.dylib 2.0.0 %n (>= 2.2.5-11)
<<
DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README* Drivers/MySQL/README:README.MySQL
<<
###
PostInstScript: <<
update-alternatives --install %p/bin/isql isql %p/bin/isql.unixodbc 60
update-alternatives --install %p/include/sql.h sql.h %p/include/sql.h.unixodbc 60
update-alternatives --install %p/include/sqlext.h sqlext.h %p/include/sqlext.h.unixodbc 60
update-alternatives --install %p/include/sqltypes.h sqltypes.h %p/include/sqltypes.h.unixodbc 60
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
update-alternatives --remove isql %p/bin/isql.unixodbc
update-alternatives --remove sql.h %p/include/sql.h.unixodbc
update-alternatives --remove sqlext.h %p/include/sqlext.h.unixodbc
update-alternatives --remove sqltypes.h %p/include/sqltypes.h.unixodbc
fi
<<
###
Description: ODBC 3 connectivity for Unix (No GUI)
DescDetail: <<
The unixODBC project provides UNIX applications with the same ODBC 3.51 API
and facilities available under Windows. It provides a Driver Manager that
supports the full ODBC API and performs the ODBC 3 to ODBC 2 translations
with UNICODE to ANSI conversion. It also includes a set of graphical
utilities
that allow users to specify connections to DBMSes to be used by applications,
a collection of ODBC drivers including a simple text based driver, an NNTP
driver, a Postgres driver and others, and a selection of templates and
libraries that to aid in the construction of ODBC drivers. It works with
MySQL, Postgres, StarOffice, Applixware, iHTML, PHP, Perl DBD::ODBC,
Paradox 9, and many other applications and drivers. Connection pooling is
also provided to increase performance with applications such as PHP.
<<
DescPort: <<
dmacks: patch Makefile.in so that local -I (for libltdl) come before global.
<<
###
License: LGPL
Maintainer: Justin F. Hallett
Homepage: http://www.unixodbc.org/

unixodbc2-nox stable port .patch

diff -Nurd -x'*~' unixODBC-2.2.12.orig/Drivers/MiniSQL/Makefile.in unixODBC-2.2.12/Drivers/MiniSQL/Makefile.in
--- unixODBC-2.2.12.orig/Drivers/MiniSQL/Makefile.in 2006-08-31 08:24:10.000000000 -0400
+++ unixODBC-2.2.12/Drivers/MiniSQL/Makefile.in 2008-02-05 13:04:09.000000000 -0500
@@ -288,7 +288,7 @@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
@MSQL_TRUE@lib_LTLIBRARIES = libodbcmini.la
-@MSQL_TRUE@INCLUDES = -I@top_srcdir@/include -I. -I@msql_headers@ -I${LTDLINCL}
+@MSQL_TRUE@INCLUDES = -I@top_srcdir@/include -I. -I${LTDLINCL} -I@msql_headers@

# PAH - Redundant?
# DEFS = -DUNIXODBC @DEFS@ -DDRIVER_NAME=\"odbcminisql\"
diff -Nurd -x'*~' unixODBC-2.2.12.orig/ODBCConfig/Makefile.in unixODBC-2.2.12/ODBCConfig/Makefile.in
--- unixODBC-2.2.12.orig/ODBCConfig/Makefile.in 2006-08-31 08:24:20.000000000 -0400
+++ unixODBC-2.2.12/ODBCConfig/Makefile.in 2008-02-05 13:03:51.000000000 -0500
@@ -222,8 +222,8 @@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \
-@QT_TRUE@ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" $(LTDLINCL)
+@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(LTDLINCL) $(QT_CXXFLAGS) \
+@QT_TRUE@ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\"

@QT_TRUE@ODBCConfig_LDADD = \
@QT_TRUE@ $(QT_LDFLAGS) \
diff -Nurd -x'*~' unixODBC-2.2.12.orig/odbcinstQ/Makefile.in unixODBC-2.2.12/odbcinstQ/Makefile.in
--- unixODBC-2.2.12.orig/odbcinstQ/Makefile.in 2006-08-31 08:24:39.000000000 -0400
+++ unixODBC-2.2.12/odbcinstQ/Makefile.in 2008-02-05 13:03:31.000000000 -0500
@@ -254,8 +254,8 @@
-module

@QT_TRUE@lib_LTLIBRARIES = libodbcinstQ.la
-@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) \
-@QT_TRUE@ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\" $(LTDLINCL)
+@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(LTDLINCL) $(QT_CXXFLAGS) \
+@QT_TRUE@ -DSYSTEM_FILE_PATH=\"@sysconfdir@\" -DDEFLIB_PATH=\"@libdir@\"

@QT_TRUE@libodbcinstQ_la_LIBADD = \
@QT_TRUE@ $(QT_LDFLAGS) \
diff -Nurd -x'*~' unixODBC-2.2.12.orig/odbctest/Makefile.in unixODBC-2.2.12/odbctest/Makefile.in
--- unixODBC-2.2.12.orig/odbctest/Makefile.in 2006-08-31 08:24:40.000000000 -0400
+++ unixODBC-2.2.12/odbctest/Makefile.in 2008-02-05 13:03:11.000000000 -0500
@@ -235,7 +235,7 @@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) -DSYSTEM_FILE_PATH=\"@sysconfdir@\" $(LTDLINCL)
+@QT_TRUE@INCLUDES = -I@top_srcdir@/include $(LTDLINCL) $(QT_CXXFLAGS) -DSYSTEM_FILE_PATH=\"@sysconfdir@\"
@QT_TRUE@odbctest_LDADD = \
@QT_TRUE@ $(QT_LDFLAGS) \
@QT_TRUE@ $(QT_LIBS) \
diff -uNr unixODBC-2.2.6/sqp/lex.l unixODBC-2.2.6-new/sqp/lex.l
--- unixODBC-2.2.6/sqp/lex.l Wed Oct 17 12:40:32 2001
+++ unixODBC-2.2.6-new/sqp/lex.l Wed Nov 26 19:21:44 2003
@@ -50,7 +50,8 @@
{
sprintf( g_szError, "%s processing '%s' on line %d", s, yytext, g_nLineNo );

- YY_FLUSH_BUFFER;
+ yy_flush_buffer(YY_CURRENT_BUFFER);
+ /* YY_FLUSH_BUFFER; */
}

/**********************************************************************

unixodbc2-nox _unstable_ port .patch