Skip to content

Commit

Permalink
[allegro5] Add Minimp3 support (#41918)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bazket571 authored Nov 5, 2024
1 parent 57ada37 commit 79a2b26
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
17 changes: 17 additions & 0 deletions ports/allegro5/minimp3-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/addons/acodec/CMakeLists.txt b/addons/acodec/CMakeLists.txt
index 6906a99..7896989 100644
--- a/addons/acodec/CMakeLists.txt
+++ b/addons/acodec/CMakeLists.txt
@@ -394,9 +394,10 @@ acodec_summary(" - Opus" SUPPORT_OPUS)
# MP3
#
if(WANT_MP3)
- find_package(MiniMP3)
+ find_path(MINIMP3_INCLUDE_DIRS "minimp3/minimp3.h")
+ set(MINIMP3_FOUND true)
if(MINIMP3_FOUND)
- include_directories(SYSTEM ${MINIMP3_INCLUDE_DIRS})
+ include_directories(SYSTEM ${MINIMP3_INCLUDE_DIRS}/minimp3)
set(ALLEGRO_CFG_ACODEC_MP3 1)
list(APPEND ACODEC_SOURCES mp3.c)
endif(MINIMP3_FOUND)
3 changes: 2 additions & 1 deletion ports/allegro5/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
do-not-copy-pdbs-to-lib.patch
msvc-arm64-atomic.patch
minimp3-fix.patch
)

if(VCPKG_TARGET_IS_ANDROID AND NOT ENV{ANDROID_HOME})
Expand Down Expand Up @@ -43,7 +44,7 @@ vcpkg_cmake_configure(
-DWANT_GLES3=ON
-DWANT_IMAGE_FREEIMAGE=OFF
-DWANT_MODAUDIO=OFF # Not available on vcpkg right now
-DWANT_MP3=OFF
-DWANT_MP3=ON
-DWANT_OPENSL=OFF # Not yet available on vcpkg
-DWANT_POPUP_EXAMPLES=OFF
-DWANT_TESTS=OFF
Expand Down
3 changes: 2 additions & 1 deletion ports/allegro5/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "allegro5",
"version": "5.2.9.1",
"version": "5.2.9.2",
"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://liballeg.org/",
"license": "BSD-3-Clause AND Zlib",
Expand All @@ -24,6 +24,7 @@
"name": "libwebp",
"default-features": false
},
"minimp3",
"openal-soft",
"opus",
"opusfile",
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": "c375db21b3bfa0c14dec1832be9fc687f6b28426",
"version": "5.2.9.2",
"port-version": 0
},
{
"git-tree": "1162ff1bdc43ad43036a30af2ca8214eeea566d9",
"version": "5.2.9.1",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"port-version": 3
},
"allegro5": {
"baseline": "5.2.9.1",
"baseline": "5.2.9.2",
"port-version": 0
},
"alpaca": {
Expand Down

0 comments on commit 79a2b26

Please sign in to comment.