From 4b872f9e450025dbd01e3b576729baab3cfa84d2 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 13 Mar 2014 15:04:09 +0100 Subject: [PATCH] New package: db185 (the original Berkeley DB 1.85 with BSD license). --- srcpkgs/db185/patches/db.1.85.diff | 100 +++++++++++++++++++++++++++++ srcpkgs/db185/template | 27 ++++++++ 2 files changed, 127 insertions(+) create mode 100644 srcpkgs/db185/patches/db.1.85.diff create mode 100644 srcpkgs/db185/template diff --git a/srcpkgs/db185/patches/db.1.85.diff b/srcpkgs/db185/patches/db.1.85.diff new file mode 100644 index 00000000000..04d1c080e1c --- /dev/null +++ b/srcpkgs/db185/patches/db.1.85.diff @@ -0,0 +1,100 @@ +--- hash/hash.c 1994-06-24 09:12:29.000000000 -0600 ++++ hash/hash.c 2010-05-26 13:54:28.000000000 -0600 +@@ -505,7 +505,7 @@ + else + if (wsize != sizeof(HASHHDR)) { + errno = EFTYPE; +- hashp->errno = errno; ++ hashp->errno_ = errno; + return (-1); + } + for (i = 0; i < NCACHED; i++) +@@ -536,7 +536,7 @@ + + hashp = (HTAB *)dbp->internal; + if (flag) { +- hashp->errno = errno = EINVAL; ++ hashp->errno_ = errno = EINVAL; + return (ERROR); + } + return (hash_access(hashp, HASH_GET, (DBT *)key, data)); +@@ -553,11 +553,11 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_NOOVERWRITE) { +- hashp->errno = errno = EINVAL; ++ hashp->errno_ = errno = EINVAL; + return (ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { +- hashp->errno = errno = EPERM; ++ hashp->errno_ = errno = EPERM; + return (ERROR); + } + return (hash_access(hashp, flag == R_NOOVERWRITE ? +@@ -574,11 +574,11 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_CURSOR) { +- hashp->errno = errno = EINVAL; ++ hashp->errno_ = errno = EINVAL; + return (ERROR); + } + if ((hashp->flags & O_ACCMODE) == O_RDONLY) { +- hashp->errno = errno = EPERM; ++ hashp->errno_ = errno = EPERM; + return (ERROR); + } + return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL)); +@@ -729,7 +729,7 @@ + + hashp = (HTAB *)dbp->internal; + if (flag && flag != R_FIRST && flag != R_NEXT) { +- hashp->errno = errno = EINVAL; ++ hashp->errno_ = errno = EINVAL; + return (ERROR); + } + #ifdef HASH_STATISTICS +--- hash/hash.h 1994-06-24 09:12:29.000000000 -0600 ++++ hash/hash.h 2010-05-26 13:53:48.000000000 -0600 +@@ -103,7 +103,7 @@ + BUFHEAD *cpage; /* Current page */ + int cbucket; /* Current bucket */ + int cndx; /* Index of next item on cpage */ +- int errno; /* Error Number -- for DBM ++ int errno_; /* Error Number -- for DBM + * compatability */ + int new_file; /* Indicates if fd is backing store + * or no */ +--- hash/ndbm.c 1994-07-21 12:02:40.000000000 -0600 ++++ hash/ndbm.c 2010-05-26 13:54:45.000000000 -0600 +@@ -180,7 +180,7 @@ + HTAB *hp; + + hp = (HTAB *)db->internal; +- return (hp->errno); ++ return (hp->errno_); + } + + extern int +@@ -190,7 +190,7 @@ + HTAB *hp; + + hp = (HTAB *)db->internal; +- hp->errno = 0; ++ hp->errno_ = 0; + return (0); + } + +--- PORT/linux/Makefile.orig 2014-03-13 14:58:27.943771560 +0100 ++++ PORT/linux/Makefile 2014-03-13 14:58:43.678574848 +0100 +@@ -15,8 +15,7 @@ MISC= snprintf.o + + ${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} + rm -f $@ +- ar cq $@ \ +- `lorder ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC} | tsort` ++ ar rcs $@ $^ + ranlib $@ + + clean: diff --git a/srcpkgs/db185/template b/srcpkgs/db185/template new file mode 100644 index 00000000000..f559fa5935a --- /dev/null +++ b/srcpkgs/db185/template @@ -0,0 +1,27 @@ +# Template file for 'db185' +pkgname=db185 +version=1.85 +revision=1 +wrksrc="db.${version}" +short_desc="The Original Berkeley DB 1.85" +maintainer="Juan RP " +license="BSD" +homepage="http://download.oracle.com/berkeley-db" +distfiles="http://download.oracle.com/berkeley-db/db.${version}.tar.gz" +checksum=4220d4ddeb77fb57ba2f37c1aa105d561d3ef85a6fb89c79c3edd735d0e193c6 + +# This is a development pkg explicitly, mostly to avoid the libdb +# dependency in mdocml. +conflicts="db-devel>=0" + +do_build() { + cd PORT/linux + make CC=$CC ${makejobs} +} + +do_install() { + vinstall PORT/include/db.h 644 usr/include + vinstall PORT/linux/libdb.a 644 usr/lib + # Create db_185.h for compat. + ln -s db.h ${DESTDIR}/usr/include/db_185.h +}