Bug 175735 - [PATCH] databases/soci: update to 3.1.0
[PATCH] databases/soci: update to 3.1.0
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Julien Laffaye
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-31 15:10 UTC by avg
Modified: 2013-02-09 20:20 UTC (History)
1 user (show)

See Also:


Attachments
soci-3.1.0.patch (9.98 KB, patch)
2013-01-31 15:10 UTC, avg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description avg 2013-01-31 15:10:00 UTC
- Update to 3.1.0

Added file(s):
- files/patch-CMakeLists.txt
- files/patch-backends_postgresql_statement.cpp
- files/patch-backends_sqlite3_standard-into-type.cpp
- files/patch-cmake_SociBackend.cmake

Port maintainer (jlaffaye@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: update, diff: suffix)
Comment 1 Edwin Groothuis freebsd_committer 2013-01-31 15:10:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jlaffaye

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Julien Laffaye freebsd_committer 2013-02-09 19:50:27 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter freebsd_committer 2013-02-09 20:13:49 UTC
Author: jlaffaye
Date: Sat Feb  9 19:49:54 2013
New Revision: 311992
URL: http://svnweb.freebsd.org/changeset/ports/311992

Log:
  - Update to 3.1.0
  
  PR:             ports/175735
  Submitted by:   avg

Added:
  head/databases/soci/files/patch-CMakeLists.txt   (contents, props changed)
  head/databases/soci/files/patch-backends_postgresql_statement.cpp   (contents, props changed)
  head/databases/soci/files/patch-backends_sqlite3_standard-into-type.cpp   (contents, props changed)
  head/databases/soci/files/patch-cmake_SociBackend.cmake   (contents, props changed)
Modified:
  head/databases/soci/Makefile   (contents, props changed)
  head/databases/soci/distinfo   (contents, props changed)
  head/databases/soci/pkg-plist   (contents, props changed)

Modified: head/databases/soci/Makefile
==============================================================================
--- head/databases/soci/Makefile	Sat Feb  9 19:11:54 2013	(r311991)
+++ head/databases/soci/Makefile	Sat Feb  9 19:49:54 2013	(r311992)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	soci
-PORTVERSION=	3.0.0
-PORTREVISION=	1
+PORTVERSION=	3.1.0
 CATEGORIES=	databases
 MASTER_SITES=	SF
 MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -11,45 +10,79 @@ MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNA
 MAINTAINER=	jlaffaye@FreeBSD.org
 COMMENT=	The C++ Database Access Library
 
-LICENSE=	MIT
+LICENSE=	BSL
 LICENSE_FILE=	${WRKSRC}/LICENSE_1_0.txt
 
+USE_ZIP=	yes
+USE_CMAKE=	yes
+CMAKE_ARGS+=	-DWITH_ORACLE:BOOL=OFF
 MAKE_JOBS_SAFE=	yes
 USE_LDCONFIG=	yes
-USE_TCL_BUILD=	85
-HAS_CONFIGURE=	yes
-CONFIGURE_ARGS=	--include-prefix=${PREFIX}/include/soci \
-		--lib-prefix=${PREFIX}/lib
-ALL_TARGET=	build_libs
+
 SUB_FILES=	pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
-OPTIONS_DEFINE=	MYSQL PGSQL
-OPTIONS_DEFAULT=	MYSQL PGSQL
+OPTIONS_DEFINE=	MYSQL PGSQL SQLITE ODBC BOOST
+BOOST_DESC=	Enable support for additional types using Boost
+OPTIONS_SINGLE=	ODBCDRV
+ODBCDRV_DESC=	ODBC driver to use
+OPTIONS_SINGLE_ODBCDRV=	IODBC UODBC
+IODBC_DESC=	use iODBC driver
+UODBC_DESC=	use unixODBC driver
+OPTIONS_DEFAULT=MYSQL PGSQL SQLITE ODBC IODBC BOOST
 
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MMYSQL}
 USE_MYSQL=	yes
 PLIST_SUB+=	MYSQL=""
