diff options
author | nros <nros@pkgsrc.org> | 2019-12-17 13:59:50 +0000 |
---|---|---|
committer | nros <nros@pkgsrc.org> | 2019-12-17 13:59:50 +0000 |
commit | 3f3b155785b445e1d920f22a5aa9c67a5ba2d5d9 (patch) | |
tree | 4a7dde167fe19a0e7f580e87f1e2607e4b9cb09f /audio/flac/patches | |
parent | 08758f3f6a6b1f8bf6448c6d4d9e80b93b9bc1e0 (diff) | |
download | pkgsrc-3f3b155785b445e1d920f22a5aa9c67a5ba2d5d9.tar.gz |
Fix build on non-linux ppc machines
Fix build on non-linux ppc machines, tested by julian sevard.
Diffstat (limited to 'audio/flac/patches')
-rw-r--r-- | audio/flac/patches/patch-configure.ac | 16 | ||||
-rw-r--r-- | audio/flac/patches/patch-src_libFLAC_cpu.c | 24 |
2 files changed, 40 insertions, 0 deletions
diff --git a/audio/flac/patches/patch-configure.ac b/audio/flac/patches/patch-configure.ac new file mode 100644 index 00000000000..c52fe7281a1 --- /dev/null +++ b/audio/flac/patches/patch-configure.ac @@ -0,0 +1,16 @@ +$NetBSD: patch-configure.ac,v 1.1 2019/12/17 13:59:50 nros Exp $ + +* check for getauxval and sys/auxv.h since it is not available on all systems + +--- configure.ac.orig 2019-12-16 17:00:33.348861095 +0000 ++++ configure.ac +@@ -103,7 +103,8 @@ AC_CHECK_TYPES(socklen_t, [], []) + + dnl check for getopt in standard library + dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) +-AC_CHECK_FUNCS(getopt_long, [], []) ++AC_CHECK_FUNCS([getopt_long getauxval], [], []) ++AC_CHECK_HEADERS([sys/auxv.h]) + + AC_CHECK_SIZEOF(void*,1) + diff --git a/audio/flac/patches/patch-src_libFLAC_cpu.c b/audio/flac/patches/patch-src_libFLAC_cpu.c new file mode 100644 index 00000000000..2b1c533c9fd --- /dev/null +++ b/audio/flac/patches/patch-src_libFLAC_cpu.c @@ -0,0 +1,24 @@ +$NetBSD: patch-src_libFLAC_cpu.c,v 1.1 2019/12/17 13:59:50 nros Exp $ + +* check for getauxval and sys/auxv.h since it is not available on all systems + +--- src/libFLAC/cpu.c.orig 2018-08-20 08:17:21.000000000 +0000 ++++ src/libFLAC/cpu.c +@@ -53,7 +53,7 @@ + #define dfprintf(file, format, ...) + #endif + +-#if defined FLAC__CPU_PPC ++#if (defined(FLAC__CPU_PPC) && defined(HAVE_SYS_AUXV_H)) + #include <sys/auxv.h> + #endif + +@@ -236,7 +236,7 @@ x86_cpu_info (FLAC__CPUInfo *info) + static void + ppc_cpu_info (FLAC__CPUInfo *info) + { +-#if defined FLAC__CPU_PPC ++#if (defined(FLAC__CPU_PPC) && defined(HAVE_GETAUXVAL)) + #ifndef PPC_FEATURE2_ARCH_3_00 + #define PPC_FEATURE2_ARCH_3_00 0x00800000 + #endif |