diff --git a/ports/wangle/CONTROL b/ports/wangle/CONTROL index a347c0782e..2e7e17686e 100644 --- a/ports/wangle/CONTROL +++ b/ports/wangle/CONTROL @@ -1,5 +1,6 @@ Source: wangle Version: 2020.10.19.00 +Port-Version: 1 Homepage: https://github.com/facebook/wangle Build-Depends: fizz, folly, openssl, glog, libevent, double-conversion, boost-system, boost-thread, boost-filesystem, boost-regex, boost-context Description: Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way. diff --git a/ports/wangle/build.patch b/ports/wangle/build.patch deleted file mode 100644 index 13b85b0378..0000000000 --- a/ports/wangle/build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt -index 15dc8b6..ed8c79b 100644 ---- a/wangle/CMakeLists.txt -+++ b/wangle/CMakeLists.txt -@@ -123,6 +123,7 @@ target_include_directories( - PUBLIC - $ - $ -+ PRIVATE - ${FIZZ_INCLUDE_DIR} - ${FOLLY_INCLUDE_DIR} - ${Boost_INCLUDE_DIR} diff --git a/ports/wangle/fix-config-cmake.patch b/ports/wangle/fix-config-cmake.patch index 66857478a9..1d5949cead 100644 --- a/ports/wangle/fix-config-cmake.patch +++ b/ports/wangle/fix-config-cmake.patch @@ -1,19 +1,22 @@ -diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in -index e50af54..a16cdbb 100644 ---- a/wangle/cmake/wangle-config.cmake.in -+++ b/wangle/cmake/wangle-config.cmake.in -@@ -12,7 +12,13 @@ - @PACKAGE_INIT@ - - set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") --set_and_check(WANGLE_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") -+set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle") -+ -+find_package(folly CONFIG REQUIRED) -+find_package(fizz CONFIG REQUIRED) -+find_package(glog REQUIRED) -+find_package(Threads REQUIRED) -+find_package(Libevent CONFIG REQUIRED) - - if (NOT TARGET wangle::wangle) - include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake") +diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in +index e50af54..e0fd0dc 100644 +--- a/wangle/cmake/wangle-config.cmake.in ++++ b/wangle/cmake/wangle-config.cmake.in +@@ -12,7 +12,16 @@ + @PACKAGE_INIT@ + + set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +-set_and_check(WANGLE_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") ++set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle") ++ ++include(CMakeFindDependencyMacro) ++find_dependency(folly REQUIRED) ++find_dependency(fizz REQUIRED) ++find_dependency(glog REQUIRED) ++find_dependency(Threads REQUIRED) ++find_dependency(Libevent REQUIRED) ++find_dependency(OpenSSL REQUIRED) ++find_dependency(double-conversion REQUIRED) + + if (NOT TARGET wangle::wangle) + include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake") diff --git a/ports/wangle/fix_dependency.patch b/ports/wangle/fix_dependency.patch new file mode 100644 index 0000000000..6b80a68f8d --- /dev/null +++ b/ports/wangle/fix_dependency.patch @@ -0,0 +1,56 @@ +diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt +index 8df7c76..f605f25 100644 +--- a/wangle/CMakeLists.txt ++++ b/wangle/CMakeLists.txt +@@ -62,7 +62,7 @@ find_package(folly CONFIG REQUIRED) + find_package(fizz CONFIG REQUIRED) + find_package(fmt CONFIG REQUIRED) + find_package(OpenSSL REQUIRED) +-find_package(Glog REQUIRED) ++find_package(glog CONFIG REQUIRED) + find_package(gflags CONFIG QUIET) + if (gflags_FOUND) + message(STATUS "Found gflags from package config") +@@ -70,8 +70,8 @@ if (gflags_FOUND) + else() + find_package(Gflags REQUIRED) + endif() +-find_package(LibEvent MODULE REQUIRED) +-find_package(DoubleConversion REQUIRED) ++find_package(Libevent CONFIG REQUIRED) ++find_package(double-conversion CONFIG REQUIRED) + find_package(Threads REQUIRED) + if (UNIX AND NOT APPLE) + find_package(Librt) +@@ -153,24 +153,23 @@ target_include_directories( + PUBLIC + $ + $ ++ PRIVATE + ${FIZZ_INCLUDE_DIR} + ${FOLLY_INCLUDE_DIR} + ${Boost_INCLUDE_DIR} +- ${OPENSSL_INCLUDE_DIR} +- ${GLOG_INCLUDE_DIRS} + ${GFLAGS_INCLUDE_DIRS} +- ${LIBEVENT_INCLUDE_DIR} +- ${DOUBLE_CONVERSION_INCLUDE_DIRS} + ) + target_link_libraries(wangle PUBLIC + ${FOLLY_LIBRARIES} + ${FIZZ_LIBRARIES} + ${Boost_LIBRARIES} +- ${OPENSSL_LIBRARIES} +- ${GLOG_LIBRARIES} ++ OpenSSL::SSL ++ OpenSSL::Crypto ++ glog::glog + ${GFLAGS_LIBRARIES} +- ${LIBEVENT_LIB} +- ${DOUBLE_CONVERSION_LIBRARIES} ++ libevent::core ++ libevent::extra ++ double-conversion::double-conversion + ${CMAKE_DL_LIBS} + ${LIBRT_LIBRARIES} + Threads::Threads) diff --git a/ports/wangle/portfile.cmake b/ports/wangle/portfile.cmake index 9082aa0418..f63ae8781e 100644 --- a/ports/wangle/portfile.cmake +++ b/ports/wangle/portfile.cmake @@ -7,10 +7,9 @@ vcpkg_from_github( SHA512 1c21199225ebfe9a95391c2bb607412ebadc7aac326373e30dc9d49223a2437b382b4c3160fb2147a505bc2182f03f651c95f7c67f916e336ac81af76884f5fa HEAD_REF master PATCHES - build.patch fix-config-cmake.patch + fix_dependency.patch ) -# message(FATAL_ERROR "patch") vcpkg_configure_cmake( SOURCE_PATH "${SOURCE_PATH}/wangle" @@ -39,6 +38,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/wangle/deprecated/rx/test ) - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)