Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Dec 2010 22:10:09 GMT
From:      Berend de Boer <berend@pobox.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/144993: databases/postgresql-odbc: contents of numeric fields returned as 0
Message-ID:  <201012262210.oBQMA9eZ086320@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/144993; it has been noted by GNATS.

From: Berend de Boer <berend@pobox.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/144993: databases/postgresql-odbc: contents of numeric
 fields returned as 0
Date: Mon, 27 Dec 2010 10:49:56 +1300

 Hi FreeBSD,
 
 As suggested have used 08.04.0200 and that appears to work fine as
 well.
 
 Here the patch to upgrade the port to this version. As it appears the
 maintainer has no time, I'm happy to become maintainer as I probably
 need this working correctly for a few years.
 
 diff -urN postgresql-odbc.orig/Makefile postgresql-odbc/Makefile
 --- postgresql-odbc.orig/Makefile	2010-11-10 23:19:44.000000000 +1300
 +++ postgresql-odbc/Makefile	2010-12-27 10:30:51.000000000 +1300
 @@ -32,7 +32,7 @@
  # this is considered to be a part of the `postgresql' port.
  
  PORTNAME=		postgresql
 -PORTVERSION=		08.04.0100
 +PORTVERSION=		08.04.0200
  PORTREVISION=		0
  CATEGORIES=		databases
  MASTER_SITES=		${MASTER_SITE_PGSQL}
 @@ -45,12 +45,10 @@
  MAINTAINER=		ports@FreeBSD.org
  COMMENT=		PostgreSQL ODBC driver
  
 -BUILD_DEPENDS=		pg_config:${PORTSDIR}/databases/postgresql83-client
 +BUILD_DEPENDS=		pg_config:${PORTSDIR}/databases/postgresql84-client
  
  GNU_CONFIGURE=		YES
  
 -IGNORE=			does not work properly (see ports/144993)
 -
  .if !defined(WITH_IODBC)
  WITH_UNIXODBC=	yes
  .endif
 @@ -71,6 +69,7 @@
  DATADIR_1=	${DATADIR}/odbc
  DOCSDIR_1=	${DOCSDIR}/odbc
  post-install:
 +	${LN} ${PREFIX}/lib/libpsqlodbcw.so.0.0 ${PREFIX}/lib/psqlodbcw.so
  .if !defined(NOPORTDATA)
  	@${MKDIR} ${DATADIR_1}
  	${INSTALL_DATA} ${WRKSRC}/*.sql ${DATADIR_1}
 diff -urN postgresql-odbc.orig/distinfo postgresql-odbc/distinfo
 --- postgresql-odbc.orig/distinfo	2009-11-05 10:11:51.000000000 +1300
 +++ postgresql-odbc/distinfo	2010-12-27 09:59:52.000000000 +1300
 @@ -1,3 +1,2 @@
 -MD5 (postgresql/psqlodbc-08.04.0100.tar.gz) = 2328c3e97e6a376620a5d317137515ff
 -SHA256 (postgresql/psqlodbc-08.04.0100.tar.gz) = 57bb143d5d20804c5ce96214227e6e65dc16520efce7ac25ddb7cc4c8aa0db0a
 -SIZE (postgresql/psqlodbc-08.04.0100.tar.gz) = 736714
 +SHA256 (postgresql/psqlodbc-08.04.0200.tar.gz) = 6e745e9083d605b1cdeaacdd3bea8f83246da302f2df7ebbd72adca06460cb3f
 +SIZE (postgresql/psqlodbc-08.04.0200.tar.gz) = 725393
 diff -urN postgresql-odbc.orig/files/patch-odbcapi30.c postgresql-odbc/files/patch-odbcapi30.c
 --- postgresql-odbc.orig/files/patch-odbcapi30.c	2009-01-27 18:13:09.000000000 +1300
 +++ postgresql-odbc/files/patch-odbcapi30.c	1970-01-01 12:00:00.000000000 +1200
 @@ -1,13 +0,0 @@
 ---- odbcapi30.c.orig	2009-01-26 23:20:59.000000000 +0600
 -+++ odbcapi30.c	2009-01-26 23:21:47.000000000 +0600
 -@@ -118,9 +118,7 @@
 - 			SQLPOINTER CharacterAttribute,
 - 			SQLSMALLINT BufferLength,
 - 			SQLSMALLINT *StringLength,
 --#if defined(_WIN64)
 --			SQLLEN *NumericAttribute
 --#elif defined(WITH_UNIXODBC) || defined(WIN32)
 -+#if defined(WIN32)
 - 			SQLPOINTER NumericAttribute
 - #else
 - 			SQLLEN *NumericAttribute
 diff -urN postgresql-odbc.orig/files/patch-odbcapi30w.c postgresql-odbc/files/patch-odbcapi30w.c
 --- postgresql-odbc.orig/files/patch-odbcapi30w.c	2009-01-27 18:13:09.000000000 +1300
 +++ postgresql-odbc/files/patch-odbcapi30w.c	1970-01-01 12:00:00.000000000 +1200
 @@ -1,11 +0,0 @@
 ---- odbcapi30w.c.orig	2009-01-26 23:23:19.000000000 +0600
 -+++ odbcapi30w.c	2009-01-26 23:24:07.000000000 +0600
 -@@ -255,7 +255,7 @@
 - 	SQLPOINTER	pCharAttr,
 - 	SQLSMALLINT	cbCharAttrMax,	
 - 	SQLSMALLINT	*pcbCharAttr,
 --#if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64))
 -+#if defined(WIN32)
 - 	SQLPOINTER	pNumAttr
 - #else
 - 	SQLLEN		*pNumAttr
 diff -urN postgresql-odbc.orig/pkg-plist postgresql-odbc/pkg-plist
 --- postgresql-odbc.orig/pkg-plist	2008-10-25 08:00:28.000000000 +1300
 +++ postgresql-odbc/pkg-plist	2010-12-27 10:15:28.000000000 +1300
 @@ -1,4 +1,5 @@
  lib/psqlodbcw.la
 +lib/libpsqlodbcw.so.0.0
  lib/psqlodbcw.so
  %%PORTDOCS%%%%DOCSDIR%%/odbc/config-opt.html
  %%PORTDOCS%%%%DOCSDIR%%/odbc/config.html
 
 -- 
 All the best,
 
 Berend de Boer



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012262210.oBQMA9eZ086320>