Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/gegl/files/, media-libs/gegl/
Date: Thu, 14 Nov 2019 15:59:32
Message-Id: 1573747159.3da3adbf0f1c3c950114c22ba22db5646f03709a.polynomial-c@gentoo
1 commit: 3da3adbf0f1c3c950114c22ba22db5646f03709a
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 14 15:48:43 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 14 15:59:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3da3adbf
7
8 media-libs/gegl: Use upstream CPU detection patch
9
10 Bug: https://bugs.gentoo.org/698744
11 Package-Manager: Portage-2.3.79, Repoman-2.3.18
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 media-libs/gegl/files/gegl-0.4.18-arch.patch | 11 -----
15 .../files/gegl-0.4.18-meson_cpu_detection.patch | 51 ++++++++++++++++++++++
16 media-libs/gegl/gegl-0.4.18.ebuild | 2 +-
17 3 files changed, 52 insertions(+), 12 deletions(-)
18
19 diff --git a/media-libs/gegl/files/gegl-0.4.18-arch.patch b/media-libs/gegl/files/gegl-0.4.18-arch.patch
20 deleted file mode 100644
21 index 57bfaf4a6c7..00000000000
22 --- a/media-libs/gegl/files/gegl-0.4.18-arch.patch
23 +++ /dev/null
24 @@ -1,11 +0,0 @@
25 ---- a/meson.build
26 -+++ b/meson.build
27 -@@ -88,8 +88,6 @@
28 - have_ppc = true
29 - config.set10('ARCH_PPC', true)
30 - config.set10('ARCH_PPC64', true)
31 --else
32 -- error('Unknown host architecture')
33 - endif
34 -
35 - ################################################################################
36
37 diff --git a/media-libs/gegl/files/gegl-0.4.18-meson_cpu_detection.patch b/media-libs/gegl/files/gegl-0.4.18-meson_cpu_detection.patch
38 new file mode 100644
39 index 00000000000..7f6b3624f36
40 --- /dev/null
41 +++ b/media-libs/gegl/files/gegl-0.4.18-meson_cpu_detection.patch
42 @@ -0,0 +1,51 @@
43 +From 6bcf95fd0f32cf5e8b1ddbe17b14d9ad049bded8 Mon Sep 17 00:00:00 2001
44 +From: Christoph Reiter <reiter.christoph@×××××.com>
45 +Date: Sun, 27 Oct 2019 14:10:08 +0100
46 +Subject: [PATCH] meson: fix cpu detection
47 +
48 +Use host_machine.cpu_family() instead of cpu(). Only the former
49 +provides a stable/defined set of values.
50 +
51 +Also don't error out on some arches for no good reason.
52 +
53 +This fixes the build on 32bit Windows.
54 +---
55 + meson.build | 12 +++++-------
56 + 1 file changed, 5 insertions(+), 7 deletions(-)
57 +
58 +diff --git a/meson.build b/meson.build
59 +index af133a0f1..540498921 100644
60 +--- a/meson.build
61 ++++ b/meson.build
62 +@@ -73,23 +73,21 @@ if os_osx and cc.get_id() != 'clang'
63 + endif
64 +
65 +
66 +-host_cpu = host_machine.cpu()
67 +-if host_cpu.startswith('i') and host_cpu.endswith('86')
68 ++host_cpu_family = host_machine.cpu_family()
69 ++if host_cpu_family == 'x86'
70 + have_x86 = true
71 + config.set10('ARCH_X86', true)
72 +-elif host_cpu == 'x86_64'
73 ++elif host_cpu_family == 'x86_64'
74 + have_x86 = true
75 + config.set10('ARCH_X86', true)
76 + config.set10('ARCH_X86_64', true)
77 +-elif host_cpu == 'ppc' or host_cpu == 'powerpc'
78 ++elif host_cpu_family == 'ppc'
79 + have_ppc = true
80 + config.set10('ARCH_PPC', true)
81 +-elif host_cpu == 'ppc64' or host_cpu == 'powerpc64'
82 ++elif host_cpu_family == 'ppc64'
83 + have_ppc = true
84 + config.set10('ARCH_PPC', true)
85 + config.set10('ARCH_PPC64', true)
86 +-else
87 +- error('Unknown host architecture')
88 + endif
89 +
90 + ################################################################################
91 +--
92 +2.22.0
93 +
94
95 diff --git a/media-libs/gegl/gegl-0.4.18.ebuild b/media-libs/gegl/gegl-0.4.18.ebuild
96 index 7de01528fc4..f23c5220119 100644
97 --- a/media-libs/gegl/gegl-0.4.18.ebuild
98 +++ b/media-libs/gegl/gegl-0.4.18.ebuild
99 @@ -80,7 +80,7 @@ DOCS=( AUTHORS docs/ChangeLog docs/NEWS.txt )
100 PATCHES=(
101 "${FILESDIR}"/${PN}-0.4.18-drop-failing-tests.patch
102 "${FILESDIR}"/${PN}-0.4.18-program-suffix.patch
103 - "${FILESDIR}"/${PN}-0.4.18-arch.patch
104 + "${FILESDIR}"/${P}-meson_cpu_detection.patch
105 )
106
107 pkg_setup() {