external/libgpg-error/UnpackedTarball_libgpg-error.mk |    1 
 external/libgpg-error/libgpg-error_gawk5.patch        |  114 ++++++++++++++++++
 external/libgpg-error/w32-build-fixes.patch           |    2 
 3 files changed, 116 insertions(+), 1 deletion(-)

New commits:
commit af3b993ebea2f653fabba981d4c22b9aa779b32a
Author:     nd101 <f...@nd.com.cn>
AuthorDate: Wed Jul 3 09:41:06 2019 +0800
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Jul 4 05:06:15 2019 +0200

    Fix libgpg-error compilation error with gawk5
    
    This is an adaptation of upstream patch
    
https://github.com/gpg/libgpg-error/commit/7865041c77f4f7005282f10f9b6666b19072fbdf
    plus a fix to Makefile.in
    
    Change-Id: I5bf946cf93e5849b8a3428064ab86f6255be97da
    Reviewed-on: https://gerrit.libreoffice.org/75022
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk 
b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index 392bc26b640d..485dc7374445 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -16,6 +16,7 @@ $(eval $(call 
gb_UnpackedTarball_set_patchlevel,libgpg-error,0))
 # clang-cl.patch src/gpgrt-int.h part upstream at 
<https://dev.gnupg.org/T4356> "Declaration of
 #  _gpgrt_functions_w32_pollable in src/gpgrt-int.h should be extern"
 $(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
+       external/libgpg-error/libgpg-error_gawk5.patch \
        $(if $(filter MSC,$(COM)),external/libgpg-error/w32-build-fixes.patch) \
        $(if $(filter 
MSC,$(COM)),external/libgpg-error/w32-build-fixes-2.patch.1) \
        $(if $(filter 
MSC,$(COM)),external/libgpg-error/w32-build-fixes-3.patch.1) \
diff --git a/external/libgpg-error/libgpg-error_gawk5.patch 
b/external/libgpg-error/libgpg-error_gawk5.patch
new file mode 100644
index 000000000000..3be76a4538a8
--- /dev/null
+++ b/external/libgpg-error/libgpg-error_gawk5.patch
@@ -0,0 +1,114 @@
+--- src/Makefile.am
++++ src/Makefile.am~
+@@ -266,7 +266,7 @@
+ 
+ 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 pkg_namespace=errnos_ \
+               $(srcdir)/errnos.in >$@
+ 
+ 
+--- src/mkerrcodes.awk
++++ src/mkerrcodes.awk~
+@@ -81,7 +81,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkerrcodes1.awk
++++ src/mkerrcodes1.awk~
+@@ -81,7 +81,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkerrcodes2.awk
++++ src/mkerrcodes2.awk~
+@@ -91,7 +91,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkerrnos.awk
++++ src/mkerrnos.awk~
+@@ -83,7 +83,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+--- src/mkstrtable.awk
++++ 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 pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+ 
+ BEGIN {
+@@ -102,7 +102,7 @@
+       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 " pkg_namespace "msgstr[] = ";
+       header = 0;
+     }
+   else
+@@ -110,7 +110,7 @@
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[     ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+@@ -150,7 +150,7 @@
+   else
+     print "  gettext_noop (\"" last_msgstr "\");";
+   print "";
+-  print "static const int " namespace "msgidx[] =";
++  print "static const int " pkg_namespace "msgidx[] =";
+   print "  {";
+   for (i = 0; i < coded_msgs; i++)
+     print "    " pos[i] ",";
+@@ -158,7 +158,7 @@
+   print "  };";
+   print "";
+   print "static GPG_ERR_INLINE int";
+-  print namespace "msgidxof (int code)";
++  print pkg_namespace "msgidxof (int code)";
+   print "{";
+   print "  return (0 ? 0";
+ 
+--- src/Makefile.in
++++ src/Makefile.in~
+@@ -1321,7 +1321,7 @@
+ 
+ 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 pkg_namespace=errnos_ \
+               $(srcdir)/errnos.in >$@
+ 
+ mkheader: mkheader.c Makefile
+ 
diff --git a/external/libgpg-error/w32-build-fixes.patch 
b/external/libgpg-error/w32-build-fixes.patch
index e8a6b6145d46..96a62e32042c 100644
--- a/external/libgpg-error/w32-build-fixes.patch
+++ b/external/libgpg-error/w32-build-fixes.patch
@@ -136,7 +136,7 @@ diff -ru libgpg-error.orig/src/Makefile.in 
libgpg-error/src/Makefile.in
  
  errnos-sym.h: Makefile mkstrtable.awk errnos.in
 @@ -1325,7 +1325,7 @@
-               -v prefix=GPG_ERR_ -v namespace=errnos_ \
+               -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
                $(srcdir)/errnos.in >$@
  
 -mkheader: mkheader.c Makefile
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to