From 2b95eed1d534159d7d78e285ceb44721884d5b77 Mon Sep 17 00:00:00 2001 From: Alfred Persson Forsberg Date: Mon, 20 Jun 2022 20:36:12 +0000 Subject: media-libs/gavl: fix building with musl musl only defines CPU_SET and others iff _GNU_SOURCE is defined, this patch adds that. Closes: https://bugs.gentoo.org/715780 Signed-off-by: Alfred Persson Forsberg Signed-off-by: Sam James --- media-libs/gavl/files/1.4.0-gnu_source.patch | 22 +++++++++++++++++++++ media-libs/gavl/files/1.4.0-x32.diff | 29 ---------------------------- media-libs/gavl/files/1.4.0-x32.patch | 29 ++++++++++++++++++++++++++++ media-libs/gavl/gavl-1.4.0-r2.ebuild | 7 +++++-- 4 files changed, 56 insertions(+), 31 deletions(-) create mode 100644 media-libs/gavl/files/1.4.0-gnu_source.patch delete mode 100644 media-libs/gavl/files/1.4.0-x32.diff create mode 100644 media-libs/gavl/files/1.4.0-x32.patch (limited to 'media-libs/gavl') diff --git a/media-libs/gavl/files/1.4.0-gnu_source.patch b/media-libs/gavl/files/1.4.0-gnu_source.patch new file mode 100644 index 000000000000..bdd48d5352cd --- /dev/null +++ b/media-libs/gavl/files/1.4.0-gnu_source.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/715780 + +musl #ifdef:s most of the defines in sched.h with _GNU_SOURCE +https://elixir.bootlin.com/musl/latest/source/include/sched.h#L13. + +--- + +diff --git a/src/benchmark.c b/src/benchmark.c +index eb96b2a..18fc2d2 100644 +--- a/src/benchmark.c ++++ b/src/benchmark.c +@@ -40,6 +40,7 @@ + #endif + + #ifdef HAVE_SCHED_SETAFFINITY ++#define _GNU_SOURCE + #define __USE_GNU + #include + #endif +-- +2.35.1 + diff --git a/media-libs/gavl/files/1.4.0-x32.diff b/media-libs/gavl/files/1.4.0-x32.diff deleted file mode 100644 index 5c742779cdbb..000000000000 --- a/media-libs/gavl/files/1.4.0-x32.diff +++ /dev/null @@ -1,29 +0,0 @@ ------------------------------------------------------------------------- -r4209 | gmerlin | 2014-06-02 16:38:33 +0200 (Mon, 02 Jun 2014) | 2 lines - -* Compilation fix - - -Index: gavl/cputest.c -=================================================================== ---- a/gavl/cputest.c (revision 4208) -+++ b/gavl/cputest.c (revision 4209) -@@ -69,6 +69,8 @@ - int rval = 0; - int eax, ebx, ecx, edx; - int max_std_level, max_ext_level, std_caps=0, ext_caps=0; -+ -+#ifndef ARCH_X86_64 - long a, c; - - __asm__ __volatile__ ( -@@ -94,6 +96,7 @@ - - if (a == c) - return 0; /* CPUID not supported */ -+#endif // !ARCH_X86_64 - - cpuid(0, max_std_level, ebx, ecx, edx); - - ------------------------------------------------------------------------- diff --git a/media-libs/gavl/files/1.4.0-x32.patch b/media-libs/gavl/files/1.4.0-x32.patch new file mode 100644 index 000000000000..5c742779cdbb --- /dev/null +++ b/media-libs/gavl/files/1.4.0-x32.patch @@ -0,0 +1,29 @@ +------------------------------------------------------------------------ +r4209 | gmerlin | 2014-06-02 16:38:33 +0200 (Mon, 02 Jun 2014) | 2 lines + +* Compilation fix + + +Index: gavl/cputest.c +=================================================================== +--- a/gavl/cputest.c (revision 4208) ++++ b/gavl/cputest.c (revision 4209) +@@ -69,6 +69,8 @@ + int rval = 0; + int eax, ebx, ecx, edx; + int max_std_level, max_ext_level, std_caps=0, ext_caps=0; ++ ++#ifndef ARCH_X86_64 + long a, c; + + __asm__ __volatile__ ( +@@ -94,6 +96,7 @@ + + if (a == c) + return 0; /* CPUID not supported */ ++#endif // !ARCH_X86_64 + + cpuid(0, max_std_level, ebx, ecx, edx); + + +------------------------------------------------------------------------ diff --git a/media-libs/gavl/gavl-1.4.0-r2.ebuild b/media-libs/gavl/gavl-1.4.0-r2.ebuild index 660445f8eb00..7fdebe1f45bf 100644 --- a/media-libs/gavl/gavl-1.4.0-r2.ebuild +++ b/media-libs/gavl/gavl-1.4.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -16,7 +16,10 @@ IUSE="doc" BDEPEND="doc? ( app-doc/doxygen )" -PATCHES=( "${FILESDIR}/${PV}-x32.diff" ) +PATCHES=( + "${FILESDIR}/${PV}-x32.patch" + "${FILESDIR}/${PV}-gnu_source.patch" +) src_prepare() { default -- cgit v1.2.3-65-gdbad