mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
Ports: Add SDL2_mixer
This commit is contained in:
parent
a9830d9a55
commit
096c4571bb
Notes:
sideshowbarker
2024-07-18 21:37:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/096c4571bb5
4 changed files with 88 additions and 1 deletions
|
@ -68,7 +68,8 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`quake`](quake/) | Quake | 0.65 | https://github.com/SerenityOS/SerenityQuake |
|
||||
| [`rsync`](rsync/) | rsync | 3.1.3 | https://rsync.samba.org/ |
|
||||
| [`SDL2`](SDL2/) | Simple DirectMedia Layer (SDL2) | | https://github.com/SerenityOS/SDL |
|
||||
| [`SDL2_ttf`](SDL2_ttf/) | SDL2\_ttf (TrueType Font add-on for SDL2) | 2.0.15 | https://www.libsdl.org/projects/SDL\_ttf/ |
|
||||
| [`SDL2_mixer`](SDL2_mixer/) | SDL2\_mixer (audio mixer add-on for SDL2) | 2.0.4 | https://www.libsdl.org/projects/SDL_mixer/ |
|
||||
| [`SDL2_ttf`](SDL2_ttf/) | SDL2\_ttf (TrueType Font add-on for SDL2) | 2.0.15 | https://www.libsdl.org/projects/SDL_ttf/ |
|
||||
| [`sed`](sed/) | GNU sed | 4.2.1 | https://www.gnu.org/software/sed/ |
|
||||
| [`sl`](sl/) | Steam Locomotive (SL) | | https://github.com/mtoyoda/sl |
|
||||
| [`stress-ng`](stress-ng/) | stress-ng | 0.11.23 | https://github.com/ColinIanKing/stress-ng |
|
||||
|
|
22
Ports/SDL2_mixer/package.sh
Executable file
22
Ports/SDL2_mixer/package.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=SDL2_mixer
|
||||
version=2.0.4
|
||||
useconfigure=true
|
||||
files="https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${version}.tar.gz SDL2_mixer-${version}.tar.gz"
|
||||
workdir="SDL2_mixer-$version"
|
||||
depends="SDL2"
|
||||
|
||||
configure() {
|
||||
run ./configure \
|
||||
--host=${SERENITY_ARCH}-pc-serenity \
|
||||
--with-sdl-prefix=${SERENITY_ROOT}/Build/Root/usr \
|
||||
EXTRA_LDFLAGS="-lgui -lgfx -lipc -lcore -lcompression"
|
||||
}
|
||||
|
||||
build() {
|
||||
run make -k
|
||||
}
|
||||
|
||||
install() {
|
||||
run make -k DESTDIR="$SERENITY_ROOT"/Build/Root install
|
||||
}
|
12
Ports/SDL2_mixer/patches/configure.patch
Normal file
12
Ports/SDL2_mixer/patches/configure.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -ru SDL2_mixer-2.0.4/build-scripts/config.sub SDL2_mixer-2.0.4-patched/build-scripts/config.sub
|
||||
--- SDL2_mixer-2.0.4/build-scripts/config.sub 2018-10-31 15:59:00.000000000 +0100
|
||||
+++ SDL2_mixer-2.0.4-patched/build-scripts/config.sub 2021-03-07 17:50:05.149501049 +0100
|
||||
@@ -1408,7 +1408,7 @@
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -serenity* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
52
Ports/SDL2_mixer/patches/dont-build-utilities.patch
Normal file
52
Ports/SDL2_mixer/patches/dont-build-utilities.patch
Normal file
|
@ -0,0 +1,52 @@
|
|||
diff -ru SDL2_mixer-2.0.4/Makefile.in SDL2_mixer-2.0.4-patched/Makefile.in
|
||||
--- SDL2_mixer-2.0.4/Makefile.in 2018-10-31 15:58:59.000000000 +0100
|
||||
+++ SDL2_mixer-2.0.4-patched/Makefile.in 2021-03-08 13:11:59.083146376 +0100
|
||||
@@ -38,7 +38,7 @@
|
||||
PLAYWAVE_OBJECTS = @PLAYWAVE_OBJECTS@
|
||||
PLAYMUS_OBJECTS = @PLAYMUS_OBJECTS@
|
||||
|
||||
-DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL2_mixer.spec.in SDL_mixer.h VisualC VisualC-WinRT Xcode Xcode-iOS acinclude aclocal.m4 autogen.sh build-scripts configure configure.in debian effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h external gcc-fat.sh load_aiff.c load_aiff.h load_voc.c load_voc.h mixer.c mixer.h music.c music.h music_cmd.c music_cmd.h music_flac.c music_flac.h music_fluidsynth.c music_fluidsynth.h music_mad.c music_mad.h music_mikmod.c music_mikmod.h music_modplug.c music_modplug.h music_mpg123.c music_mpg123.h music_nativemidi.c music_nativemidi.h music_ogg.c music_ogg.h music_opus.c music_opus.h music_timidity.c music_timidity.h music_wav.c music_wav.h native_midi playmus.c playwave.c timidity version.rc
|
||||
+DIST = *.txt Android.mk Makefile.in SDL2_mixer.pc.in SDL2_mixer.spec.in SDL_mixer.h VisualC VisualC-WinRT Xcode Xcode-iOS acinclude aclocal.m4 autogen.sh build-scripts configure configure.in debian effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h external gcc-fat.sh load_aiff.c load_aiff.h load_voc.c load_voc.h mixer.c mixer.h music.c music.h music_cmd.c music_cmd.h music_flac.c music_flac.h music_fluidsynth.c music_fluidsynth.h music_mad.c music_mad.h music_mikmod.c music_mikmod.h music_modplug.c music_modplug.h music_mpg123.c music_mpg123.h music_nativemidi.c music_nativemidi.h music_ogg.c music_ogg.h music_opus.c music_opus.h music_timidity.c music_timidity.h music_wav.c music_wav.h native_midi timidity version.rc
|
||||
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
@@ -46,7 +46,7 @@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
-all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/playwave$(EXE) $(objects)/playmus$(EXE)
|
||||
+all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET)
|
||||
|
||||
$(srcdir)/configure: $(srcdir)/configure.in
|
||||
@echo "Warning, configure.in is out of date"
|
||||
@@ -64,12 +64,6 @@
|
||||
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
|
||||
$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
|
||||
-$(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
|
||||
- $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(objects)/$(TARGET) $(SDL_LIBS) $(LDFLAGS)
|
||||
-
|
||||
-$(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET)
|
||||
- $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(objects)/$(TARGET) $(SDL_LIBS) $(LDFLAGS)
|
||||
-
|
||||
install: all install-hdrs install-lib #install-bin
|
||||
install-hdrs:
|
||||
$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL2
|
||||
@@ -84,8 +78,6 @@
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
|
||||
install-bin:
|
||||
$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
|
||||
- $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playwave$(EXE) $(bindir)/playwave$(EXE)
|
||||
- $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(objects)/playmus$(EXE) $(bindir)/playmus$(EXE)
|
||||
|
||||
uninstall: uninstall-hdrs uninstall-lib uninstall-bin
|
||||
uninstall-hdrs:
|
||||
@@ -99,8 +91,6 @@
|
||||
uninstall-lib:
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
|
||||
uninstall-bin:
|
||||
- rm -f $(bindir)/playwave$(EXE)
|
||||
- rm -f $(bindir)/playmus$(EXE)
|
||||
|
||||
clean:
|
||||
rm -rf $(objects)
|
Loading…
Add table
Reference in a new issue