summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Alfredsen <crabbedhaloablution@icloud.com>2020-12-11 19:51:40 +0100
committerSam James <sam@gentoo.org>2021-01-21 22:28:22 +0000
commit842646ff88d3aad89dac6bc80a5aeb4a0cf9b64c (patch)
tree07b4efb2362cdc463b35308575d390778db31463
parentdev-tcltk/tkimg: version bump to 1.4.12 (diff)
downloadgentoo-842646ff88d3aad89dac6bc80a5aeb4a0cf9b64c.tar.gz
gentoo-842646ff88d3aad89dac6bc80a5aeb4a0cf9b64c.tar.bz2
gentoo-842646ff88d3aad89dac6bc80a5aeb4a0cf9b64c.zip
media-libs/sbc: Fix 1.5 build on non-x86 platforms.
Closes: https://bugs.gentoo.org/759277 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Peter Alfredsen <crabbedhaloablution@icloud.com> Closes: https://github.com/gentoo/gentoo/pull/18610 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--media-libs/sbc/files/sbc-1.5-ifdef-builtin.patch30
-rw-r--r--media-libs/sbc/sbc-1.5.ebuild2
2 files changed, 32 insertions, 0 deletions
diff --git a/media-libs/sbc/files/sbc-1.5-ifdef-builtin.patch b/media-libs/sbc/files/sbc-1.5-ifdef-builtin.patch
new file mode 100644
index 000000000000..cfa89958db10
--- /dev/null
+++ b/media-libs/sbc/files/sbc-1.5-ifdef-builtin.patch
@@ -0,0 +1,30 @@
+diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c
+index 97a75be..ac79ca5 100644
+--- a/sbc/sbc_primitives.c
++++ b/sbc/sbc_primitives.c
+@@ -591,6 +591,7 @@ static int sbc_calc_scalefactors_j(
+ return joint;
+ }
+
++#if defined(__i386__) || defined(__x86_64__)
+ static void sbc_init_primitives_x86(struct sbc_encoder_state *state)
+ {
+ __builtin_cpu_init();
+@@ -605,6 +606,7 @@ static void sbc_init_primitives_x86(struct sbc_encoder_state *state)
+ sbc_init_primitives_sse(state);
+ #endif
+ }
++#endif
+
+ /*
+ * Detect CPU features and setup function pointers
+@@ -630,7 +632,9 @@ void sbc_init_primitives(struct sbc_encoder_state *state)
+ state->implementation_info = "Generic C";
+
+ /* X86/AMD64 optimizations */
++#if defined(__i386__) || defined(__x86_64__)
+ sbc_init_primitives_x86(state);
++#endif
+
+ /* ARM optimizations */
+ #ifdef SBC_BUILD_WITH_ARMV6_SUPPORT
diff --git a/media-libs/sbc/sbc-1.5.ebuild b/media-libs/sbc/sbc-1.5.ebuild
index 65d68e49819c..91d43e28d957 100644
--- a/media-libs/sbc/sbc-1.5.ebuild
+++ b/media-libs/sbc/sbc-1.5.ebuild
@@ -20,6 +20,8 @@ RESTRICT="test"
RDEPEND=""
DEPEND="virtual/pkgconfig"
+PATCHES=( "${FILESDIR}/${P}-ifdef-builtin.patch" )
+
multilib_src_configure() {
ECONF_SOURCE=${S} \
econf \