aboutsummaryrefslogtreecommitdiff
path: root/ports/sqlpp11
diff options
context:
space:
mode:
authorOctavian Dima <WopsS@users.noreply.github.com>2019-01-26 22:01:25 +0100
committerCodiferous <44823842+Codiferous@users.noreply.github.com>2019-01-26 13:01:25 -0800
commitda0fc542dcd9dd068dfe8efcf347036aaaf3ae2f (patch)
tree201902be7a6b972450c4dfbdb37c96152a5e9711 /ports/sqlpp11
parent715aefc2138ae0c3577294cfd3e2bdf94126122d (diff)
downloadvcpkg-da0fc542dcd9dd068dfe8efcf347036aaaf3ae2f.tar.gz
vcpkg-da0fc542dcd9dd068dfe8efcf347036aaaf3ae2f.zip
Add sqlpp11 libraries (#4747)
* Add sqlpp11 * Add sqlpp11-connector-mysql * Add sqlpp11-connector-sqlite3 * Apply a patch for MSVC
Diffstat (limited to 'ports/sqlpp11')
-rw-r--r--ports/sqlpp11/CONTROL4
-rw-r--r--ports/sqlpp11/FixForMSVC.patch24
-rw-r--r--ports/sqlpp11/portfile.cmake28
3 files changed, 56 insertions, 0 deletions
diff --git a/ports/sqlpp11/CONTROL b/ports/sqlpp11/CONTROL
new file mode 100644
index 000000000..7c75d17d9
--- /dev/null
+++ b/ports/sqlpp11/CONTROL
@@ -0,0 +1,4 @@
+Source: sqlpp11
+Version: 0.57
+Description: A type safe embedded domain specific language for SQL queries and results in C++.
+Build-Depends: date \ No newline at end of file
diff --git a/ports/sqlpp11/FixForMSVC.patch b/ports/sqlpp11/FixForMSVC.patch
new file mode 100644
index 000000000..753590707
--- /dev/null
+++ b/ports/sqlpp11/FixForMSVC.patch
@@ -0,0 +1,24 @@
+diff --git a/include/sqlpp11/char_sequence.h b/include/sqlpp11/char_sequence.h
+index 5759525..96cdbd0 100644
+--- a/include/sqlpp11/char_sequence.h
++++ b/include/sqlpp11/char_sequence.h
+@@ -54,16 +54,16 @@ namespace sqlpp
+ }
+ };
+
+- template <std::size_t N, const char (&s)[N], typename T>
++ template <std::size_t N, const char* s, typename T>
+ struct make_char_sequence_impl;
+
+- template <std::size_t N, const char (&s)[N], std::size_t... i>
++ template <std::size_t N, const char* s, std::size_t... i>
+ struct make_char_sequence_impl<N, s, sqlpp::detail::index_sequence<i...>>
+ {
+ using type = char_sequence<s[i]...>;
+ };
+
+- template <std::size_t N, const char (&Input)[N]>
++ template <std::size_t N, const char* Input>
+ using make_char_sequence =
+ typename make_char_sequence_impl<N, Input, sqlpp::detail::make_index_sequence<N - 1>>::type;
+ } // namespace sqlpp
diff --git a/ports/sqlpp11/portfile.cmake b/ports/sqlpp11/portfile.cmake
new file mode 100644
index 000000000..61b930da5
--- /dev/null
+++ b/ports/sqlpp11/portfile.cmake
@@ -0,0 +1,28 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO rbock/sqlpp11
+ REF 0.57
+ SHA512 6bf48189f35cf2ff20b09e27ab83b6fb36415bed7e5c818c1ea2c9b30b5fe0a60c0f7e9930e92a0637c7b567ccfead4a9208a3aff99be89fed361778cf8c45f1
+ HEAD_REF master
+ PATCHES FixForMSVC.patch
+)
+
+# Use sqlpp11's own build process, skipping tests
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DENABLE_TESTS:BOOL=OFF
+)
+
+vcpkg_install_cmake()
+
+# Move CMake config files to the right place
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
+
+# Delete redundant and unnecessary directories
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11 RENAME copyright)