* update libldac to 2.0.2.3-2.1

This commit is contained in:
Alexander Baldeck 2024-09-11 23:50:02 +02:00
parent b42e950b12
commit 81e2ab1dbd
2 changed files with 56 additions and 5 deletions

View File

@ -3,19 +3,21 @@
pkgname=libldac
pkgver=2.0.2.3
pkgrel=2
pkgrel=2.1
pkgdesc="LDAC Bluetooth encoder library"
url="https://github.com/EHfive/ldacBT"
arch=(x86_64 powerpc64le riscv64)
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=(Apache-2.0)
depends=(glibc)
makedepends=(git cmake)
provides=(libldacBT_{abr,enc}.so)
_commit=fbffba45d15d959da6ee04eafe14c0d4721f6030 # tags/v2.0.2.3
source=("git+$url#commit=$_commit"
"git+https://gitlab.com/eh5/libldac.git")
sha256sums=('SKIP'
'SKIP')
"git+https://gitlab.com/eh5/libldac.git"
big-endian.patch)
sha256sums=('d2a53c44c8c45c81276608e6dad66c781fa3f185c7c42d46088e8e4579f3526e'
'SKIP'
'3b5df24599b3ba893e7fbb5f38b573b9013fc7828cb8cdcc5dc7d6fb85b58ba2')
pkgver() {
cd ldacBT
@ -28,6 +30,8 @@ prepare() {
git submodule init
git submodule set-url libldac "$srcdir/libldac"
git -c protocol.file.allow=always submodule update
patch -Np1 -i ${srcdir}/big-endian.patch
}
build() {

47
libldac/big-endian.patch Normal file
View File

@ -0,0 +1,47 @@
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# T2 SDE: package/*/libldac/big-endian.patch
# Copyright (C) 2024 The T2 SDE Project
#
# This Copyright note is generated by scripts/Create-CopyPatch,
# more information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License version 2 as used by the T2 SDE.
# --- T2-COPYRIGHT-NOTE-END ---
--- ldacBT/libldac/src/ldacBT_internal.c.vanilla 2024-08-29 16:04:25.883334391 +0200
+++ ldacBT/libldac/src/ldacBT_internal.c 2024-08-29 16:06:06.053334677 +0200
@@ -248,7 +248,16 @@
p_pcm_8+=3;
}
#else /* __BYTE_ORDER */
-#error unsupported byte order
+ for (i = 0; i < nsmpl; i++) {
+ *p_lch_8++ = p_pcm_8[2];
+ *p_lch_8++ = p_pcm_8[1];
+ *p_lch_8++ = p_pcm_8[0];
+ p_pcm_8+=3;
+ *p_rch_8++ = p_pcm_8[2];
+ *p_rch_8++ = p_pcm_8[1];
+ *p_rch_8++ = p_pcm_8[0];
+ p_pcm_8+=3;
+ }
#endif /* #if __BYTE_ORDER == __LITTLE_ENDIAN */
}
else if ( fmt == LDACBT_SMPL_FMT_S32 ){
@@ -263,7 +272,12 @@
p_pcm_8+=4;
}
#else /* __BYTE_ORDER */
-#error unsupported byte order
+ for (i = 0; i < nsmpl; i++) {
+ *p_lch_8++ = p_pcm_8[3]; *p_lch_8++ = p_pcm_8[2]; *p_lch_8++ = p_pcm_8[1]; *p_lch_8++ = p_pcm_8[0];
+ p_pcm_8+=4;
+ *p_rch_8++ = p_pcm_8[3]; *p_rch_8++ = p_pcm_8[2]; *p_rch_8++ = p_pcm_8[1]; *p_rch_8++ = p_pcm_8[3];
+ p_pcm_8+=4;
+ }
#endif /* #if __BYTE_ORDER == __LITTLE_ENDIAN */
}
else if ( fmt == LDACBT_SMPL_FMT_F32 ){