-CONFIGURE_ARGS+=--mysql-include=${LOCALBASE}/include/mysql \
-		--mysql-lib=${LOCALBASE}/lib/mysql
+CMAKE_ARGS+=	-DWITH_MYSQL:BOOL=ON
 .else
 PLIST_SUB+=	MYSQL="@comment "
+CMAKE_ARGS+=	-DWITH_MYSQL:BOOL=OFF
 .endif
 
 .if ${PORT_OPTIONS:MPGSQL}
 USE_PGSQL=	yes
 PLIST_SUB+=	PGSQL=""
-CONFIGURE_ARGS+=--postgresql-include=${LOCALBASE}/include \
-		--postgresql-lib=${LOCALBASE}/lib
+CMAKE_ARGS+=	-DWITH_POSTGRESQL:BOOL=ON
 .else
 PLIST_SUB+=	PGSQL="@comment "
+CMAKE_ARGS+=	-DWITH_POSTGRESQL:BOOL=OFF
+.endif
+
+.if ${PORT_OPTIONS:MSQLITE}
+USE_SQLITE=	yes
+PLIST_SUB+=	SQLITE=""
+CMAKE_ARGS+=	-DWITH_SQLITE3:BOOL=ON
+.else
+PLIST_SUB+=	SQLITE="@comment "
+CMAKE_ARGS+=	-DWITH_SQLITE3:BOOL=OFF
+.endif
+
+.if ${PORT_OPTIONS:MODBC}
+PLIST_SUB+=	ODBC=""
+CMAKE_ARGS+=	-DWITH_ODBC:BOOL=ON
+.if ${PORT_OPTIONS:MUODBC}
+LIB_DEPENDS+=	odbc:${PORTSDIR}/databases/unixODBC
+CMAKE_ARGS+=	-DODBC_LIBRARY:FILE_PATH=${LOCALBASE}/lib/libodbc.so
+.elif ${PORT_OPTIONS:MIODBC}
+LIB_DEPENDS+=	iodbc:${PORTSDIR}/databases/libiodbc
+CMAKE_ARGS+=	-DODBC_LIBRARY:FILE_PATH=${LOCALBASE}/lib/libiodbc.so
+.endif
+.else
+PLIST_SUB+=	ODBC="@comment "
+CMAKE_ARGS+=	-DWITH_ODBC:BOOL=OFF
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|" ${WRKSRC}/configure
-	@${REINPLACE_CMD} -e "s/ldconfig/true/" ${WRKSRC}/build/unix/install.tcl
+. if ${PORT_OPTIONS:MBOOST}
+LIB_DEPENDS+=	boost_date_time:${PORTSDIR}/devel/boost-libs
+PLIST_SUB+=	BOOST=""
+CMAKE_ARGS+=	-DWITH_BOOST:BOOL=ON
+.else
+PLIST_SUB+=	BOOST="@comment "
+CMAKE_ARGS+=	-DWITH_BOOST:BOOL=OFF
+.endif
 
 post-install:
 	@${CAT} ${PKGMESSAGE}

Modified: head/databases/soci/distinfo
==============================================================================
--- head/databases/soci/distinfo	Sat Feb  9 19:11:54 2013	(r311991)
+++ head/databases/soci/distinfo	Sat Feb  9 19:49:54 2013	(r311992)
@@ -1,2 +1,2 @@
-SHA256 (soci-3.0.0.tar.gz) = 896a79cbf1859971f4887eec8fa9519b17749c930d6901a6aa1701e556d26ece
-SIZE (soci-3.0.0.tar.gz) = 195545
+SHA256 (soci-3.1.0.zip) = f7004cb2ac040b1fa6ce3cf7ea36e9fe5cdff92c6444ffd764ab2279d5f72449
+SIZE (soci-3.1.0.zip) = 418596

Added: head/databases/soci/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/soci/files/patch-CMakeLists.txt	Sat Feb  9 19:49:54 2013	(r311992)
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2012-06-19 19:38:59.955809070 +0300
++++ CMakeLists.txt	2012-06-19 19:41:10.731806799 +0300
+@@ -68,7 +68,7 @@ include(SociDependencies)
+ # Installation
+ #################################################################################
+ 
+-if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4)
++if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4 OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+   set(SOCI_LIBDIR "lib")
+ else()
+   set(SOCI_LIBDIR "lib64")

