View | Details | Raw Unified | Return to bug 203242
Collapse All | Expand All

(-)databases/dbtool/Makefile (-34 / +32 lines)
Lines 2-8 Link Here
2
# $FreeBSD: head/databases/dbtool/Makefile 384024 2015-04-14 20:21:24Z mi $
2
# $FreeBSD: head/databases/dbtool/Makefile 384024 2015-04-14 20:21:24Z mi $
3
3
4
PORTNAME=	dbtool
4
PORTNAME=	dbtool
5
PORTVERSION=	1.8
5
PORTVERSION=	1.9.1
6
CATEGORIES=	databases
6
CATEGORIES=	databases
7
MASTER_SITES=	http://www.daemon.de/idisk/Apps/dbtool/
7
MASTER_SITES=	http://www.daemon.de/idisk/Apps/dbtool/
8
8
Lines 10-55 Link Here
10
COMMENT=	Store and retrieve data in a key/value format in a hash database
10
COMMENT=	Store and retrieve data in a key/value format in a hash database
11
11
12
LICENSE=	GPLv2
12
LICENSE=	GPLv2
13
#LICENSE_FILE=	${WRKSRC}/COPYING
13
14
14
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
15
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
15
16
16
OPTIONS_DEFINE=	BDB EXAMPLES
17
USES=		gmake shebangfix
17
18
SHEBANG_FILES=	samples/account-db/accdb
18
EXAMPLES_RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
19
bash_OLD_CMD=	/bin/sh
19
20
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
21
CPPFLAGS+=	${CXXFLAGS} -I${LOCALBASE}/include
22
LIBS+=		-L${LOCALBASE}/lib
23
21
24
USES=		gmake
22
CPPFLAGS+=	-I${LOCALBASE}/include
25
REINPLACE_ARGS=	-i ""
23
LDFLAGS+=	-L${LOCALBASE}/lib
26
24
27
SH2BASH=	samples/account-db/accdb
25
PORTEXAMPLES=	*
28
UB2PFX=		samples/locate/locate samples/locate/updatedb
26
PLIST_FILES=	bin/dbtool man/man1/dbtool.1.gz
29
EXTRACT_AFTER_ARGS+=	--no-same-permissions --no-same-owner --exclude '*~'
27
30
28
OPTIONS_DEFINE=		EXAMPLES
31
.include <bsd.port.options.mk>
29
OPTIONS_SINGLE=		BACKEND
32
30
OPTIONS_SINGLE_BACKEND=	BDB GDBM
33
.if ${PORT_OPTIONS:MBDB}
31
OPTIONS_DEFAULT=	GDBM
34
USE_BDB=	48+
32
35
CPPFLAGS+=	-I${BDB_INCLUDE_DIR}
33
BACKEND_DESC=		Database backend
36
LIBS+=		-L${BDB_LIB_DIR} -l${BDB_LIB_NAME}
34
BDB_USE=		bdb=yes
37
CONFIGURE_ARGS+=	--with-berkeley
35
BDB_CONFIGURE_ON=	--with-berkeley \
38
.else
36
			--with-bdb-include-dir=${BDB_INCLUDE_DIR} \
39
LIB_DEPENDS+=	libgdbm.so:${PORTSDIR}/databases/gdbm
37
			--with-bdb-lib-dir=${BDB_LIB_DIR}
40
CONFIGURE_ARGS+=	--without-berkeley
38
EXAMPLES_RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
41
.endif
39
GDBM_LIB_DEPENDS=	libgdbm.so:${PORTSDIR}/databases/gdbm
40
GDBM_CONFIGURE_ON=	--with-gdbm \
41
			--with-gdbm-dir=${LOCALBASE}
42
42
43
post-patch:
43
post-patch:
44
	${REINPLACE_CMD} -e "s,stdin,input,g" ${WRKSRC}/dbtool.cc ${WRKSRC}/engine.cc ${WRKSRC}/engine.h
44
	@${REINPLACE_CMD} -e \
45
.if ${PORT_OPTIONS:MEXAMPLES}
45
		'/try_libs=/s|"-ldb_cxx.*"|"-ldb_cxx"| ; \
46
	${REINPLACE_CMD} -e "s|/bin/sh|${LOCALBASE}/bin/bash|" ${SH2BASH:S|^|${WRKSRC}/|}
46
		 /try_headers=/s|"db.*"|"db_cxx.h"|' ${WRKSRC}/configure
47
	${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${UB2PFX:S|^|${WRKSRC}/|}
47
48
	${RM} ${UB2PFX:C|.*|${WRKSRC}/&.orig|}
48
post-install-EXAMPLES-on:
49
49
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
50
post-install:
50
	@(cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . \
51
	#@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
51
		${STAGEDIR}${EXAMPLESDIR})
52
	cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
53
.endif
54
52
55
.include <bsd.port.mk>
53
.include <bsd.port.mk>
(-)databases/dbtool/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (dbtool-1.8.tar.gz) = a66e1150cce006daecedd9a592efe75fa19c642addad97ec117f1a2219c4f079
1
SHA256 (dbtool-1.9.1.tar.gz) = afd3fa03d4b69f25c689817dc1b6ac452eb16ed4b9712c20695b3b4d13a5e647
2
SIZE (dbtool-1.8.tar.gz) = 133262
2
SIZE (dbtool-1.9.1.tar.gz) = 965751
(-)databases/dbtool/files/patch-samples_locate_locate (-16 lines)
Lines 1-16 Link Here
1
--- samples/locate/locate.orig	Sat Apr 20 17:14:18 2002
2
+++ samples/locate/locate	Sun Mar 23 12:25:01 2003
3
@@ -12,10 +12,10 @@
4
 #
5
 # $Id: locate,v 1.3 2001/06/26 23:00:02 scip Exp $
6
 
7
-dbtool="/usr/bin/dbtool";
8
+dbtool="%%PREFIX%%/bin/dbtool";
9
 find="/usr/bin/find";
10
-db="/var/local/locate.db";
11
-sort="/bin/sort";
12
+db="/var/db/locate.db";
13
+sort="/usr/bin/sort";
14
 regex=$1;
15
 
16
 if [ "x$regex" != "x" ]; then
(-)databases/dbtool/files/patch-samples_locate_updatedb (-16 lines)
Lines 1-16 Link Here
1
--- samples/locate/updatedb.orig	Sat Apr 20 17:14:18 2002
2
+++ samples/locate/updatedb	Sun Mar 23 12:24:47 2003
3
@@ -11,10 +11,10 @@
4
 # $Id: updatedb,v 1.2 2001/06/26 23:00:02 scip Exp $
5
 #
6
 
7
-dbtool="/usr/bin/dbtool";
8
+dbtool="%%PREFIX%%/bin/dbtool";
9
 find="/usr/bin/find";
10
-db="/var/local/locate.db";
11
-egrep="/bin/egrep";
12
+db="/var/db/locate.db";
13
+egrep="/usr/bin/egrep";
14
 cp="/bin/cp"
15
 
16
 $cp /dev/null $db;
(-)databases/dbtool/pkg-plist (-9 lines)
Lines 1-9 Link Here
1
bin/dbtool
2
man/man1/dbtool.1.gz
3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/account-db/README
4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/account-db/accdb
5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/locate/README
6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/locate/locate
7
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/locate/updatedb
8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/uback/README
9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README

Return to bug 203242