diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 906c83fbc5..1ce6536c81 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -144,6 +144,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`ruby`](ruby/) | Ruby | 3.0.2 | https://www.ruby-lang.org/ | | [`sam`](sam/) | Software Automatic Mouth (SAM) | c86ea39 | https://github.com/vidarh/SAM | | [`scummvm`](scummvm/) | ScummVM | 2.2.0 | https://www.scummvm.org/ | +| [`SDL_sound`](SDL_sound/) | SDL_sound (Abstract soundfile decoder) | | https://github.com/icculus/SDL_sound | | [`SDL2`](SDL2/) | Simple DirectMedia Layer (SDL2) | | https://github.com/SerenityOS/SDL | | [`SDL2-GNUBoy`](SDL2-GNUBoy/) | SDL2 GNUBoy | 1.2 | https://github.com/AlexOberhofer/SDL2-GNUBoy | | [`SDL2_gfx`](SDL2_gfx/) | SDL2\_gfx (Graphics primitives add-on for SDL2) | 1.0.4 | https://sourceforge.net/projects/sdl2gfx/ | diff --git a/Ports/SDL_sound/package.sh b/Ports/SDL_sound/package.sh new file mode 100755 index 0000000000..e12fd21b93 --- /dev/null +++ b/Ports/SDL_sound/package.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=SDL_sound +version=git +workdir=SDL_sound-main +useconfigure=true +deps="SDL2" +files="https://github.com/icculus/SDL_sound/archive/refs/heads/main.zip main.zip f8a322d090a172b9c66a41758f7ece850a8ff231058733a13e44bc380342651b" +auth_type=sha256 +configopts="-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" + +configure() { + run cmake $configopts +} + +install() { + run make install +} diff --git a/Ports/SDL_sound/patches/fix_cmakelists.patch b/Ports/SDL_sound/patches/fix_cmakelists.patch new file mode 100644 index 0000000000..7cb860c3a0 --- /dev/null +++ b/Ports/SDL_sound/patches/fix_cmakelists.patch @@ -0,0 +1,14 @@ +--- SDL_sound-main/CMakeLists.txt 2021-08-21 03:28:50.000000000 +0300 ++++ SDL_sound-main.serenity/CMakeLists.txt 2021-09-18 15:59:24.321216126 +0300 +@@ -29,7 +29,10 @@ + add_definitions(-xldscope=hidden) + endif() + +-find_package(SDL2 REQUIRED) ++INCLUDE(FindPkgConfig) ++ ++PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) ++ + include_directories(${SDL2_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR}) + if(WIN32) + # -lmingw32: gcc adds it automatically.