Added: head/databases/soci/files/patch-backends_postgresql_statement.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/soci/files/patch-backends_postgresql_statement.cpp	Sat Feb  9 19:49:54 2013	(r311992)
@@ -0,0 +1,14 @@
+--- backends/postgresql/statement.cpp.orig	2012-06-19 19:22:42.029810018 +0300
++++ backends/postgresql/statement.cpp	2012-06-19 19:23:24.256806727 +0300
+@@ -445,7 +445,11 @@ long long postgresql_statement_backend::
+ {
+     const char * resultStr = PQcmdTuples(result_);
+     char * end;
++#ifdef __FreeBSD__
++    long long result = strtoq(resultStr, &end, 0);
++#else
+     long long result = strtoll(resultStr, &end, 0);
++#endif
+     if (end != resultStr)
+     {
+         return result;

Added: head/databases/soci/files/patch-backends_sqlite3_standard-into-type.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/soci/files/patch-backends_sqlite3_standard-into-type.cpp	Sat Feb  9 19:49:54 2013	(r311992)
@@ -0,0 +1,26 @@
+--- backends/sqlite3/standard-into-type.cpp.orig	2012-06-19 19:12:10.168809305 +0300
++++ backends/sqlite3/standard-into-type.cpp	2012-06-19 19:22:12.580359214 +0300
+@@ -113,7 +113,11 @@ void sqlite3_standard_into_type_backend:
+         case x_long_long:
+             {
+                 long long* dest = static_cast<long long*>(data_);
++#ifdef __FreeBSD__
++                *dest = strtoq(buf, NULL, 10);
++#else
+                 *dest = strtoll(buf, NULL, 10);
++#endif
+             }
+             break;
+         case x_unsigned_long_long:
+@@ -142,7 +146,11 @@ void sqlite3_standard_into_type_backend:
+ 
+                 rowid *rid = static_cast<rowid *>(data_);
+                 sqlite3_rowid_backend *rbe = static_cast<sqlite3_rowid_backend *>(rid->get_backend());
++#ifdef __FreeBSD__
++                long long val = strtoq(buf, NULL, 10);
++#else
+                 long long val = strtoll(buf, NULL, 10);
++#endif
+                 rbe->value_ = static_cast<unsigned long>(val);
+             }
+             break;

Added: head/databases/soci/files/patch-cmake_SociBackend.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/soci/files/patch-cmake_SociBackend.cmake	Sat Feb  9 19:49:54 2013	(r311992)
@@ -0,0 +1,10 @@
+--- cmake/SociBackend.cmake.orig	2012-06-19 19:07:03.554808441 +0300
++++ cmake/SociBackend.cmake	2012-06-19 19:07:19.839807427 +0300
+@@ -61,6 +61,7 @@ macro(soci_backend NAME)
+       string(TOUPPER "${dep}" DEPU)
+       list(APPEND THIS_BACKEND_DEPENDS_INCLUDE_DIRS ${${DEPU}_INCLUDE_DIR})
+       list(APPEND THIS_BACKEND_DEPENDS_INCLUDE_DIRS ${${DEPU}_INCLUDE_DIRS})
++      list(APPEND THIS_BACKEND_DEPENDS_INCLUDE_DIRS ${${DEPU}_INCLUDE_DIRECTORIES})
+       list(APPEND THIS_BACKEND_DEPENDS_LIBRARIES ${${DEPU}_LIBRARIES})
+       list(APPEND THIS_BACKEND_DEPENDS_DEFS -DHAVE_${DEPU}=1)
+     endif()

Modified: head/databases/soci/pkg-plist
==============================================================================
--- head/databases/soci/pkg-plist	Sat Feb  9 19:11:54 2013	(r311991)
+++ head/databases/soci/pkg-plist	Sat Feb  9 19:49:54 2013	(r311992)
@@ -1,16 +1,23 @@
 include/soci/backend-loader.h
 include/soci/blob-exchange.h
 include/soci/blob.h
-include/soci/boost-fusion.h
-include/soci/boost-gregorian-date.h
-include/soci/boost-optional.h
-include/soci/boost-tuple.h
+%%BOOST%%include/soci/boost-fusion.h
+%%BOOST%%include/soci/boost-gregorian-date.h
+%%BOOST%%include/soci/boost-optional.h
+%%BOOST%%include/soci/boost-tuple.h
 include/soci/connection-pool.h
+include/soci/empty/soci-empty.h
 include/soci/error.h
 include/soci/exchange-traits.h
 include/soci/into-type.h
 include/soci/into.h
+%%MYSQL%%include/soci/mysql/common.h
+%%MYSQL%%include/soci/mysql/soci-mysql.h
+%%ODBC%%include/soci/odbc/soci-odbc.h
+%%ODBC%%include/soci/odbc/utility.h
 include/soci/once-temp-type.h
+%%PGSQL%%include/soci/postgresql/common.h
+%%PGSQL%%include/soci/postgresql/soci-postgresql.h
 include/soci/prepare-temp-type.h
 include/soci/procedure.h
 include/soci/ref-counted-prepare-info.h
@@ -23,31 +30,50 @@ include/soci/rowset.h
 include/soci/session.h
 include/soci/soci-backend.h
 include/soci/soci-config.h
-%%MYSQL%%include/soci/soci-mysql.h
 include/soci/soci-platform.h
-%%PGSQL%%include/soci/soci-postgresql.h
 include/soci/soci-simple.h
 include/soci/soci.h
+%%SQLITE%%include/soci/sqlite3/common.h
+%%SQLITE%%include/soci/sqlite3/soci-sqlite3.h
 include/soci/statement.h
 include/soci/transaction.h
 include/soci/type-conversion-traits.h
 include/soci/type-conversion.h
 include/soci/type-holder.h
 include/soci/type-ptr.h
+include/soci/unsigned-types.h
 include/soci/use-type.h
 include/soci/use.h
 include/soci/values-exchange.h
 include/soci/values.h
-lib/libsoci_core-3.0.0.so
-lib/libsoci_core-3.so
+include/soci/version.h
 lib/libsoci_core.a
 lib/libsoci_core.so
-%%MYSQL%%lib/libsoci_mysql-3.0.0.so
-%%MYSQL%%lib/libsoci_mysql-3.so
+lib/libsoci_core.so.3.1
+lib/libsoci_core.so.3.1.0
+lib/libsoci_empty.a
+lib/libsoci_empty.so
+lib/libsoci_empty.so.3.1
+lib/libsoci_empty.so.3.1.0
 %%MYSQL%%lib/libsoci_mysql.a
 %%MYSQL%%lib/libsoci_mysql.so
-%%PGSQL%%lib/libsoci_postgresql-3.0.0.so
-%%PGSQL%%lib/libsoci_postgresql-3.so
+%%MYSQL%%lib/libsoci_mysql.so.3.1
+%%MYSQL%%lib/libsoci_mysql.so.3.1.0
+%%ODBC%%lib/libsoci_odbc.a
+%%ODBC%%lib/libsoci_odbc.so
+%%ODBC%%lib/libsoci_odbc.so.3.1
+%%ODBC%%lib/libsoci_odbc.so.3.1.0
 %%PGSQL%%lib/libsoci_postgresql.a
 %%PGSQL%%lib/libsoci_postgresql.so
+%%PGSQL%%lib/libsoci_postgresql.so.3.1
+%%PGSQL%%lib/libsoci_postgresql.so.3.1.0
+%%SQLITE%%lib/libsoci_sqlite3.a
+%%SQLITE%%lib/libsoci_sqlite3.so
+%%SQLITE%%lib/libsoci_sqlite3.so.3.1
+%%SQLITE%%lib/libsoci_sqlite3.so.3.1.0
+@dirrm include/soci/sqlite3
+@dirrm include/soci/postgresql
+@dirrm include/soci/odbc
+@dirrm include/soci/mysql
+@dirrm include/soci/empty
 @dirrm include/soci
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"