mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Add sqlpp11 libraries (#4747)
* Add sqlpp11 * Add sqlpp11-connector-mysql * Add sqlpp11-connector-sqlite3 * Apply a patch for MSVC
This commit is contained in:
parent
715aefc213
commit
da0fc542dc
4
ports/sqlpp11-connector-mysql/CONTROL
Normal file
4
ports/sqlpp11-connector-mysql/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: sqlpp11-connector-mysql
|
||||
Version: 0.25
|
||||
Description: A C++ wrapper for MySQL meant to be used in combination with sqlpp11.
|
||||
Build-Depends: date, libmariadb, sqlpp11
|
26
ports/sqlpp11-connector-mysql/portfile.cmake
Normal file
26
ports/sqlpp11-connector-mysql/portfile.cmake
Normal file
@ -0,0 +1,26 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rbock/sqlpp11-connector-mysql
|
||||
REF 0.25
|
||||
SHA512 1351161eff5ecc3c2bc720f537e474fadc8f4843999e33274a9b1bccf21fd2b5785eb9588dedc951dcf1c09e4a90c8e2193e9046a43a1bc9d355045aaec71740
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
# Use sqlpp11-connector-mysql's own build process, skipping tests
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DENABLE_TESTS:BOOL=OFF
|
||||
-DDATE_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
|
||||
-DSQLPP11_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
|
||||
-DMYSQL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/mysql
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11-connector-mysql RENAME copyright)
|
4
ports/sqlpp11-connector-sqlite3/CONTROL
Normal file
4
ports/sqlpp11-connector-sqlite3/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: sqlpp11-connector-sqlite3
|
||||
Version: 0.29
|
||||
Description: A C++ wrapper for sqlite3 meant to be used in combination with sqlpp11.
|
||||
Build-Depends: date, sqlite3, sqlpp11
|
24
ports/sqlpp11-connector-sqlite3/portfile.cmake
Normal file
24
ports/sqlpp11-connector-sqlite3/portfile.cmake
Normal file
@ -0,0 +1,24 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rbock/sqlpp11-connector-sqlite3
|
||||
REF 0.29
|
||||
SHA512 99d1b36209dc879b12b99ed0809f1d21f760c62c25aa32d8f83b571d0819e35783ad20be0754288da9cd5fcb81cbb672031928d159ff9a64c3635dcbc4bda8fa
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
# Use sqlpp11-connector-sqlite3's own build process, skipping tests
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DENABLE_TESTS:BOOL=OFF
|
||||
-DSQLPP11_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11-connector-sqlite3 RENAME copyright)
|
4
ports/sqlpp11/CONTROL
Normal file
4
ports/sqlpp11/CONTROL
Normal file
@ -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
|
24
ports/sqlpp11/FixForMSVC.patch
Normal file
24
ports/sqlpp11/FixForMSVC.patch
Normal file
@ -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
|
28
ports/sqlpp11/portfile.cmake
Normal file
28
ports/sqlpp11/portfile.cmake
Normal file
@ -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)
|
Loading…
x
Reference in New Issue
Block a user