1 |
commit: 8fca8acb895fa9fea2f3a6f0ce539b39af5f97ed |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 26 03:02:46 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 26 03:09:28 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fca8acb |
7 |
|
8 |
x11-libs/cairo: Use upstream patches |
9 |
|
10 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
11 |
|
12 |
.../cairo/files/cairo-1.16.0-binutils-2.34.patch | 54 +++++++++++++++++++++- |
13 |
x11-libs/cairo/files/cairo-1.16.0-strings.patch | 22 ++++++++- |
14 |
2 files changed, 74 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/x11-libs/cairo/files/cairo-1.16.0-binutils-2.34.patch b/x11-libs/cairo/files/cairo-1.16.0-binutils-2.34.patch |
17 |
index 03daac0eca4b..a10cad5ee553 100644 |
18 |
--- a/x11-libs/cairo/files/cairo-1.16.0-binutils-2.34.patch |
19 |
+++ b/x11-libs/cairo/files/cairo-1.16.0-binutils-2.34.patch |
20 |
@@ -1,6 +1,55 @@ |
21 |
+From e30259f6237571c61992433c110bc6e1ef900244 Mon Sep 17 00:00:00 2001 |
22 |
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@×××××××××××.com> |
23 |
+Date: Tue, 23 Feb 2021 11:36:24 +0000 |
24 |
+Subject: [PATCH] cairo-trace: fix build with newer versions of bfd |
25 |
+ |
26 |
+And update configure/meson checks to check for the new function. |
27 |
+ |
28 |
+Drop libiberty.h check since it's only needed by backtrace-symbols.c |
29 |
+which we're about to remove. |
30 |
+ |
31 |
+Closes #391, #460 |
32 |
+--- |
33 |
+ Makefile.am | 1 + |
34 |
+ configure.ac | 8 +++++++- |
35 |
+ meson-cc-tests/bfd-section-flags.c | 9 +++++++++ |
36 |
+ meson.build | 11 ++++++----- |
37 |
+ util/cairo-trace/lookup-symbol.c | 7 +++---- |
38 |
+ 5 files changed, 26 insertions(+), 10 deletions(-) |
39 |
+ create mode 100644 meson-cc-tests/bfd-section-flags.c |
40 |
+ |
41 |
+diff --git a/configure.ac b/configure.ac |
42 |
+index 18e4a305f..6444a3da3 100644 |
43 |
+--- a/configure.ac |
44 |
++++ b/configure.ac |
45 |
+@@ -826,7 +826,13 @@ CAIRO_ENABLE(interpreter, cairo-script-interpreter, yes, [ |
46 |
+ AC_CHECK_LIB(bfd, bfd_openr, |
47 |
+ [AC_CHECK_HEADER(bfd.h, [have_bfd=yes], |
48 |
+ [have_bfd=no])], [have_bfd=no]) |
49 |
+-AC_CHECK_HEADER(libiberty.h,, [have_bfd=no]) |
50 |
++dnl bfd_section_flags is an inline func so we don't bother with linking the lib in |
51 |
++AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
52 |
++ #include <bfd.h> |
53 |
++ asection *s; |
54 |
++],[ |
55 |
++ return bfd_section_flags(s) == 0; |
56 |
++])],[],[have_bfd=no]) |
57 |
+ if test "x$have_bfd" = "xyes"; then |
58 |
+ AC_DEFINE([HAVE_BFD], [1], [Define to 1 if you have the binutils development files installed]) |
59 |
+ BFD_LIBS=-lbfd |
60 |
+diff --git a/util/cairo-trace/lookup-symbol.c b/util/cairo-trace/lookup-symbol.c |
61 |
+index f9665b36f..9af0b5944 100644 |
62 |
--- a/util/cairo-trace/lookup-symbol.c |
63 |
+++ b/util/cairo-trace/lookup-symbol.c |
64 |
-@@ -145,14 +145,14 @@ find_address_in_section (bfd *abfd, |
65 |
+@@ -65,7 +65,6 @@ |
66 |
+ |
67 |
+ #if HAVE_BFD |
68 |
+ #include <bfd.h> |
69 |
+-#include <libiberty.h> |
70 |
+ |
71 |
+ struct symtab { |
72 |
+ bfd *bfd; |
73 |
+@@ -145,14 +144,14 @@ find_address_in_section (bfd *abfd, |
74 |
if (symbol->found) |
75 |
return; |
76 |
|
77 |
@@ -18,3 +67,6 @@ |
78 |
if (symbol->pc >= vma + size) |
79 |
return; |
80 |
|
81 |
+-- |
82 |
+2.34.1 |
83 |
+ |
84 |
|
85 |
diff --git a/x11-libs/cairo/files/cairo-1.16.0-strings.patch b/x11-libs/cairo/files/cairo-1.16.0-strings.patch |
86 |
index ee72f9dec7ce..2c4742887e36 100644 |
87 |
--- a/x11-libs/cairo/files/cairo-1.16.0-strings.patch |
88 |
+++ b/x11-libs/cairo/files/cairo-1.16.0-strings.patch |
89 |
@@ -1,4 +1,21 @@ |
90 |
-https://bugs.gentoo.org/726200 |
91 |
+From 23b6e8bb5798c77550da613fadc3da8b3be14573 Mon Sep 17 00:00:00 2001 |
92 |
+From: Sergei Trofimovich <slyfox@g.o> |
93 |
+Date: Sun, 14 Jun 2020 09:58:52 +0100 |
94 |
+Subject: [PATCH] build/aclocal.float.m4: detect 'strings' with AC_CHECK_TOOL |
95 |
+ |
96 |
+This way all binutils tools are detected with $CHOST prefix |
97 |
+if exist. And strings is allowed to be substituted with |
98 |
+STRINGS environment override, so 'llvm-strings' (or other) |
99 |
+alternative can be used. |
100 |
+ |
101 |
+Bug: https://bugs.gentoo.org/726200 |
102 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
103 |
+--- |
104 |
+ build/aclocal.float.m4 | 7 +++++-- |
105 |
+ 1 file changed, 5 insertions(+), 2 deletions(-) |
106 |
+ |
107 |
+diff --git a/build/aclocal.float.m4 b/build/aclocal.float.m4 |
108 |
+index f92db03e6..d9728c123 100644 |
109 |
--- a/build/aclocal.float.m4 |
110 |
+++ b/build/aclocal.float.m4 |
111 |
@@ -31,10 +31,13 @@ int main() { return 0; } |
112 |
@@ -17,3 +34,6 @@ https://bugs.gentoo.org/726200 |
113 |
if test "$ax_cv_c_float_words_bigendian" = unknown; then |
114 |
ax_cv_c_float_words_bigendian=no |
115 |
else |
116 |
+-- |
117 |
+2.34.1 |
118 |
+ |