Update to dbic++ 0.6.0. Minor Makefile cleanup so that

WRKDIST doesn't need to change.  Remove getline->fgenln
patch now that getline is natively supported.
This commit is contained in:
jeremy 2012-04-06 19:25:23 +00:00
parent 3593386850
commit e2ae866641
8 changed files with 54 additions and 59 deletions

View File

@ -1,18 +1,17 @@
# $OpenBSD: Makefile,v 1.6 2011/09/16 08:48:02 espie Exp $
# $OpenBSD: Makefile,v 1.7 2012/04/06 19:25:23 jeremy Exp $
SHARED_ONLY= Yes
COMMENT= C++ database API
DISTNAME= deepfryed-dbicpp-g466860f
PKGNAME= dbic++-0.5.6
DISTNAME= deepfryed-dbicpp-v0.6.0
PKGNAME= dbic++-0.6.0
CATEGORIES= databases
HOMEPAGE= https://github.com/deepfryed/dbicpp
REVISION = 0
SHARED_LIBS += dbdmysql 1.0 # 0.0
SHARED_LIBS += dbdpg 1.0 # 0.0
SHARED_LIBS += dbdsqlite3 0.0 # 0.0
SHARED_LIBS += dbdmysql 2.0 # 1.0
SHARED_LIBS += dbdpg 2.0 # 1.0
SHARED_LIBS += dbdsqlite3 1.0 # 1.0
# MIT
PERMIT_PACKAGE_CDROM= Yes
@ -36,18 +35,21 @@ LIB_DEPENDS= mysql-client->=5:databases/mysql \
sysutils/e2fsprogs
CONFIGURE_STYLE= none
WRKDIST= ${WRKDIR}/deepfryed-dbicpp-4fe45f7
WRKDIST= ${WRKDIR}/deepfryed-dbicpp
NO_REGRESS= Yes
post-extract:
mv ${WRKDIR}/deepfryed-dbicpp-* ${WRKDIR}/deepfryed-dbicpp
pre-configure:
${SUBST_CMD} ${WRKSRC}/{CMakeLists.txt,inc/dbic++.h,src/dbic++.cc,pkgconfig/dbic++.pc}
do-build:
cd ${WRKSRC} && ${SET_ENV} ${MAKE_ENV} ${LOCALBASE}/bin/bash build.sh
cd ${WRKSRC} && ${SET_ENV} ${MAKE_ENV} ${LOCALBASE}/bin/bash build
do-install:
cd ${WRKSRC} && ${SET_ENV} ${MAKE_ENV} \
${LOCALBASE}/bin/bash build.sh -i
${LOCALBASE}/bin/bash build -i
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (deepfryed-dbicpp-g466860f.tar.gz) = QXv1uOF2+rCF8Dkv6tdc5Q==
RMD160 (deepfryed-dbicpp-g466860f.tar.gz) = POt1CYLnCq2kLPcoEkXJzveX+f4=
SHA1 (deepfryed-dbicpp-g466860f.tar.gz) = 0X1uzAXgzX7JJ5eC3yBUA/zNVqc=
SHA256 (deepfryed-dbicpp-g466860f.tar.gz) = odddcJsbvgq7Ony1pfG+JcjhhjR9FvkXwwF4JWBAPNE=
SIZE (deepfryed-dbicpp-g466860f.tar.gz) = 55945
MD5 (deepfryed-dbicpp-v0.6.0.tar.gz) = +29APSLm7drBWydIGCfzpg==
RMD160 (deepfryed-dbicpp-v0.6.0.tar.gz) = tOw81tS6IsyoxVe4o/JQIqz0HWg=
SHA1 (deepfryed-dbicpp-v0.6.0.tar.gz) = g6BR8TmVT9T4CNL4anrndJxdM5U=
SHA256 (deepfryed-dbicpp-v0.6.0.tar.gz) = w97KgB7B0VIkXzx5uF60xXE4hF+6ikt18OxdrRFChqc=
SIZE (deepfryed-dbicpp-v0.6.0.tar.gz) = 55703

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-CMakeLists_txt,v 1.2 2011/03/14 18:30:33 jeremy Exp $
--- CMakeLists.txt.orig Wed Jan 12 18:27:58 2011
+++ CMakeLists.txt Wed Jan 19 11:05:22 2011
@@ -32,7 +32,7 @@ IF (PQ_FOUND)
$OpenBSD: patch-CMakeLists_txt,v 1.3 2012/04/06 19:25:23 jeremy Exp $
--- CMakeLists.txt.orig Wed Mar 28 22:09:47 2012
+++ CMakeLists.txt Thu Mar 29 16:09:46 2012
@@ -35,7 +35,7 @@ IF (PQ_FOUND)
TARGET_LINK_LIBRARIES(dbdpg ${PQ_LIBRARIES})
ENDIF()
@ -10,7 +10,7 @@ $OpenBSD: patch-CMakeLists_txt,v 1.2 2011/03/14 18:30:33 jeremy Exp $
INSTALL(TARGETS dbdpg
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dbic++
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/dbic++)
@@ -47,7 +47,7 @@ IF (MYSQL_FOUND)
@@ -50,7 +50,7 @@ IF (MYSQL_FOUND)
ELSE()
TARGET_LINK_LIBRARIES(dbdmysql ${MYSQL_LIBRARIES})
ENDIF()
@ -19,7 +19,7 @@ $OpenBSD: patch-CMakeLists_txt,v 1.2 2011/03/14 18:30:33 jeremy Exp $
INSTALL(TARGETS dbdmysql
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/dbic++
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/dbic++)
@@ -62,19 +62,19 @@ IF (SQLITE3_FOUND)
@@ -65,19 +65,19 @@ IF (SQLITE3_FOUND)
ELSE()
TARGET_LINK_LIBRARIES(dbdsqlite3 ${SQLITE3_LIBRARIES})
ENDIF()
@ -35,11 +35,11 @@ $OpenBSD: patch-CMakeLists_txt,v 1.2 2011/03/14 18:30:33 jeremy Exp $
+TARGET_LINK_LIBRARIES(demo/demo dbic++ ${UUID_LIBRARIES} ${PCRE_LIBRARIES})
ADD_EXECUTABLE(demo/async src/examples/async.cc)
-TARGET_LINK_LIBRARIES(demo/async dbic++ dl ${UUID_LIBRARIES} ${PCRE_LIBRARIES} ${EVENT_LIBRARIES})
+TARGET_LINK_LIBRARIES(demo/async dbic++ ${UUID_LIBRARIES} ${PCRE_LIBRARIES} ${EVENT_LIBRARIES})
-TARGET_LINK_LIBRARIES(demo/async dbic++ dl ${UUID_LIBRARIES} ${PCRE_LIBRARIES})
+TARGET_LINK_LIBRARIES(demo/async dbic++ ${UUID_LIBRARIES} ${PCRE_LIBRARIES})
-ADD_DEFINITIONS(-Wall -Wno-sign-compare -rdynamic -fopenmp -fPIC -O3)
+ADD_DEFINITIONS(-Wall -Wno-sign-compare -rdynamic -fopenmp -fPIC)
ADD_DEFINITIONS(${UUID_DEFINITIONS} ${EVENT_DEFINITIONS} ${PCRE_DEFINITIONS})
-ADD_DEFINITIONS(-Wall -Wno-sign-compare -rdynamic -fopenmp -fPIC -O3 -Wno-non-virtual-dtor)
+ADD_DEFINITIONS(-Wall -Wno-sign-compare -rdynamic -fopenmp -fPIC -Wno-non-virtual-dtor)
ADD_DEFINITIONS(${UUID_DEFINITIONS} ${PCRE_DEFINITIONS})
# Use -DCMAKE_INSTALL_PREFIX:PATH=<path> to override /usr/local

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-build_sh,v 1.2 2011/03/14 18:30:33 jeremy Exp $
--- build.sh.orig Wed Jan 12 18:27:58 2011
+++ build.sh Tue Jan 18 15:46:51 2011
$OpenBSD: patch-build,v 1.1 2012/04/06 19:25:23 jeremy Exp $
--- build.orig Wed Jan 12 18:27:58 2011
+++ build Tue Jan 18 15:46:51 2011
@@ -88,12 +88,10 @@ _uninstall() {
}

