summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-07-28 17:49:00 +0000
committerjlam <jlam@pkgsrc.org>2001-07-28 17:49:00 +0000
commit4484f7b4544b46f1288f40af22c527273b2e1e2a (patch)
treed04575cb7c05e1fee86f94628e1a1dd9cbb0ad35 /databases
parent6e42ce1fd373ebd4f7c6df5c7b2822a693238e9a (diff)
downloadpkgsrc-4484f7b4544b46f1288f40af22c527273b2e1e2a.tar.gz
java-db3: Java interface to the Sleepcat DB3 library.
Idea provided in pkg/13512 and pkg/13518 by Martti Kuparinen <martti.kuparinen@iki.fi>.
Diffstat (limited to 'databases')
-rw-r--r--databases/java-db3/Makefile45
-rw-r--r--databases/java-db3/buildlink.mk36
-rw-r--r--databases/java-db3/distinfo6
-rw-r--r--databases/java-db3/patches/patch-aa236
-rw-r--r--databases/java-db3/patches/patch-ab30
-rw-r--r--databases/java-db3/pkg/DESCR23
-rw-r--r--databases/java-db3/pkg/PLIST7
7 files changed, 383 insertions, 0 deletions
diff --git a/databases/java-db3/Makefile b/databases/java-db3/Makefile
new file mode 100644
index 00000000000..20a9998b818
--- /dev/null
+++ b/databases/java-db3/Makefile
@@ -0,0 +1,45 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/07/28 17:49:00 jlam Exp $
+
+DISTNAME= db-3.2.9
+PKGNAME= java-db3-2.9
+CATEGORIES= databases
+MASTER_SITES= http://www.sleepycat.com/update/3.2.9/
+
+MAINTAINER= jlam@netbsd.org
+HOMEPAGE= http://www.sleepycat.com/
+COMMENT= Sleepycat Software's Berkeley DB version 3 with Java support
+
+DEPENDS+= db3-2.9:../../databases/db3
+
+USE_JAVA= yes
+JDK_HOME= ${JAVA_HOME}
+JAVAC= ${JDK_HOME}/bin/javac
+JAR= ${JDK_HOME}/bin/jar
+JAVACABS= ${JAVAC}
+
+USE_BUILDLINK_ONLY= yes
+USE_LIBTOOL= yes
+LTCONFIG_OVERRIDE= ${WRKDIR}/${DISTNAME}/dist/ltconfig
+GNU_CONFIGURE= yes
+CONFIGURE_SCRIPT= ../dist/configure
+
+CONFIGURE_ARGS+= --program-transform-name=s,db_,db3_,
+CONFIGURE_ARGS+= --includedir=${PREFIX}/include/db3
+CONFIGURE_ARGS+= --enable-shared
+CONFIGURE_ARGS+= --enable-java
+CONFIGURE_ENV+= JAVAC="${JAVAC}"
+CONFIGURE_ENV+= JAVACABS="${JAVACABS}"
+CONFIGURE_ENV+= JAR="${JAR}"
+ALL_TARGET= libdb3_java.la java
+INSTALL_TARGET= install_java
+
+WRKSRC= ${WRKDIR}/${DISTNAME}/build_unix
+
+.include "../../mk/bsd.pkg.mk"
+
+.if ${PKG_JVM} == "jdk"
+CPPFLAGS+= -I${JDK_HOME}/include/netbsd
+.elif ${PKG_JVM} == "sun-jdk"
+JDK_HOME= ${LOCALBASE}/java
+CPPFLAGS+= -I${JDK_HOME}/include/linux
+.endif
diff --git a/databases/java-db3/buildlink.mk b/databases/java-db3/buildlink.mk
new file mode 100644
index 00000000000..450fd5d771f
--- /dev/null
+++ b/databases/java-db3/buildlink.mk
@@ -0,0 +1,36 @@
+# $NetBSD: buildlink.mk,v 1.1.1.1 2001/07/28 17:49:00 jlam Exp $
+#
+# This Makefile fragment is included by packages that use java-db3.
+#
+# To use this Makefile fragment, simply:
+#
+# (1) Optionally define BUILDLINK_DEPENDS.java-db3 to the dependency pattern
+# for the version of java-db3 desired.
+# (2) Include this Makefile fragment in the package Makefile,
+# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
+# search path, and
+# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
+# path.
+
+.if !defined(JAVA_DB3_BUILDLINK_MK)
+JAVA_DB3_BUILDLINK_MK= # defined
+
+.include "../../mk/bsd.buildlink.mk"
+
+BUILDLINK_DEPENDS.java-db3?= java-db3>=3.2.9
+DEPENDS+= ${BUILDLINK_DEPENDS.java-db3}:../../databases/java-db3
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.java-db3=java-db3
+BUILDLINK_PREFIX.java-db3_DEFAULT= ${LOCALBASE}
+BUILDLINK_FILES.java-db3= lib/db3.jar
+BUILDLINK_FILES.java-db3+= lib/libdb3_java.*
+
+.include "../../databases/db3/buildlink.mk"
+
+BUILDLINK_TARGETS.java-db3= java-db3-buildlink
+BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.java-db3}
+
+pre-configure: ${BUILDLINK_TARGETS.java-db3}
+java-db3-buildlink: _BUILDLINK_USE
+
+.endif # JAVA_DB3_BUILDLINK_MK
diff --git a/databases/java-db3/distinfo b/databases/java-db3/distinfo
new file mode 100644
index 00000000000..dc73e9b24f8
--- /dev/null
+++ b/databases/java-db3/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2001/07/28 17:49:00 jlam Exp $
+
+SHA1 (db-3.2.9.tar.gz) = 1adcc34b6a56e51e4019e80bc56b509ac28e1035
+Size (db-3.2.9.tar.gz) = 2085238 bytes
+SHA1 (patch-aa) = 32a39969500b837357c2ce59fb2a90ea82181455
+SHA1 (patch-ab) = 7d33cd81c1e23b44d72bb2018624af8dfd08fed4
diff --git a/databases/java-db3/patches/patch-aa b/databases/java-db3/patches/patch-aa
new file mode 100644
index 00000000000..bb2c746d42b
--- /dev/null
+++ b/databases/java-db3/patches/patch-aa
@@ -0,0 +1,236 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/07/28 17:49:00 jlam Exp $
+
+--- ../dist/Makefile.in.orig Thu Nov 30 15:07:33 2000
++++ ../dist/Makefile.in
+@@ -17,7 +17,7 @@
+ INSTALLER= @INSTALLER@
+
+ LDFLAGS= @LDFLAGS@
+-LIBDB_ARGS= @LIBDB_ARGS@
++LIBDB_ARGS= $(libso_linkname)
+ LIBJSO_LIBS= @LIBJSO_LIBS@
+ LIBS= @LIBS@
+ LIBSO_LIBS= @LIBSO_LIBS@
+@@ -26,19 +26,19 @@
+ LIBXSO_LIBS= @LIBXSO_LIBS@
+
+ POSTLINK= @POSTLINK@
+-SOLINK= @SOLINK@
++SOLINK= @SOLINK@ -version-info @DB_VERSION_MINOR@:@DB_VERSION_PATCH@
+ SOFLAGS= @SOFLAGS@
+ SOMAJOR= @DB_VERSION_MAJOR@
+ SOVERSION= @DB_VERSION_MAJOR@.@DB_VERSION_MINOR@
+
+-libdb= libdb.a
++libdb= $(libso_base).la
+
+-libso_base= libdb
+-libso_linkname= $(libso_base)-$(SOVERSION).la
+-libso= $(libso_base)-$(SOVERSION).@SOSUFFIX@
+-libso_target= $(libso_base)-$(SOVERSION).la
++libso_base= libdb3
++libso_linkname= $(libso_base).la
++libso= $(libso_base).@SOSUFFIX@.$(SOVERSION)
++libso_target= $(libso_base).la
+ libso_default= $(libso_base).@SOSUFFIX@
+-libso_major= $(libso_base)-$(SOMAJOR).@SOSUFFIX@
++libso_major= $(libso_base).@SOSUFFIX@.$(SOMAJOR)
+
+ ##################################################
+ # C++
+@@ -47,12 +47,12 @@
+ # You must configure it using:
+ # --enable-cxx
+ ##################################################
+-libcxx= libdb_cxx.a
+-libxso_base= libdb_cxx
+-libxso= $(libxso_base)-$(SOVERSION).@SOSUFFIX@
+-libxso_target= $(libxso_base)-$(SOVERSION).la
++libcxx= libdb3_cxx.a
++libxso_base= libdb3_cxx
++libxso= $(libxso_base).@SOSUFFIX@.$(SOVERSION)
++libxso_target= $(libxso_base).la
+ libxso_default= $(libxso_base).@SOSUFFIX@
+-libxso_major= $(libxso_base)-$(SOMAJOR).@SOSUFFIX@
++libxso_major= $(libxso_base).@SOSUFFIX@.$(SOMAJOR)
+
+ ##################################################
+ # JAVA
+@@ -72,13 +72,13 @@
+ JAVA_DBDIR= $(JAVA_SRCDIR)/$(JAVA_DBREL)
+ JAVA_EXDIR= $(JAVA_SRCDIR)/com/sleepycat/examples
+
+-libj_jarfile= db.jar
+-libjso_base= libdb_java
+-libjso= $(libjso_base)-$(SOVERSION).@SOSUFFIX@
+-libjso_target= $(libjso_base)-$(SOVERSION).la
++libj_jarfile= db3.jar
++libjso_base= libdb3_java
++libjso= $(libjso_base).@SOSUFFIX@.$(SOVERSION)
++libjso_target= $(libjso_base).la
+ libjso_default= $(libjso_base).@SOSUFFIX@
+-libjso_major= $(libjso_base)-$(SOMAJOR).@SOSUFFIX@
+-libjso_g= $(libjso_base)-$(SOVERSION)_g.@SOSUFFIX@
++libjso_major= $(libjso_base).@SOSUFFIX@.$(SOMAJOR)
++libjso_g= $(libjso_base)_g.@SOSUFFIX@.$(SOVERSION)
+
+ ##################################################
+ # TCL
+@@ -88,11 +88,11 @@
+ # --enable-tcl --with-tcl=DIR --enable-dynamic
+ ##################################################
+ TCFLAGS= @TCFLAGS@
+-libtso_base= libdb_tcl
+-libtso= $(libtso_base)-$(SOVERSION).@SOSUFFIX@
+-libtso_target= $(libtso_base)-$(SOVERSION).la
++libtso_base= libdb3_tcl
++libtso= $(libtso_base).@SOSUFFIX@.$(SOVERSION)
++libtso_target= $(libtso_base).la
+ libtso_default= $(libtso_base).@SOSUFFIX@
+-libtso_major= $(libtso_base)-$(SOMAJOR).@SOSUFFIX@
++libtso_major= $(libtso_base).@SOSUFFIX@.$(SOMAJOR)
+
+ ##################################################
+ # DB_DUMP185 UTILITY
+@@ -115,7 +115,7 @@
+ bindir= @bindir@
+ includedir=@includedir@
+ libdir= @libdir@
+-docdir= $(prefix)/docs
++docdir= $(prefix)/share/doc/db3
+
+ dmode= 755
+ emode= 555
+@@ -192,8 +192,8 @@
+ db_dump@o@ db_load@o@ db_printlog@o@ db_recover@o@ db_stat@o@ \
+ db_upgrade@o@ db_verify@o@ util_log@o@ util_sig@o@
+
+-PROGS= @ADDITIONAL_PROGS@ db_archive db_checkpoint db_deadlock \
+- db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify
++PROGS= @ADDITIONAL_PROGS@ db3_archive db3_checkpoint db3_deadlock \
++ db3_dump db3_load db3_printlog db3_recover db3_stat db3_upgrade db3_verify
+
+ JAVA_DBSRCS=\
+ $(JAVA_DBDIR)/Db.java $(JAVA_DBDIR)/DbAppendRecno.java \
+@@ -230,14 +230,6 @@
+ ##################################################
+ all: @DEFAULT_LIB@ @ADDITIONAL_LIBS@ @ADDITIONAL_LANG@ $(PROGS)
+
+-$(libdb): $(OBJS)
+- $(ar) $@ $(OBJS)
+- test ! -f $(ranlib) || $(ranlib) $@
+-
+-$(libcxx): $(COBJS) $(OBJS)
+- $(ar) $@ $(COBJS) $(OBJS)
+- test ! -f $(ranlib) || $(ranlib) $@
+-
+ $(libso_target): $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libso_target) \
+ $(OBJS) $(LDFLAGS) $(LIBSO_LIBS)
+@@ -275,57 +267,57 @@
+ ##################################################
+ # Utilities
+ ##################################################
+-berkeley_db_svc: $(RPC_SRV) util_log@o@ @DEFAULT_LIB@
++berkeley_db3_svc: $(RPC_SRV) util_log@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) $(RPC_SRV) util_log@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_archive: db_archive@o@ util_sig@o@ @DEFAULT_LIB@
++db3_archive: db_archive@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_archive@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_checkpoint: db_checkpoint@o@ util_log@o@ util_sig@o@ @DEFAULT_LIB@
++db3_checkpoint: db_checkpoint@o@ util_log@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_checkpoint@o@ util_log@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_deadlock: db_deadlock@o@ util_log@o@ util_sig@o@ @DEFAULT_LIB@
++db3_deadlock: db_deadlock@o@ util_log@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_deadlock@o@ util_log@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_dump: db_dump@o@ util_sig@o@ @DEFAULT_LIB@
++db3_dump: db_dump@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) db_dump@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_dump185: db_dump185@o@ @LIBOBJS@
++db3_dump185: db_dump185@o@ @LIBOBJS@
+ $(CCLINK) -o $@ $(LDFLAGS) db_dump185@o@ @LIBOBJS@ $(DB185LIB)
+ $(POSTLINK) $@
+
+-db_load: db_load@o@ util_sig@o@ @DEFAULT_LIB@
++db3_load: db_load@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) db_load@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_printlog: db_printlog@o@ util_sig@o@ @DEFAULT_LIB@
++db3_printlog: db_printlog@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_printlog@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_recover: db_recover@o@ util_sig@o@ @DEFAULT_LIB@
++db3_recover: db_recover@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_recover@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_stat: db_stat@o@ util_sig@o@ @DEFAULT_LIB@
++db3_stat: db_stat@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) db_stat@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_upgrade: db_upgrade@o@ util_sig@o@ @DEFAULT_LIB@
++db3_upgrade: db_upgrade@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_upgrade@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+
+-db_verify: db_verify@o@ util_sig@o@ @DEFAULT_LIB@
++db3_verify: db_verify@o@ util_sig@o@ @DEFAULT_LIB@
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_verify@o@ util_sig@o@ $(LIBDB_ARGS) $(LIBS)
+ $(POSTLINK) $@
+@@ -452,8 +444,6 @@
+ @cd $(libdir) && $(rm) -f \
+ $(libso_target) $(libso) $(libso_default) $(libso_major)
+ @$(INSTALLER) $(libso_target) $(libdir)
+- @cd $(libdir) && $(ln) -s $(libso) $(libso_default)
+- @cd $(libdir) && $(ln) -s $(libso) $(libso_major)
+ @$(LIBTOOL) --mode=finish $(libdir)
+
+ install_dynamic_cxx:
+@@ -463,8 +453,6 @@
+ @cd $(libdir) && $(rm) -f \
+ $(libxso_target) $(libxso) $(libxso_default) $(libxso_major)
+ @$(INSTALLER) $(libxso_target) $(libdir)
+- @cd $(libdir) && $(ln) -s $(libxso) $(libxso_default)
+- @cd $(libdir) && $(ln) -s $(libxso) $(libxso_major)
+
+ install_tcl:
+ @echo "Installing DB Tcl library: $(libdir) ..."
+@@ -473,8 +461,6 @@
+ @cd $(libdir) && $(rm) -f \
+ $(libtso_target) $(libtso) $(libtso_default) $(libtso_major)
+ @$(INSTALLER) $(libtso_target) $(libdir)
+- @cd $(libdir) && $(ln) -s $(libtso) $(libtso_default)
+- @cd $(libdir) && $(ln) -s $(libtso) $(libtso_major)
+
+ install_java:
+ @echo "Installing DB Java library: $(libdir) ..."
+@@ -483,9 +469,6 @@
+ @cd $(libdir) && $(rm) -f \
+ $(libjso_target) $(libjso) $(libjso_default) $(libjso_major)
+ @$(INSTALLER) $(libjso_target) $(libdir)
+- @cd $(libdir) && $(ln) -s $(libjso) $(libjso_default)
+- @cd $(libdir) && $(ln) -s $(libjso) $(libjso_major)
+- @cd $(libdir) && $(ln) -s $(libjso) $(libjso_g)
+ @$(cp) $(JAVA_CLASSTOP)/$(libj_jarfile) $(libdir)
+
+ install_utilities:
diff --git a/databases/java-db3/patches/patch-ab b/databases/java-db3/patches/patch-ab
new file mode 100644
index 00000000000..3697f81816d
--- /dev/null
+++ b/databases/java-db3/patches/patch-ab
@@ -0,0 +1,30 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/07/28 17:49:00 jlam Exp $
+
+--- ../dist/configure.orig Wed Jan 24 15:16:18 2001
++++ ../dist/configure Thu Mar 22 17:36:06 2001
+@@ -1605,6 +1605,7 @@
+ if test "$GXX" = "yes"; then
+ CXXVERSION=`${MAKEFILE_CXX} --version`
+ case ${CXXVERSION} in
++ egcs*) CXXFLAGS="-fexceptions $CXXFLAGS";;
+ 1.*|2.[01234567].*|*-1.*|*-2.[01234567].* )
+ CXXFLAGS="-fhandle-exceptions $CXXFLAGS";;
+ * ) CXXFLAGS="-fexceptions $CXXFLAGS";;
+@@ -1632,7 +1633,7 @@
+ --disable-static \
+ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+- SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/' ./libtool`
++ SOSUFFIX=`./libtool --config | sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/'`
+ DEFAULT_LIB="\$(libso_target)"
+ DEFAULT_INSTALL="install_dynamic"
+ LIBDB_ARGS="\$(libso_linkname)"
+@@ -1644,7 +1645,7 @@
+
+ INSTALLER="\$(LIBTOOL) --mode=install cp"
+ POSTLINK="\$(LIBTOOL) --mode=execute true"
+- SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC} -avoid-version"
++ SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}"
+ SOFLAGS="-rpath \$(libdir)"
+ o=".lo"
+ fi
diff --git a/databases/java-db3/pkg/DESCR b/databases/java-db3/pkg/DESCR
new file mode 100644
index 00000000000..262096316e7
--- /dev/null
+++ b/databases/java-db3/pkg/DESCR
@@ -0,0 +1,23 @@
+Berkeley DB is an embeddable database system that supports keyed access to
+data. The software is distributed in source code form, and developers can
+compile and link the source code into a single library for inclusion
+directly in their applications.
+
+Developers may choose to store data in any of several different storage
+structures to satisfy the requirements of a particular application. In
+database terminology, these storage structures and the code that operates on
+them are called access methods. The library includes support for the
+following access methods:
+
+ * B+tree: Stores keys in sorted order, using either a programmer-supplied
+ ordering function or a default function that does lexicographical
+ ordering of keys. Applications may perform equality or range searches.
+ * Hashing: Stores records in a hash table for fast searches based on
+ strict equality. Extended Linear Hashing modifies the hash function
+ used by the table as new records are inserted, in order to keep buckets
+ underfull in the steady state.
+ * Fixed and Variable-Length Records: Stores fixed- or variable-length
+ records in sequential order. Record numbers may be immutable or
+ mutable, i.e., permitting new records to be inserted between existing
+ records or requiring that new records be added only at the end of the
+ database.
diff --git a/databases/java-db3/pkg/PLIST b/databases/java-db3/pkg/PLIST
new file mode 100644
index 00000000000..09ba2d48bde
--- /dev/null
+++ b/databases/java-db3/pkg/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/07/28 17:49:00 jlam Exp $
+lib/db3.jar
+lib/libdb3_java.a
+lib/libdb3_java.la
+lib/libdb3_java.so
+lib/libdb3_java.so.2
+lib/libdb3_java.so.2.9