diff options
author | xSlendiX <gamingxslendix@gmail.com> | 2021-09-18 16:19:50 +0300 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-10-10 15:26:05 -0700 |
commit | f573b7b47a7d9b84e027d8feaceb647251f86442 (patch) | |
tree | 7218d91778305e3873f2397e34b55c62fafcec40 /Ports | |
parent | e900f94a037899cd6ca31ca84615b6c004cf4d7b (diff) | |
download | serenity-f573b7b47a7d9b84e027d8feaceb647251f86442.zip |
Ports: Add libmodplug
Diffstat (limited to 'Ports')
-rw-r--r-- | Ports/AvailablePorts.md | 1 | ||||
-rwxr-xr-x | Ports/libmodplug/package.sh | 14 | ||||
-rw-r--r-- | Ports/libmodplug/patches/build-fixes.patch | 12 | ||||
-rw-r--r-- | Ports/libmodplug/patches/config.sub.patch | 12 |
4 files changed, 39 insertions, 0 deletions
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 <stdlib.h> + #include <stdio.h> + #include <string.h> ++#include <strings.h> + #ifdef HAVE_MALLOC_H + #include <malloc.h> + #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* \ |