Ports: Add libmpg123 port

Add `libmpg123` port, for dependant projects to be able to use it.

This port doesn't include the entire `mpg123` project, just the
`libmpg123` library.
This commit is contained in:
Michael Manganiello 2022-03-26 13:15:31 -03:00 committed by Andreas Kling
parent f12d81ddf5
commit 7dfb167b18
4 changed files with 140 additions and 0 deletions

View file

@ -97,6 +97,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`libmad`](libmad/) | libmad | 0.15.1b | https://www.underbit.com/products/mad/ |
| [`libmodplug`](libmodplug/) | libmodplug | 0.8.8.5 | http://modplug-xmms.sourceforge.net/ |
| [`libmpeg2`](libmpeg2/) | libmpeg2 | 0.5.1 | https://libmpeg2.sourceforge.io/ |
| [`libmpg123`](libmpg123/) | libmpg123 | 1.29.3 | https://www.mpg123.de/ |
| [`libogg`](libogg/) | libogg | 1.3.5 | https://github.com/xiph/ogg |
| [`liboggz`](liboggz/) | liboggz | 1.1.1 | https://www.xiph.org/oggz/ |
| [`libopenal`](libopenal/) | OpenAL soft | 1.21.1 | https://openal-soft.org/ |

13
Ports/libmpg123/package.sh Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=libmpg123
version=1.29.3
useconfigure=true
workdir=mpg123-${version}
use_fresh_config_sub=true
config_sub_path=build/config.sub
files="https://download.sourceforge.net/project/mpg123/mpg123/${version}/mpg123-${version}.tar.bz2 mpg123-${version}.tar.bz2
https://download.sourceforge.net/project/mpg123/mpg123/${version}/mpg123-${version}.tar.bz2.sig mpg123-${version}.tar.bz2.sig"
auth_type="sig"
auth_import_key="D021FF8ECF4BE09719D61A27231C4CBC60D5CAFE"
auth_opts=("mpg123-${version}.tar.bz2.sig")

View file

@ -0,0 +1,5 @@
# Patches for mpg123 on SerenityOS
## `add-serenity-target.patch`
Add `serenity` as a valid target.

View file

@ -0,0 +1,121 @@
diff --git a/configure b/configure
index d3404be..809a412 100755
--- a/configure
+++ b/configure
@@ -14826,11 +14826,11 @@ case $host in
cpu_type="x86"
newoldwritesample=enabled
;;
- i686-*-linux*|i686-*-kfreebsd*-gnu)
+ i686-*-linux*|i686-*-kfreebsd*-gnu|i686-*-serenity*)
cpu_type="x86"
newoldwritesample=enabled
;;
- x86_64-*-linux*|x86_64-*-kfreebsd*-gnu)
+ x86_64-*-linux*|x86_64-*-kfreebsd*-gnu|x86_64-*-serenity*)
cpu_type="x86-64"
;;
*-*-linux*|*-*-kfreebsd*-gnu)
diff --git a/configure.ac b/configure.ac
index 3ca8766..383120e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -709,11 +709,11 @@ case $host in
cpu_type="x86"
newoldwritesample=enabled
;;
- i686-*-linux*|i686-*-kfreebsd*-gnu)
+ i686-*-linux*|i686-*-kfreebsd*-gnu|i686-*-serenity*)
cpu_type="x86"
newoldwritesample=enabled
;;
- x86_64-*-linux*|x86_64-*-kfreebsd*-gnu)
+ x86_64-*-linux*|x86_64-*-kfreebsd*-gnu|x86_64-*-serenity*)
cpu_type="x86-64"
;;
*-*-linux*|*-*-kfreebsd*-gnu)
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a6d21ae..44d3c98 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2836,7 +2836,7 @@ linux*android*)
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | serenity*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
@@ -3553,7 +3553,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | serenity*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -4372,7 +4372,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | serenity*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4696,7 +4696,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | serenity*)
case $cc_basename in
# old Intel for x86_64, which still supported -KPIC.
ecc*)
@@ -4954,7 +4954,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- linux* | k*bsd*-gnu | gnu*)
+ linux* | k*bsd*-gnu | gnu* | serenity*)
_LT_TAGVAR(link_all_deplibs, $1)=no
;;
*)
@@ -5019,7 +5019,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
openbsd* | bitrig*)
with_gnu_ld=no
;;
- linux* | k*bsd*-gnu | gnu*)
+ linux* | k*bsd*-gnu | gnu* | serenity*)
_LT_TAGVAR(link_all_deplibs, $1)=no
;;
esac
@@ -5197,7 +5197,7 @@ _LT_EOF
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | serenity*)
tmp_diet=no
if test linux-dietlibc = "$host_os"; then
case $cc_basename in
@@ -5809,7 +5809,7 @@ _LT_EOF
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
- linux*)
+ linux* | serenity*)
case $cc_basename in
tcc*)
# Fabrice Bellard et al's Tiny C Compiler
@@ -6952,7 +6952,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(inherit_rpath, $1)=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | serenity*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler