commit: a2ce3add20e033f2c7d2d39186dffc3ac82709af Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> AuthorDate: Sat Apr 20 17:03:49 2019 +0000 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> CommitDate: Sat Apr 20 17:03:49 2019 +0000 URL: https://gitweb.gentoo.org/proj/riscv.git/commit/?id=a2ce3add
dev-libs/libgpg-error: Fix build with gawk5, bug 683254 Package-Manager: Portage-2.3.63, Repoman-2.3.12 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> .../files/libgpg-error-1.36-gawk5-2.patch | 13 ++++ .../files/libgpg-error-1.36-gawk5.patch | 74 ++++++++++++++++++++++ dev-libs/libgpg-error/libgpg-error-1.36.ebuild | 5 ++ 3 files changed, 92 insertions(+) diff --git a/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5-2.patch b/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5-2.patch new file mode 100644 index 0000000..5684921 --- /dev/null +++ b/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5-2.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +index 9ffb29d..83e6659 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -1449,7 +1449,7 @@ code-from-errno.h: mkerrcodes Makefile + + errnos-sym.h: Makefile mkstrtable.awk errnos.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ +- -v prefix=GPG_ERR_ -v namespace=errnos_ \ ++ -v prefix=GPG_ERR_ -v libgpg_error_namespace=errnos_ \ + $(srcdir)/errnos.in >$@ + + mkheader: mkheader.c Makefile diff --git a/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5.patch b/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5.patch new file mode 100644 index 0000000..2ea2b6e --- /dev/null +++ b/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5.patch @@ -0,0 +1,74 @@ +From 55b9550de790126856666ad8cb78a75c5ae48220 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <[email protected]> +Date: Sat, 13 Apr 2019 19:59:45 +0200 +Subject: [PATCH] Fixed build with gawk-5 + +gawk-5 has the word "namespace" reserved which results in an error when +building libgpg-error: + + gawk: fatal: cannot use gawk builtin `namespace' as variable name + +Fixed this by renaming "namespace" to "libgpg_error_namespace". + +Signed-off-by: Lars Wendler <[email protected]> +--- + src/Makefile.am | 2 +- + src/mkstrtable.awk | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index ce1b882..b329242 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile + + errnos-sym.h: Makefile mkstrtable.awk errnos.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ +- -v prefix=GPG_ERR_ -v namespace=errnos_ \ ++ -v prefix=GPG_ERR_ -v libgpg_error_namespace=errnos_ \ + $(srcdir)/errnos.in >$@ + + +diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk +index c9de9c1..5b5307b 100644 +--- a/src/mkstrtable.awk ++++ b/src/mkstrtable.awk +@@ -77,7 +77,7 @@ + # + # The variable prefix can be used to prepend a string to each message. + # +-# The variable namespace can be used to prepend a string to each ++# The variable libgpg_error_namespace can be used to prepend a string to each + # variable and macro name. + + BEGIN { +@@ -102,7 +102,7 @@ header { + print "/* The purpose of this complex string table is to produce"; + print " optimal code with a minimum of relocations. */"; + print ""; +- print "static const char " namespace "msgstr[] = "; ++ print "static const char " libgpg_error_namespace "msgstr[] = "; + header = 0; + } + else +@@ -150,7 +150,7 @@ END { + else + print " gettext_noop (\"" last_msgstr "\");"; + print ""; +- print "static const int " namespace "msgidx[] ="; ++ print "static const int " libgpg_error_namespace "msgidx[] ="; + print " {"; + for (i = 0; i < coded_msgs; i++) + print " " pos[i] ","; +@@ -158,7 +158,7 @@ END { + print " };"; + print ""; + print "static GPG_ERR_INLINE int"; +- print namespace "msgidxof (int code)"; ++ print libgpg_error_namespace "msgidxof (int code)"; + print "{"; + print " return (0 ? 0"; + +-- +2.21.0 + diff --git a/dev-libs/libgpg-error/libgpg-error-1.36.ebuild b/dev-libs/libgpg-error/libgpg-error-1.36.ebuild index f4f70fd..93ea2b5 100644 --- a/dev-libs/libgpg-error/libgpg-error-1.36.ebuild +++ b/dev-libs/libgpg-error/libgpg-error-1.36.ebuild @@ -26,6 +26,11 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/gpgrt.h ) +PATCHES=( + "${FILESDIR}/${P}-gawk5.patch" + "${FILESDIR}/${P}-gawk5-2.patch" +) + src_prepare() { default elibtoolize
