aboutsummaryrefslogtreecommitdiff
path: root/databases/dbtool
diff options
context:
space:
mode:
Diffstat (limited to 'databases/dbtool')
-rw-r--r--databases/dbtool/Makefile27
-rw-r--r--databases/dbtool/distinfo2
-rw-r--r--databases/dbtool/files/patch-Makefile.in20
-rw-r--r--databases/dbtool/files/patch-samples_locate_locate16
-rw-r--r--databases/dbtool/files/patch-samples_locate_updatedb16
-rw-r--r--databases/dbtool/pkg-plist11
6 files changed, 89 insertions, 3 deletions
diff --git a/databases/dbtool/Makefile b/databases/dbtool/Makefile
index 72c3f7058875..4cfe88d9d540 100644
--- a/databases/dbtool/Makefile
+++ b/databases/dbtool/Makefile
@@ -7,8 +7,7 @@
#
PORTNAME= dbtool
-PORTVERSION= 1.5
-PORTREVISION= 0
+PORTVERSION= 1.6
CATEGORIES= databases
MASTER_SITES= ftp://ftp.daemon.de/scip/Apps/dbtool/
@@ -24,6 +23,9 @@ CONFIGURE_ARGS= --with-berkeley
.else
LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
.endif
+.if !defined(NOPORTDOCS)
+RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash2
+.endif
GNU_CONFIGURE= yes
CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib" \
@@ -31,9 +33,13 @@ CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib" \
USE_GMAKE= yes
USE_REINPLACE= yes
+REINPLACE_ARGS= -i ""
MAN1= dbtool.1
+SH2BASH= samples/account-db/accdb
+UB2PFX= samples/locate/locate samples/locate/updatedb
+
post-extract:
.if !defined(WITH_BERKELEY_DB)
@${ECHO_MSG}
@@ -47,5 +53,22 @@ post-patch:
@${REINPLACE_CMD} -e "s,stdin,input,g" ${WRKSRC}/${file}
.endfor
@${REINPLACE_CMD} -e "s,==,=,g" ${WRKSRC}/configure
+.if !defined(NOPORTDOCS)
+.for file in ${SH2BASH}
+ @${REINPLACE_CMD} -e "s|/bin/sh|${LOCALBASE}/bin/bash|" ${WRKSRC}/${file}
+.endfor
+.for file in ${UB2PFX}
+ @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/${file}
+ @${RM} ${WRKSRC}/${file}.orig
+.endfor
+.endif
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${EXAMPLESDIR}
+ @${CP} -Rp ${WRKSRC}/samples/* ${EXAMPLESDIR}
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
+ @${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
+.endif
.include <bsd.port.mk>
diff --git a/databases/dbtool/distinfo b/databases/dbtool/distinfo
index fb0640355df0..557e69e8fd9d 100644
--- a/databases/dbtool/distinfo
+++ b/databases/dbtool/distinfo
@@ -1 +1 @@
-MD5 (dbtool-1.5.tar.gz) = 0d90a7578d4342c6c7fd995bc2bf00de
+MD5 (dbtool-1.6.tar.gz) = a8e3f0982b42b0dbb3b9c1c31c975060
diff --git a/databases/dbtool/files/patch-Makefile.in b/databases/dbtool/files/patch-Makefile.in
new file mode 100644
index 000000000000..18d04801c1e0
--- /dev/null
+++ b/databases/dbtool/files/patch-Makefile.in
@@ -0,0 +1,20 @@
+--- Makefile.in.orig Sat Apr 20 20:43:22 2002
++++ Makefile.in Sat Mar 22 14:06:46 2003
+@@ -68,7 +68,7 @@
+ dbtool_SOURCES = cipher.cc config.cc dbtool.cc digest.cc engine.cc rijndael.cc
+ man_MANS = dbtool.1
+ EXTRA_DIST = $(man_MANS)
+-CXXFLAGS = -g -Wstrict-prototypes -O
++CXXFLAGS = @CXXFLAGS@
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ CONFIG_CLEAN_FILES =
+@@ -84,7 +84,7 @@
+ dbtool_LDADD = $(LDADD)
+ dbtool_DEPENDENCIES =
+ dbtool_LDFLAGS =
+-CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
++CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS)
+ CXXLD = $(CXX)
+ CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+ man1dir = $(mandir)/man1
diff --git a/databases/dbtool/files/patch-samples_locate_locate b/databases/dbtool/files/patch-samples_locate_locate
new file mode 100644
index 000000000000..159506e8502f
--- /dev/null
+++ b/databases/dbtool/files/patch-samples_locate_locate
@@ -0,0 +1,16 @@
+--- samples/locate/locate.orig Sat Apr 20 17:14:18 2002
++++ samples/locate/locate Sun Mar 23 12:25:01 2003
+@@ -12,10 +12,10 @@
+ #
+ # $Id: locate,v 1.3 2001/06/26 23:00:02 scip Exp $
+
+-dbtool="/usr/bin/dbtool";
++dbtool="%%PREFIX%%/bin/dbtool";
+ find="/usr/bin/find";
+-db="/var/local/locate.db";
+-sort="/bin/sort";
++db="/var/db/locate.db";
++sort="/usr/bin/sort";
+ regex=$1;
+
+ if [ "x$regex" != "x" ]; then
diff --git a/databases/dbtool/files/patch-samples_locate_updatedb b/databases/dbtool/files/patch-samples_locate_updatedb
new file mode 100644
index 000000000000..5d9efbc15b47
--- /dev/null
+++ b/databases/dbtool/files/patch-samples_locate_updatedb
@@ -0,0 +1,16 @@
+--- samples/locate/updatedb.orig Sat Apr 20 17:14:18 2002
++++ samples/locate/updatedb Sun Mar 23 12:24:47 2003
+@@ -11,10 +11,10 @@
+ # $Id: updatedb,v 1.2 2001/06/26 23:00:02 scip Exp $
+ #
+
+-dbtool="/usr/bin/dbtool";
++dbtool="%%PREFIX%%/bin/dbtool";
+ find="/usr/bin/find";
+-db="/var/local/locate.db";
+-egrep="/bin/egrep";
++db="/var/db/locate.db";
++egrep="/usr/bin/egrep";
+ cp="/bin/cp"
+
+ $cp /dev/null $db;
diff --git a/databases/dbtool/pkg-plist b/databases/dbtool/pkg-plist
index 398a0aad5a9e..4760ce055610 100644
--- a/databases/dbtool/pkg-plist
+++ b/databases/dbtool/pkg-plist
@@ -1 +1,12 @@
bin/dbtool
+%%PORTDOCS%%%%EXAMPLESDIR%%/account-db/README
+%%PORTDOCS%%%%EXAMPLESDIR%%/account-db/accdb
+%%PORTDOCS%%%%EXAMPLESDIR%%/locate/README
+%%PORTDOCS%%%%EXAMPLESDIR%%/locate/locate
+%%PORTDOCS%%%%EXAMPLESDIR%%/locate/updatedb
+%%PORTDOCS%%%%EXAMPLESDIR%%/uback/README
+%%PORTDOCS%%%%EXAMPLESDIR%%/README
+@dirrm %%PORTDOCS%%%%EXAMPLESDIR%%/account-db
+@dirrm %%PORTDOCS%%%%EXAMPLESDIR%%/locate
+@dirrm %%PORTDOCS%%%%EXAMPLESDIR%%/uback
+@dirrm %%PORTDOCS%%%%EXAMPLESDIR%%