diff options
| author | Falko Axmann <github@m.falkoa.de> | 2019-09-03 22:47:48 +0200 |
|---|---|---|
| committer | dan-shaw <51385773+dan-shaw@users.noreply.github.com> | 2019-09-03 13:47:48 -0700 |
| commit | 6171b912f9f33789be2439be85d2a142001e4ebb (patch) | |
| tree | f56ef846df0f7ae7db59878457271b2864605633 | |
| parent | a19151fff1d1201db6218d07ed5f8ece178ae80e (diff) | |
| download | vcpkg-6171b912f9f33789be2439be85d2a142001e4ebb.tar.gz vcpkg-6171b912f9f33789be2439be85d2a142001e4ebb.zip | |
[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.
| -rw-r--r-- | ports/anyrpc/CONTROL | 4 | ||||
| -rw-r--r-- | ports/anyrpc/arm_endian_detection.patch | 16 | ||||
| -rw-r--r-- | ports/anyrpc/portfile.cmake | 29 |
3 files changed, 49 insertions, 0 deletions
diff --git a/ports/anyrpc/CONTROL b/ports/anyrpc/CONTROL new file mode 100644 index 000000000..a6ddb6890 --- /dev/null +++ b/ports/anyrpc/CONTROL @@ -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++. diff --git a/ports/anyrpc/arm_endian_detection.patch b/ports/anyrpc/arm_endian_detection.patch new file mode 100644 index 000000000..5dfa340b0 --- /dev/null +++ b/ports/anyrpc/arm_endian_detection.patch @@ -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 diff --git a/ports/anyrpc/portfile.cmake b/ports/anyrpc/portfile.cmake new file mode 100644 index 000000000..34102a24d --- /dev/null +++ b/ports/anyrpc/portfile.cmake @@ -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() |
