Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/riscv:master commit in: dev-libs/libgpg-error/files/, dev-libs/libgpg-error/
Date: Sat, 20 Apr 2019 23:10:05
Message-Id: 1555779829.a2ce3add20e033f2c7d2d39186dffc3ac82709af.dilfridge@gentoo
1 commit: a2ce3add20e033f2c7d2d39186dffc3ac82709af
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 20 17:03:49 2019 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 20 17:03:49 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/riscv.git/commit/?id=a2ce3add
7
8 dev-libs/libgpg-error: Fix build with gawk5, bug 683254
9
10 Package-Manager: Portage-2.3.63, Repoman-2.3.12
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12
13 .../files/libgpg-error-1.36-gawk5-2.patch | 13 ++++
14 .../files/libgpg-error-1.36-gawk5.patch | 74 ++++++++++++++++++++++
15 dev-libs/libgpg-error/libgpg-error-1.36.ebuild | 5 ++
16 3 files changed, 92 insertions(+)
17
18 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
19 new file mode 100644
20 index 0000000..5684921
21 --- /dev/null
22 +++ b/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5-2.patch
23 @@ -0,0 +1,13 @@
24 +diff --git a/src/Makefile.in b/src/Makefile.in
25 +index 9ffb29d..83e6659 100644
26 +--- a/src/Makefile.in
27 ++++ b/src/Makefile.in
28 +@@ -1449,7 +1449,7 @@ code-from-errno.h: mkerrcodes Makefile
29 +
30 + errnos-sym.h: Makefile mkstrtable.awk errnos.in
31 + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
32 +- -v prefix=GPG_ERR_ -v namespace=errnos_ \
33 ++ -v prefix=GPG_ERR_ -v libgpg_error_namespace=errnos_ \
34 + $(srcdir)/errnos.in >$@
35 +
36 + mkheader: mkheader.c Makefile
37
38 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
39 new file mode 100644
40 index 0000000..2ea2b6e
41 --- /dev/null
42 +++ b/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5.patch
43 @@ -0,0 +1,74 @@
44 +From 55b9550de790126856666ad8cb78a75c5ae48220 Mon Sep 17 00:00:00 2001
45 +From: Lars Wendler <polynomial-c@g.o>
46 +Date: Sat, 13 Apr 2019 19:59:45 +0200
47 +Subject: [PATCH] Fixed build with gawk-5
48 +
49 +gawk-5 has the word "namespace" reserved which results in an error when
50 +building libgpg-error:
51 +
52 + gawk: fatal: cannot use gawk builtin `namespace' as variable name
53 +
54 +Fixed this by renaming "namespace" to "libgpg_error_namespace".
55 +
56 +Signed-off-by: Lars Wendler <polynomial-c@g.o>
57 +---
58 + src/Makefile.am | 2 +-
59 + src/mkstrtable.awk | 8 ++++----
60 + 2 files changed, 5 insertions(+), 5 deletions(-)
61 +
62 +diff --git a/src/Makefile.am b/src/Makefile.am
63 +index ce1b882..b329242 100644
64 +--- a/src/Makefile.am
65 ++++ b/src/Makefile.am
66 +@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
67 +
68 + errnos-sym.h: Makefile mkstrtable.awk errnos.in
69 + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
70 +- -v prefix=GPG_ERR_ -v namespace=errnos_ \
71 ++ -v prefix=GPG_ERR_ -v libgpg_error_namespace=errnos_ \
72 + $(srcdir)/errnos.in >$@
73 +
74 +
75 +diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
76 +index c9de9c1..5b5307b 100644
77 +--- a/src/mkstrtable.awk
78 ++++ b/src/mkstrtable.awk
79 +@@ -77,7 +77,7 @@
80 + #
81 + # The variable prefix can be used to prepend a string to each message.
82 + #
83 +-# The variable namespace can be used to prepend a string to each
84 ++# The variable libgpg_error_namespace can be used to prepend a string to each
85 + # variable and macro name.
86 +
87 + BEGIN {
88 +@@ -102,7 +102,7 @@ header {
89 + print "/* The purpose of this complex string table is to produce";
90 + print " optimal code with a minimum of relocations. */";
91 + print "";
92 +- print "static const char " namespace "msgstr[] = ";
93 ++ print "static const char " libgpg_error_namespace "msgstr[] = ";
94 + header = 0;
95 + }
96 + else
97 +@@ -150,7 +150,7 @@ END {
98 + else
99 + print " gettext_noop (\"" last_msgstr "\");";
100 + print "";
101 +- print "static const int " namespace "msgidx[] =";
102 ++ print "static const int " libgpg_error_namespace "msgidx[] =";
103 + print " {";
104 + for (i = 0; i < coded_msgs; i++)
105 + print " " pos[i] ",";
106 +@@ -158,7 +158,7 @@ END {
107 + print " };";
108 + print "";
109 + print "static GPG_ERR_INLINE int";
110 +- print namespace "msgidxof (int code)";
111 ++ print libgpg_error_namespace "msgidxof (int code)";
112 + print "{";
113 + print " return (0 ? 0";
114 +
115 +--
116 +2.21.0
117 +
118
119 diff --git a/dev-libs/libgpg-error/libgpg-error-1.36.ebuild b/dev-libs/libgpg-error/libgpg-error-1.36.ebuild
120 index f4f70fd..93ea2b5 100644
121 --- a/dev-libs/libgpg-error/libgpg-error-1.36.ebuild
122 +++ b/dev-libs/libgpg-error/libgpg-error-1.36.ebuild
123 @@ -26,6 +26,11 @@ MULTILIB_WRAPPED_HEADERS=(
124 /usr/include/gpgrt.h
125 )
126
127 +PATCHES=(
128 + "${FILESDIR}/${P}-gawk5.patch"
129 + "${FILESDIR}/${P}-gawk5-2.patch"
130 +)
131 +
132 src_prepare() {
133 default
134 elibtoolize