tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH] Update tdb to 1.1.5, add py-tdb
I'd like some review on this one, as it's a bit complex. I want
to switch bzr-svn from sqlite to tdb.
Thanks.
Update to 1.1.5; no changelog available.
They removed the man pages for some reason.
=== added directory 'databases/py-tdb'
=== added file 'databases/py-tdb/DESCR'
--- databases/py-tdb/DESCR 1970-01-01 00:00:00 +0000
+++ databases/py-tdb/DESCR 2009-09-06 03:57:49 +0000
@@ -0,0 +1 @@
+Python binding for TDB, the Trivial Database.
=== added file 'databases/py-tdb/Makefile'
--- databases/py-tdb/Makefile 1970-01-01 00:00:00 +0000
+++ databases/py-tdb/Makefile 2009-09-06 15:46:53 +0000
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+#PKGREVISION= 1
+COMMENT= Python binding for TDB
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+.include "../../databases/tdb/Makefile.common"
+
+# Move to pyversion.mk, like PYTHONBIN?
+PYTHON_CONFIG= ${LOCALBASE}/bin/python${PYVERSSUFFIX}-config
+CONFIGURE_ENV+= PYTHON_CONFIG=${PYTHON_CONFIG:Q}
+
+PY_PATCHPLIST= YES
+
+BUILD_TARGET= build-python
+INSTALL_TARGET= install-python
+TEST_TARGET= check-python
+
+.include "../../databases/tdb/buildlink3.mk"
+.include "../../lang/python/extension.mk"
+.include "../../mk/bsd.pkg.mk"
=== added file 'databases/py-tdb/PLIST'
--- databases/py-tdb/PLIST 1970-01-01 00:00:00 +0000
+++ databases/py-tdb/PLIST 2009-09-06 00:08:47 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+${PYSITELIB}/tdb.so
=== modified file 'databases/tdb/Makefile'
--- databases/tdb/Makefile 2009-09-05 23:26:01 +0000
+++ databases/tdb/Makefile 2009-09-06 00:34:40 +0000
@@ -1,22 +1,24 @@
# $NetBSD: Makefile,v 1.14 2008/06/20 01:09:11 joerg Exp $
-#
-DISTNAME= tdb-1.0.6
-PKGREVISION= 2
-CATEGORIES= databases
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tdb/}
-
-MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE= http://sourceforge.net/projects/tdb/
COMMENT= Small database system which uses files to store data
+#PKGREVISION= 1
+
PKG_DESTDIR_SUPPORT= user-destdir
+.include "Makefile.common"
+
# both install tdbtool and tdbdump
CONFLICTS+= samba-[0-9]*
-GNU_CONFIGURE= YES
-USE_TOOLS+= gmake
-USE_LIBTOOL= YES
+CONFIGURE_ARGS+= --disable-python
+
+TEST_TARGET= test
+
+# Ick, install missing .so symlinks required by py-tdb; inspired by Debian.
+post-install:
+ cd ${WRKSRC} && \
+ ln -s libtdb.so.1.* ${DESTDIR}${PREFIX}/lib/libtdb.so.1 && \
+ ln -s libtdb.so.1 ${DESTDIR}${PREFIX}/lib/libtdb.so
.include "../../mk/bsd.pkg.mk"
=== added file 'databases/tdb/Makefile.common'
--- databases/tdb/Makefile.common 1970-01-01 00:00:00 +0000
+++ databases/tdb/Makefile.common 2009-09-06 15:59:45 +0000
@@ -0,0 +1,17 @@
+# $NetBSD$
+# used by databases/tdb/Makefile
+# used by databases/py-tdb/Makefile
+
+DISTNAME= tdb-1.1.5
+CATEGORIES= databases
+MASTER_SITES= http://samba.org/ftp/tdb/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://tdb.samba.org/
+
+DISTINFO_FILE= ${.CURDIR}/../../databases/tdb/distinfo
+PATCHDIR= ${.CURDIR}/../../databases/tdb/patches
+
+GNU_CONFIGURE= YES
+USE_TOOLS+= gmake
+USE_LIBTOOL= YES
=== modified file 'databases/tdb/PLIST'
--- databases/tdb/PLIST 2009-09-05 23:26:01 +0000
+++ databases/tdb/PLIST 2009-09-06 00:22:39 +0000
@@ -1,16 +1,10 @@
-@comment $NetBSD: PLIST,v 1.2 2004/09/22 08:09:23 jlam Exp $
+@comment $NetBSD$
+bin/tdbbackup
bin/tdbdump
bin/tdbtool
include/tdb.h
-lib/libtdb.la
-man/man3/tdb.3
-man/man3/tdb_chainlock.3
-man/man3/tdb_close.3
-man/man3/tdb_delete.3
-man/man3/tdb_error.3
-man/man3/tdb_exists.3
-man/man3/tdb_fetch.3
-man/man3/tdb_firstkey.3
-man/man3/tdb_open.3
-man/man3/tdb_store.3
-man/man3/tdb_traverse.3
+lib/libtdb.a
+lib/libtdb.so
+lib/libtdb.so.1
+lib/libtdb.so.${PKGVERSION}
+lib/pkgconfig/tdb.pc
=== modified file 'databases/tdb/distinfo'
--- databases/tdb/distinfo 2009-09-05 23:26:01 +0000
+++ databases/tdb/distinfo 2009-09-06 15:44:41 +0000
@@ -1,8 +1,6 @@
$NetBSD: distinfo,v 1.3 2005/02/23 16:33:10 agc Exp $
-SHA1 (tdb-1.0.6.tar.gz) = d1876522f1b8ffa8cf844a1f6605e0c32d387a7a
-RMD160 (tdb-1.0.6.tar.gz) = 5163caf1cc76c9f3a69e88f7438ecd98ec5e52cf
-Size (tdb-1.0.6.tar.gz) = 139948 bytes
-SHA1 (patch-aa) = 7af794ccbaeab55f4d44f41212ca881dd169506e
-SHA1 (patch-ab) = dbe92ea1facfb3d601a7ce1a9b7f9a25e0c879cc
-SHA1 (patch-ac) = 3a8da4fd18724ba54f593a27adbe9cdfd012f255
+SHA1 (tdb-1.1.5.tar.gz) = 1451cced3d333e24c67464249b4015f048770e40
+RMD160 (tdb-1.1.5.tar.gz) = d13f18e42d87161f7d48876c8d7957c54e889cf0
+Size (tdb-1.1.5.tar.gz) = 254358 bytes
+SHA1 (patch-aa) = 04ab8ea2a6cd4c6d645673e72b5f4a713caf135e
=== added file 'databases/tdb/patches/patch-aa'
--- databases/tdb/patches/patch-aa 1970-01-01 00:00:00 +0000
+++ databases/tdb/patches/patch-aa 2009-09-06 15:44:36 +0000
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Use pkgsrc-specified LDFLAGS when linking Python extension module, to pick up
+pkgsrc libpython rather than the system libpython.
+
+--- tdb.mk.orig 2009-05-23 07:37:50.000000000 -0700
++++ tdb.mk
+@@ -40,7 +40,7 @@ pytdb.o: $(tdbdir)/pytdb.c
+ $(CC) $(PICFLAG) -c $(tdbdir)/pytdb.c $(CFLAGS) `$(PYTHON_CONFIG)
--cflags`
+
+ tdb.$(SHLIBEXT): libtdb.$(SHLIBEXT) pytdb.o
+- $(SHLD) $(SHLD_FLAGS) -o $@ pytdb.o -L. -ltdb `$(PYTHON_CONFIG)
--ldflags`
++ $(SHLD) $(SHLD_FLAGS) $(LDFLAGS) -o $@ pytdb.o -L. -ltdb
`$(PYTHON_CONFIG) --ldflags`
+
+ install:: installdirs installbin installheaders installlibs \
+ $(PYTHON_INSTALL_TARGET)
=== removed file 'databases/tdb/patches/patch-aa'
--- databases/tdb/patches/patch-aa 2009-09-05 23:26:01 +0000
+++ databases/tdb/patches/patch-aa 1970-01-01 00:00:00 +0000
@@ -1,100 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2002/11/29 19:19:12 jmmv Exp $
-
---- configure.orig Tue Dec 11 05:06:33 2001
-+++ configure
-@@ -1592,95 +1592,8 @@ else
- fi
-
-
--echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
--echo "configure:1597: checking for gdbm_open in -lgdbm" >&5
--ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-- echo $ac_n "(cached) $ac_c" 1>&6
--else
-- ac_save_LIBS="$LIBS"
--LIBS="-lgdbm $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 1605 "configure"
--#include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error. */
--/* We use char because int might match the return type of a gcc2
-- builtin and then its argument prototype would still apply. */
--char gdbm_open();
--
--int main() {
--gdbm_open()
--; return 0; }
--EOF
--if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
&& test -s conftest${ac_exeext}; then
-- rm -rf conftest*
-- eval "ac_cv_lib_$ac_lib_var=yes"
--else
-- echo "configure: failed program was:" >&5
-- cat conftest.$ac_ext >&5
-- rm -rf conftest*
-- eval "ac_cv_lib_$ac_lib_var=no"
--fi
--rm -f conftest*
--LIBS="$ac_save_LIBS"
--
--fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-- echo "$ac_t""yes" 1>&6
-- have_gdbm=true
--else
-- echo "$ac_t""no" 1>&6
- have_gdbm=false
--fi
--
--if test "x$have_gdbm" = "xfalse";then
-- echo "configure: warning: WARNING: tdbtest is disabled. It needs gdbm." 1>&2
--fi
--echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
--echo "configure:1641: checking for dlopen in -ldl" >&5
--ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
--if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-- echo $ac_n "(cached) $ac_c" 1>&6
--else
-- ac_save_LIBS="$LIBS"
--LIBS="-ldl $LIBS"
--cat > conftest.$ac_ext <<EOF
--#line 1649 "configure"
--#include "confdefs.h"
--/* Override any gcc2 internal prototype to avoid an error. */
--/* We use char because int might match the return type of a gcc2
-- builtin and then its argument prototype would still apply. */
--char dlopen();
--
--int main() {
--dlopen()
--; return 0; }
--EOF
--if { (eval echo configure:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
&& test -s conftest${ac_exeext}; then
-- rm -rf conftest*
-- eval "ac_cv_lib_$ac_lib_var=yes"
--else
-- echo "configure: failed program was:" >&5
-- cat conftest.$ac_ext >&5
-- rm -rf conftest*
-- eval "ac_cv_lib_$ac_lib_var=no"
--fi
--rm -f conftest*
--LIBS="$ac_save_LIBS"
--
--fi
--if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-- echo "$ac_t""yes" 1>&6
-- have_dllib=true
--else
-- echo "$ac_t""no" 1>&6
- have_dllib=false
--fi
--
--if test "x$have_dllib" = "xfalse";then
-- echo "configure: warning: WARNING: tdbtorture is disabled. It needs libdl."
1>&2
--fi
--
-
-
- if $have_gdbm; then
=== removed file 'databases/tdb/patches/patch-ab'
--- databases/tdb/patches/patch-ab 2009-09-05 23:26:01 +0000
+++ databases/tdb/patches/patch-ab 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2002/11/29 19:19:12 jmmv Exp $
-
---- Makefile.in.orig Tue Dec 11 05:08:49 2001
-+++ Makefile.in
-@@ -80,7 +80,6 @@ LDADD = libtdb.la
- @BUILD_TDBTORTURE_TRUE@TDBTORTURE = tdbtorture
- @BUILD_TDBTORTURE_FALSE@TDBTORTURE =
-
--noinst_PROGRAMS = tdbspeed tdbiterate $(TDBTEST) $(TDBTORTURE)
- bin_PROGRAMS = tdbtool tdbdump
-
- lib_LTLIBRARIES = libtdb.la
-@@ -115,7 +114,7 @@ LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
- libtdb_la_LIBADD =
- libtdb_la_OBJECTS = tdb.lo spinlock.lo
--PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-+PROGRAMS = $(bin_PROGRAMS)
-
- tdbtool_OBJECTS = tdbtool.o
- tdbtool_LDADD = $(LDADD)
-@@ -159,8 +158,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(
-
- TAR = tar
- GZIP_ENV = --best
--SOURCES = $(libtdb_la_SOURCES) $(tdbtool_SOURCES) $(tdbdump_SOURCES)
$(tdbspeed_SOURCES) $(tdbiterate_SOURCES) $(tdbtest_SOURCES)
$(tdbtorture_SOURCES)
--OBJECTS = $(libtdb_la_OBJECTS) $(tdbtool_OBJECTS) $(tdbdump_OBJECTS)
$(tdbspeed_OBJECTS) $(tdbiterate_OBJECTS) $(tdbtest_OBJECTS)
$(tdbtorture_OBJECTS)
-+SOURCES = $(libtdb_la_SOURCES) $(tdbtool_SOURCES) $(tdbdump_SOURCES)
-+OBJECTS = $(libtdb_la_OBJECTS) $(tdbtool_OBJECTS) $(tdbdump_OBJECTS)
-
- all: all-redirect
- .SUFFIXES:
=== removed file 'databases/tdb/patches/patch-ac'
--- databases/tdb/patches/patch-ac 2009-09-05 23:26:01 +0000
+++ databases/tdb/patches/patch-ac 1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2003/07/17 20:37:51 jmmv Exp $
-
---- tdbtool.c.orig 2001-12-11 04:45:47.000000000 +0100
-+++ tdbtool.c
-@@ -169,23 +169,23 @@ static void print_data(unsigned char *bu
-
- static void help(void)
- {
-- printf("
--tdbtool:
-- create dbname : create a database
-- open dbname : open an existing database
-- erase : erase the database
-- dump dumpname : dump the database as strings
-- insert key data : insert a record
-- store key data : store a record (replace)
-- show key : show a record by key
-- delete key : delete a record by key
-- list : print the database hash table and freelist
-- free : print the database freelist
-- 1 | first : print the first record
-- n | next : print the next record
-- q | quit : terminate
-- \\n : repeat 'next' command
--");
-+ printf("\n" \
-+"tdbtool:\n" \
-+" create dbname : create a database\n" \
-+" open dbname : open an existing database\n" \
-+" erase : erase the database\n" \
-+" dump dumpname : dump the database as strings\n" \
-+" insert key data : insert a record\n" \
-+" store key data : store a record (replace)\n" \
-+" show key : show a record by key\n" \
-+" delete key : delete a record by key\n" \
-+" list : print the database hash table and freelist\n" \
-+" free : print the database freelist\n" \
-+" 1 | first : print the first record\n" \
-+" n | next : print the next record\n" \
-+" q | quit : terminate\n" \
-+" \\n : repeat 'next' command\n" \
-+);
- }
-
- static void terror(char *why)
Home |
Main Index |
Thread Index |
Old Index