aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyd7349 <myd7349@gmail.com>2021-07-16 05:55:58 +0800
committerGitHub <noreply@github.com>2021-07-15 14:55:58 -0700
commit9624235c565994b769a97e820a840bb01cc797c9 (patch)
treed38e105e2a47ef175584b0b5ee86ee3a4ab38ae6
parent04208f04daf17a747c27eb5fafe411d3635e759c (diff)
downloadvcpkg-9624235c565994b769a97e820a840bb01cc797c9.tar.gz
vcpkg-9624235c565994b769a97e820a840bb01cc797c9.zip
[czmq] Update to v4.2.1 (#17989)
* [czmq] Update to 4.2.1 * [czmq] vcpkg x-add-version czmq * [czmq] Quote paths * [czmq] Overwrite version * [czmq] Fix curl winldap linkage when built as static library * [czmq] Overwrite version * [czmq] Fix dependencies * [czmq] Overwrite version * [czmq] Modernize * [czmq] Overwrite version
-rw-r--r--ports/czmq/CONTROL27
-rw-r--r--ports/czmq/Findlibcurl.cmake62
-rw-r--r--ports/czmq/Findlibmicrohttpd.cmake14
-rw-r--r--ports/czmq/Findlibzmq.cmake8
-rw-r--r--ports/czmq/Findlz4.cmake8
-rw-r--r--ports/czmq/Finduuid.cmake10
-rw-r--r--ports/czmq/fix-dependencies.patch8
-rw-r--r--ports/czmq/portfile.cmake42
-rw-r--r--ports/czmq/vcpkg.json53
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/c-/czmq.json5
11 files changed, 119 insertions, 120 deletions
diff --git a/ports/czmq/CONTROL b/ports/czmq/CONTROL
deleted file mode 100644
index 2d190c394..000000000
--- a/ports/czmq/CONTROL
+++ /dev/null
@@ -1,27 +0,0 @@
-Source: czmq
-Version: 2019-06-10-4
-Build-Depends: zeromq
-Description: High-level C binding for ZeroMQ
-Homepage: https://github.com/zeromq/czmq
-
-Feature: tool
-Description: Build and install czmq tools (zmakecert)
-
-Feature: draft
-Description: Build and install draft APIs
-
-Feature: curl
-Description: Build with libcurl
-Build-Depends: curl
-
-Feature: lz4
-Description: Build with lz4
-Build-Depends: lz4
-
-Feature: httpd
-Description: Build with HTTP server support (libmicrohttpd)
-Build-Depends: libmicrohttpd
-
-Feature: uuid
-Description: Build with libuuid
-Build-Depends: libuuid (!windows&!uwp&!osx)
diff --git a/ports/czmq/Findlibcurl.cmake b/ports/czmq/Findlibcurl.cmake
index 6c943e2d7..6a8f90bbd 100644
--- a/ports/czmq/Findlibcurl.cmake
+++ b/ports/czmq/Findlibcurl.cmake
@@ -1,51 +1,11 @@
-find_path(
- LIBCURL_INCLUDE_DIRS
- NAMES curl/curl.h
-)
-
-find_library(
- LIBCURL_LIBRARY_DEBUG
- NAMES libcurl-d_imp libcurl-d curl-d curl
-)
-
-find_library(
- LIBCURL_LIBRARY_RELEASE
- NAMES libcurl_imp libcurl curl
-)
-
-include(SelectLibraryConfigurations)
-select_library_configurations(LIBCURL)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
- LIBCURL
- REQUIRED_VARS LIBCURL_LIBRARIES LIBCURL_INCLUDE_DIRS
-)
-
-# CURL dependencies
-# https://github.com/Microsoft/vcpkg/issues/4312
-# https://github.com/microsoft/vcpkg/commit/ee325d14276e7bd7961e94e58293b02d6e9e92da
-# https://github.com/microsoft/vcpkg/pull/6698
-if (LIBCURL_FOUND)
- find_package(OpenSSL QUIET)
- find_package(ZLIB QUIET)
-
- if (OPENSSL_FOUND)
- list(APPEND LIBCURL_LIBRARIES
- OpenSSL::SSL
- OpenSSL::Crypto
- )
- endif ()
-
- if (ZLIB_FOUND)
- list(APPEND LIBCURL_LIBRARIES
- ZLIB::ZLIB
- )
- endif ()
-
- if (WIN32)
- list(APPEND LIBCURL_LIBRARIES
- Crypt32
- )
- endif ()
-endif ()
+find_package(CURL CONFIG QUIET)
+
+if(CURL_FOUND)
+ set(LIBCURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS})
+ set(LIBCURL_LIBRARIES CURL::libcurl)
+ set(LIBCURL_FOUND TRUE)
+ message(STATUS "Found libcurl: ${LIBCURL_LIBRARIES}")
+else()
+ set(LIBCURL_FOUND FALSE)
+ message(STATUS "Could not find libcurl")
+endif()
diff --git a/ports/czmq/Findlibmicrohttpd.cmake b/ports/czmq/Findlibmicrohttpd.cmake
index 476cb2add..c7d0b4c19 100644
--- a/ports/czmq/Findlibmicrohttpd.cmake
+++ b/ports/czmq/Findlibmicrohttpd.cmake
@@ -1,17 +1,17 @@
-find_path(LIBMICROHTTPD_INCLUDE_DIRS NAMES microhttpd.h)
+find_path(LIBMICROHTTPD_INCLUDE_DIR NAMES microhttpd.h)
-get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIRS} PATH)
+get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIR} PATH)
find_library(
LIBMICROHTTPD_LIBRARY_DEBUG
- NAMES libmicrohttpd microhttpd
+ NAMES libmicrohttpd-dll_d libmicrohttpd microhttpd
PATHS ${_prefix_path}/debug/lib
NO_DEFAULT_PATH
)
find_library(
LIBMICROHTTPD_LIBRARY_RELEASE
- NAMES libmicrohttpd microhttpd
+ NAMES libmicrohttpd-dll libmicrohttpd microhttpd
PATHS ${_prefix_path}/lib
NO_DEFAULT_PATH
)
@@ -24,5 +24,9 @@ select_library_configurations(LIBMICROHTTPD)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
LIBMICROHTTPD
- REQUIRED_VARS LIBMICROHTTPD_LIBRARIES LIBMICROHTTPD_INCLUDE_DIRS
+ REQUIRED_VARS LIBMICROHTTPD_LIBRARY LIBMICROHTTPD_INCLUDE_DIR
)
+
+if(LIBMICROHTTPD_FOUND)
+ set(LIBMICROHTTPD_INCLUDE_DIRS ${LIBMICROHTTPD_INCLUDE_DIR})
+endif()
diff --git a/ports/czmq/Findlibzmq.cmake b/ports/czmq/Findlibzmq.cmake
index 706f063c3..80ce140e7 100644
--- a/ports/czmq/Findlibzmq.cmake
+++ b/ports/czmq/Findlibzmq.cmake
@@ -2,9 +2,5 @@ find_package(ZeroMQ CONFIG REQUIRED)
set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR})
set(LIBZMQ_LIBRARIES libzmq libzmq-static)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
- LIBZMQ
- REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS
-)
+set(LIBZMQ_FOUND TRUE)
+message(STATUS "Found libzmq: ${LIBZMQ_LIBRARIES}")
diff --git a/ports/czmq/Findlz4.cmake b/ports/czmq/Findlz4.cmake
index 8ce17c5bd..bb9797368 100644
--- a/ports/czmq/Findlz4.cmake
+++ b/ports/czmq/Findlz4.cmake
@@ -1,4 +1,4 @@
-find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
+find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
@@ -9,5 +9,9 @@ select_library_configurations(LZ4)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
LZ4
- REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS
+ REQUIRED_VARS LZ4_LIBRARY LZ4_INCLUDE_DIR
)
+
+if(LZ4_FOUND)
+ set(LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR})
+endif()
diff --git a/ports/czmq/Finduuid.cmake b/ports/czmq/Finduuid.cmake
index ba89aab56..96e61e057 100644
--- a/ports/czmq/Finduuid.cmake
+++ b/ports/czmq/Finduuid.cmake
@@ -1,9 +1,9 @@
find_path(
- UUID_INCLUDE_DIRS
+ UUID_INCLUDE_DIR
NAMES uuid/uuid.h
)
-get_filename_component(_prefix_path ${UUID_INCLUDE_DIRS} PATH)
+get_filename_component(_prefix_path ${UUID_INCLUDE_DIR} PATH)
find_library(
UUID_LIBRARY_DEBUG
@@ -27,5 +27,9 @@ select_library_configurations(UUID)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
UUID
- REQUIRED_VARS UUID_LIBRARIES UUID_INCLUDE_DIRS
+ REQUIRED_VARS UUID_LIBRARY UUID_INCLUDE_DIR
)
+
+if(UUID_FOUND)
+ set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
+endif()
diff --git a/ports/czmq/fix-dependencies.patch b/ports/czmq/fix-dependencies.patch
index bb57247dc..4612b8939 100644
--- a/ports/czmq/fix-dependencies.patch
+++ b/ports/czmq/fix-dependencies.patch
@@ -1,8 +1,8 @@
diff --git a/builds/cmake/Config.cmake.in b/builds/cmake/Config.cmake.in
-index 9c15f36a..e1475cd6 100644
+index 9c15f36a..5afff016 100644
--- a/builds/cmake/Config.cmake.in
+++ b/builds/cmake/Config.cmake.in
-@@ -1,4 +1,14 @@
+@@ -1,4 +1,12 @@
@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
@@ -10,10 +10,8 @@ index 9c15f36a..e1475cd6 100644
+find_dependency(ZeroMQ)
+
+if ("@CZMQ_WITH_LIBCURL@" AND "@LIBCURL_FOUND@")
-+ find_dependency(OpenSSL)
-+ find_dependency(ZLIB)
++ find_dependency(CURL)
+endif ()
+
-+
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")
diff --git a/ports/czmq/portfile.cmake b/ports/czmq/portfile.cmake
index 448008f0f..a24d0be9a 100644
--- a/ports/czmq/portfile.cmake
+++ b/ports/czmq/portfile.cmake
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zeromq/czmq
- REF 7e29cf95305551daad197e32423d9cff5f9b6893
- SHA512 7d79494c904f5276c9d1e4a193a63882dc622a6db8998b9719de4aec8b223b3a8b3c92ea02be81f39afc12c1a883b310fd3662ea27ed736b0b9c7092b4843a18
+ REF v4.2.1
+ SHA512 65a21f7bd5935b119e1b24ce3b2ce8462031ab7c9a4ba587bb99fe618c9f8cb672cfa202993ddd79e0fb0f154ada06560b79a1b4f762fcce8f88f2f450ecee01
HEAD_REF master
PATCHES
fix-dependencies.patch
@@ -15,27 +15,27 @@ foreach(_cmake_module
Findlz4.cmake
Finduuid.cmake
)
- configure_file(
+ file(COPY
${CMAKE_CURRENT_LIST_DIR}/${_cmake_module}
- ${SOURCE_PATH}/${_cmake_module}
- COPYONLY
+ DESTINATION ${SOURCE_PATH}
)
endforeach()
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
-vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
- draft ENABLE_DRAFTS
- curl CZMQ_WITH_LIBCURL
- httpd CZMQ_WITH_LIBMICROHTTPD
- lz4 CZMQ_WITH_LZ4
- uuid CZMQ_WITH_UUID
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ draft ENABLE_DRAFTS
+ curl CZMQ_WITH_LIBCURL
+ httpd CZMQ_WITH_LIBMICROHTTPD
+ lz4 CZMQ_WITH_LZ4
+ uuid CZMQ_WITH_UUID
)
-vcpkg_configure_cmake(
+vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DCZMQ_BUILD_SHARED=${BUILD_SHARED}
@@ -44,20 +44,22 @@ vcpkg_configure_cmake(
${FEATURE_OPTIONS}
)
-vcpkg_install_cmake()
+vcpkg_cmake_install()
vcpkg_copy_pdbs()
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
- vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
+ vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT})
- vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT})
+ vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/${PORT})
endif()
+vcpkg_fixup_pkgconfig()
+
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 ("tool" IN_LIST FEATURES)
@@ -66,7 +68,7 @@ endif()
vcpkg_clean_executables_in_bin(FILE_NAMES zmakecert)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/czmq_library.h
@@ -76,4 +78,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
# Handle copyright
-configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/ports/czmq/vcpkg.json b/ports/czmq/vcpkg.json
new file mode 100644
index 000000000..326c881d6
--- /dev/null
+++ b/ports/czmq/vcpkg.json
@@ -0,0 +1,53 @@
+{
+ "name": "czmq",
+ "version-semver": "4.2.1",
+ "description": "High-level C binding for ZeroMQ",
+ "homepage": "https://github.com/zeromq/czmq",
+ "license": "MPL-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ },
+ "zeromq"
+ ],
+ "features": {
+ "curl": {
+ "description": "Build with libcurl",
+ "dependencies": [
+ "curl"
+ ]
+ },
+ "draft": {
+ "description": "Build and install draft APIs"
+ },
+ "httpd": {
+ "description": "Build with HTTP server support (libmicrohttpd)",
+ "dependencies": [
+ "libmicrohttpd"
+ ]
+ },
+ "lz4": {
+ "description": "Build with lz4",
+ "dependencies": [
+ "lz4"
+ ]
+ },
+ "tool": {
+ "description": "Build and install czmq tools (zmakecert)"
+ },
+ "uuid": {
+ "description": "Build with libuuid",
+ "dependencies": [
+ {
+ "name": "libuuid",
+ "platform": "!windows & !uwp & !osx"
+ }
+ ]
+ }
+ }
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index be1787a55..aca0b3c81 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1589,7 +1589,7 @@
"port-version": 0
},
"czmq": {
- "baseline": "2019-06-10-4",
+ "baseline": "4.2.1",
"port-version": 0
},
"d3dx12": {
diff --git a/versions/c-/czmq.json b/versions/c-/czmq.json
index 3d8139285..45cace946 100644
--- a/versions/c-/czmq.json
+++ b/versions/c-/czmq.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "e05dc72cf3b616b1fd6629ea3dc20d08ed8d8055",
+ "version-semver": "4.2.1",
+ "port-version": 0
+ },
+ {
"git-tree": "31aceda22627ab6f97f03868d5f92a4cc78a275e",
"version-string": "2019-06-10-4",
"port-version": 0