OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: [patch] postgresql-jdbc subpackage

From: Matthias Kilian (kilioutback.escape.de)
Date: Fri Feb 11 2005 - 06:58:18 CST


On Thu, Feb 10, 2005 at 10:38:24PM +0100, Matthias Kilian wrote:
> You're right; Tomorrow I'll submit a patch with a pseudo flavor
> "java" that has to set explicitely to build the JDBC driver.

diff -x CVS -rNu /usr/ports/databases/postgresql/Makefile ./Makefile
--- /usr/ports/databases/postgresql/Makefile Sat Feb 5 22:08:30 2005
+++ ./Makefile Fri Feb 11 13:30:50 2005
-1,12 +1,14
 # $OpenBSD: Makefile,v 1.72 2005/02/05 15:11:58 sturm Exp $
 
 COMMENT= "PostgreSQL RDBMS (client)"
+COMMENT-jdbc= "PostgreSQL RDMBS (JDBC driver)"
 COMMENT-server= "PostgreSQL RDBMS (server)"
 COMMENT-docs= "PostgreSQL RDBMS documentation"
 
 VERSION= 7.4.3
 DISTNAME= postgresql-${VERSION}
 FULLPKGNAME= postgresql-client-${VERSION}p1
+PKGNAME-jdbc= postgresql-jdbc-${VERSION}p1
 PKGNAME-server= postgresql-server-${VERSION}p1
 PKGNAME-docs= postgresql-docs-${VERSION}p1
 
-29,6 +31,13
 MULTI_PACKAGES= -server -docs
 SUBPACKAGE?=
 
+.if ${MACHINE_ARCH} == "i386"
+PSEUDO_FLAVORS= java
+.endif
+
+FLAVOR?=
+
+
 # The -client SUBPACKAGE should build and run fine on static arches,
 # but the server requires loadable library support. Until we figure
 # out the correct incantation to not build the server on those systems,
-80,6 +89,17
 WANTLIB=
 PKG_ARCH= *
 . endif
+.endif
+
+.if ${FLAVOR:L:Mjava}
+MULTI_PACKAGES+= -jdbc
+CONFIGURE_ARGS+= --with-java
+BUILD_DEPENDS= :jdk-1.4.2:devel/jdk/1.4 \
+ :apache-ant*->=1.4.1:devel/apache-ant
+JAVA_HOME= ${LOCALBASE}/jdk-1.4.2
+MAKE_FLAGS+= JAVA_HOME=${JAVA_HOME}
+FAKE_FLAGS+= JAVA_HOME=${JAVA_HOME}
+CONFIGURE_ENV+= JAVA_HOME=${JAVA_HOME}
 .endif
 
 # Regression tests must be done manually and not as root. Successful
diff -x CVS -rNu /usr/ports/databases/postgresql/pkg/DESCR ./pkg/DESCR
--- /usr/ports/databases/postgresql/pkg/DESCR Tue Aug 17 21:34:39 2004
+++ ./pkg/DESCR Fri Feb 11 13:31:59 2005
-17,4 +17,12
   Tutorial and User's Guide and Integrated Documentation package
   contains all the above documentation.
 
+* postgresql-jdbc-${VERSION} - JDBC driver
+ JDBC driver for accessing PostgreSQL from Java applications.
+ Only for i386. Must be enabled with pseudoflavor java.
+
 WWW: ${HOMEPAGE}
+
+FLAVORS:
+
+ java: build the JDBC driver (i386 only)
diff -x CVS -rNu /usr/ports/databases/postgresql/pkg/DESCR-jdbc ./pkg/DESCR-jdbc
--- /usr/ports/databases/postgresql/pkg/DESCR-jdbc Thu Jan 1 01:00:00 1970
+++ ./pkg/DESCR-jdbc Fri Feb 11 13:27:45 2005
-0,0 +1,3
+PostgreSQL RDBMS JDBC driver.
+
+Library and examples for Java clients using PostgreSQL.
diff -x CVS -rNu /usr/ports/databases/postgresql/pkg/PLIST-jdbc ./pkg/PLIST-jdbc
--- /usr/ports/databases/postgresql/pkg/PLIST-jdbc Thu Jan 1 01:00:00 1970
+++ ./pkg/PLIST-jdbc Fri Feb 11 13:27:45 2005
-0,0 +1,4
+comment $OpenBSD$
+share/postgresql/java/
+share/postgresql/java/postgresql-examples.jar
+share/postgresql/java/postgresql.jar