diff options
author | joerg <joerg@pkgsrc.org> | 2013-09-11 12:22:33 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-09-11 12:22:33 +0000 |
commit | 25305daafc3fc3cf8d4f3dae9f3d3447214f24b0 (patch) | |
tree | 5524c2ee0a01af36af0c5c80f19fa16c94952812 /databases | |
parent | 1991beb91c9303fef0243ccc9fc53ecefb5fe3f3 (diff) | |
download | pkgsrc-25305daafc3fc3cf8d4f3dae9f3d3447214f24b0.tar.gz |
Update to soci 3.2.2:
- Fix uninitialized indicators in conversion_into_type and
conversion_use_type specialisations
- Fixed placeholder matching for PostgreSQL-style casts with ORM
- Fixed memory leaking in use binding in case of bind/unbind sequence
- Fixed sscanf formatter for MinGW/MSVC in backends
- Fixed partial placeholder name matching for ORM cases
- Added test for use of indicators with rowset<row>
- Added test for get_affected_rows after bulk operations
Add options for selecting MySQL/PostgreSQL/SQLite backends, defaulting
to PostgreSQL.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/soci/Makefile | 7 | ||||
-rw-r--r-- | databases/soci/PLIST | 32 | ||||
-rw-r--r-- | databases/soci/distinfo | 15 | ||||
-rw-r--r-- | databases/soci/options.mk | 38 | ||||
-rw-r--r-- | databases/soci/patches/patch-CMakeLists.txt | 21 | ||||
-rw-r--r-- | databases/soci/patches/patch-backends_postgresql_session.cpp | 27 | ||||
-rw-r--r-- | databases/soci/patches/patch-backends_postgresql_soci-postgresql.h | 14 | ||||
-rw-r--r-- | databases/soci/patches/patch-backends_sqlite3_soci-sqlite3.h | 15 | ||||
-rw-r--r-- | databases/soci/patches/patch-core_once-temp-type.cpp | 13 | ||||
-rw-r--r-- | databases/soci/patches/patch-core_once-temp-type.h | 26 |
10 files changed, 75 insertions, 133 deletions
diff --git a/databases/soci/Makefile b/databases/soci/Makefile index 4b428015fb6..e331ad705e1 100644 --- a/databases/soci/Makefile +++ b/databases/soci/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.3 2013/08/30 10:19:37 joerg Exp $ +# $NetBSD: Makefile,v 1.4 2013/09/11 12:22:33 joerg Exp $ # -DISTNAME= soci-3.2.1 +DISTNAME= soci-3.2.2 PKGREVISION= 2 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=soci/} @@ -16,6 +16,5 @@ USE_LANGUAGES= c c++ CMAKE_ARGS+= -DSOCI_LIBDIR=lib -.include "../../databases/sqlite3/buildlink3.mk" -.include "../../mk/pgsql.buildlink3.mk" +.include "options.mk" .include "../../mk/bsd.pkg.mk" diff --git a/databases/soci/PLIST b/databases/soci/PLIST index 021faf5dd75..3eb8952efd7 100644 --- a/databases/soci/PLIST +++ b/databases/soci/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1 2013/07/05 21:04:45 joerg Exp $ +@comment $NetBSD: PLIST,v 1.2 2013/09/11 12:22:33 joerg Exp $ include/soci/backend-loader.h include/soci/blob-exchange.h include/soci/blob.h @@ -13,9 +13,11 @@ include/soci/error.h include/soci/exchange-traits.h include/soci/into-type.h include/soci/into.h +${PLIST.mysql}include/soci/mysql/common.h +${PLIST.mysql}include/soci/mysql/soci-mysql.h include/soci/once-temp-type.h -include/soci/postgresql/common.h -include/soci/postgresql/soci-postgresql.h +${PLIST.pgsql}include/soci/postgresql/common.h +${PLIST.pgsql}include/soci/postgresql/soci-postgresql.h include/soci/prepare-temp-type.h include/soci/procedure.h include/soci/query_transformation.h @@ -32,8 +34,8 @@ include/soci/soci-config.h include/soci/soci-platform.h include/soci/soci-simple.h include/soci/soci.h -include/soci/sqlite3/common.h -include/soci/sqlite3/soci-sqlite3.h +${PLIST.sqlite}include/soci/sqlite3/common.h +${PLIST.sqlite}include/soci/sqlite3/soci-sqlite3.h include/soci/statement.h include/soci/transaction.h include/soci/type-conversion-traits.h @@ -54,11 +56,15 @@ lib/libsoci_empty.a lib/libsoci_empty.so lib/libsoci_empty.so.3.2 lib/libsoci_empty.so.${PKGVERSION} -lib/libsoci_postgresql.a -lib/libsoci_postgresql.so -lib/libsoci_postgresql.so.3.2 -lib/libsoci_postgresql.so.${PKGVERSION} -lib/libsoci_sqlite3.a -lib/libsoci_sqlite3.so -lib/libsoci_sqlite3.so.3.2 -lib/libsoci_sqlite3.so.${PKGVERSION} +${PLIST.mysql}lib/libsoci_mysql.a +${PLIST.mysql}lib/libsoci_mysql.so +${PLIST.mysql}lib/libsoci_mysql.so.3.2 +${PLIST.mysql}lib/libsoci_mysql.so.${PKGVERSION} +${PLIST.pgsql}lib/libsoci_postgresql.a +${PLIST.pgsql}lib/libsoci_postgresql.so +${PLIST.pgsql}lib/libsoci_postgresql.so.3.2 +${PLIST.pgsql}lib/libsoci_postgresql.so.${PKGVERSION} +${PLIST.sqlite}lib/libsoci_sqlite3.a +${PLIST.sqlite}lib/libsoci_sqlite3.so +${PLIST.sqlite}lib/libsoci_sqlite3.so.3.2 +${PLIST.sqlite}lib/libsoci_sqlite3.so.${PKGVERSION} diff --git a/databases/soci/distinfo b/databases/soci/distinfo index b6c185e72f6..1c58dbc5842 100644 --- a/databases/soci/distinfo +++ b/databases/soci/distinfo @@ -1,11 +1,6 @@ -$NetBSD: distinfo,v 1.3 2013/08/30 10:19:37 joerg Exp $ +$NetBSD: distinfo,v 1.4 2013/09/11 12:22:33 joerg Exp $ -SHA1 (soci-3.2.1.tar.gz) = 38f602ec8d61c4563df8ea4d4ed318dc378e7096 -RMD160 (soci-3.2.1.tar.gz) = 3e98139aa904c62dbf7cc6a1fae5fc73042a6364 -Size (soci-3.2.1.tar.gz) = 343358 bytes -SHA1 (patch-CMakeLists.txt) = c66f0b8fd3ca0fedaebedd6943ae0471f7c6ba35 -SHA1 (patch-backends_postgresql_session.cpp) = d816ffc0c4981ef9b2bdcb28e9e4292b519d3e75 -SHA1 (patch-backends_postgresql_soci-postgresql.h) = 1c01ebdad82d4f641024b8e73a4c853f1c83b134 -SHA1 (patch-backends_sqlite3_soci-sqlite3.h) = 688260116f0e35f37f7de8d61366a3397259dc0c -SHA1 (patch-core_once-temp-type.cpp) = 5d19aa72accd8d3883915283c1380df2ec4c7e5c -SHA1 (patch-core_once-temp-type.h) = 5c08a4c0f5bba3729bfec2c6930b6145da5e864d +SHA1 (soci-3.2.2.tar.gz) = 0a63cdbe719793c37b328a95778451a550f22c0a +RMD160 (soci-3.2.2.tar.gz) = d366c1773d23c551404a8e05791afc3a4b6acfdd +Size (soci-3.2.2.tar.gz) = 354047 bytes +SHA1 (patch-CMakeLists.txt) = 589fed2101a09637cb3f052bf7915dd2bccf0385 diff --git a/databases/soci/options.mk b/databases/soci/options.mk new file mode 100644 index 00000000000..620d8e08a49 --- /dev/null +++ b/databases/soci/options.mk @@ -0,0 +1,38 @@ +# $NetBSD: options.mk,v 1.1 2013/09/11 12:22:33 joerg Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.soci +PKG_SUPPORTED_OPTIONS= mysql pgsql sqlite +PKG_SUGGESTED_OPTIONS= pgsql + +.include "../../mk/bsd.options.mk" + +PLIST_VARS+= ${PKG_SUPPORTED_OPTIONS} + +CMAKE_ARGS+= -DWITH_ODBC=off -DWITH_ORACLE=off \ + -DWITH_FIREBIRD=off -DWITH_DB2=off + +PLIST_VARS+= mysql pgsql sqlite + +.if !empty(PKG_OPTIONS:Mmysql) +.include "../../mk/mysql.buildlink3.mk" +CMAKE_ARGS+= -DWITH_MYSQL=on +PLIST.mysql= yes +.else +CMAKE_ARGS+= -DWITH_MYSQL=off +.endif + +.if !empty(PKG_OPTIONS:Mpgsql) +.include "../../mk/pgsql.buildlink3.mk" +CMAKE_ARGS+= -DWITH_POSTGRESQL=on +PLIST.pgsql= yes +.else +CMAKE_ARGS+= -DWITH_POSTGRESQL=off +.endif + +.if !empty(PKG_OPTIONS:Msqlite) +.include "../../databases/sqlite3/buildlink3.mk" +CMAKE_ARGS+= -DWITH_SQLITE3=on +PLIST.sqlite= yes +.else +CMAKE_ARGS+= -DWITH_SQLITE3=off +.endif diff --git a/databases/soci/patches/patch-CMakeLists.txt b/databases/soci/patches/patch-CMakeLists.txt index 9678bdd529b..34287f0c991 100644 --- a/databases/soci/patches/patch-CMakeLists.txt +++ b/databases/soci/patches/patch-CMakeLists.txt @@ -1,19 +1,18 @@ -$NetBSD: patch-CMakeLists.txt,v 1.1 2013/07/05 21:04:45 joerg Exp $ +$NetBSD: patch-CMakeLists.txt,v 1.2 2013/09/11 12:22:33 joerg Exp $ -Use consistent behavior on all platforms. - ---- CMakeLists.txt.orig 2013-07-05 18:10:32.000000000 +0000 +--- CMakeLists.txt.orig 2013-09-11 10:45:29.000000000 +0000 +++ CMakeLists.txt -@@ -70,11 +70,7 @@ include(SociDependencies) +@@ -70,11 +70,13 @@ include(SociDependencies) # Installation ############################################################################### --if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) -- set(SOCI_LIBDIR "lib") --else() -- set(SOCI_LIBDIR "lib64") --endif() -+set(SOCI_LIBDIR "lib") ++if(NOT DEFINED SOCI_LIBDIR) + if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) + set(SOCI_LIBDIR "lib") + else() + set(SOCI_LIBDIR "lib64") + endif() ++endif() set(BINDIR "bin" CACHE PATH "The directory to install binaries into.") set(LIBDIR ${SOCI_LIBDIR} CACHE PATH "The directory to install libraries into.") diff --git a/databases/soci/patches/patch-backends_postgresql_session.cpp b/databases/soci/patches/patch-backends_postgresql_session.cpp deleted file mode 100644 index 6977c531ca6..00000000000 --- a/databases/soci/patches/patch-backends_postgresql_session.cpp +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-backends_postgresql_session.cpp,v 1.1 2013/08/27 22:28:05 joerg Exp $ - ---- backends/postgresql/session.cpp.orig 2013-08-26 22:13:09.945248387 +0000 -+++ backends/postgresql/session.cpp -@@ -8,6 +8,7 @@ - #define SOCI_POSTGRESQL_SOURCE - #include "soci-postgresql.h" - #include "error.h" -+#include "session.h" - #include <connection-parameters.h> - #include <libpq/libpq-fs.h> // libpq - #include <cctype> -@@ -51,6 +52,14 @@ postgresql_session_backend::postgresql_s - conn_ = conn; - } - -+bool postgresql_session_backend::get_next_sequence_value( -+ session & s, std::string const & sequence, long & value) -+{ -+ s << "select nextval('" + sequence + "')", into(value); -+ -+ return true; -+} -+ - postgresql_session_backend::~postgresql_session_backend() - { - clean_up(); diff --git a/databases/soci/patches/patch-backends_postgresql_soci-postgresql.h b/databases/soci/patches/patch-backends_postgresql_soci-postgresql.h deleted file mode 100644 index bd9563f42a2..00000000000 --- a/databases/soci/patches/patch-backends_postgresql_soci-postgresql.h +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-backends_postgresql_soci-postgresql.h,v 1.1 2013/08/27 22:28:05 joerg Exp $ - ---- backends/postgresql/soci-postgresql.h.orig 2013-08-26 22:14:11.873247651 +0000 -+++ backends/postgresql/soci-postgresql.h -@@ -239,6 +239,9 @@ struct postgresql_session_backend : deta - - void deallocate_prepared_statement(const std::string & statementName); - -+ virtual bool get_next_sequence_value(session & s, -+ std::string const & sequence, long & value); -+ - virtual std::string get_backend_name() const { return "postgresql"; } - - void clean_up(); diff --git a/databases/soci/patches/patch-backends_sqlite3_soci-sqlite3.h b/databases/soci/patches/patch-backends_sqlite3_soci-sqlite3.h deleted file mode 100644 index 0ffed6b42fe..00000000000 --- a/databases/soci/patches/patch-backends_sqlite3_soci-sqlite3.h +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-backends_sqlite3_soci-sqlite3.h,v 1.1 2013/07/05 21:04:45 joerg Exp $ - -sqlite.h is included inside a namespace, so make sure that -the content of stdarg.h is in the default namespace. - ---- backends/sqlite3/soci-sqlite3.h.orig 2013-03-22 00:48:38.000000000 +0000 -+++ backends/sqlite3/soci-sqlite3.h -@@ -23,6 +23,7 @@ - # define SOCI_SQLITE3_DECL - #endif - -+#include <stdarg.h> - #include <vector> - #include "soci-backend.h" - diff --git a/databases/soci/patches/patch-core_once-temp-type.cpp b/databases/soci/patches/patch-core_once-temp-type.cpp deleted file mode 100644 index ee20017e057..00000000000 --- a/databases/soci/patches/patch-core_once-temp-type.cpp +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-core_once-temp-type.cpp,v 1.1 2013/08/30 10:19:37 joerg Exp $ - ---- core/once-temp-type.cpp.orig 2013-08-30 00:17:03.209692967 +0000 -+++ core/once-temp-type.cpp -@@ -35,7 +35,7 @@ once_temp_type & once_temp_type::operato - return *this; - } - --once_temp_type::~once_temp_type() -+once_temp_type::~once_temp_type() SOCI_ONCE_TEMP_TYPE_NOEXCEPT - { - rcst_->dec_ref(); - } diff --git a/databases/soci/patches/patch-core_once-temp-type.h b/databases/soci/patches/patch-core_once-temp-type.h deleted file mode 100644 index 714bc03d7f9..00000000000 --- a/databases/soci/patches/patch-core_once-temp-type.h +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-core_once-temp-type.h,v 1.1 2013/08/30 10:19:37 joerg Exp $ - ---- core/once-temp-type.h.orig 2013-08-30 00:16:03.749693674 +0000 -+++ core/once-temp-type.h -@@ -21,6 +21,12 @@ namespace details - - class ref_counted_statement; - -+#if __cplusplus >= 201103L -+#define SOCI_ONCE_TEMP_TYPE_NOEXCEPT noexcept(false) -+#else -+#define SOCI_ONCE_TEMP_TYPE_NOEXCEPT -+#endif -+ - // this needs to be lightweight and copyable - class SOCI_DECL once_temp_type - { -@@ -30,7 +36,7 @@ public: - once_temp_type(once_temp_type const & o); - once_temp_type & operator=(once_temp_type const & o); - -- ~once_temp_type(); -+ ~once_temp_type() SOCI_ONCE_TEMP_TYPE_NOEXCEPT; - - template <typename T> - once_temp_type & operator<<(T const & t) |