mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 02:11:58 +08:00
[rsocket] Add new port (#11021)
* [rsocket] Add new port * [rsocket] don't build in some window environment * [rsocket] add missing deps in CONTROL * [rsocket] add missing deps in CONTROL * [rsocket] remove some deprecated args * [rsocket] romove vcpkg_fail_port_install(ON_ARCH x64) * [rsocket] only support x64 architecture * [rsocket] upgrade to 2020.05.04.00 * [rsocket] add vcpkg_fail_port_install to portfile * [rsocket] Fix find dependencies * Update ports/rsocket/portfile.cmake * Update ports/rsocket/CONTROL Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
parent
a17543d840
commit
62cbf26175
6
ports/rsocket/CONTROL
Normal file
6
ports/rsocket/CONTROL
Normal file
@ -0,0 +1,6 @@
|
||||
Source: rsocket
|
||||
Version: 2020.05.04.00-1
|
||||
Homepage: https://github.com/rsocket/rsocket-cpp
|
||||
Description: C++ implementation of RSocket http://rsocket.io
|
||||
Build-Depends: folly, double-conversion, openssl, gflags, glog, fmt, boost-system, boost-thread, boost-filesystem, boost-regex, boost-context, boost-program-options, zlib
|
||||
Supports: !(windows&x64)
|
26
ports/rsocket/fix-cmake-config.patch
Normal file
26
ports/rsocket/fix-cmake-config.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/cmake/rsocket-config.cmake.in b/cmake/rsocket-config.cmake.in
|
||||
index d5579a85..ea12752a 100644
|
||||
--- a/cmake/rsocket-config.cmake.in
|
||||
+++ b/cmake/rsocket-config.cmake.in
|
||||
@@ -4,7 +4,7 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
if(NOT TARGET rsocket::ReactiveSocket)
|
||||
- include("${PACKAGE_PREFIX_DIR}/lib/cmake/rsocket/rsocket-exports.cmake")
|
||||
+ include("${CMAKE_CURRENT_LIST_DIR}/rsocket-exports.cmake")
|
||||
endif()
|
||||
|
||||
if (NOT rsocket_FIND_QUIETLY)
|
||||
diff --git a/yarpl/cmake/yarpl-config.cmake.in b/yarpl/cmake/yarpl-config.cmake.in
|
||||
index d557b213..1b83fffc 100644
|
||||
--- a/yarpl/cmake/yarpl-config.cmake.in
|
||||
+++ b/yarpl/cmake/yarpl-config.cmake.in
|
||||
@@ -4,7 +4,7 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
if(NOT TARGET yarpl::yarpl)
|
||||
- include("${PACKAGE_PREFIX_DIR}/lib/cmake/yarpl/yarpl-exports.cmake")
|
||||
+ include("${CMAKE_CURRENT_LIST_DIR}/yarpl-exports.cmake")
|
||||
endif()
|
||||
|
||||
set(YARPL_LIBRARIES yarpl::yarpl)
|
94
ports/rsocket/fix-find-dependencies.patch
Normal file
94
ports/rsocket/fix-find-dependencies.patch
Normal file
@ -0,0 +1,94 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f69e907..22570b5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -124,7 +124,7 @@ option(BUILD_BENCHMARKS "Build benchmarks" ON)
|
||||
option(BUILD_EXAMPLES "Build examples" ON)
|
||||
option(BUILD_TESTS "Build tests" ON)
|
||||
|
||||
-enable_testing()
|
||||
+#enable_testing()
|
||||
|
||||
include(ExternalProject)
|
||||
include(CTest)
|
||||
@@ -172,7 +172,9 @@ endif()
|
||||
|
||||
if("${BUILD_TYPE_LOWER}" MATCHES "debug")
|
||||
message("debug mode was set")
|
||||
+ if (NOT WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unreachable-code")
|
||||
+ endif()
|
||||
else()
|
||||
message("release mode was set")
|
||||
endif()
|
||||
@@ -181,18 +183,25 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(TEST_CXX_FLAGS ${TEST_CXX_FLAGS} -Wno-inconsistent-missing-override)
|
||||
endif()
|
||||
|
||||
-find_library(DOUBLE-CONVERSION double-conversion)
|
||||
+find_package(double-conversion CONFIG REQUIRED)
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
-find_package(Gflags REQUIRED)
|
||||
+find_package(gflags CONFIG REQUIRED)
|
||||
|
||||
-# find glog::glog to satisfy the folly dep.
|
||||
-find_package(Glog REQUIRED)
|
||||
+find_package(ZLIB REQUIRED)
|
||||
|
||||
-find_package(fmt CONFIG REQUIRED)
|
||||
+if (BUILD_SHARED_LIBS)
|
||||
+ set(gflags gflags_shared)
|
||||
+else()
|
||||
+ set(gflags gflags_static)
|
||||
+endif()
|
||||
|
||||
-include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR})
|
||||
+# find glog::glog to satisfy the folly dep.
|
||||
+find_package(folly CONFIG REQUIRED)
|
||||
+#find_package(glog CONFIG REQUIRED)
|
||||
+#
|
||||
+#find_package(fmt CONFIG REQUIRED)
|
||||
|
||||
include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR})
|
||||
|
||||
@@ -327,7 +336,7 @@ target_compile_options(
|
||||
ReactiveSocket
|
||||
PRIVATE ${EXTRA_CXX_FLAGS})
|
||||
|
||||
-enable_testing()
|
||||
+#enable_testing()
|
||||
|
||||
install(TARGETS ReactiveSocket EXPORT rsocket-exports DESTINATION lib)
|
||||
install(DIRECTORY rsocket DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||
@@ -470,7 +479,7 @@ if(BUILD_TESTS)
|
||||
${GMOCK_LIBS} # This also needs the preceding `add_dependencies`
|
||||
glog::glog
|
||||
gflags
|
||||
- ${DOUBLE-CONVERSION})
|
||||
+ double-conversion::double-conversion)
|
||||
|
||||
# Download the latest TCK drivers JAR.
|
||||
set(TCK_DRIVERS_JAR rsocket-tck-drivers-0.9.10.jar)
|
||||
diff --git a/yarpl/CMakeLists.txt b/yarpl/CMakeLists.txt
|
||||
index f4159b8..8c01ffb 100644
|
||||
--- a/yarpl/CMakeLists.txt
|
||||
+++ b/yarpl/CMakeLists.txt
|
||||
@@ -53,8 +53,14 @@ endif()
|
||||
# Using NDEBUG in Release builds.
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
|
||||
|
||||
-find_package(Gflags REQUIRED)
|
||||
-find_package(Glog REQUIRED)
|
||||
+find_package(gflags CONFIG REQUIRED)
|
||||
+if (BUILD_SHARED_LIBS)
|
||||
+ set(gflags gflags_shared)
|
||||
+else()
|
||||
+ set(gflags gflags_static)
|
||||
+endif()
|
||||
+
|
||||
+find_package(glog CONFIG REQUIRED)
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
|
||||
IF(NOT FOLLY_VERSION)
|
44
ports/rsocket/portfile.cmake
Normal file
44
ports/rsocket/portfile.cmake
Normal file
@ -0,0 +1,44 @@
|
||||
# yarpl only support static build in Windows
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_fail_port_install(ON_ARCH "x64")
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rsocket/rsocket-cpp #v2020.05.04.00
|
||||
REF 8038d05e741c3d3ecd6adb069b4a1b3daa230e14
|
||||
SHA512 d7bc93af7b6130d73fa0823f534ad57a531dfa7d7aa990a2a1a1b72b6761db7eeb60573d0d38f55daa991554e3ab4ac507047f8051a4390b3343cd708a48efbb
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-cmake-config.patch
|
||||
fix-find-dependencies.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/include/yarpl/perf
|
||||
${CURRENT_PACKAGES_DIR}/include/yarpl/cmake
|
||||
${CURRENT_PACKAGES_DIR}/include/yarpl/test
|
||||
${CURRENT_PACKAGES_DIR}/include/rsocket/examples
|
||||
${CURRENT_PACKAGES_DIR}/include/rsocket/test
|
||||
)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
@ -1533,6 +1533,8 @@ rocksdb:x64-uwp=fail
|
||||
rpclib:arm64-windows=fail
|
||||
rpclib:arm-uwp=fail
|
||||
rpclib:x64-uwp=fail
|
||||
rsocket:x64-windows=fail
|
||||
rsocket:x64-windows-static=fail
|
||||
rtlsdr:x64-uwp=fail
|
||||
rtlsdr:arm64-windows=fail
|
||||
rtlsdr:arm-uwp=fail
|
||||
|
Loading…
x
Reference in New Issue
Block a user