summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Vinogradov2022-08-09 14:05:47 -0400
committerPavel Vinogradov2022-08-09 14:13:19 -0400
commit0a5d7ba512bf9aa0a986c2c4f4741419feb41e74 (patch)
treee4ed95b7770e0b7d57b1a56406161e213e71a9ef
parent2387a1115ae6ce2ceb45ab1f22d41f0a178fbf53 (diff)
x11-libs/cairo: follow-up for stable branch
-rw-r--r--x11-libs/cairo/HISTORY5
-rwxr-xr-xx11-libs/cairo/PRE_BUILD5
-rw-r--r--x11-libs/cairo/patches-stable/0001-Fix-build-with-newer-binutils.patch34
-rw-r--r--x11-libs/cairo/patches-stable/cairo-1.10.0-buggy_gradients.patch14
4 files changed, 53 insertions, 5 deletions
diff --git a/x11-libs/cairo/HISTORY b/x11-libs/cairo/HISTORY
index 4a0c6b268f..f947295877 100644
--- a/x11-libs/cairo/HISTORY
+++ b/x11-libs/cairo/HISTORY
@@ -1,6 +1,9 @@
2022-08-09 Pavel Vinogradov <public@sourcemage.org>
- * PRE_BUILD, 0001-Fix-build-against-binutils-2.39.patch: fix build
+ * PRE_BUILD, patches/0001-Fix-build-against-binutils-2.39.patch,
+ patches-stable/0001-Fix-build-with-newer-binutils.patch: fix build
against binutils 2.39
+ * cairo-1.10.0-buggy_gradients.patch ->
+ patches-stable/cairo-1.10.0-buggy_gradients.patch
2022-08-06 Pavel Vinogradov <public@sourcemage.org>
* CONFIGURE, DEPENDS, DETAILS, PRE_BUILD, PRE_SUB_DEPENDS,
diff --git a/x11-libs/cairo/PRE_BUILD b/x11-libs/cairo/PRE_BUILD
index f7d147eebf..02e1d7d5e9 100755
--- a/x11-libs/cairo/PRE_BUILD
+++ b/x11-libs/cairo/PRE_BUILD
@@ -3,7 +3,4 @@ cd ${SOURCE_DIRECTORY} &&
apply_patch_dir patches &&
-if [[ "$CAIRO_BRANCH" != "scm" ]]; then
- # http://bugs.gentoo.org/show_bug.cgi?id=336696
- patch -p1 -d "$SOURCE_DIRECTORY" < "$SPELL_DIRECTORY/cairo-1.10.0-buggy_gradients.patch"
-fi
+if [[ "$CAIRO_BRANCH" != "scm" ]]; then apply_patch_dir patches-stable; fi
diff --git a/x11-libs/cairo/patches-stable/0001-Fix-build-with-newer-binutils.patch b/x11-libs/cairo/patches-stable/0001-Fix-build-with-newer-binutils.patch
new file mode 100644
index 0000000000..27d0e0d20d
--- /dev/null
+++ b/x11-libs/cairo/patches-stable/0001-Fix-build-with-newer-binutils.patch
@@ -0,0 +1,34 @@
+From 24996e6ee241ebcd303dd34a2b06b37a6dd0c217 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Wed, 13 Jul 2022 21:26:57 +0100
+Subject: [PATCH] Fix build with newer binutils-dev installed
+
+It seems the PTR typedef (or macro?) has been removed from newer versions
+of libbfd.
+
+Resolves: https://gitlab.freedesktop.org/cairo/cairo/-/issues/581
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ util/cairo-trace/lookup-symbol.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/util/cairo-trace/lookup-symbol.c b/util/cairo-trace/lookup-symbol.c
+index 3934066b9..ca15688c4 100644
+--- a/util/cairo-trace/lookup-symbol.c
++++ b/util/cairo-trace/lookup-symbol.c
+@@ -106,10 +106,10 @@ _symtab_init (struct symtab *symtab, const char *filename)
+ if (! bfd_check_format_matches (symtab->bfd, bfd_object, &matching))
+ goto BAIL;
+
+- symcount = bfd_read_minisymbols (symtab->bfd, false, (PTR) &symtab->syms, &size);
++ symcount = bfd_read_minisymbols (symtab->bfd, false, (void **) &symtab->syms, &size);
+ if (symcount == 0) {
+ symcount = bfd_read_minisymbols (symtab->bfd, true /* dynamic */ ,
+- (PTR) &symtab->syms, &size);
++ (void **) &symtab->syms, &size);
+ }
+ if (symcount < 0)
+ goto BAIL;
+--
+GitLab
+
diff --git a/x11-libs/cairo/patches-stable/cairo-1.10.0-buggy_gradients.patch b/x11-libs/cairo/patches-stable/cairo-1.10.0-buggy_gradients.patch
new file mode 100644
index 0000000000..a3a4a96120
--- /dev/null
+++ b/x11-libs/cairo/patches-stable/cairo-1.10.0-buggy_gradients.patch
@@ -0,0 +1,14 @@
+--- a/src/cairo-xlib-display.c.ubuntu 2010-08-04 11:57:49.000000000 +0200
++++ b/src/cairo-xlib-display.c 2010-08-04 11:58:28.000000000 +0200
+@@ -353,11 +353,7 @@
+ /* Prior to Render 0.10, there is no protocol support for gradients and
+ * we call function stubs instead, which would silently consume the drawing.
+ */
+-#if RENDER_MAJOR == 0 && RENDER_MINOR < 10
+ display->buggy_gradients = TRUE;
+-#else
+- display->buggy_gradients = FALSE;
+-#endif
+ display->buggy_pad_reflect = FALSE;
+ display->buggy_repeat = FALSE;
+