diff --git a/ports/allegro5/cmake-project-include.cmake b/ports/allegro5/cmake-project-include.cmake index 4c1beb129b..5b736dbb13 100644 --- a/ports/allegro5/cmake-project-include.cmake +++ b/ports/allegro5/cmake-project-include.cmake @@ -1,3 +1,8 @@ if(MSVC AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") add_compile_options(/Gy) endif() + +# https://gitlab.kitware.com/cmake/cmake/-/issues/25635 +if(CMAKE_VERSION VERSION_EQUAL "3.28.0" OR CMAKE_VERSION VERSION_EQUAL "3.28.1") + list(APPEND CMAKE_IGNORE_PATH "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/freetype") +endif() diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 8166ea1634..bd8a85e8ad 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -2,68 +2,59 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO liballeg/allegro5 REF ${VERSION} - SHA512 2e7833b725718fdf11f1cd5999dc9fafca4b34adda15d3d8cb551c0eb00368d2e1c08b15f8beb766e2f208ffdc3b5e33175e969c7333ad6dc92f269522ac3d32 + SHA512 5466e547a20bf22d606a385eeb9facc57b43c7f64689c724f82a572d4730dc62b2860829435b739a716ebca85fdc01c071f3e630048cdfd4799157e61fe815e9 HEAD_REF master PATCHES do-not-copy-pdbs-to-lib.patch msvc-arm64-atomic.patch ) +if(VCPKG_TARGET_IS_ANDROID AND NOT ENV{ANDROID_HOME}) + message(FATAL_ERROR "${PORT} requires environment variable ANDROID_HOME to be set." ) +endif() + +vcpkg_find_acquire_program(PKGCONFIG) +set(ENV{PKG_CONFIG} "${PKGCONFIG}") string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" VCPKG_BUILD_SHARED_LIBS) +vcpkg_check_features(OUT_FEATURE_OPTIONS options + FEATURES + direct3d WANT_D3D + opengl WANT_OPENGL +) +if(NOT WANT_OPENGL) + list(APPEND options -DWANT_X11=OFF) +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS "-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake" - -DWANT_DOCS=OFF - -DALLEGRO_SDL=OFF - -DWANT_DEMO=OFF - -DSHARED=${VCPKG_BUILD_SHARED_LIBS} -DINSTALL_PKG_CONFIG_FILES=true - -DWANT_EXAMPLES=OFF - -DWANT_TESTS=OFF - -DWANT_AUDIO=ON - -DWANT_COLOR=ON - -DWANT_D3D=ON + -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON + -DSHARED=${VCPKG_BUILD_SHARED_LIBS} + ${options} + -DALLEGRO_SDL=OFF -DWANT_D3D9EX=OFF # Not available on vcpkg - -DWANT_DSOUND=ON - -DWANT_FLAC=ON - -DWANT_FONT=ON + -DWANT_DEMO=OFF + -DWANT_DOCS=OFF + -DWANT_EXAMPLES=OFF -DWANT_GLES3=ON - -DWANT_IMAGE=ON - -DWANT_IMAGE_JPG=ON - -DWANT_IMAGE_PNG=ON - -DWANT_MEMFILE=ON + -DWANT_IMAGE_FREEIMAGE=OFF -DWANT_MODAUDIO=OFF # Not available on vcpkg right now - -DWANT_NATIVE_DIALOG=ON - -DWANT_NATIVE_IMAGE_LOADER=ON - -DWANT_OGG_VIDEO=ON - -DWANT_OPENAL=ON - -DWANT_OPENGL=ON + -DWANT_MP3=OFF -DWANT_OPENSL=OFF # Not yet available on vcpkg - -DWANT_OPUS=ON - -DWANT_PHYSFS=ON -DWANT_POPUP_EXAMPLES=OFF - -DWANT_PRIMITIVES=ON - -DWANT_RELEASE_LOGGING=OFF - -DWANT_SHADERS_D3D=ON - -DWANT_SHADERS_GL=ON + -DWANT_TESTS=OFF -DWANT_TREMOR=OFF # Not yet available on vcpkg - -DWANT_TTF=ON - -DWANT_VIDEO=ON - -DWANT_VORBIS=ON - OPTIONS_RELEASE - -DWANT_ALLOW_SSE=ON - OPTIONS_DEBUG - -DWANT_ALLOW_SSE=OFF ) vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_cmake_config_fixup(PACKAGE_NAME allegro CONFIG_PATH lib/cmake/allegro) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/allegro) vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/allegro5/vcpkg.json b/ports/allegro5/vcpkg.json index 40b37627c5..112e096f3b 100644 --- a/ports/allegro5/vcpkg.json +++ b/ports/allegro5/vcpkg.json @@ -1,19 +1,30 @@ { "name": "allegro5", - "version": "5.2.9.0", + "version": "5.2.9.1", "description": "Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.", - "homepage": "https://github.com/liballeg/allegro5", + "homepage": "https://liballeg.org/", "license": "BSD-3-Clause AND Zlib", "dependencies": [ + { + "name": "alsa", + "platform": "linux" + }, "bzip2", - "freetype", + { + "name": "freetype", + "default-features": false + }, "libflac", + "libjpeg-turbo", "libogg", "libpng", "libtheora", "libvorbis", + { + "name": "libwebp", + "default-features": false + }, "openal-soft", - "opengl", "opus", "opusfile", "physfs", @@ -26,5 +37,28 @@ "host": true }, "zlib" - ] + ], + "default-features": [ + { + "name": "direct3d", + "platform": "windows" + }, + { + "name": "opengl", + "platform": "!(arm & windows) & !uwp & !xbox" + } + ], + "features": { + "direct3d": { + "description": "Direct3D support", + "supports": "windows" + }, + "opengl": { + "description": "OpenGL support", + "supports": "!(arm & windows) & !uwp & !xbox", + "dependencies": [ + "opengl" + ] + } + } } diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index a04b216ab1..804f184b78 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -42,14 +42,10 @@ ace:arm-neon-android=fail ace:arm64-android=fail ace:x64-android=fail +# Needs SDK (in ENV{ANDROID_HOME}) allegro5:arm-neon-android=fail allegro5:arm64-android=fail allegro5:x64-android=fail -# Fails with "fatal error LNK1322: cannot avoid potential ARM hazard" even with /Gy -allegro5:arm64-windows=fail -# Fails to build in CMake 3.28 attempting to pass $; https://gitlab.kitware.com/cmake/cmake/-/issues/25635 -allegro5:x64-osx=fail -allegro5:arm64-osx=fail ampl-asl:x64-android=fail apr:arm-neon-android=fail apr:arm64-android=fail diff --git a/versions/a-/allegro5.json b/versions/a-/allegro5.json index 58027fd2d9..20657dc6de 100644 --- a/versions/a-/allegro5.json +++ b/versions/a-/allegro5.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1162ff1bdc43ad43036a30af2ca8214eeea566d9", + "version": "5.2.9.1", + "port-version": 0 + }, { "git-tree": "93860d1ef432006526823ace61750eb6b0e86ec2", "version": "5.2.9.0", diff --git a/versions/baseline.json b/versions/baseline.json index 7cb46f2002..e80ca3b3ce 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -81,7 +81,7 @@ "port-version": 3 }, "allegro5": { - "baseline": "5.2.9.0", + "baseline": "5.2.9.1", "port-version": 0 }, "alpaca": {