diff options
Diffstat (limited to 'community/psqlodbc')
-rw-r--r-- | community/psqlodbc/PKGBUILD | 33 | ||||
-rw-r--r-- | community/psqlodbc/fix-function-declarations.patch | 47 |
2 files changed, 80 insertions, 0 deletions
diff --git a/community/psqlodbc/PKGBUILD b/community/psqlodbc/PKGBUILD new file mode 100644 index 000000000..176acffd9 --- /dev/null +++ b/community/psqlodbc/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 14188 2010-04-02 00:06:50Z andrea $ +# Maintainer: +# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux-br.org> +# Contributor: Rick Rein <jeebusroxors@gmail.com> + +pkgname=psqlodbc +pkgver=08.04.0100 +pkgrel=2 +pkgdesc="PostgreSQL ODBC driver" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.postgresql.org" +depends=('unixodbc' 'postgresql-libs' 'libtool') +makedepends=('postgresql') +options=('!libtool') +source=(ftp://ftp2.it.postgresql.org/mirrors/postgres//odbc/versions/src/$pkgname-$pkgver.tar.gz + fix-function-declarations.patch) +md5sums=('2328c3e97e6a376620a5d317137515ff' + 'f1189f9c6ae0b5bfb5ee8423eaa4076f') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + patch -p1 -i "$srcdir/fix-function-declarations.patch" || return 1 + + ./configure --prefix=/usr + make || return 1 +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/community/psqlodbc/fix-function-declarations.patch b/community/psqlodbc/fix-function-declarations.patch new file mode 100644 index 000000000..4504661b0 --- /dev/null +++ b/community/psqlodbc/fix-function-declarations.patch @@ -0,0 +1,47 @@ +diff -upr psqlodbc-08.04.0100.orig/odbcapi30.c psqlodbc-08.04.0100/odbcapi30.c +--- psqlodbc-08.04.0100.orig/odbcapi30.c 2008-10-07 00:46:09.000000000 +0300 ++++ psqlodbc-08.04.0100/odbcapi30.c 2009-09-19 20:13:57.000000000 +0300 +@@ -118,13 +118,7 @@ SQLColAttribute(SQLHSTMT StatementHandle + SQLPOINTER CharacterAttribute, + SQLSMALLINT BufferLength, + SQLSMALLINT *StringLength, +-#if defined(_WIN64) + SQLLEN *NumericAttribute +-#elif defined(WITH_UNIXODBC) || defined(WIN32) +- SQLPOINTER NumericAttribute +-#else +- SQLLEN *NumericAttribute +-#endif + ) + { + CSTR func = "SQLColAttribute"; +diff -upr psqlodbc-08.04.0100.orig/odbcapi30w.c psqlodbc-08.04.0100/odbcapi30w.c +--- psqlodbc-08.04.0100.orig/odbcapi30w.c 2009-03-22 16:17:10.000000000 +0200 ++++ psqlodbc-08.04.0100/odbcapi30w.c 2009-09-19 20:22:17.000000000 +0300 +@@ -262,11 +262,7 @@ SQLRETURN SQL_API SQLColAttributeW( + SQLPOINTER pCharAttr, + SQLSMALLINT cbCharAttrMax, + SQLSMALLINT *pcbCharAttr, +-#if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64)) +- SQLPOINTER pNumAttr +-#else + SQLLEN *pNumAttr +-#endif + ) + { + CSTR func = "SQLColAttributeW"; +diff -upr psqlodbc-08.04.0100.orig/odbcapi.c psqlodbc-08.04.0100/odbcapi.c +--- psqlodbc-08.04.0100.orig/odbcapi.c 2008-11-23 03:00:53.000000000 +0200 ++++ psqlodbc-08.04.0100/odbcapi.c 2009-09-19 20:13:56.000000000 +0300 +@@ -1111,11 +1111,7 @@ SQLExtendedFetch( + HSTMT hstmt, + SQLUSMALLINT fFetchType, + SQLLEN irow, +-#ifdef WITH_UNIXODBC +- SQLROWSETSIZE *pcrow, +-#else + SQLULEN *pcrow, +-#endif /* WITH_UNIXODBC */ + SQLUSMALLINT *rgfRowStatus) + { + RETCODE ret; |