aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorodidev <odidev@puresoftware.com>2020-04-15 12:22:48 +0000
committerRasmus Thomsen <oss@cogitri.dev>2020-05-19 12:37:07 +0000
commitf231d4b6fabf7c1b0302ab88d9ee0e1123dd036c (patch)
tree3e88b13273c386a41fab45bb3bb3e5fa02e1e902
parentfd93ecbc62d8727a9090e25b84483050228fc977 (diff)
community/mplayer: Enable aarch64 support for alpine OS
-rw-r--r--community/mplayer/APKBUILD15
-rw-r--r--community/mplayer/mplayer_alpine_aarch64.patch72
2 files changed, 84 insertions, 3 deletions
diff --git a/community/mplayer/APKBUILD b/community/mplayer/APKBUILD
index 8105846540d..8b5cdfccec0 100644
--- a/community/mplayer/APKBUILD
+++ b/community/mplayer/APKBUILD
@@ -4,7 +4,7 @@ pkgver=1.4.0
pkgrel=2
pkgdesc="A movie player for linux"
url="http://www.mplayerhq.hu/design7/news.html"
-arch="x86_64"
+arch="x86_64 aarch64"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc"
makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
@@ -14,12 +14,20 @@ makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
source="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-${pkgver%.*}.tar.xz
x11-libs.patch
+ mplayer_alpine_aarch64.patch
"
builddir="$srcdir"/MPlayer-${pkgver%.*}
build() {
+case "$CARCH" in
+ aarch64)
+ cpudetection="disable-runtime-cpudetection"
+ ;;
+ *)
+ cpudetection="enable-runtime-cpudetection"
+ esac
./configure \
--prefix=/usr \
- --enable-runtime-cpudetection \
+ --$cpudetection \
--disable-gui \
--disable-gif \
--disable-arts \
@@ -60,4 +68,5 @@ package() {
rm -rf "$pkgdir"/usr/share/mplayer/font
}
sha512sums="8ef71cad187d8c8f81c837279bd3a421b440c892d3347a667670b21c954007e35cf0d15828f0901f347b9c1b053e8da4bc7f0fb6de34382d1e463074923d7b34 MPlayer-1.4.tar.xz
-bba012c5a116cbc6715955a0a563c89a33a1d8ad3c44301a083ce65296ba9112a88a58e38c874d9347f9c3133054e62bd16d3b3367383f207ee40ddae105081c x11-libs.patch"
+bba012c5a116cbc6715955a0a563c89a33a1d8ad3c44301a083ce65296ba9112a88a58e38c874d9347f9c3133054e62bd16d3b3367383f207ee40ddae105081c x11-libs.patch
+7bcb79de0627903ae1016487f9623283d3b2b186c4f2e5686093558f8d9b5d884e3357a93f43862e14fc261e587c50cd38821896ae2bdaff3f32290194fa4b55 mplayer_alpine_aarch64.patch"
diff --git a/community/mplayer/mplayer_alpine_aarch64.patch b/community/mplayer/mplayer_alpine_aarch64.patch
new file mode 100644
index 00000000000..1bcb454f538
--- /dev/null
+++ b/community/mplayer/mplayer_alpine_aarch64.patch
@@ -0,0 +1,72 @@
+diff -ur a/configure b/configure
+--- a/configure 2018-12-15 15:38:24.000000000 +0000
++++ b/configure 2020-02-07 13:53:12.840595052 +0000
+@@ -577,6 +577,7 @@
+ --enable-altivec enable AltiVec (PowerPC) [autodetect]
+ --enable-armv5te enable DSP extensions (ARM) [autodetect]
+ --enable-armv6 enable ARMv6 (ARM) [autodetect]
++ --enable-armv8 enable ARMv8 (ARM) [autodetect]
+ --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect]
+ --enable-armvfp enable ARM VFP (ARM) [autodetect]
+ --enable-vfpv3 enable ARM VFPV3 (ARM) [autodetect]
+@@ -638,6 +639,7 @@
+ _fast_clz=auto
+ _armv5te=auto
+ _armv6=auto
++_armv8=auto
+ _armv6t2=auto
+ _armvfp=auto
+ vfpv3=auto
+@@ -1438,6 +1440,8 @@
+ --disable-armv5te) _armv5te=no ;;
+ --enable-armv6) _armv6=yes ;;
+ --disable-armv6) _armv6=no ;;
++ --enable-armv8) _armv8=yes ;;
++ --disable-armv8) _armv8=no ;;
+ --enable-armv6t2) _armv6t2=yes ;;
+ --disable-armv6t2) _armv6t2=no ;;
+ --enable-armvfp) _armvfp=yes ;;
+@@ -3278,7 +3282,7 @@
+ echores "$_iwmmxt"
+ fi
+
+-cpuexts_all='ALTIVEC XOP AVX AVX2 AVX512 FMA3 FMA4 MMX MMX2 MMXEXT AMD3DNOW AMD3DNOWEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 FAST_CMOV I686 FAST_CLZ ARMV5TE ARMV6 ARMV6T2 VFP VFPV3 SETEND NEON IWMMXT MMI VIS MVI'
++cpuexts_all='ALTIVEC XOP AVX AVX2 AVX512 FMA3 FMA4 MMX MMX2 MMXEXT AMD3DNOW AMD3DNOWEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 FAST_CMOV I686 FAST_CLZ ARMV5TE ARMV6 ARMV8 ARMV6T2 VFP VFPV3 SETEND NEON IWMMXT MMI VIS MVI'
+ test "$_altivec" = yes && cpuexts="ALTIVEC $cpuexts"
+ test "$_mmx" = yes && cpuexts="MMX $cpuexts"
+ test "$_mmxext" = yes && cpuexts="MMX2 $cpuexts"
+@@ -3302,6 +3306,7 @@
+ test "$_fast_clz" = yes && cpuexts="FAST_CLZ $cpuexts"
+ test "$_armv5te" = yes && cpuexts="ARMV5TE $cpuexts"
+ test "$_armv6" = yes && cpuexts="ARMV6 $cpuexts"
++test "$_armv8" = yes && cpuexts="ARMV8 $cpuexts"
+ test "$_armv6t2" = yes && cpuexts="ARMV6T2 $cpuexts"
+ test "$_armvfp" = yes && cpuexts="VFP $cpuexts"
+ test "$vfpv3" = yes && cpuexts="VFPV3 $cpuexts"
+diff -ur a/ffmpeg/libavcodec/aarch64/idctdsp_init_aarch64.c b/ffmpeg/libavcodec/aarch64/idctdsp_init_aarch64.c
+--- a/ffmpeg/libavcodec/aarch64/idctdsp_init_aarch64.c 2019-04-18 20:04:08.000000000 +0000
++++ b/ffmpeg/libavcodec/aarch64/idctdsp_init_aarch64.c 2020-02-11 12:27:13.842360029 +0000
+@@ -32,9 +32,11 @@
+ if (avctx->idct_algo == FF_IDCT_AUTO ||
+ avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||
+ avctx->idct_algo == FF_IDCT_SIMPLENEON) {
++#if HAVE_NEON
+ c->idct_put = ff_simple_idct_put_neon;
+ c->idct_add = ff_simple_idct_add_neon;
+ c->idct = ff_simple_idct_neon;
++#endif
+ c->perm_type = FF_IDCT_PERM_PARTTRANS;
+ }
+ }
+diff -ur a/ffmpeg/libavcodec/Makefile b/ffmpeg/libavcodec/Makefile
+--- a/ffmpeg/libavcodec/Makefile 2019-04-18 20:04:08.000000000 +0000
++++ b/ffmpeg/libavcodec/Makefile 2020-02-12 09:09:00.217639763 +0000
+@@ -94,7 +94,7 @@
+ OBJS-$(CONFIG_HUFFMAN) += huffman.o
+ OBJS-$(CONFIG_HUFFYUVDSP) += huffyuvdsp.o
+ OBJS-$(CONFIG_HUFFYUVENCDSP) += huffyuvencdsp.o
+-OBJS-$(CONFIG_IDCTDSP) += idctdsp.o simple_idct.o jrevdct.o
++OBJS-$(CONFIG_IDCTDSP) += aarch64/idctdsp_init_aarch64.o idctdsp.o simple_idct.o jrevdct.o
+ OBJS-$(CONFIG_IIRFILTER) += iirfilter.o
+ OBJS-$(CONFIG_MDCT15) += mdct15.o
+ OBJS-$(CONFIG_INTRAX8) += intrax8.o intrax8dsp.o msmpeg4data.o