diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2021-07-27 02:07:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-26 11:07:10 -0700 |
| commit | 358225a9177f750d7233ebc94348a7f5578e1041 (patch) | |
| tree | 072a28b1e94694cfc7918fc636300018ad63908e | |
| parent | b57e29a6ceb3ca1382eca103dee876c7d2ac25ca (diff) | |
| download | vcpkg-358225a9177f750d7233ebc94348a7f5578e1041.tar.gz vcpkg-358225a9177f750d7233ebc94348a7f5578e1041.zip | |
[zeromq] Fix arm build, fix feature websockets-sha1 (#19074)
* [zeromq] Fix arm build, fix feature websockets-sha1
* update baseline
* version stuff
* Fix rename
* Update versions/z-/zeromq.json
| -rw-r--r-- | ports/zeromq/CONTROL | 15 | ||||
| -rw-r--r-- | ports/zeromq/fix-arm.patch | 51 | ||||
| -rw-r--r-- | ports/zeromq/portfile.cmake | 30 | ||||
| -rw-r--r-- | ports/zeromq/vcpkg.json | 32 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 2 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/z-/zeromq.json | 5 |
7 files changed, 104 insertions, 33 deletions
diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL deleted file mode 100644 index 4cf6d33c4..000000000 --- a/ports/zeromq/CONTROL +++ /dev/null @@ -1,15 +0,0 @@ -Source: zeromq -Version: 4.3.4 -Port-Version: 0 -Homepage: https://github.com/zeromq/libzmq -Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products - -Feature: sodium -Description: Using libsodium for CURVE security -Build-Depends: libsodium - -Feature: websockets-sha1 -Description: Enable WebSocket transport through builtin sha1 (libzmq#3676) - -Feature: draft -Description: Build and install draft APIs diff --git a/ports/zeromq/fix-arm.patch b/ports/zeromq/fix-arm.patch new file mode 100644 index 000000000..3f6c6486b --- /dev/null +++ b/ports/zeromq/fix-arm.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd3d8eb..c08cad9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -551,6 +551,8 @@ if(ZMQ_HAVE_WINDOWS) + set(CMAKE_REQUIRED_LIBRARIES "") + # TODO: This not the symbol we're looking for. What is the symbol? + check_library_exists(ws2 fopen "" HAVE_WS2) ++ ++ check_cxx_symbol_exists(CryptAcquireContext "windows.h;wincrypt.h" HAVE_ADVAPI32) + else() + check_cxx_symbol_exists(if_nametoindex net/if.h HAVE_IF_NAMETOINDEX) + check_cxx_symbol_exists(SO_PEERCRED sys/socket.h ZMQ_HAVE_SO_PEERCRED) +@@ -1452,6 +1454,10 @@ if(BUILD_SHARED) + elseif(HAVE_WS2) + target_link_libraries(libzmq ws2) + endif() ++ ++ if (HAVE_ADVAPI32) ++ target_link_libraries(libzmq advapi32) ++ endif() + + if(HAVE_RPCRT4) + target_link_libraries(libzmq rpcrt4) +@@ -1497,6 +1503,10 @@ if(BUILD_STATIC) + elseif(HAVE_WS2) + target_link_libraries(libzmq-static ws2) + endif() ++ ++ if (HAVE_ADVAPI32) ++ target_link_libraries(libzmq-static advapi32) ++ endif() + + if(HAVE_RPCRT4) + target_link_libraries(libzmq-static rpcrt4) +diff --git a/src/clock.cpp b/src/clock.cpp +index 79522ad..0667c59 100644 +--- a/src/clock.cpp ++++ b/src/clock.cpp +@@ -41,8 +41,10 @@ + #include <cmnintrin.h> + #else + #include <intrin.h> +-#if defined(_M_ARM) || defined(_M_ARM64) ++#if defined(_M_ARM) + #include <arm_neon.h> ++#elif defined(_M_ARM64) ++#include <arm64_neon.h> + #endif + #endif + #endif diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake index 650e7baad..01c5aa49c 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -1,8 +1,11 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq REF v4.3.4 SHA512 ad828b1ab5a87983285a6b44b08240816ed1c4e2c73306ab1a851bf80df1892b5e2f92064a49fbadc1f4c75043625ace77dd25b64d5d1c2a7d1d61cc916fba0b + PATCHES fix-arm.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) @@ -13,8 +16,7 @@ vcpkg_check_features( FEATURES sodium WITH_LIBSODIUM draft ENABLE_DRAFTS - INVERTED_FEATURES - websockets-sha1 DISABLE_WS + websockets-sha1 ENABLE_WS ) set(PLATFORM_OPTIONS) @@ -22,9 +24,8 @@ if(VCPKG_TARGET_IS_MINGW) set(PLATFORM_OPTIONS "-DCMAKE_SYSTEM_VERSION=6.0") endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DZMQ_BUILD_TESTS=OFF -DBUILD_STATIC=${BUILD_STATIC} @@ -39,27 +40,26 @@ vcpkg_configure_cmake( "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/ZeroMQ) - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ZeroMQ) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_cmake_config_fixup(CONFIG_PATH CMake) +else() + vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ZeroMQ) endif() file(COPY - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() # Handle copyright -file(RENAME ${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(RENAME "${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/zmq) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/zmq") diff --git a/ports/zeromq/vcpkg.json b/ports/zeromq/vcpkg.json new file mode 100644 index 000000000..631f9cf78 --- /dev/null +++ b/ports/zeromq/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "zeromq", + "version": "4.3.4", + "port-version": 1, + "description": "The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products", + "homepage": "https://github.com/zeromq/libzmq", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "draft": { + "description": "Build and install draft APIs" + }, + "sodium": { + "description": "Using libsodium for CURVE security", + "dependencies": [ + "libsodium" + ] + }, + "websockets-sha1": { + "description": "Enable WebSocket transport through builtin sha1 (libzmq#3676)" + } + } +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index bc2525256..9fd0dd71c 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1686,8 +1686,6 @@ yato:arm-uwp=fail yato:x64-uwp=fail z3:arm-uwp=fail z3:x64-uwp=fail -zeromq:arm-uwp=fail -zeromq:x64-uwp=fail zkpp:x86-windows=fail zkpp:x64-windows=fail zkpp:x64-windows-static=fail diff --git a/versions/baseline.json b/versions/baseline.json index 2282ac6cf..c0e9a327e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6882,7 +6882,7 @@ }, "zeromq": { "baseline": "4.3.4", - "port-version": 0 + "port-version": 1 }, "zfp": { "baseline": "0.5.5-2", diff --git a/versions/z-/zeromq.json b/versions/z-/zeromq.json index 28696a10d..7c15ff356 100644 --- a/versions/z-/zeromq.json +++ b/versions/z-/zeromq.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "43f1c320c2710a2f0efa61b54608a33da707bd43", + "version": "4.3.4", + "port-version": 1 + }, + { "git-tree": "baf0f8a38476e24bbe2b3f4cac31ed02fff29bc4", "version-string": "4.3.4", "port-version": 0 |
