commit:     e9188ba72be3130b5a15fde1996e07c3bac4d7f7
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  5 09:22:39 2020 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Aug  5 09:22:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9188ba7

dev-ada/gnatmem: build with newer binutils-libs

Closes: https://bugs.gentoo.org/735676
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ada/gnatmem/files/gnatmem-2019-bfd.patch | 29 ++++++++++++++++++++++++++++
 dev-ada/gnatmem/gnatmem-2019-r1.ebuild       | 13 +++++++++----
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/dev-ada/gnatmem/files/gnatmem-2019-bfd.patch 
b/dev-ada/gnatmem/files/gnatmem-2019-bfd.patch
new file mode 100644
index 00000000000..007d217cf24
--- /dev/null
+++ b/dev-ada/gnatmem/files/gnatmem-2019-bfd.patch
@@ -0,0 +1,29 @@
+--- a/src/libaddr2line.c       2020-08-04 22:41:04.670046491 +0200
++++ b/src/libaddr2line.c       2020-08-04 22:44:55.560802332 +0200
+@@ -55,14 +55,26 @@
+   if (found)
+     return;
+ 
++#if defined(bfd_get_section_flags)
+   if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0)
++#else
++  if ((bfd_section_flags (section) & SEC_ALLOC) == 0)
++#endif
+     return;
+ 
++#if defined(bfd_get_section_vma)
+   vma = bfd_get_section_vma (abfd, section);
++#else
++  vma = bfd_section_vma (section);
++#endif
+   if (pc < vma)
+     return;
+ 
++#if defined(bfd_get_section_size)
+   size = bfd_get_section_size (section);
++#else
++  size = bfd_section_size (section);
++#endif
+   if (pc >= vma + size)
+     return;
+ 

diff --git a/dev-ada/gnatmem/gnatmem-2019-r1.ebuild 
b/dev-ada/gnatmem/gnatmem-2019-r1.ebuild
index 44e18966d1e..67e5964f46a 100644
--- a/dev-ada/gnatmem/gnatmem-2019-r1.ebuild
+++ b/dev-ada/gnatmem/gnatmem-2019-r1.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
@@ -21,13 +21,16 @@ IUSE=""
 RDEPEND="${ADA_DEPS}"
 DEPEND="${RDEPEND}
        dev-ada/gprbuild[${ADA_USEDEP}]
-       sys-libs/binutils-libs"
+       sys-libs/binutils-libs:="
 
 REQUIRED_USE="${ADA_REQUIRED_USE}"
 
 S="${WORKDIR}"/${MYP}
 
-PATCHES=( "${FILESDIR}"/${PN}-2018-gentoo.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-2018-gentoo.patch
+       "${FILESDIR}"/${P}-bfd.patch
+)
 
 src_prepare() {
        default
@@ -37,7 +40,9 @@ src_prepare() {
 
 src_compile() {
        gprbuild -v -Pgnatmem.gpr -j$(makeopts_jobs) \
-               -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS}
+               -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} \
+               -largs ${LDFLAGS} \
+               || die
 }
 
 src_install() {

Reply via email to