diff --git a/ports/aeron/patches/add-libuuid-vcpkg-support.patch b/ports/aeron/patches/add-libuuid-vcpkg-support.patch new file mode 100644 index 0000000000..b1440038a7 --- /dev/null +++ b/ports/aeron/patches/add-libuuid-vcpkg-support.patch @@ -0,0 +1,76 @@ +diff --git a/aeron-driver/src/main/c/CMakeLists.txt b/aeron-driver/src/main/c/CMakeLists.txt +index 1234567..abcdefg 100644 +--- a/aeron-driver/src/main/c/CMakeLists.txt ++++ b/aeron-driver/src/main/c/CMakeLists.txt +@@ -36,15 +36,39 @@ if (NOT MSVC) + endif () + + check_include_file("bsd/stdlib.h" BSDSTDLIB_H_EXISTS) +-check_include_file("uuid/uuid.h" UUID_H_EXISTS) + find_library(LIBBSD_EXISTS NAMES bsd libbsd) +-find_library(LIBUUID_EXISTS NAMES uuid libuuid libuuid.dll) ++find_library(LIBUUID_SYSTEM NAMES uuid libuuid libuuid.dll) ++ ++# In vcpkg builds on Linux, use vcpkg's libuuid ++if(DEFINED VCPKG_TOOLCHAIN AND CMAKE_SYSTEM_NAME MATCHES "Linux") ++ find_package(unofficial-libuuid QUIET CONFIG) ++ if(TARGET unofficial::UUID::uuid) ++ get_target_property(UUID_INCLUDE_DIR unofficial::UUID::uuid INTERFACE_INCLUDE_DIRECTORIES) ++ if(UUID_INCLUDE_DIR) ++ list(APPEND CMAKE_REQUIRED_INCLUDES "${UUID_INCLUDE_DIR}") ++ endif() ++ list(APPEND CMAKE_REQUIRED_LIBRARIES "unofficial::UUID::uuid") ++ set(LIBUUID_EXISTS TRUE) ++ set(AERON_LIB_UUID_LIBS "unofficial::UUID::uuid") ++ set(UUID_H_EXISTS TRUE) ++ set(UUID_GENERATE_PROTOTYPE_EXISTS TRUE) ++ endif() ++endif() ++ ++if(NOT DEFINED LIBUUID_EXISTS OR NOT LIBUUID_EXISTS) ++ set(LIBUUID_EXISTS ${LIBUUID_SYSTEM}) ++endif() ++ ++# Only check for uuid headers if not found via vcpkg ++if(NOT DEFINED UUID_H_EXISTS OR NOT UUID_H_EXISTS) ++ check_include_file("uuid/uuid.h" UUID_H_EXISTS) ++endif() + + if (LIBBSD_EXISTS) + set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} -lbsd") + endif () + +-if (LIBUUID_EXISTS) ++if (LIBUUID_EXISTS AND NOT AERON_LIB_UUID_LIBS) + set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} -luuid") + endif () + +@@ -64,7 +88,9 @@ if (MSVC AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows") + set(WSAPOLL_PROTOTYPE_EXISTS True) + endif () + +-check_symbol_exists(uuid_generate "uuid/uuid.h" UUID_GENERATE_PROTOTYPE_EXISTS) ++if(NOT DEFINED UUID_GENERATE_PROTOTYPE_EXISTS OR NOT UUID_GENERATE_PROTOTYPE_EXISTS) ++ check_symbol_exists(uuid_generate "uuid/uuid.h" UUID_GENERATE_PROTOTYPE_EXISTS) ++endif() + + check_symbol_exists(poll "poll.h" POLL_PROTOTYPE_EXISTS) + check_symbol_exists(epoll_create "sys/epoll.h" EPOLL_PROTOTYPE_EXISTS) +@@ -387,7 +413,7 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + set(AERON_LIB_BSD_LIBS bsd) + endif () + +- if (LIBUUID_EXISTS) ++ if (LIBUUID_EXISTS AND NOT AERON_LIB_UUID_LIBS) + set(AERON_LIB_UUID_LIBS uuid) + endif () + +@@ -400,7 +426,7 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + endif () + + if (CYGWIN) +- if (LIBUUID_EXISTS) ++ if (LIBUUID_EXISTS AND NOT AERON_LIB_UUID_LIBS) + set(AERON_LIB_UUID_LIBS uuid) + endif () + endif () diff --git a/ports/aeron/portfile.cmake b/ports/aeron/portfile.cmake index 6af74b6960..a80b31128c 100644 --- a/ports/aeron/portfile.cmake +++ b/ports/aeron/portfile.cmake @@ -8,6 +8,8 @@ vcpkg_from_github( REF "${VERSION}" SHA512 6302b235285d897bb58d388c1883145c486f931575174b68161e67a04ae2efb48993d8045855d6e04ba378fdb58050c5339561c85fffb6b222abaa1952103d37 HEAD_REF master + PATCHES + patches/add-libuuid-vcpkg-support.patch ) # Set archive option based on feature diff --git a/ports/aeron/vcpkg.json b/ports/aeron/vcpkg.json index 01d6630413..0d6a71cdb3 100644 --- a/ports/aeron/vcpkg.json +++ b/ports/aeron/vcpkg.json @@ -2,11 +2,16 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "aeron", "version": "1.49.3", + "port-version": 1, "description": "Efficient reliable UDP unicast, UDP multicast, and IPC message transport", "homepage": "https://github.com/aeron-io/aeron", "license": "Apache-2.0", - "supports": "(x64 & !uwp & !xbox) | ((x64 | arm64) & !windows & !android)", + "supports": "(x64 & windows & !uwp & !xbox) | ((x64 | arm64) & !windows & !android)", "dependencies": [ + { + "name": "libuuid", + "platform": "linux" + }, { "name": "vcpkg-cmake", "host": true @@ -19,7 +24,7 @@ "features": { "archive": { "description": "Build Aeron Archive API for recording and replaying message streams (requires Java)", - "supports": "(x64 & !uwp & !xbox) | ((x64 | arm64) & !windows & !android)" + "supports": "(x64 & windows & !uwp & !xbox) | ((x64 | arm64) & !windows & !android)" } } } diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index b7e4fcc41f..758222a73c 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -38,6 +38,9 @@ ## # Add new items alphabetically +aeron:arm-neon-android=fail +aeron:arm64-android=fail +aeron:x64-android=fail apr:arm-neon-android=fail apr:arm64-android=fail apr:x64-android=fail diff --git a/versions/a-/aeron.json b/versions/a-/aeron.json index dff6f820da..1484b8094b 100644 --- a/versions/a-/aeron.json +++ b/versions/a-/aeron.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c7c0110b039da7b02fbf0a42de05428df118d56a", + "version": "1.49.3", + "port-version": 1 + }, { "git-tree": "44788413f50414d098289891dfcdc63f664ef067", "version": "1.49.3", diff --git a/versions/baseline.json b/versions/baseline.json index e68a4238a9..2cd5820da2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -58,7 +58,7 @@ }, "aeron": { "baseline": "1.49.3", - "port-version": 0 + "port-version": 1 }, "air-ctl": { "baseline": "1.1.2",