[sqlpp11,vcpkg-ci-sqlpp11] Fixes, cleanup, test port (#41128)

This commit is contained in:
Kai Pastor 2024-09-25 21:46:34 +02:00 committed by GitHub
parent d1e8683f11
commit 3d89599850
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 135 additions and 59 deletions

View File

@ -1,13 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb05cd8..4e83094 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,7 +113,7 @@ endif()
### Packaging
install(PROGRAMS ${PROJECT_SOURCE_DIR}/scripts/ddl2cpp
RENAME sqlpp11-ddl2cpp
- DESTINATION ${CMAKE_INSTALL_BINDIR}
+ DESTINATION tools/sqlpp11
)
write_basic_package_version_file(Sqlpp11ConfigVersion.cmake
diff --git a/cmake/configs/Sqlpp11Config.cmake b/cmake/configs/Sqlpp11Config.cmake
index 5c5926f..c25da97 100644
index bf340d6..249014d 100644
--- a/cmake/configs/Sqlpp11Config.cmake
+++ b/cmake/configs/Sqlpp11Config.cmake
@@ -55,7 +55,7 @@ endforeach()
# Import "ddl2cpp" script
if(NOT TARGET sqlpp11::ddl2cpp)
- get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../../bin/sqlpp11-ddl2cpp" REALPATH)
+ get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../scripts/sqlpp11-ddl2cpp" REALPATH)
if(NOT EXISTS "${sqlpp11_ddl2cpp_location}")
message(FATAL_ERROR "The imported target sqlpp11::ddl2cpp references the file '${sqlpp11_ddl2cpp_location}' but this file does not exists.")
endif()
- get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../../bin/sqlpp11-ddl2cpp" REALPATH)
+ get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../tools/sqlpp11/sqlpp11-ddl2cpp" REALPATH)
if(NOT EXISTS "${sqlpp11_ddl2cpp_location}")
message(FATAL_ERROR "The imported target sqlpp11::ddl2cpp references the file '${sqlpp11_ddl2cpp_location}' but this file does not exists.")
endif()

View File

@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb05cd8..6aff88b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,8 @@ set(SQLPP11_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Sqlpp11 CACHE STRING
### Dependencies
if(DEPENDENCY_CHECK AND BUILD_MYSQL_CONNECTOR)
- find_package(MySQL REQUIRED)
+ find_package(MySQL NAMES unofficial-libmysql REQUIRED)
+ add_library(MySQL::MySQL ALIAS unofficial::libmysql::libmysql)
endif()
if(DEPENDENCY_CHECK AND BUILD_MARIADB_CONNECTOR)
diff --git a/cmake/configs/Sqlpp11MySQLConfig.cmake b/cmake/configs/Sqlpp11MySQLConfig.cmake
index 0d2a5b3..53dab6e 100644
--- a/cmake/configs/Sqlpp11MySQLConfig.cmake
+++ b/cmake/configs/Sqlpp11MySQLConfig.cmake
@@ -1,2 +1,2 @@
include(CMakeFindDependencyMacro)
-find_dependency(MySQL)
\ No newline at end of file
+find_dependency(unofficial-libmysql)

View File

@ -1,34 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88a8ae0..a36cb19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,7 +62,7 @@ if(DEPENDENCY_CHECK AND BUILD_POSTGRESQL_CONNECTOR)
endif()
if(DEPENDENCY_CHECK AND BUILD_SQLITE3_CONNECTOR)
- find_package(SQLite3 REQUIRED)
+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
endif()
if(DEPENDENCY_CHECK AND BUILD_SQLCIPHER_CONNECTOR)
@@ -89,7 +89,7 @@ target_compile_features(sqlpp11 INTERFACE cxx_std_11)
if(BUILD_SQLITE3_CONNECTOR)
- add_component(NAME sqlite3 DEPENDENCIES SQLite::SQLite3)
+ add_component(NAME sqlite3 DEPENDENCIES unofficial::sqlite3::sqlite3)
endif()
if(BUILD_SQLCIPHER_CONNECTOR)
diff --git a/cmake/configs/Sqlpp11Config.cmake b/cmake/configs/Sqlpp11Config.cmake
index c25da97..b15524e 100644
--- a/cmake/configs/Sqlpp11Config.cmake
+++ b/cmake/configs/Sqlpp11Config.cmake
@@ -30,6 +30,7 @@ list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(date REQUIRED)
+find_dependency(unofficial-sqlite3 CONFIG)
# Work out the set of components to load
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)

View File

@ -1,12 +1,14 @@
set(VCPKG_BUILD_TYPE release) # header-only lib
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO rbock/sqlpp11
REF ${VERSION}
SHA512 7b48f66e2e229ed046a5b5033acc1be36b0c2790773a81ce9c65fce4a85379d61e87dd0ff214eb4126ce87fe6cf2f314b7e6c54256b600d15d8352d74a8fac0d
HEAD_REF master
HEAD_REF main
PATCHES
ddl2cpp_path.patch
fix_link_sqlite3.patch
dependencies.diff
)
vcpkg_check_features(
@ -18,27 +20,16 @@ vcpkg_check_features(
postgresql BUILD_POSTGRESQL_CONNECTOR
)
# Use sqlpp11's own build process
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING:BOOL=OFF
# Use vcpkg as source for the date library
-DSQLPP11_INSTALL_CMAKEDIR=share/${PORT}
-DUSE_SYSTEM_DATE:BOOL=ON
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
# Move CMake config files to the right place
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Sqlpp11)
# Delete redundant and unnecessary directories
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_PACKAGES_DIR}/cmake" "${CURRENT_PACKAGES_DIR}/include/date")
# Move python script from bin directory
file(COPY "${CURRENT_PACKAGES_DIR}/bin/sqlpp11-ddl2cpp" DESTINATION "${CURRENT_PACKAGES_DIR}/scripts")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,6 +1,7 @@
{
"name": "sqlpp11",
"version": "0.64",
"port-version": 1,
"description": "A type safe embedded domain specific language for SQL queries and results in C++.",
"homepage": "https://github.com/rbock/sqlpp11",
"license": "BSD-2-Clause",

View File

@ -571,15 +571,14 @@ liblo:arm64-uwp=fail
liblo:arm64-android=fail
liblo:x64-android=fail
liblo:x64-uwp=fail
# libmariadb conflicts with libmysql
libmariadb:arm-neon-android=fail
libmariadb:arm64-android=fail
libmariadb:arm64-windows = skip
libmariadb:arm64-uwp = skip
libmariadb:x64-android=fail
libmariadb:x64-linux = skip
libmariadb:x64-osx = skip
libmariadb:arm64-osx = skip
libmariadb:x64-uwp = skip
libmariadb:x64-windows = skip
libmariadb:x64-windows-static = skip
libmariadb:x64-windows-static-md=skip
@ -1092,6 +1091,7 @@ spdk-isal:x64-linux=skip
spscqueue:arm-neon-android=fail
spscqueue:arm64-android=fail
spscqueue:x64-android=fail
# sqlpp11-connector-mysql: CI issues resolved by overlay port
stormlib:arm64-uwp=fail
stormlib:x64-uwp=fail
stxxl:arm-neon-android=fail
@ -1354,6 +1354,19 @@ vcpkg-ci-soci:x64-osx=pass
vcpkg-ci-soci:x64-windows=pass
vcpkg-ci-soci:x64-windows-static=pass
vcpkg-ci-soci:x64-windows-static-md=pass
vcpkg-ci-sqlpp11:arm-neon-android=pass
vcpkg-ci-sqlpp11:arm64-android=pass
vcpkg-ci-sqlpp11:arm64-osx=pass
vcpkg-ci-sqlpp11:arm64-uwp=pass
vcpkg-ci-sqlpp11:arm64-windows=pass
vcpkg-ci-sqlpp11:x64-android=pass
vcpkg-ci-sqlpp11:x64-linux=pass
vcpkg-ci-sqlpp11:x64-osx=pass
vcpkg-ci-sqlpp11:x64-uwp=pass
vcpkg-ci-sqlpp11:x64-windows-static-md=pass
vcpkg-ci-sqlpp11:x64-windows-static=pass
vcpkg-ci-sqlpp11:x64-windows=pass
vcpkg-ci-sqlpp11:x86-windows=pass
vcpkg-ci-wxwidgets:arm64-windows=pass
vcpkg-ci-wxwidgets:x64-linux=pass
vcpkg-ci-wxwidgets:x64-osx=pass

View File

@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View File

@ -0,0 +1,26 @@
{
"name": "sqlpp11-connector-mysql",
"version-string": "ci",
"description": "Overlay for an obsolete empty port in order to unblock sqlpp11 testing: platform-specific choice of testable implementation",
"homepage": "https://github.com/microsoft/vcpkg",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
{
"name": "sqlpp11",
"default-features": false,
"features": [
"mariadb"
],
"platform": "x86 & windows"
},
{
"name": "sqlpp11",
"default-features": false,
"features": [
"mysql"
],
"platform": "!(x86 & windows)"
}
]
}

View File

@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View File

@ -0,0 +1,36 @@
{
"name": "vcpkg-ci-sqlpp11",
"version-string": "ci",
"description": "Port to force features of sqlpp11 within CI",
"homepage": "https://github.com/microsoft/vcpkg",
"license": "MIT",
"dependencies": [
{
"name": "sqlpp11",
"features": [
"sqlite3"
]
},
{
"name": "sqlpp11",
"features": [
"postgresql"
],
"platform": "!uwp"
},
{
"name": "sqlpp11",
"features": [
"mariadb"
],
"platform": "x86 & windows"
},
{
"name": "sqlpp11",
"features": [
"mysql"
],
"platform": "!android & !uwp & !(x86 & windows)"
}
]
}

View File

@ -8582,7 +8582,7 @@
},
"sqlpp11": {
"baseline": "0.64",
"port-version": 0
"port-version": 1
},
"sqlpp11-connector-mysql": {
"baseline": "0.61",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "dcc1169986fc1ff635e7f0a104e1330c9ac3e15f",
"version": "0.64",
"port-version": 1
},
{
"git-tree": "6906f65042fff492746cfe95290e03ea4e89da4a",
"version": "0.64",