View File

@ -1,12 +1,22 @@
$OpenBSD: patch-inc_dbic++_h,v 1.1 2011/03/14 18:30:33 jeremy Exp $
--- inc/dbic++.h.orig Wed Jan 12 18:27:58 2011
+++ inc/dbic++.h Wed Jan 19 11:05:22 2011
@@ -31,7 +31,7 @@ namespace dbi {
#include "dbic++/container.h"
#include "dbic++/cpool.h"
$OpenBSD: patch-inc_dbic++_h,v 1.2 2012/04/06 19:25:23 jeremy Exp $
--- inc/dbic++.h.orig Wed Mar 28 22:09:47 2012
+++ inc/dbic++.h Tue Apr 3 14:07:10 2012
@@ -42,7 +42,7 @@ namespace dbi {
typedef dbi::FieldSet field_list_t;
}
-#define DEFAULT_DRIVER_PATH "/usr/lib/dbic++"
+#define DEFAULT_DRIVER_PATH "${LOCALBASE}/lib/dbic++"
#define DBI_TYPE_UNKNOWN 0
#define DBI_TYPE_INT 1
@@ -75,9 +75,5 @@ namespace dbi {
#include "dbic++/result.h"
#include "dbic++/query.h"
#include "dbic++/etc.h"
-
-#ifndef __linux
- extern size_t getline(char **, size_t *, FILE *);
-#endif
#endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_dbic++_cc,v 1.1 2011/03/14 18:30:33 jeremy Exp $
--- src/dbic++.cc.orig Wed Jan 12 18:27:58 2011
+++ src/dbic++.cc Wed Jan 19 11:06:17 2011
@@ -106,8 +106,7 @@ namespace dbi {
$OpenBSD: patch-src_dbic++_cc,v 1.2 2012/04/06 19:25:23 jeremy Exp $
--- src/dbic++.cc.orig Tue Jul 5 17:42:19 2011
+++ src/dbic++.cc Mon Nov 7 12:46:57 2011
@@ -110,8 +110,7 @@ namespace dbi {
void initCheck(string driver_name) {
if (!drivers.size()) {

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_file_io_cc,v 1.1 2011/03/14 18:30:33 jeremy Exp $
--- src/file_io.cc.orig Wed Jan 12 18:27:58 2011
+++ src/file_io.cc Tue Jan 18 16:59:51 2011
@@ -44,10 +44,9 @@ namespace dbi {
char *buffer;
size_t size;
- size = getline(&buffer, &size, fp);
- if (size > 0) {
+ buffer = fgetln(fp, &size);
+ if (buffer != NULL && size > 0) {
line = string(buffer, size);
- free(buffer);
return true;
}

View File

@ -1,22 +1,21 @@
@comment $OpenBSD: PLIST,v 1.2 2011/03/14 18:30:33 jeremy Exp $
@comment $OpenBSD: PLIST,v 1.3 2012/04/06 19:25:23 jeremy Exp $
include/dbic++/
include/dbic++.h
include/dbic++/abstract_handle.h
include/dbic++/abstract_result.h
include/dbic++/abstract_statement.h
include/dbic++/container.h
include/dbic++/cpool.h
include/dbic++/error.h
include/dbic++/etc.h
include/dbic++/field_set.h
include/dbic++/file_io.h
include/dbic++/handle.h
include/dbic++/io.h
include/dbic++/param.h
include/dbic++/query.h
include/dbic++/reactor.h
include/dbic++/result.h
include/dbic++/result_row.h
include/dbic++/result_row_hash.h
include/dbic++/socketinfo.h
include/dbic++/statement.h
include/dbic++/string_io.h
include/dbic++/util.h