gegl: fix broken cpu detection

from upstream
This commit is contained in:
tnn 2019-11-13 09:28:24 +00:00
parent 025af435f5
commit 785eabc481
2 changed files with 37 additions and 1 deletions

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.25 2019/11/02 14:05:46 nia Exp $
$NetBSD: distinfo,v 1.26 2019/11/13 09:28:24 tnn Exp $
SHA1 (gegl-0.4.18.tar.xz) = fbb7415f8f9df63cd738f7ef51ef0f0ff65ecfbb
RMD160 (gegl-0.4.18.tar.xz) = c33c56c7b839b508f9f89a1bf4ae51ccd6758ca2
SHA512 (gegl-0.4.18.tar.xz) = e79874cd50e9f0c27c7dc9d9b952545c31d0a48e2b158aa54b92c3e933267877222f86ede7256f2528f18985dc85d6eadbcd809f7a3563efc4449ec7634f15fd
Size (gegl-0.4.18.tar.xz) = 4812756 bytes
SHA1 (patch-gegl_gegl-config.c) = a8e1f5f5394a33be2bcdcb05ec7654d06f7ad4bc
SHA1 (patch-meson.build) = 10c564848e9821be63ea6aa82f27339d4e2bc421

View file

@ -0,0 +1,35 @@
$NetBSD: patch-meson.build,v 1.1 2019/11/13 09:28:24 tnn Exp $
https://gitlab.gnome.org/GNOME/gegl/commit/6bcf95fd0f32cf5e8b1ddbe17b14d9ad049bded8
--- meson.build.orig 2019-10-26 23:01:07.000000000 +0000
+++ meson.build
@@ -73,23 +73,21 @@ if os_osx and cc.get_id() != 'clang'
endif
-host_cpu = host_machine.cpu()
-if host_cpu.startswith('i') and host_cpu.endswith('86')
+host_cpu_family = host_machine.cpu_family()
+if host_cpu_family == 'x86'
have_x86 = true
config.set10('ARCH_X86', true)
-elif host_cpu == 'x86_64'
+elif host_cpu_family == 'x86_64'
have_x86 = true
config.set10('ARCH_X86', true)
config.set10('ARCH_X86_64', true)
-elif host_cpu == 'ppc' or host_cpu == 'powerpc'
+elif host_cpu_family == 'ppc'
have_ppc = true
config.set10('ARCH_PPC', true)
-elif host_cpu == 'ppc64' or host_cpu == 'powerpc64'
+elif host_cpu_family == 'ppc64'
have_ppc = true
config.set10('ARCH_PPC', true)
config.set10('ARCH_PPC64', true)
-else
- error('Unknown host architecture')
endif
################################################################################