Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 May 2014 03:59:07 GMT
From:      David Shane Holden <dpejesh@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   java/189934: [patch] databases/postgresql-jdbc update to 9.3.1101
Message-ID:  <201405190359.s4J3x7bE053487@cgiserv.freebsd.org>
Resent-Message-ID: <201405190400.s4J400Vw028889@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         189934
>Category:       java
>Synopsis:       [patch] databases/postgresql-jdbc update to 9.3.1101
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-java
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 19 04:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     David Shane Holden
>Release:        
>Organization:
>Environment:
FreeBSD 10.0-RELEASE-p3 FreeBSD 10.0-RELEASE-p3 #0: Tue May 13 18:31:10 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Update postgresql-jdbc port to 9.3.1101.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/databases/postgresql-jdbc/Makefile b/databases/postgresql-jdbc/Makefile
index 684bea0..9c3789e 100644
--- a/databases/postgresql-jdbc/Makefile
+++ b/databases/postgresql-jdbc/Makefile
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	postgresql
-PORTVERSION=	9.1.902
-PORTREVISION=	1
+PORTVERSION=	9.3.1101
 DISTVERSIONSUFFIX=.src
 CATEGORIES=	databases java
 MASTER_SITES=	http://jdbc.postgresql.org/download/
@@ -15,28 +14,40 @@ COMMENT=	The Java JDBC implementation for PostgreSQL
 
 DIST_SUBDIR=	postgresql
 
+OPTIONS_DEFINE=	DOCS
+
 USE_ANT=	yes
 USE_JAVA=	yes
 
-PLIST_FILES=	%%JAVAJARDIR%%/postgresql.jar
+JAR_FILE=	postgresql-${DISTVERSION:C/.([0-9][0-9][0-9]*)/-\1/g}.${JDBCVER}.jar
+
+PLIST_FILES=	%%JAVAJARDIR%%/${JAR_FILE}
 PORTDOCS=	*
 DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
 SUB_FILES=	pkg-message
+SUB_LIST=	JAR_FILE=${JAR_FILE}
 
-NO_STAGE=	yes
-post-patch:
-	${REINPLACE_CMD} 's,/usr/local/pgsql/share/java,${JAVAJARDIR},' ${WRKSRC}/README
+.include <bsd.port.options.mk>
 
-OPTIONS_DEFINE=	DOCS
+.include <bsd.port.pre.mk>
 
-.include <bsd.port.options.mk>
+.if "${JAVA_PORT_VERSION}" == "1.6.0"
+JDBCVER=	jdbc4
+.elif "${JAVA_PORT_VERSION}" == "1.7.0" || "${JAVA_PORT_VERSION}" == "1.8.0"
+JDBCVER=	jdbc41
+.else
+IGNORE=		Unsupported Java version
+.endif
+
+post-patch:
+	${REINPLACE_CMD} 's,/usr/local/pgsql/share/java,${JAVAJARDIR},' ${WRKSRC}/README.md
+	${REINPLACE_CMD} 's,postgresql\.jar,${JAR_FILE},' ${WRKSRC}/README.md
 
 do-install:
-	@ ${INSTALL_DATA} ${WRKSRC}/jars/postgresql.jar ${JAVAJARDIR}/postgresql.jar
+	@ ${INSTALL_DATA} ${WRKSRC}/jars/${JAR_FILE} ${STAGEDIR}${JAVAJARDIR}/
 .if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
 .endif
-	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/postgresql-jdbc/distinfo b/databases/postgresql-jdbc/distinfo
index 669c99c..8b10e68 100644
--- a/databases/postgresql-jdbc/distinfo
+++ b/databases/postgresql-jdbc/distinfo
@@ -1,2 +1,2 @@
-SHA256 (postgresql/postgresql-jdbc-9.1-902.src.tar.gz) = 7f99c2307ae53d28412cc69ba75066e428d8fa6b567f1f1ea0acbb5d785cfc69
-SIZE (postgresql/postgresql-jdbc-9.1-902.src.tar.gz) = 606514
+SHA256 (postgresql/postgresql-jdbc-9.3-1101.src.tar.gz) = 1a41e7dab3d7627d4922d002e9a486f59532a387cf1d8b544192980494cd549a
+SIZE (postgresql/postgresql-jdbc-9.3-1101.src.tar.gz) = 1856965
diff --git a/databases/postgresql-jdbc/files/patch-build-xml b/databases/postgresql-jdbc/files/patch-build-xml
index e5ba244..c69eaa3 100644
--- a/databases/postgresql-jdbc/files/patch-build-xml
+++ b/databases/postgresql-jdbc/files/patch-build-xml
@@ -1,14 +1,11 @@
---- build.xml.orig	2007-10-15 09:49:36.000000000 +0200
-+++ build.xml	2008-01-22 13:52:37.000000000 +0100
-@@ -109,10 +109,7 @@
+--- build.xml.orig
++++ build.xml
+@@ -228,7 +228,7 @@
+     <available classname="org.postgresql.Driver" property="old.driver.present" />
+     <fail message="Old driver was detected on classpath or in jre/lib/ext, please remove and try again." if="old.driver.present" />
  
-   <target name="compile" depends="prepare,check_versions,driver">
- 
--    <available classname="org.postgresql.Driver" property="old.driver.present" />
--    <fail message="Old driver was detected on classpath or in jre/lib/ext, please remove and try again." if="old.driver.present" />
--
 -    <javac classpath="${srcdir}" srcdir="${srcdir}" destdir="${builddir}" debug="${debug}" source="${java.specification.version}">
-+    <javac includeAntRuntime="no" classpath="${srcdir}" srcdir="${srcdir}" destdir="${builddir}" debug="${debug}">
-       <!-- This is the core of the driver.  It is common for all versions. -->
-        <include name="${package}/*.java" />
-        <include name="${package}/core/**" />
++    <javac includeAntRuntime="no" classpath="${srcdir}" srcdir="${srcdir}" destdir="${builddir}" debug="${debug}" source="${java.specification.version}">
+       <patternset refid="jdbc.version.src.pattern"/>
+     </javac>
+   </target>
diff --git a/databases/postgresql-jdbc/files/pkg-message.in b/databases/postgresql-jdbc/files/pkg-message.in
index a0c1be4..f67e3f3 100644
--- a/databases/postgresql-jdbc/files/pkg-message.in
+++ b/databases/postgresql-jdbc/files/pkg-message.in
@@ -1,5 +1,5 @@
 PostgreSQL JDBC support installed!
 
-postgresql.jar resides in
-%%JAVAJARDIR%%/postgresql.jar
+%%JAR_FILE%% resides in
+%%JAVAJARDIR%%/%%JAR_FILE%%
 Add this to your CLASSPATH!


>Release-Note:
>Audit-Trail:
>Unformatted:



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