On Sat, 30 Apr 2011 02:39:30 +0900, Satoru KURASHIKI wrote:
hi,
On Sun, Apr 24, 2011 at 2:35 AM, Keith Lawson wrote:
Would it be appropriate to split QDBM into a package with GDBM
compatibility and one without? To get around the problem so we can
upgrade our web servers we removed all gdbm_ functions from QDBM and
installed a local replacement for the Debian package. I can provide
patches if you want to go this route.
I will try to split libqdbm14 to 2 versions and control them with
Conflicts/Provides.
I'm glad if you send me your patches.
regards,
The attached patches to configure.in and Makefile.in add the configure
flag "--disable-gdbm" which allows you to build QDBM without the GDBM
emulation that leads to the symbol conflict. This is from QDBM v 1.8.77.
I have tested building the library but haven't put it in place and
tested on a squeeze system where the conflict exists yet.
I've never created any autoconf configuration files before today so if
I've done this incorrectly please point me in the right direction and I
will send other patches.
Thanks,
Keith
--- Makefile.in.orig 2011-04-30 15:23:44.000000000 -0400
+++ Makefile.in 2011-04-30 15:20:57.000000000 -0400
@@ -20,8 +20,12 @@
PACKAGETGZ = $(PACKAGE)-$(VERSION).tar.gz
LIBVER = @LIBVER@
LIBREV = @LIBREV@
+ENABLE_GDBM = @ENABLE_GDBM@
+
# Targets
+ifeq ($(ENABLE_GDBM),1)
+
MYHEADS = depot.h curia.h relic.h hovel.h cabin.h villa.h vista.h odeum.h
MYLIBOBJS = depot.o curia.o relic.o hovel.o cabin.o villa.o vista.o odeum.o
myconf.o
MYLIBS = libqdbm.a libqdbm.so.$(LIBVER).$(LIBREV).0 libqdbm.so.$(LIBVER)
libqdbm.so
@@ -31,6 +35,22 @@
cbtest.1 cbcodec.1 vlmgr.1 vltest.1 vltsv.1 odmgr.1 odtest.1 odidx.1
qmttest.1
MYMAN3S = qdbm.3 depot.3 dpopen.3 curia.3 cropen.3 relic.3 hovel.3 \
cabin.3 villa.3 vlopen.3 vista.3 odeum.3 odopen.3
+
+else
+
+MYHEADS = depot.h curia.h relic.h cabin.h villa.h vista.h odeum.h
+MYLIBOBJS = depot.o curia.o relic.o cabin.o villa.o vista.o odeum.o myconf.o
+MYLIBS = libqdbm.a libqdbm.so.$(LIBVER).$(LIBREV).0 libqdbm.so.$(LIBVER)
libqdbm.so
+MYBINS = dpmgr dptest dptsv crmgr crtest crtsv rlmgr rltest \
+ cbtest cbcodec vlmgr vltest vltsv odmgr odtest odidx qmttest
+MYMAN1S = dpmgr.1 dptest.1 dptsv.1 crmgr.1 crtest.1 crtsv.1 rlmgr.1 rltest.1 \
+ cbtest.1 cbcodec.1 vlmgr.1 vltest.1 vltsv.1 odmgr.1 odtest.1 odidx.1
qmttest.1
+MYMAN3S = qdbm.3 depot.3 dpopen.3 curia.3 cropen.3 relic.3 hovel.3 \
+ cabin.3 villa.3 vlopen.3 vista.3 odeum.3 odopen.3
+
+
+endif
+
MYDOCS = spex.html spex-ja.html COPYING ChangeLog NEWS THANKS
MYPCS = qdbm.pc
MYWINLIBS = libqdbm.a libqdbm.dll.a
@@ -267,6 +287,7 @@
$(RUNENV) $(RUNCMD) ./rltest write casket 5000
$(RUNENV) $(RUNCMD) ./rltest read casket 5000
$(RUNENV) $(RUNCMD) ./rlmgr list casket
+ifeq ($(ENABLE_GDBM),1)
rm -rf casket*
$(RUNENV) $(RUNCMD) ./hvtest write casket 5000
$(RUNENV) $(RUNCMD) ./hvtest read casket 5000
@@ -276,6 +297,7 @@
$(RUNENV) $(RUNCMD) ./hvtest write -qdbm -s casket 500
$(RUNENV) $(RUNCMD) ./hvtest write -qdbm casket 5000
$(RUNENV) $(RUNCMD) ./hvtest read -qdbm casket 5000
+endif
rm -rf casket*
$(RUNENV) $(RUNCMD) ./cbtest sort 5000
$(RUNENV) $(RUNCMD) ./cbtest strstr 500
--- configure.in.orig 2011-04-30 15:16:47.000000000 -0400
+++ configure.in 2011-04-30 15:16:52.000000000 -0400
@@ -98,6 +98,16 @@
enables="$enables (no-mmap)"
fi
+# Disable GDBM emulation
+ENABLE_GDBM=0
+AC_ARG_ENABLE(gdbm, AC_HELP_STRING([--disable-gdbm],
+ [disable GDBM emulation]))
+if test x$enable_gebm != xno; then
+ AC_DEFINE(ENABLE_GDBM, 1, [Enable GDBM emulation])
+ ENABLE_GDBM=1
+fi
+AC_SUBST(ENABLE_GDBM)
+
# Enable ZLIB compression
AC_ARG_ENABLE(zlib,
AC_HELP_STRING([--enable-zlib], [feature ZLIB for B+ tree and inverted
index]))