Skip to content

Commit

Permalink
[allegro5] Update (#36464)
Browse files Browse the repository at this point in the history
* [allegro5] Update to 5.2.9.1

* Remove allegro5 from CI baseline

* [allegro5] Fixup

* [allegro5] Fixup

* [allegro5] Fixup
  • Loading branch information
dg0yt committed Jan 31, 2024
1 parent 1897a5a commit e07c955
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 46 deletions.
5 changes: 5 additions & 0 deletions ports/allegro5/cmake-project-include.cmake
Original file line number Diff line number Diff line change
@@ -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()
61 changes: 26 additions & 35 deletions ports/allegro5/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
-DINSTALL_PKG_CONFIG_FILES=true
-DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON
-DSHARED=${VCPKG_BUILD_SHARED_LIBS}
${options}
-DALLEGRO_SDL=OFF
-DWANT_D3D9EX=OFF # Not available on vcpkg
-DWANT_DEMO=OFF
-DSHARED=${VCPKG_BUILD_SHARED_LIBS}
-DINSTALL_PKG_CONFIG_FILES=true
-DWANT_DOCS=OFF
-DWANT_EXAMPLES=OFF
-DWANT_TESTS=OFF
-DWANT_AUDIO=ON
-DWANT_COLOR=ON
-DWANT_D3D=ON
-DWANT_D3D9EX=OFF # Not available on vcpkg
-DWANT_DSOUND=ON
-DWANT_FLAC=ON
-DWANT_FONT=ON
-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")
Expand Down
44 changes: 39 additions & 5 deletions ports/allegro5/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
]
}
}
}
6 changes: 1 addition & 5 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<LINK_ONLY:ZLIB::ZLIB>; 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
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/allegro5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1162ff1bdc43ad43036a30af2ca8214eeea566d9",
"version": "5.2.9.1",
"port-version": 0
},
{
"git-tree": "93860d1ef432006526823ace61750eb6b0e86ec2",
"version": "5.2.9.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"port-version": 3
},
"allegro5": {
"baseline": "5.2.9.0",
"baseline": "5.2.9.1",
"port-version": 0
},
"alpaca": {
Expand Down

0 comments on commit e07c955

Please sign in to comment.