Index: head/databases/dbtool/Makefile =================================================================== --- head/databases/dbtool/Makefile (revision 472626) +++ head/databases/dbtool/Makefile (revision 472627) @@ -1,52 +1,49 @@ # Created by: ijliao # $FreeBSD$ PORTNAME= dbtool PORTVERSION= 1.9.1 CATEGORIES= databases MASTER_SITES= http://www.daemon.de/idisk/Apps/dbtool/ MAINTAINER= ports@FreeBSD.org COMMENT= Store and retrieve data in a key/value format in a hash database LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libpcre.so:devel/pcre -USES= gmake shebangfix +USES= gmake localbase shebangfix SHEBANG_FILES= samples/account-db/accdb bash_OLD_CMD= /bin/sh GNU_CONFIGURE= yes - -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib PORTEXAMPLES= * PLIST_FILES= bin/dbtool man/man1/dbtool.1.gz OPTIONS_DEFINE= EXAMPLES OPTIONS_SINGLE= BACKEND OPTIONS_SINGLE_BACKEND= BDB GDBM OPTIONS_DEFAULT= GDBM BACKEND_DESC= Database backend BDB_USES= bdb BDB_CONFIGURE_ON= --with-berkeley \ --with-bdb-include-dir=${BDB_INCLUDE_DIR} \ --with-bdb-lib-dir=${BDB_LIB_DIR} EXAMPLES_RUN_DEPENDS= bash:shells/bash GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm GDBM_CONFIGURE_ON= --with-gdbm \ --with-gdbm-dir=${LOCALBASE} post-patch: @${REINPLACE_CMD} -e \ '/try_libs=/s|"-ldb_cxx.*"|"-ldb_cxx"| ; \ /try_headers=/s|"db.*"|"db_cxx.h"|' ${WRKSRC}/configure post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} .include Index: head/databases/dbtool/files/patch-engine.cc =================================================================== --- head/databases/dbtool/files/patch-engine.cc (nonexistent) +++ head/databases/dbtool/files/patch-engine.cc (revision 472627) @@ -0,0 +1,64 @@ +engine.cc:539:46: error: non-constant-expression cannot be narrowed from type + 'std::__1::basic_string, + std::__1::allocator >::size_type' (aka 'unsigned long') to 'int' in + initializer list [-Wc++11-narrowing] + datum key = {(char *)config.key.c_str(), config.key.length()}; + ^~~~~~~~~~~~~~~~~~~ +engine.cc:539:46: note: insert an explicit cast to silence this issue + datum key = {(char *)config.key.c_str(), config.key.length()}; + ^~~~~~~~~~~~~~~~~~~ + static_cast( ) + +--- engine.cc.orig 2018-06-17 15:07:26 UTC ++++ engine.cc +@@ -324,8 +324,8 @@ void Engine::from_input() { + Dbt d_key((char *)key.c_str(), key.length()); + Dbt d_value((char *)value.c_str(), value.length()); + #else +- datum d_key = {(char *)key.c_str(), key.length()}; +- datum d_value = {(char *)value.c_str(), value.length()}; ++ datum d_key = {(char *)key.c_str(), static_cast(key.length())}; ++ datum d_value = {(char *)value.c_str(), static_cast(value.length())}; + #endif + if(config.force == 1) { + #ifdef HAVE_BERKELEY +@@ -405,8 +405,8 @@ void Engine::insert() { + Dbt value(v, strlen(v)); + #else + int ret; +- datum key = {(char *)config.key.c_str(), config.key.length()}; +- datum value = {(char *)__value.c_str(), __value.length()}; ++ datum key = {(char *)config.key.c_str(), static_cast(config.key.length())}; ++ datum value = {(char *)__value.c_str(), static_cast(__value.length())}; + #endif + + if(config.force == 1) { +@@ -465,8 +465,8 @@ void Engine::update() { + Dbt value(v, strlen(v)); + #else + int ret; +- datum key = {(char *)config.key.c_str(), config.key.length()}; +- datum value = {(char *)__value.c_str(), __value.length()}; ++ datum key = {(char *)config.key.c_str(), static_cast(config.key.length())}; ++ datum value = {(char *)__value.c_str(), static_cast(__value.length())}; + #endif + + if(config.force == 1) { +@@ -536,7 +536,7 @@ void Engine::remove() { + } + db->close(0); + #else +- datum key = {(char *)config.key.c_str(), config.key.length()}; ++ datum key = {(char *)config.key.c_str(), static_cast(config.key.length())}; + ret = gdbm_delete(db, key); + gdbm_close(db); + #endif +@@ -579,7 +579,7 @@ void Engine::select() { + db->close(0); + #else + datum content; +- datum key = {(char *)config.key.c_str(), config.key.length()}; ++ datum key = {(char *)config.key.c_str(), static_cast(config.key.length())}; + content = gdbm_fetch(db, key); + string V(content.dptr, content.dsize); + if(config.with == 1) Property changes on: head/databases/dbtool/files/patch-engine.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property