aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-06-03 13:35:48 +0800
committerGitHub <noreply@github.com>2020-06-02 22:35:48 -0700
commit92136af733564106bdb73656201b1d623cef3a58 (patch)
treefa0fa1097813b930152745f6da8a43762bbe5919
parent01b10260c558587b6520bd458d3f9b2ec6e70ce4 (diff)
downloadvcpkg-92136af733564106bdb73656201b1d623cef3a58.tar.gz
vcpkg-92136af733564106bdb73656201b1d623cef3a58.zip
[yaml-cpp] Update to 0.6.3 and also fix include files cannot be found (#11718)
-rw-r--r--ports/yaml-cpp/0001-noexcept.patch26
-rw-r--r--ports/yaml-cpp/0003-cxx-std-features.patch16
-rw-r--r--ports/yaml-cpp/CONTROL2
-rw-r--r--ports/yaml-cpp/fix-include-path.patch (renamed from ports/yaml-cpp/0002-fix-include-path.patch)26
-rw-r--r--ports/yaml-cpp/portfile.cmake19
5 files changed, 25 insertions, 64 deletions
diff --git a/ports/yaml-cpp/0001-noexcept.patch b/ports/yaml-cpp/0001-noexcept.patch
deleted file mode 100644
index e5e1882c0..000000000
--- a/ports/yaml-cpp/0001-noexcept.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h
-index 9c96859..a6045ee 100644
---- a/include/yaml-cpp/exceptions.h
-+++ b/include/yaml-cpp/exceptions.h
-@@ -15,7 +15,7 @@
-
- // This is here for compatibility with older versions of Visual Studio
- // which don't support noexcept
--#ifdef _MSC_VER
-+#if defined(_MSC_VER) && _MSC_VER < 1900
- #define YAML_CPP_NOEXCEPT _NOEXCEPT
- #else
- #define YAML_CPP_NOEXCEPT noexcept
-diff --git a/src/exceptions.cpp b/src/exceptions.cpp
-index 9b6d891..931b4bc 100644
---- a/src/exceptions.cpp
-+++ b/src/exceptions.cpp
-@@ -2,7 +2,7 @@
-
- // This is here for compatibility with older versions of Visual Studio
- // which don't support noexcept
--#ifdef _MSC_VER
-+#if defined(_MSC_VER) && _MSC_VER < 1900
- #define YAML_CPP_NOEXCEPT _NOEXCEPT
- #else
- #define YAML_CPP_NOEXCEPT noexcept
diff --git a/ports/yaml-cpp/0003-cxx-std-features.patch b/ports/yaml-cpp/0003-cxx-std-features.patch
deleted file mode 100644
index ac09c86c1..000000000
--- a/ports/yaml-cpp/0003-cxx-std-features.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c4d4be1..174264d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -279,6 +279,11 @@ set_target_properties(yaml-cpp PROPERTIES
- COMPILE_FLAGS "${yaml_c_flags} ${yaml_cxx_flags}"
- )
-
-+target_compile_features(yaml-cpp
-+ PUBLIC
-+ cxx_std_11
-+)
-+
- set_target_properties(yaml-cpp PROPERTIES
- VERSION "${YAML_CPP_VERSION}"
- SOVERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}"
diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL
index 1e0a781e2..bbd8056b2 100644
--- a/ports/yaml-cpp/CONTROL
+++ b/ports/yaml-cpp/CONTROL
@@ -1,4 +1,4 @@
Source: yaml-cpp
-Version: 0.6.2-3
+Version: 0.6.3
Homepage: https://github.com/jbeder/yaml-cpp
Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.
diff --git a/ports/yaml-cpp/0002-fix-include-path.patch b/ports/yaml-cpp/fix-include-path.patch
index 78c260831..9a7e9ff42 100644
--- a/ports/yaml-cpp/0002-fix-include-path.patch
+++ b/ports/yaml-cpp/fix-include-path.patch
@@ -1,13 +1,13 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d2d8810..c4d4be1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -326,7 +326,7 @@ else()
- set(INSTALL_CMAKE_DIR ${LIB_INSTALL_DIR}/cmake/yaml-cpp)
- endif()
-
--file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_ROOT_DIR}")
-+set(REL_INCLUDE_DIR "../../include")
- set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}")
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
- "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4732a45..3de71cc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -324,7 +324,7 @@ else()
+ endif()
+
+
+-file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_ROOT_DIR}")
++set(REL_INCLUDE_DIR "../../include")
+ set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
+ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY)
diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake
index 380f65aee..718bb50f1 100644
--- a/ports/yaml-cpp/portfile.cmake
+++ b/ports/yaml-cpp/portfile.cmake
@@ -1,22 +1,26 @@
-include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jbeder/yaml-cpp
- REF yaml-cpp-0.6.2
- SHA512 fea8ce0a20a00cbc75023d1db442edfcd32d0ac57a3c41b32ec8d56f87cc1d85d7dd7a923ce662f5d3a315f91a736d6be0d649997acd190915c1d68cc93795e4
+ REF 9a3624205e8774953ef18f57067b3426c1c5ada6 #v0.6.3
+ SHA512 9bd0f05b882beed748eddb5d615bf356b7d1f31c4e3a4bbf80a6bdeb30b33fa1e0ccf596161a489169e6a111a3112e371d8d00514a0bfd02e6a6a11513904bed
HEAD_REF master
PATCHES
- 0001-noexcept.patch
- 0002-fix-include-path.patch
- 0003-cxx-std-features.patch
+ fix-include-path.patch
)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(YAML_BUILD_SHARED_LIBS ON)
+else()
+ set(YAML_BUILD_SHARED_LIBS OFF)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_TESTS=OFF
+ -DYAML_BUILD_SHARED_LIBS=${YAML_BUILD_SHARED_LIBS}
)
vcpkg_install_cmake()
@@ -40,5 +44,4 @@ endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h "${DLL_H}")
# Handle copyright
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yaml-cpp)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file