Subject: pkg/13512: optional java support to db3
To: None <gnats-bugs@gnats.netbsd.org>
From: None <martti.kuparinen@iki.fi>
List: netbsd-bugs
Date: 07/19/2001 16:12:26
>Number:         13512
>Category:       pkg
>Synopsis:       optional java support to db3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 19 07:10:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Martti Kuparinen
>Release:        1.5W
>Organization:
>Environment:
System: NetBSD dhcp39 1.5W NetBSD 1.5W (KAYAK) #1: Tue Jul 17 10:49:51 CEST 2001 root@dhcp39:/usr/src/sys/arch/i386/compile/KAYAK i386
Architecture: i386
Machine: i386

>Description:

While trying to build OpenOffice I discovered that the current db3
package doesn't build Java support. I realize that this must be
an optional feature...

Try with "make WANT_DB3_JAVA_SUPPORT=1 install".

>How-To-Repeat:
>Fix:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/databases/db3/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	2001/03/26 19:31:55	1.6
+++ Makefile	2001/07/19 14:09:01
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.6 2001/03/26 19:31:55 skrll Exp $
 
-DISTNAME=	db-3.2.9
-PKGNAME=	db3-2.9
+DISTNAME=	db-${DB3_VERSION}
+PKGNAME=	db3-${DB3_VERSION}
 CATEGORIES=	databases
 MASTER_SITES=	http://www.sleepycat.com/update/3.2.9/
 
@@ -9,6 +9,8 @@
 HOMEPAGE=	http://www.sleepycat.com/
 COMMENT=	Sleepycat Software's Berkeley DB version 3
 
+DB3_VERSION=	3.2.9
+
 USE_LIBTOOL=		yes
 LTCONFIG_OVERRIDE=	${WRKDIR}/${DISTNAME}/dist/ltconfig
 GNU_CONFIGURE=		yes
@@ -17,6 +19,17 @@
 CONFIGURE_ARGS+=	--program-transform-name=s,db_,db3_,
 CONFIGURE_ARGS+=	--enable-cxx
 CONFIGURE_ARGS+=	--enable-shared
+
+.if defined(WANT_DB3_JAVA_SUPPORT)
+CONFIGURE_ARGS+=	--enable-java
+PLIST_SUBST+=		JAVA=
+DEPENDS+=		sun-jdk>=1.3.1:../../lang/sun-jdk13
+CFLAGS+=		-I${LOCALBASE}/java/include/linux
+PATH!=			echo "${PATH}:${LOCALBASE}/java/bin"
+.else
+CONFIGURE_ARGS+=	--disable-java
+PLIST_SUBST+=		JAVA="@comment "
+.endif
 
 WRKSRC=			${WRKDIR}/${DISTNAME}/build_unix
 
Index: pkg/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/databases/db3/pkg/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- PLIST	2001/03/26 19:31:56	1.3
+++ PLIST	2001/07/19 14:09:02
@@ -11,6 +11,12 @@
 bin/db3_verify
 include/db3/db_cxx.h
 include/db3/db.h
+${JAVA}lib/db3.jar
+${JAVA}lib/libdb3_java-3.2.a
+${JAVA}lib/libdb3_java-3.2.la
+${JAVA}lib/libdb3_java-3.2.so
+${JAVA}lib/libdb3_java-3.2.so.2
+${JAVA}lib/libdb3_java-3.2.so.2.9
 lib/libdb3.a
 lib/libdb3.la
 lib/libdb3.so
>Release-Note:
>Audit-Trail:
>Unformatted: