summaryrefslogtreecommitdiff
path: root/Ports/libmpg123
diff options
context:
space:
mode:
authorMichael Manganiello <adamantike@users.noreply.github.com>2022-03-26 13:15:31 -0300
committerAndreas Kling <kling@serenityos.org>2022-03-26 18:13:46 +0100
commit7dfb167b181bb39bd03f16e1f7edc79f7d02b1f5 (patch)
treee09a8ea77899d8bb07dc6c0518a9bd66f8f5ffa5 /Ports/libmpg123
parentf12d81ddf5ef3efd8c8cf8c5abdf13f667288067 (diff)
downloadserenity-7dfb167b181bb39bd03f16e1f7edc79f7d02b1f5.zip
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.
Diffstat (limited to 'Ports/libmpg123')
-rwxr-xr-xPorts/libmpg123/package.sh13
-rw-r--r--Ports/libmpg123/patches/ReadMe.md5
-rw-r--r--Ports/libmpg123/patches/add-serenity-target.patch121
3 files changed, 139 insertions, 0 deletions
diff --git a/Ports/libmpg123/package.sh b/Ports/libmpg123/package.sh
new file mode 100755
index 0000000000..a4b780ae8f
--- /dev/null
+++ b/Ports/libmpg123/package.sh
@@ -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")
diff --git a/Ports/libmpg123/patches/ReadMe.md b/Ports/libmpg123/patches/ReadMe.md
new file mode 100644
index 0000000000..a46164a3b9
--- /dev/null
+++ b/Ports/libmpg123/patches/ReadMe.md
@@ -0,0 +1,5 @@
+# Patches for mpg123 on SerenityOS
+
+## `add-serenity-target.patch`
+
+Add `serenity` as a valid target.
diff --git a/Ports/libmpg123/patches/add-serenity-target.patch b/Ports/libmpg123/patches/add-serenity-target.patch
new file mode 100644
index 0000000000..123ffeb5cb
--- /dev/null
+++ b/Ports/libmpg123/patches/add-serenity-target.patch
@@ -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