mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 05:59:07 +08:00
[anyrpc] Add new port (#7438)
* Add port anyrpc * Add port anyrpc Added missing `vcpkg_install_cmake()` * Add port anyrpc Added patch to detect endianness on ARM. * Add port anyrpc further tweaks to endianness detection.
This commit is contained in:
parent
a19151fff1
commit
6171b912f9
4
ports/anyrpc/CONTROL
Normal file
4
ports/anyrpc/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: anyrpc
|
||||
Version: 2017-12-01
|
||||
Homepage: https://github.com/sgieseking/anyrpc
|
||||
Description: A multiprotocol remote procedure call system for C++.
|
16
ports/anyrpc/arm_endian_detection.patch
Normal file
16
ports/anyrpc/arm_endian_detection.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/include/anyrpc/api.h b/include/anyrpc/api.h
|
||||
index a67fa32..e7d74ad 100644
|
||||
--- a/include/anyrpc/api.h
|
||||
+++ b/include/anyrpc/api.h
|
||||
@@ -158,9 +158,9 @@ typedef int socklen_t;
|
||||
# elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||||
# define ANYRPC_ENDIAN ANYRPC_BIGENDIAN
|
||||
// Detect with architecture macros
|
||||
-# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)
|
||||
+# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__) || defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__)
|
||||
# define ANYRPC_ENDIAN ANYRPC_BIGENDIAN
|
||||
-# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__)
|
||||
+# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__) || defined(__ARMEL__) || defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(_M_ARM)
|
||||
# define ANYRPC_ENDIAN ANYRPC_LITTLEENDIAN
|
||||
# elif defined(ANYRPC_DOXYGEN_RUNNING)
|
||||
# define ANYRPC_ENDIAN
|
29
ports/anyrpc/portfile.cmake
Normal file
29
ports/anyrpc/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO sgieseking/anyrpc
|
||||
REF bfd50aa6dd620066ed308258599127cd46be818b
|
||||
SHA512 604e92a2a2936fb95e74e05dd1ac578e67e2877357443d83f8fac319ab244a27d1fac2ebd8bcd9ac8108e7a198752776974027b8f020643bb039b5f84406049b
|
||||
HEAD_REF master
|
||||
PATCHES "arm_endian_detection.patch"
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ANYRPC_LIB_BUILD_SHARED)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_WITH_LOG4CPLUS=OFF
|
||||
-DANYRPC_LIB_BUILD_SHARED=${ANYRPC_LIB_BUILD_SHARED}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/anyrpc RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
vcpkg_copy_pdbs()
|
Loading…
Reference in New Issue
Block a user