aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2022-03-01 18:47:09 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2022-03-01 18:47:09 +0000
commit491f8bf3707cd3073822be5831bbd92b55edc265 (patch)
tree224b1965a78df6ac6e3fd9be66e5a9539da87004
parent73643406704f7bb612a7b178fa4426e2705aa17b (diff)
downloadports-491f8bf3707cd3073822be5831bbd92b55edc265.tar.gz
ports-491f8bf3707cd3073822be5831bbd92b55edc265.zip
audio/festalon: add support for powerpc, powerpc64
1. Clang needs -maltivec. 2. Include altivec.h to make AltiVec actually available.
-rw-r--r--audio/festalon/Makefile2
-rw-r--r--audio/festalon/files/patch-configure11
-rw-r--r--audio/festalon/files/patch-src_filter.c13
3 files changed, 25 insertions, 1 deletions
diff --git a/audio/festalon/Makefile b/audio/festalon/Makefile
index a7fe7297f28a..e762536ecf20 100644
--- a/audio/festalon/Makefile
+++ b/audio/festalon/Makefile
@@ -13,7 +13,7 @@ COMMENT= Command line player for .nsf and .hes audio files
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-ONLY_FOR_ARCHS= amd64
+ONLY_FOR_ARCHS= amd64 powerpc powerpc64
LIB_DEPENDS= libsamplerate.so:audio/libsamplerate
diff --git a/audio/festalon/files/patch-configure b/audio/festalon/files/patch-configure
new file mode 100644
index 000000000000..728e8fc70528
--- /dev/null
+++ b/audio/festalon/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig 2022-03-01 14:06:45 UTC
++++ configure
+@@ -20915,7 +20915,7 @@ else
+ fi
+
+ elif expr x"$target_cpu" : 'xpowerpc' > /dev/null; then
+- CFLAGS="-faltivec $CFLAGS"
++ CFLAGS="-maltivec $CFLAGS"
+ cat >>confdefs.h <<\_ACEOF
+ #define ARCH_POWERPC 1
+ _ACEOF
diff --git a/audio/festalon/files/patch-src_filter.c b/audio/festalon/files/patch-src_filter.c
new file mode 100644
index 000000000000..e4f7aa9d1ee7
--- /dev/null
+++ b/audio/festalon/files/patch-src_filter.c
@@ -0,0 +1,13 @@
+--- src/filter.c.orig 2022-03-01 18:15:52 UTC
++++ src/filter.c
+@@ -20,6 +20,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+
++#ifdef __powerpc__
++#include <altivec.h>
++#endif
++
+ #include <samplerate.h>
+
+ #include "types.h"