summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-08-31 07:22:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-03 09:55:50 +0100
commit6b3e91fe1a854c84d698e00f306f3ed8de56b1da (patch)
treed54b699ef1bc49c1b43217f3a082fad4767ba49c
parenta4b6d8b7eb9b93855b160c31c452a7b50dfbded0 (diff)
downloadpoky-6b3e91fe1a854c84d698e00f306f3ed8de56b1da.tar.gz
libgpg-error: Fix build with gawk 5.x
(From OE-Core rev: 11f4bf5ace2e6c0baf0eebbab128d4867139249d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch142
-rw-r--r--meta/recipes-support/libgpg-error/libgpg-error_1.36.bb1
2 files changed, 143 insertions, 0 deletions
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch
new file mode 100644
index 0000000000..2db11b2176
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.36-gawk5-support.patch
@@ -0,0 +1,142 @@
1From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
2From: NIIBE Yutaka <gniibe@fsij.org>
3Date: Mon, 15 Apr 2019 15:10:44 +0900
4Subject: [PATCH] awk: Prepare for Gawk 5.0.
5
6* src/Makefile.am: Use pkg_namespace (instead of namespace).
7* src/mkerrnos.awk: Likewise.
8* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
9* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
10
11--
12
13In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
14which only allows escaping specific characters.
15
16GnuPG-bug-id: 4459
17Reported-by: Marius Schamschula
18Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
19Upstream-Status: Backport [https://dev.gnupg.org/T4459]
20---
21 lang/cl/mkerrcodes.awk | 2 +-
22 src/Makefile.am | 2 +-
23 src/mkerrcodes.awk | 2 +-
24 src/mkerrcodes1.awk | 2 +-
25 src/mkerrcodes2.awk | 2 +-
26 src/mkerrnos.awk | 2 +-
27 src/mkstrtable.awk | 10 +++++-----
28 7 files changed, 11 insertions(+), 11 deletions(-)
29
30--- a/lang/cl/mkerrcodes.awk
31+++ b/lang/cl/mkerrcodes.awk
32@@ -122,7 +122,7 @@ header {
33 }
34
35 !header {
36- sub (/\#.+/, "");
37+ sub (/#.+/, "");
38 sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
39
40 if (/^$/)
41--- a/src/Makefile.am
42+++ b/src/Makefile.am
43@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FO
44
45 errnos-sym.h: Makefile mkstrtable.awk errnos.in
46 $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
47- -v prefix=GPG_ERR_ -v namespace=errnos_ \
48+ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
49 $(srcdir)/errnos.in >$@
50
51
52--- a/src/mkerrcodes.awk
53+++ b/src/mkerrcodes.awk
54@@ -85,7 +85,7 @@ header {
55 }
56
57 !header {
58- sub (/\#.+/, "");
59+ sub (/#.+/, "");
60 sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
61
62 if (/^$/)
63--- a/src/mkerrcodes1.awk
64+++ b/src/mkerrcodes1.awk
65@@ -81,7 +81,7 @@ header {
66 }
67
68 !header {
69- sub (/\#.+/, "");
70+ sub (/#.+/, "");
71 sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
72
73 if (/^$/)
74--- a/src/mkerrcodes2.awk
75+++ b/src/mkerrcodes2.awk
76@@ -91,7 +91,7 @@ header {
77 }
78
79 !header {
80- sub (/\#.+/, "");
81+ sub (/#.+/, "");
82 sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
83
84 if (/^$/)
85--- a/src/mkerrnos.awk
86+++ b/src/mkerrnos.awk
87@@ -83,7 +83,7 @@ header {
88 }
89
90 !header {
91- sub (/\#.+/, "");
92+ sub (/#.+/, "");
93 sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
94
95 if (/^$/)
96--- a/src/mkstrtable.awk
97+++ b/src/mkstrtable.awk
98@@ -77,7 +77,7 @@
99 #
100 # The variable prefix can be used to prepend a string to each message.
101 #
102-# The variable namespace can be used to prepend a string to each
103+# The variable pkg_namespace can be used to prepend a string to each
104 # variable and macro name.
105
106 BEGIN {
107@@ -102,7 +102,7 @@ header {
108 print "/* The purpose of this complex string table is to produce";
109 print " optimal code with a minimum of relocations. */";
110 print "";
111- print "static const char " namespace "msgstr[] = ";
112+ print "static const char " pkg_namespace "msgstr[] = ";
113 header = 0;
114 }
115 else
116@@ -110,7 +110,7 @@ header {
117 }
118
119 !header {
120- sub (/\#.+/, "");
121+ sub (/#.+/, "");
122 sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
123
124 if (/^$/)
125@@ -150,7 +150,7 @@ END {
126 else
127 print " gettext_noop (\"" last_msgstr "\");";
128 print "";
129- print "static const int " namespace "msgidx[] =";
130+ print "static const int " pkg_namespace "msgidx[] =";
131 print " {";
132 for (i = 0; i < coded_msgs; i++)
133 print " " pos[i] ",";
134@@ -158,7 +158,7 @@ END {
135 print " };";
136 print "";
137 print "static GPG_ERR_INLINE int";
138- print namespace "msgidxof (int code)";
139+ print pkg_namespace "msgidxof (int code)";
140 print "{";
141 print " return (0 ? 0";
142
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.36.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.36.bb
index 2db544a12e..b11ab0548d 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.36.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.36.bb
@@ -14,6 +14,7 @@ SECTION = "libs"
14UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" 14UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
15SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \ 15SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
16 file://pkgconfig.patch \ 16 file://pkgconfig.patch \
17 file://libgpg-error-1.36-gawk5-support.patch \
17 " 18 "
18 19
19SRC_URI[md5sum] = "eff437f397e858a9127b76c0d87fa5ed" 20SRC_URI[md5sum] = "eff437f397e858a9127b76c0d87fa5ed"