commit:     66be6eece6fb20cd720d5c0490eedfc947c918bc
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  4 09:02:14 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Feb  4 09:03:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66be6eec

x11-libs/cairo: tweak for binutils-2.34, bug #707960

Reported-by: Hugo Ribeiro
Closes: https://bugs.gentoo.org/707960
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 x11-libs/cairo/cairo-1.16.0-r3.ebuild                |  6 +++++-
 x11-libs/cairo/cairo-9999.ebuild                     |  6 +++++-
 .../cairo/files/cairo-1.16.0-binutils-2.34.patch     | 20 ++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/x11-libs/cairo/cairo-1.16.0-r3.ebuild 
b/x11-libs/cairo/cairo-1.16.0-r3.ebuild
index 275c687dcf5..2d3601c7a39 100644
--- a/x11-libs/cairo/cairo-1.16.0-r3.ebuild
+++ b/x11-libs/cairo/cairo-1.16.0-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -67,6 +67,10 @@ PATCHES=(
 src_prepare() {
        default
 
+       if has_version ">=sys-libs/binutils-libs-2.34"; then
+               eapply "${FILESDIR}"/${PN}-1.16.0-binutils-2.34.patch
+       fi
+
        # tests and perf tools require X, bug #483574
        if ! use X; then
                sed -e '/^SUBDIRS/ s#boilerplate test perf# #' -i Makefile.am 
|| die

diff --git a/x11-libs/cairo/cairo-9999.ebuild b/x11-libs/cairo/cairo-9999.ebuild
index d5022d1759a..29d74b12d97 100644
--- a/x11-libs/cairo/cairo-9999.ebuild
+++ b/x11-libs/cairo/cairo-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -65,6 +65,10 @@ PATCHES=(
 src_prepare() {
        default
 
+       if has_version ">=sys-libs/binutils-libs-2.34"; then
+               eapply "${FILESDIR}"/${PN}-1.16.0-binutils-2.34.patch
+       fi
+
        # tests and perf tools require X, bug #483574
        if ! use X; then
                sed -e '/^SUBDIRS/ s#boilerplate test perf# #' -i Makefile.am 
|| die

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
new file mode 100644
index 00000000000..03daac0eca4
--- /dev/null
+++ b/x11-libs/cairo/files/cairo-1.16.0-binutils-2.34.patch
@@ -0,0 +1,20 @@
+--- a/util/cairo-trace/lookup-symbol.c
++++ b/util/cairo-trace/lookup-symbol.c
+@@ -145,14 +145,14 @@ find_address_in_section (bfd *abfd,
+     if (symbol->found)
+       return;
+ 
+-    if ((bfd_get_section_flags (symtab->bfd, section) & SEC_ALLOC) == 0)
++    if ((bfd_section_flags (section) & SEC_ALLOC) == 0)
+       return;
+ 
+-    vma = bfd_get_section_vma (symtab->bfd, section);
++    vma = bfd_section_vma (section);
+     if (symbol->pc < vma)
+       return;
+ 
+-    size = bfd_section_size (symtab->bfd, section);
++    size = bfd_section_size (section);
+     if (symbol->pc >= vma + size)
+       return;
+ 

Reply via email to