aboutsummaryrefslogtreecommitdiff
path: root/databases/dbtool
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-05-07 23:49:46 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-05-07 23:49:46 +0000
commit26f5e61764502357edcceaf32c870c0d7681c780 (patch)
tree6634f95e3c7abc6c3694431477fc3318f48c23ba /databases/dbtool
parent5369a2f90df292218f018d147c2d2a8e59d9f3a4 (diff)
downloadports-26f5e61764502357edcceaf32c870c0d7681c780.tar.gz
ports-26f5e61764502357edcceaf32c870c0d7681c780.zip
Notes
Diffstat (limited to 'databases/dbtool')
-rw-r--r--databases/dbtool/Makefile41
-rw-r--r--databases/dbtool/pkg-plist1
2 files changed, 13 insertions, 29 deletions
diff --git a/databases/dbtool/Makefile b/databases/dbtool/Makefile
index f834cb73b737..2eb9c3a3f423 100644
--- a/databases/dbtool/Makefile
+++ b/databases/dbtool/Makefile
@@ -12,40 +12,27 @@ COMMENT= Store and retrieve data in a key/value format in a hash database
LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
-.if defined(WITH_BERKELEY_DB)
-LIB_DEPENDS+= libdb3.so:${PORTSDIR}/databases/db3
-DB_INC= -I${LOCALBASE}/include/db3
-CONFIGURE_ARGS= --with-berkeley
-.else
-LIB_DEPENDS+= libgdbm.so:${PORTSDIR}/databases/gdbm
-.endif
-.if !defined(NOPORTDOCS)
-RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash
-.endif
+OPTIONS_DEFINE= BDB EXAMPLES
+
+BDB_LIB_DEPENDS= libdb3.so:${PORTSDIR}/databases/db3
+BDB_CPPFLAGS= -I${LOCALBASE}/include/db3
+BDB_CONFIGURE_ON= --with-berkeley
+BDB_LIB_DEPENDS_OFF= libgdbm.so:${PORTSDIR}/databases/gdbm
+
+EXAMPLES_RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
LICENSE= GPLv2
GNU_CONFIGURE= yes
CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib"
-CPPFLAGS+= ${CXXFLAGS} -I${LOCALBASE}/include ${DB_INC}
+CPPFLAGS+= ${CXXFLAGS} -I${LOCALBASE}/include
-USE_GMAKE= yes
+USES= gmake
REINPLACE_ARGS= -i ""
-MAN1= dbtool.1
-
SH2BASH= samples/account-db/accdb
UB2PFX= samples/locate/locate samples/locate/updatedb
-NO_STAGE= yes
-post-extract:
-.if !defined(WITH_BERKELEY_DB)
- @${ECHO_MSG}
- @${ECHO_MSG} " Build with gdbm by default. "
- @${ECHO_MSG} " If you want to use BerkeleyDB, you can build with WITH_BERKELEY_DB=yes"
- @${ECHO_MSG}
-.endif
-
post-patch:
.for file in dbtool.cc engine.cc engine.h
@${REINPLACE_CMD} -e "s,stdin,input,g" ${WRKSRC}/${file}
@@ -63,11 +50,7 @@ post-patch:
.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
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ @${CP} -Rp ${WRKSRC}/samples/* ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>
diff --git a/databases/dbtool/pkg-plist b/databases/dbtool/pkg-plist
index e345834efe7d..0d926da3ba79 100644
--- a/databases/dbtool/pkg-plist
+++ b/databases/dbtool/pkg-plist
@@ -1,4 +1,5 @@
bin/dbtool
+man/man1/dbtool.1.gz
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/account-db/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/account-db/accdb
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/locate/README