ALL: Add libmpcdec dependency

This commit is contained in:
Le Philousophe
2024-09-05 17:58:43 +00:00
parent 99db437186
commit 70b905ae30
22 changed files with 97 additions and 0 deletions
+2
View File
@@ -73,6 +73,8 @@ local_package(libmpeg2)
local_package(liba52)
local_package(libmpcdec)
local_package(libvpx)
local_package(libopenssl)
+16
View File
@@ -0,0 +1,16 @@
#! /bin/sh
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
HELPERS_DIR=$PACKAGE_DIR/../..
. $HELPERS_DIR/functions.sh
do_make_bdir
do_lha_fetch audio/libmpcdec "libmpcdec*/"
do_lha_install
# libmpcdec.a is located in common folder where it should not and it has a bad casing, fix this
cp local/common/lib/libMPCdec.a $DESTDIR/$PREFIX/lib/libmpcdec.a
do_clean_bdir
+3
View File
@@ -75,6 +75,9 @@ helpers_package(mpeg2dec)
# No a52dec in the original toolchain build ours statically
helpers_package(a52dec)
# No libmpcdec in the original toolchain build ours statically
helpers_package(libmpcdec)
# No libvpx in the original toolchain build ours statically
helpers_package(libvpx)
+21
View File
@@ -0,0 +1,21 @@
#! /bin/sh
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
HELPERS_DIR=$PACKAGE_DIR/../..
. $HELPERS_DIR/functions.sh
do_make_bdir
do_pkg_fetch libmpc
autoreconf -fi
do_configure "$@"
do_make -C include
do_make -C libmpcdec
do_make -C include install
do_make -C libmpcdec install
do_clean_bdir
+2
View File
@@ -63,6 +63,8 @@ helpers_package(mpeg2dec)
helpers_package(a52dec)
helpers_package(libmpcdec)
# Multithreading is not functional (and it's only one core anyway)
helpers_package(libvpx, --disable-multithread)
+2
View File
@@ -78,6 +78,8 @@ helpers_package(mpeg2dec, , CFLAGS="$CFLAGS -mno-altivec")
helpers_package(a52dec)
helpers_package(libmpcdec)
# Multithreading is not functional (and it's only one core anyway)
helpers_package(libvpx, --disable-multithread)
+2
View File
@@ -75,6 +75,8 @@ helpers_package(mpeg2dec)
helpers_package(a52dec)
helpers_package(libmpcdec)
# libvpx is already installed in original toolchain
# curl is already installed in original toolchain
+2
View File
@@ -30,6 +30,8 @@ helpers_package(a52dec)
helpers_package(libmikmod)
helpers_package(libmpcdec)
# --as is used for x86* and overrides AS environment variable: exactly what we want
# Fix build with nasm
COPY --from=android-helpers /lib-helpers/packages/libvpx lib-helpers/packages/libvpx
+2
View File
@@ -133,6 +133,8 @@ helpers_package(mpeg2dec)
ports_package(a52dec)
ports_package(libmpcdec)
ports_package(libvpx)
# No curl as it's provided in SDK
+2
View File
@@ -120,6 +120,8 @@ helpers_package(mpeg2dec)
helpers_package(a52dec)
helpers_package(libmpcdec)
# libvpx thinks that darwin means xcode and adds too many flags
# disable this treatment
COPY --from=apple-common /lib-helpers/packages/libvpx lib-helpers/packages/libvpx
+2
View File
@@ -60,6 +60,8 @@ helpers_package(mpeg2dec)
helpers_package(a52dec)
helpers_package(libmpcdec)
helpers_package(libvpx)
# curl is already installed in original toolchain
+3
View File
@@ -87,6 +87,9 @@ local_mxe_package(libmpeg2)
mxe_package(a52dec)
# Patch libmpcdec to install the static library without a _static suffix
local_mxe_package(libmpcdec)
mxe_package(libvpx)
local_mxe_package(curl-light)
@@ -0,0 +1,15 @@
Index: libmpcdec/requant.h
===================================================================
--- a/libmpcdec/requant.h
+++ b/libmpcdec/requant.h
@@ -48,7 +48,7 @@
/* C O N S T A N T S */
-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
+extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
+extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
+extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
#define Cc (__Cc + 1)
@@ -0,0 +1,7 @@
# Patch libmpcdec_BUILD to install libmpcdec.a without a _static suffix
# Also remove useless LDFLAGS once the attached patch is applied
# newline and comma variables are defined by MXE
$(eval define libmpcdec_BUILD$(newline)\
$(subst libmpcdec_static.a' '$$(PREFIX)/$$(TARGET)/lib/',libmpcdec_static.a' '$$(PREFIX)/$$(TARGET)/lib/libmpcdec.a',$(value libmpcdec_BUILD))$(newline)\
$(subst LDFLAGS='$$(LDFLAGS) -Wl$(comma)--allow-multiple-definition',,$(value libmpcdec_BUILD))$(newline)\
endef)
+2
View File
@@ -56,6 +56,8 @@ helpers_package(mpeg2dec)
helpers_package(a52dec)
helpers_package(libmpcdec)
helpers_package(libvpx)
# No curl support in configure
+3
View File
@@ -80,6 +80,9 @@ helpers_package(mpeg2dec)
# No a52dec in the original toolchain build ours statically
helpers_package(a52dec)
# No libmpcdec in the original toolchain build ours statically
helpers_package(libmpcdec)
# No libvpx in the original toolchain build ours statically
helpers_package(libvpx)
+3
View File
@@ -75,6 +75,9 @@ helpers_package(mpeg2dec)
# No a52dec in the original toolchain build ours statically
helpers_package(a52dec)
# No libmpcdec in the original toolchain build ours statically
helpers_package(libmpcdec)
# No libvpx in the original toolchain build ours statically
helpers_package(libvpx)
+1
View File
@@ -32,6 +32,7 @@ multistrap_package(libgtk-3-dev)
multistrap_package(libjpeg62-turbo-dev)
multistrap_package(libmad0-dev)
multistrap_package(libmikmod-dev)
multistrap_package(libmpcdec-dev)
multistrap_package(libmpeg2-4-dev)
multistrap_package(libogg-dev)
multistrap_package(libpng-dev)
+2
View File
@@ -94,6 +94,8 @@ helpers_package(mpeg2dec)
helpers_package(a52dec)
helpers_package(libmpcdec)
helpers_package(libvpx)
# helpers_package(openssl)
+2
View File
@@ -56,6 +56,8 @@ vdpm_package(libmpeg2)
helpers_package(a52dec)
helpers_package(libmpcdec)
vdpm_package(libvpx)
vdpm_package(openssl)
+2
View File
@@ -72,6 +72,8 @@ helpers_package(mpeg2dec)
COPY packages/a52dec lib-helpers/packages/a52dec/
helpers_package(a52dec)
helpers_package(libmpcdec)
# Windows 95 doesn't handle well SSE.
# Multithreading uses InterlockedCompareExchange, not present in Windows 95.
helpers_package(libvpx, --as=nasm --disable-sse --disable-multithread)
+1
View File
@@ -15,6 +15,7 @@ RUN apt-get update && \
libjpeg62-turbo-dev`'APT_ARCH \
libmad0-dev`'APT_ARCH \
libmikmod-dev`'APT_ARCH \
libmpcdec-dev`'APT_ARCH \
libmpeg2-4-dev`'APT_ARCH \
libogg-dev`'APT_ARCH \
libpng-dev`'APT_ARCH \