From 9c10548fe995ec5499f2c3be1a594834804756da Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Thu, 1 Mar 2018 17:30:03 +0100 Subject: [gflags] remove old patch, fixed upstream, introduce a new patch to fix wrong config path (#2917) * [gflags] remove patch, fixed upstream * [gflags] fix gflags-config.cmake wrong path --- ports/gflags/0001-patch-dir.patch | 13 +++++++++++++ ports/gflags/CONTROL | 2 +- ports/gflags/portfile.cmake | 3 ++- ports/gflags/revert-fix-install.patch | 15 --------------- 4 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 ports/gflags/0001-patch-dir.patch delete mode 100644 ports/gflags/revert-fix-install.patch diff --git a/ports/gflags/0001-patch-dir.patch b/ports/gflags/0001-patch-dir.patch new file mode 100644 index 000000000..d3aaa00fb --- /dev/null +++ b/ports/gflags/0001-patch-dir.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3709073..8e919cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -503,7 +503,7 @@ endif () + # ---------------------------------------------------------------------------- + # installation rules + set (EXPORT_NAME ${PACKAGE_NAME}-targets) +-file (RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CONFIG_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}") ++set (INSTALL_PREFIX_REL2CONFIG_DIR "../..") + configure_file (cmake/config.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-install.cmake" @ONLY) + configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake" @ONLY) + diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index a1bcb795c..72f2937b7 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.1-1 +Version: 2.2.1-2 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index dcbbb7426..7e316c83b 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -14,7 +14,8 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/revert-fix-install.patch" + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-patch-dir.patch # gflags was estimating a wrong relative path between the gflags-config.cmake file and the include path; "../.." goes from share/gflags/ to the triplet root ) vcpkg_configure_cmake( diff --git a/ports/gflags/revert-fix-install.patch b/ports/gflags/revert-fix-install.patch deleted file mode 100644 index 80793b65c..000000000 --- a/ports/gflags/revert-fix-install.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 922a038..7d6af45 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -410,8 +410,8 @@ if (OS_WINDOWS) - set (RUNTIME_INSTALL_DIR "bin") - set (LIBRARY_INSTALL_DIR "lib") - set (INCLUDE_INSTALL_DIR "include") -- set (CONFIG_INSTALL_DIR "share/${PACKAGE_NAME}") -- set (PKGCONFIG_INSTALL_DIR "") -+ set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}") -+ set (PKGCONFIG_INSTALL_DIR) - else () - set (RUNTIME_INSTALL_DIR bin) - # The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora -- cgit v1.2.3