diff --git a/ports/aeron/portfile.cmake b/ports/aeron/portfile.cmake new file mode 100644 index 0000000000..6af74b6960 --- /dev/null +++ b/ports/aeron/portfile.cmake @@ -0,0 +1,74 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aeron-io/aeron + REF "${VERSION}" + SHA512 6302b235285d897bb58d388c1883145c486f931575174b68161e67a04ae2efb48993d8045855d6e04ba378fdb58050c5339561c85fffb6b222abaa1952103d37 + HEAD_REF master +) + +# Set archive option based on feature +if("archive" IN_LIST FEATURES) + set(BUILD_ARCHIVE ON) +else() + set(BUILD_ARCHIVE OFF) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DAERON_INSTALL_TARGETS=ON + -DAERON_TESTS=OFF + -DAERON_BUILD_SAMPLES=OFF + -DBUILD_AERON_ARCHIVE_API=${BUILD_ARCHIVE} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/aeron) + +# Aeron always builds both static and shared libraries regardless of VCPKG_LIBRARY_LINKAGE. +# Handle the shared library artifacts based on linkage type. +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # For static builds, remove shared library artifacts (DLLs, SOs, DYLIBs and their import libs) + file(REMOVE + "${CURRENT_PACKAGES_DIR}/lib/aeron.dll" + "${CURRENT_PACKAGES_DIR}/lib/aeron_client_shared.dll" + "${CURRENT_PACKAGES_DIR}/lib/aeron_driver.dll" + "${CURRENT_PACKAGES_DIR}/lib/aeron.lib" + "${CURRENT_PACKAGES_DIR}/lib/aeron_client_shared.lib" + "${CURRENT_PACKAGES_DIR}/lib/aeron_driver.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/aeron.dll" + "${CURRENT_PACKAGES_DIR}/debug/lib/aeron_client_shared.dll" + "${CURRENT_PACKAGES_DIR}/debug/lib/aeron_driver.dll" + "${CURRENT_PACKAGES_DIR}/debug/lib/aeron.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/aeron_client_shared.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/aeron_driver.lib" + ) +else() + # For dynamic builds, move DLLs from lib to bin + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") + file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + if(RELEASE_DLLS) + file(COPY ${RELEASE_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE ${RELEASE_DLLS}) + endif() + if(DEBUG_DLLS) + file(COPY ${DEBUG_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE ${DEBUG_DLLS}) + endif() +endif() + +# Copy aeronmd tools +vcpkg_copy_tools(TOOL_NAMES aeronmd aeronmd_s AUTO_CLEAN) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/aeron/vcpkg.json b/ports/aeron/vcpkg.json new file mode 100644 index 0000000000..01d6630413 --- /dev/null +++ b/ports/aeron/vcpkg.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "aeron", + "version": "1.49.3", + "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)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "archive": { + "description": "Build Aeron Archive API for recording and replaying message streams (requires Java)", + "supports": "(x64 & !uwp & !xbox) | ((x64 | arm64) & !windows & !android)" + } + } +} diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index cd2cc7145d..d6474f8456 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -55,6 +55,7 @@ llvm = skip ace[tao]:arm-neon-android=feature-fails # tao requires a host tree with tao_idl compiled for the host ace[tao]:arm64-android=feature-fails ace[tao]:x64-android=feature-fails +aeron[archive]=skip # archive feature requires Java for SBE code generation allegro5:arm64-windows=fail # Fails with "fatal error LNK1322: cannot avoid potential ARM hazard" even with /Gy apr:arm64-windows=fail # Cross compiling CI machine cannot run gen_test_char to generate apr_escape_test_char.h blitz:arm64-windows=fail diff --git a/versions/a-/aeron.json b/versions/a-/aeron.json new file mode 100644 index 0000000000..dff6f820da --- /dev/null +++ b/versions/a-/aeron.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "44788413f50414d098289891dfcdc63f664ef067", + "version": "1.49.3", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 6ea73ab46b..fd02f0770b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -56,6 +56,10 @@ "baseline": "2.1.1", "port-version": 0 }, + "aeron": { + "baseline": "1.49.3", + "port-version": 0 + }, "air-ctl": { "baseline": "1.1.2", "port-version": 3