mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:09:00 +08:00
[soci] update to 4.0.2 (#18526)
* [soci] update to 4.0.2 * update version * update portfile.cmake * update version * fix ci error * update version * fix-mysql-feature * update version * Add comment explaining fix-mysql-feature-error.patch Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
5d734efcef
commit
c32e7e262d
@ -1,8 +1,8 @@
|
||||
diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake
|
||||
index 442d81d..ef56422 100644
|
||||
index 5d4ef0d..bb0edf2 100644
|
||||
--- a/cmake/SociBackend.cmake
|
||||
+++ b/cmake/SociBackend.cmake
|
||||
@@ -159,8 +159,13 @@ macro(soci_backend NAME)
|
||||
@@ -159,8 +159,14 @@ macro(soci_backend NAME)
|
||||
${THIS_BACKEND_HEADERS})
|
||||
|
||||
target_link_libraries(${THIS_BACKEND_TARGET}
|
||||
@ -12,42 +12,25 @@ index 442d81d..ef56422 100644
|
||||
+
|
||||
+ target_include_directories(${THIS_BACKEND_TARGET}
|
||||
+ PUBLIC
|
||||
+ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS})
|
||||
+ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS}
|
||||
+ )
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${THIS_BACKEND_TARGET}
|
||||
@@ -197,8 +202,14 @@ macro(soci_backend NAME)
|
||||
@@ -197,9 +203,15 @@ macro(soci_backend NAME)
|
||||
|
||||
# Still need to link the libraries for tests to work
|
||||
target_link_libraries (${THIS_BACKEND_TARGET_STATIC}
|
||||
+ PUBLIC
|
||||
${THIS_BACKEND_DEPENDS_LIBRARIES}
|
||||
)
|
||||
-
|
||||
+
|
||||
+ target_include_directories(${THIS_BACKEND_TARGET_STATIC}
|
||||
+ PUBLIC
|
||||
+ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS}
|
||||
+ )
|
||||
|
||||
+
|
||||
set_target_properties(${THIS_BACKEND_TARGET_STATIC}
|
||||
PROPERTIES
|
||||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
||||
index 3916cce..d537613 100644
|
||||
--- a/src/core/CMakeLists.txt
|
||||
+++ b/src/core/CMakeLists.txt
|
||||
@@ -64,6 +64,7 @@ if (SOCI_SHARED)
|
||||
target_include_directories(${SOCI_CORE_TARGET}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
|
||||
+ $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
endif()
|
||||
@@ -96,6 +97,7 @@ if (SOCI_STATIC)
|
||||
target_include_directories(${SOCI_CORE_TARGET_STATIC}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
|
||||
+ $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
endif()
|
||||
OUTPUT_NAME ${THIS_BACKEND_OUTPUT_NAME}
|
||||
|
12
ports/soci/fix-mysql-feature-error.patch
Normal file
12
ports/soci/fix-mysql-feature-error.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/src/backends/mysql/session.cpp b/src/backends/mysql/session.cpp
|
||||
index 383248c..86a5bfd 100644
|
||||
--- a/src/backends/mysql/session.cpp
|
||||
+++ b/src/backends/mysql/session.cpp
|
||||
@@ -5,6 +5,7 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
+typedef bool my_bool;
|
||||
|
||||
#define SOCI_MYSQL_SOURCE
|
||||
#include "soci/mysql/soci-mysql.h"
|
@ -1,12 +1,13 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO SOCI/soci
|
||||
REF 334cc55d9fa7b42d7214a8533a246d637bc92899 #version 4.0.1 commit on 2020.10.19
|
||||
SHA512 b300b13f68347d78252812e09efffb1735072cf5019940da53366a5cdee997f4b8b03a584a87a95ba764b0a78640ad6eb4966b53f9156280cb452465607afbc7
|
||||
REF 99e2d567161a302de4f99832af76e6d3b75b68e6 #version 4.0.2
|
||||
SHA512 d08d2383808d46d5e9550e9c7d93fb405d9e336eb38d974ba429e5b9446d3af53d4e702b90e80c67e298333da0145457fa1146d9773322676030be69de4ec4f4
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-dependency-libmysql.patch
|
||||
export-include-dirs.patch
|
||||
fix-mysql-feature-error.patch # https://bugs.mysql.com/bug.php?id=85131
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC)
|
||||
@ -32,37 +33,29 @@ foreach(_feature IN LISTS ALL_FEATURES)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DSOCI_TESTS=OFF
|
||||
-DSOCI_CXX11=ON
|
||||
-DSOCI_LIBDIR:STRING=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds
|
||||
-DLIBDIR:STRING=lib
|
||||
-DSOCI_STATIC=${SOCI_STATIC}
|
||||
-DSOCI_SHARED=${SOCI_DYNAMIC}
|
||||
${_COMPONENT_FLAGS}
|
||||
${MYSQL_OPT}
|
||||
-DWITH_ORACLE=OFF
|
||||
-DWITH_FIREBIRD=OFF
|
||||
-DWITH_DB2=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||
# Correct the config file name
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCI.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCIConfig.cmake)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SOCI)
|
||||
|
||||
if ("mysql" IN_LIST FEATURES)
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCIConfig.cmake
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCIConfig.cmake"
|
||||
"# Create imported target SOCI::soci_mysql"
|
||||
"\ninclude(CMakeFindDependencyMacro)\nfind_dependency(libmysql)\n# Create imported target SOCI::soci_mysql"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,9 +1,18 @@
|
||||
{
|
||||
"name": "soci",
|
||||
"version": "4.0.1",
|
||||
"port-version": 3,
|
||||
"version": "4.0.2",
|
||||
"description": "SOCI database access library",
|
||||
"homepage": "https://github.com/SOCI/soci",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"boost": {
|
||||
"description": "Integration with Boost",
|
||||
|
@ -6081,8 +6081,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"soci": {
|
||||
"baseline": "4.0.1",
|
||||
"port-version": 3
|
||||
"baseline": "4.0.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"socket-io-client": {
|
||||
"baseline": "3.0.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "885023b9eb3db14a25a785e0f67e3a1585f07a02",
|
||||
"version": "4.0.2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "05767aa636348d9fb5a2507a2c348091cc9d7782",
|
||||
"version": "4.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user