summaryrefslogtreecommitdiff
path: root/databases/soci
diff options
context:
space:
mode:
authorjoerg <joerg>2013-10-04 18:32:07 +0000
committerjoerg <joerg>2013-10-04 18:32:07 +0000
commita6198b4cfb6c4869c89ae3fdf0f74cad4b909fa4 (patch)
treee09bc470a78f4be2e9018e31a88cddac924b10cf /databases/soci
parent209078a949dcce5fb42b30cbd250768a4c59ec92 (diff)
downloadpkgsrc-a6198b4cfb6c4869c89ae3fdf0f74cad4b909fa4.tar.gz
Allow building on Cygwin.
Diffstat (limited to 'databases/soci')
-rw-r--r--databases/soci/Makefile7
-rw-r--r--databases/soci/PLIST.Cygwin3
-rw-r--r--databases/soci/distinfo4
-rw-r--r--databases/soci/patches/patch-backends_postgresql_statement.cpp13
-rw-r--r--databases/soci/patches/patch-cmake_SociConfig.cmake25
5 files changed, 50 insertions, 2 deletions
diff --git a/databases/soci/Makefile b/databases/soci/Makefile
index e331ad705e1..935001387eb 100644
--- a/databases/soci/Makefile
+++ b/databases/soci/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2013/09/11 12:22:33 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2013/10/04 18:32:07 joerg Exp $
#
DISTNAME= soci-3.2.2
@@ -16,5 +16,10 @@ USE_LANGUAGES= c c++
CMAKE_ARGS+= -DSOCI_LIBDIR=lib
+.include "../../mk/bsd.prefs.mk"
+
+CXXFLAGS.Cygwin+= -std=gnu++11
+CMAKE_ARGS+= -DCMAKE_CXX_FLAGS=${CXXFLAGS:Q}
+
.include "options.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/databases/soci/PLIST.Cygwin b/databases/soci/PLIST.Cygwin
new file mode 100644
index 00000000000..ad7c959af18
--- /dev/null
+++ b/databases/soci/PLIST.Cygwin
@@ -0,0 +1,3 @@
+bin/cygsoci_core-3.2.dll
+bin/cygsoci_empty-3.2.dll
+bin/cygsoci_postgresql-3.2.dll
diff --git a/databases/soci/distinfo b/databases/soci/distinfo
index 1c58dbc5842..34986941dc8 100644
--- a/databases/soci/distinfo
+++ b/databases/soci/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.4 2013/09/11 12:22:33 joerg Exp $
+$NetBSD: distinfo,v 1.5 2013/10/04 18:32:07 joerg Exp $
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
+SHA1 (patch-backends_postgresql_statement.cpp) = d8c9fc32b9866eb3756e7f6f684255840462ac56
+SHA1 (patch-cmake_SociConfig.cmake) = d9b7585b4fe82058f70928e4a57058fa03273385
diff --git a/databases/soci/patches/patch-backends_postgresql_statement.cpp b/databases/soci/patches/patch-backends_postgresql_statement.cpp
new file mode 100644
index 00000000000..16a0042185b
--- /dev/null
+++ b/databases/soci/patches/patch-backends_postgresql_statement.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-backends_postgresql_statement.cpp,v 1.1 2013/10/04 18:32:07 joerg Exp $
+
+--- backends/postgresql/statement.cpp.orig 2013-10-02 07:33:45.455669800 +0000
++++ backends/postgresql/statement.cpp
+@@ -453,7 +453,7 @@ long long postgresql_statement_backend::
+ // pointer to it, so we can't rely on implicit conversion here.
+ const char * const resultStr = PQcmdTuples(result_.get_result());
+ char * end;
+- long long result = std::strtoll(resultStr, &end, 0);
++ long long result = strtoll(resultStr, &end, 0);
+ if (end != resultStr)
+ {
+ return result;
diff --git a/databases/soci/patches/patch-cmake_SociConfig.cmake b/databases/soci/patches/patch-cmake_SociConfig.cmake
new file mode 100644
index 00000000000..44263acfcf2
--- /dev/null
+++ b/databases/soci/patches/patch-cmake_SociConfig.cmake
@@ -0,0 +1,25 @@
+$NetBSD: patch-cmake_SociConfig.cmake,v 1.1 2013/10/04 18:32:07 joerg Exp $
+
+--- cmake/SociConfig.cmake.orig 2013-08-21 22:40:11.000000000 +0000
++++ cmake/SociConfig.cmake
+@@ -28,19 +28,11 @@ if (MSVC)
+
+ else()
+
+- set(SOCI_GCC_CLANG_COMMON_FLAGS
+- "-pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long")
++ set(SOCI_GCC_CLANG_COMMON_FLAGS "-Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long")
+
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC ${SOCI_GCC_CLANG_COMMON_FLAGS}")
+- if (CMAKE_COMPILER_IS_GNUCXX)
+- if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
+- else()
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+- endif()
+- endif()
+
+ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
+