aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ttaenc
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-11-03 10:43:26 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-11-03 11:51:14 -0300
commit632e17fd31a4f56e1e988daa0c9256c0c1647dd1 (patch)
tree10abae033f3f78522ac91ec18ab517269c54279b /testing/ttaenc
parent7d22789fc3d90946ef9dea35220c21e58d5629e7 (diff)
downloadaports-632e17fd31a4f56e1e988daa0c9256c0c1647dd1.tar.bz2
aports-632e17fd31a4f56e1e988daa0c9256c0c1647dd1.tar.xz
testing/ttaenc: new aport
Diffstat (limited to 'testing/ttaenc')
-rw-r--r--testing/ttaenc/APKBUILD36
-rw-r--r--testing/ttaenc/fix-musl.patch17
2 files changed, 53 insertions, 0 deletions
diff --git a/testing/ttaenc/APKBUILD b/testing/ttaenc/APKBUILD
new file mode 100644
index 0000000000..a1f4abef1e
--- /dev/null
+++ b/testing/ttaenc/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+pkgname=ttaenc
+pkgver=3.4.1
+pkgrel=0
+pkgdesc="TrueAudio lossless compressor"
+url="https://sourceforge.net/projects/tta/"
+arch="all"
+license="GPL-2.0-only"
+options="!check" # no tests
+source="https://downloads.sourceforge.net/tta/tta/ttaenc-src/ttaenc-$pkgver-src.tgz
+ fix-musl.patch"
+builddir="$srcdir/ttaenc-$pkgver-src"
+
+prepare() {
+ default_prepare
+
+ # sse is only available on x86*
+ case "$CARCH" in
+ x86*) ;;
+ *) sed 's|-msse||' -i Makefile ;;
+ esac
+}
+
+build() {
+ make
+}
+
+package() {
+ # mediocre makefile
+ mkdir -p "$pkgdir"/usr/bin
+ mv ttaenc "$pkgdir"/usr/bin
+}
+
+sha512sums="489f9a2e0f94a82f12302f076e33062104e58688ffde97e742ad3c8c226bd0000133c539e9111e10f2d24c176e0b7ddd0a76e60bd3baafa53c29b3cd89ada06d ttaenc-3.4.1-src.tgz
+db49910a45cc4ac6559bb58554cb78daca722bbe273bf9fbf8f86479efe9f4cb8ecb1101e53a7bcdd07b7143a5aa90a62af7cef52654c8d77981148b42ef294c fix-musl.patch"
diff --git a/testing/ttaenc/fix-musl.patch b/testing/ttaenc/fix-musl.patch
new file mode 100644
index 0000000000..2be6bb486f
--- /dev/null
+++ b/testing/ttaenc/fix-musl.patch
@@ -0,0 +1,17 @@
+--- ttaenc-3.4.1-src/ttaenc.h.orig
++++ ttaenc-3.4.1-src/ttaenc.h
+@@ -101,8 +101,13 @@
+ typedef unsigned __int32 uint32;
+ typedef unsigned __int64 uint64;
+ #else
++#if __GLIBC__
+ typedef __uint32_t uint32;
+ typedef __uint64_t uint64;
++#else
++typedef uint32_t uint32;
++typedef uint64_t uint64;
++#endif
+ #endif
+
+ #define PREDICTOR1(x, k) ((int)((((uint64)x << k) - x) >> k))
+