From f573b7b47a7d9b84e027d8feaceb647251f86442 Mon Sep 17 00:00:00 2001 From: xSlendiX Date: Sat, 18 Sep 2021 16:19:50 +0300 Subject: Ports: Add libmodplug --- Ports/AvailablePorts.md | 1 + Ports/libmodplug/package.sh | 14 ++++++++++++++ Ports/libmodplug/patches/build-fixes.patch | 12 ++++++++++++ Ports/libmodplug/patches/config.sub.patch | 12 ++++++++++++ 4 files changed, 39 insertions(+) create mode 100755 Ports/libmodplug/package.sh create mode 100644 Ports/libmodplug/patches/build-fixes.patch create mode 100644 Ports/libmodplug/patches/config.sub.patch (limited to 'Ports') diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index eb37709957..906c83fbc5 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -73,6 +73,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | [`libicu`](libicu/) | ICU | 69.1 | http://site.icu-project.org/ | | [`libksba`](libksba/) | libksba | 1.5.1 | https://gnupg.org/software/libksba/index.html | | [`libjpeg`](libjpeg/) | libjpeg | 9d | https://ijg.org/ | +| [`libmodplug`](libmodplug/) | libmodplug | 0.8.8.5 | http://modplug-xmms.sourceforge.net/ | | [`libogg`](libogg/) | libogg | 1.3.4 | https://github.com/xiph/ogg | | [`libopenal`](libopenal/) | OpenAL soft | 1.21.1 | https://openal-soft.org/ | | [`libphysfs`](libphysfs/) | PhysicsFS | 3.0.2 | https://icculus.org/physfs/ | diff --git a/Ports/libmodplug/package.sh b/Ports/libmodplug/package.sh new file mode 100755 index 0000000000..ad7c4b5fdb --- /dev/null +++ b/Ports/libmodplug/package.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port=libmodplug +version=0.8.8.5 +useconfigure=true +configopts="ac_cv_c_bigendian=no" +files="https://download.sourceforge.net/modplug-xmms/libmodplug-${version}.tar.gz libmodplug-${version}.tar.gz 77462d12ee99476c8645cb5511363e3906b88b33a6b54362b4dbc0f39aa2daad" +auth_type=sha256 +workdir="libmodplug-$version" + +install() { + run make DESTDIR=${SERENITY_INSTALL_ROOT} $installopts install + ${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmodplug.so -Wl,-soname,libmodplug.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmodplug.a -Wl,--no-whole-archive + rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmodplug.la +} diff --git a/Ports/libmodplug/patches/build-fixes.patch b/Ports/libmodplug/patches/build-fixes.patch new file mode 100644 index 0000000000..4e32054735 --- /dev/null +++ b/Ports/libmodplug/patches/build-fixes.patch @@ -0,0 +1,12 @@ +diff -Naur libmodplug-0.8.8.5/src/libmodplug/stdafx.h libmodplug-0.8.8.5.serenity/src/libmodplug/stdafx.h +index 3eacf1da6..871fb6d82 100644 +--- libmodplug-0.8.8.5/src/libmodplug/stdafx.h ++++ libmodplug-0.8.8.5.serenity/src/libmodplug/stdafx.h +@@ -57,6 +57,7 @@ inline void ProcessPlugins(int n) {} + #include + #include + #include ++#include + #ifdef HAVE_MALLOC_H + #include + #endif diff --git a/Ports/libmodplug/patches/config.sub.patch b/Ports/libmodplug/patches/config.sub.patch new file mode 100644 index 0000000000..64d1dc0b83 --- /dev/null +++ b/Ports/libmodplug/patches/config.sub.patch @@ -0,0 +1,12 @@ +diff -Naur libmodplug-0.8.8.5/config.sub libmodplug-0.8.8.5.serenity/config.sub +--- libmodplug-0.8.8.5/config.sub 2017-03-17 09:34:37.000000000 +0100 ++++ libmodplug-0.8.8.5.serenity/config.sub 2021-04-14 01:12:00.264606451 +0200 +@@ -1381,7 +1381,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* | -irix* | -serenity* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ -- cgit v1.2.3