diff options
Diffstat (limited to 'external/poky/meta/recipes-support/libgpg-error/libgpg-error')
5 files changed, 125 insertions, 574 deletions
diff --git a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0001-Do-not-fail-when-testing-config-scripts.patch b/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0001-Do-not-fail-when-testing-config-scripts.patch new file mode 100644 index 00000000..a0ab4f23 --- /dev/null +++ b/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0001-Do-not-fail-when-testing-config-scripts.patch @@ -0,0 +1,27 @@ +From 137805890951b6b585c1d23097e0a51e8c7a8a50 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 28 Feb 2020 09:19:56 +0000 +Subject: [PATCH] Do not fail when testing config scripts + +In previous versions this was not a hard a failure, and so went +unnoticed. The test is unsuitable for building with sysroots anyway as the +failure is due to that. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 9303954..7630540 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -344,7 +344,6 @@ gpg-error-config: gpgrt-config gpg-error-config-old + else \ + echo "no"; \ + echo "*** Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log"; \ +- exit 1; \ + fi + cp gpg-error-config-old $@ + diff --git a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0001-syscfg-Support-ARC-CPUs-and-simplify-aliasing-table.patch b/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0001-syscfg-Support-ARC-CPUs-and-simplify-aliasing-table.patch deleted file mode 100644 index 03b0ce77..00000000 --- a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0001-syscfg-Support-ARC-CPUs-and-simplify-aliasing-table.patch +++ /dev/null @@ -1,298 +0,0 @@ -From d4fd6975671477721936060771aa4d7d07fb0910 Mon Sep 17 00:00:00 2001 -From: Werner Koch <wk@gnupg.org> -Date: Tue, 18 Sep 2018 14:54:08 +0200 -Subject: [PATCH libgpg-error] syscfg: Support ARC CPUs and simplify aliasing - table. - -* src/mkheader.c (xmalloc): New. -(xstrdup): Implement using xmalloc. -(canon_host_triplet): Add supporr for arc CPU. Adjust alias table to -also alias *-pc-*. Rename ibm to unknown. Add internal arg. Add -unknown vendor hack. -(main): New mode to just print the canonicalized form. -* src/Makefile.am (lock_obj_pub): s/-(pc|ibm)-/-unknown/. Also rename -files accordingly. --- - -config.sub does no real aliasing and thus we would need to add several -vendors to the alising tables despite that this has no technical -meanding. Instead we now replace the vendor with "unknown" for the -4-part-"triplets". This change will make maintenace easier. - -Signed-off-by: Werner Koch <wk@gnupg.org> - -Upstream-Status: Backport [ http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commit;h=48c8f8ddfc80 ] ---- - src/Makefile.am | 16 ++-- - src/mkheader.c | 92 ++++++++++++++++--- - ...-gnu.h => lock-obj-pub.i686-unknown-gnu.h} | 0 - ... lock-obj-pub.i686-unknown-kfreebsd-gnu.h} | 0 - ... => lock-obj-pub.i686-unknown-linux-gnu.h} | 0 - ...=> lock-obj-pub.s390x-unknown-linux-gnu.h} | 0 - ...ock-obj-pub.x86_64-unknown-kfreebsd-gnu.h} | 0 - ...> lock-obj-pub.x86_64-unknown-linux-gnu.h} | 0 - ...ock-obj-pub.x86_64-unknown-linux-gnux32.h} | 0 - ... lock-obj-pub.x86_64-unknown-linux-musl.h} | 0 - 10 files changed, 85 insertions(+), 23 deletions(-) - rename src/syscfg/{lock-obj-pub.i686-pc-gnu.h => lock-obj-pub.i686-unknown-gnu.h} (100%) - rename src/syscfg/{lock-obj-pub.i686-pc-kfreebsd-gnu.h => lock-obj-pub.i686-unknown-kfreebsd-gnu.h} (100%) - rename src/syscfg/{lock-obj-pub.i686-pc-linux-gnu.h => lock-obj-pub.i686-unknown-linux-gnu.h} (100%) - rename src/syscfg/{lock-obj-pub.s390x-ibm-linux-gnu.h => lock-obj-pub.s390x-unknown-linux-gnu.h} (100%) - rename src/syscfg/{lock-obj-pub.x86_64-pc-kfreebsd-gnu.h => lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h} (100%) - rename src/syscfg/{lock-obj-pub.x86_64-pc-linux-gnu.h => lock-obj-pub.x86_64-unknown-linux-gnu.h} (100%) - rename src/syscfg/{lock-obj-pub.x86_64-pc-linux-gnux32.h => lock-obj-pub.x86_64-unknown-linux-gnux32.h} (100%) - rename src/syscfg/{lock-obj-pub.x86_64-pc-linux-musl.h => lock-obj-pub.x86_64-unknown-linux-musl.h} (100%) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 42998e46a3bc..8ec582ef99fb 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -52,9 +52,9 @@ lock_obj_pub = \ - syscfg/lock-obj-pub.arm-apple-darwin.h \ - syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.i386-apple-darwin.h \ -- syscfg/lock-obj-pub.i686-pc-gnu.h \ -- syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h \ -- syscfg/lock-obj-pub.i686-pc-linux-gnu.h \ -+ syscfg/lock-obj-pub.i686-unknown-gnu.h \ -+ syscfg/lock-obj-pub.i686-unknown-kfreebsd-gnu.h \ -+ syscfg/lock-obj-pub.i686-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.m68k-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.mips-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h \ -@@ -66,16 +66,16 @@ lock_obj_pub = \ - syscfg/lock-obj-pub.powerpc64le-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.powerpc-unknown-linux-gnuspe.h \ - syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h \ -- syscfg/lock-obj-pub.s390x-ibm-linux-gnu.h \ -+ syscfg/lock-obj-pub.s390x-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.sh3-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.sh4-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.sparc-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.sparc64-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.x86_64-apple-darwin.h \ -- syscfg/lock-obj-pub.x86_64-pc-kfreebsd-gnu.h \ -- syscfg/lock-obj-pub.x86_64-pc-linux-gnu.h \ -- syscfg/lock-obj-pub.x86_64-pc-linux-gnux32.h \ -- syscfg/lock-obj-pub.x86_64-pc-linux-musl.h \ -+ syscfg/lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h \ -+ syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h \ -+ syscfg/lock-obj-pub.x86_64-unknown-linux-gnux32.h \ -+ syscfg/lock-obj-pub.x86_64-unknown-linux-musl.h \ - syscfg/lock-obj-pub.tilegx-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.ia64-unknown-linux-gnu.h \ - syscfg/lock-obj-pub.mingw32.h -diff --git a/src/mkheader.c b/src/mkheader.c -index 2fc5fada66a4..7a38a1bec1a4 100644 ---- a/src/mkheader.c -+++ b/src/mkheader.c -@@ -51,17 +51,27 @@ xfree (void *a) - - - static char * --xstrdup (const char *string) -+xmalloc (size_t n) - { - char *p; -- size_t len = strlen (string) + 1; - -- p = malloc (len); -+ p = malloc (n); - if (!p) - { - fputs (PGM ": out of core\n", stderr); - exit (1); - } -+ return p; -+} -+ -+ -+static char * -+xstrdup (const char *string) -+{ -+ char *p; -+ size_t len = strlen (string) + 1; -+ -+ p = xmalloc (len); - memcpy (p, string, len); - return p; - } -@@ -69,23 +79,31 @@ xstrdup (const char *string) - - /* Return a malloced string with TRIPLET. If TRIPLET has an alias - return that instead. In general build-aux/config.sub should do the -- aliasing but some returned triplets are anyway identical and thus we -- use this function to map it to the canonical form. */ -+ aliasing but some returned triplets are anyway identical and thus -+ we use this function to map it to the canonical form. -+ NO_VENDOR_HACK is for internal use; caller must call with 0. */ - static char * --canon_host_triplet (const char *triplet) -+canon_host_triplet (const char *triplet, int no_vendor_hack) - { - struct { - const char *name; - const char *alias; - } tbl[] = { -- {"i486-pc-linux-gnu", "i686-pc-linux-gnu" }, -+ {"i486-pc-linux-gnu", "i686-unknown-linux-gnu" }, - {"i586-pc-linux-gnu" }, -- {"i486-pc-gnu", "i686-pc-gnu"}, -+ {"i686-pc-linux-gnu" }, -+ {"arc-oe-linux-uclibc" }, /* Other CPU but same struct. */ -+ -+ {"i486-pc-gnu", "i686-unknown-gnu"}, - {"i586-pc-gnu"}, -- {"i486-pc-kfreebsd-gnu", "i686-pc-kfreebsd-gnu"}, -+ {"i686-pc-gnu"}, -+ -+ {"i486-pc-kfreebsd-gnu", "i686-unknown-kfreebsd-gnu"}, - {"i586-pc-kfreebsd-gnu"}, -+ {"i686-pc-kfreebsd-gnu"}, - -- {"x86_64-pc-linux-gnuhardened1", "x86_64-pc-linux-gnu" }, -+ {"x86_64-pc-linux-gnuhardened1", "x86_64-unknown-linux-gnu" }, -+ {"x86_64-pc-linux-gnu" }, - - {"powerpc-unknown-linux-gnuspe", "powerpc-unknown-linux-gnu" }, - -@@ -98,6 +116,7 @@ canon_host_triplet (const char *triplet) - }; - int i; - const char *lastalias = NULL; -+ const char *s; - - for (i=0; tbl[i].name; i++) - { -@@ -110,6 +129,36 @@ canon_host_triplet (const char *triplet) - return xstrdup (lastalias); - } - } -+ for (i=0, s=triplet; *s; s++) -+ if (*s == '-') -+ i++; -+ if (i > 2 && !no_vendor_hack) -+ { -+ /* We have a 4 part "triplet": CPU-VENDOR-KERNEL-SYSTEM where -+ * the last two parts replace the OS part of a real triplet. -+ * The VENDOR part is then in general useless because -+ * KERNEL-SYSTEM is specific enough. We now do a second pass by -+ * replacing VENDOR with "unknown". */ -+ char *p; -+ char *buf = xmalloc (strlen (triplet) + 7 + 1); -+ -+ for (p=buf,s=triplet,i=0; *s; s++) -+ { -+ *p++ = *s; -+ if (*s == '-' && ++i == 1) -+ { -+ memcpy (p, "unknown-",8); -+ p += 8; -+ for (s++; *s != '-'; s++) -+ ; -+ } -+ } -+ *p = 0; -+ p = canon_host_triplet (buf, 1); -+ xfree (buf); -+ return p; -+ } -+ - return xstrdup (triplet); - } - -@@ -558,7 +607,7 @@ write_special (const char *fname, int lnr, const char *tag) - int - main (int argc, char **argv) - { -- FILE *fp; -+ FILE *fp = NULL; - char line[LINESIZE]; - int lnr = 0; - const char *fname, *s; -@@ -571,11 +620,22 @@ main (int argc, char **argv) - argc--; argv++; - } - -- if (argc != 6) -+ if (argc == 1) -+ { -+ /* Print just the canonicalized host triplet. */ -+ host_triplet = canon_host_triplet (argv[0], 0); -+ printf ("%s\n", host_triplet); -+ goto leave; -+ } -+ else if (argc == 6) -+ ; /* Standard operation. */ -+ else - { - fputs ("usage: " PGM - " host_os host_triplet template.h config.h" -- " version version_number\n", -+ " version version_number\n" -+ " " PGM -+ " host_triplet\n", - stderr); - return 1; - } -@@ -586,7 +646,7 @@ main (int argc, char **argv) - hdr_version = argv[4]; - hdr_version_number = argv[5]; - -- host_triplet = canon_host_triplet (host_triplet_raw); -+ host_triplet = canon_host_triplet (host_triplet_raw, 0); - - srcdir = malloc (strlen (fname) + 2 + 1); - if (!srcdir) -@@ -677,13 +737,15 @@ main (int argc, char **argv) - "End:\n" - "*/\n", stdout); - -+ leave: - if (ferror (stdout)) - { - fprintf (stderr, PGM ": error writing to stdout: %s\n", strerror (errno)); - return 1; - } - -- fclose (fp); -+ if (fp) -+ fclose (fp); - - xfree (host_triplet); - return 0; -diff --git a/src/syscfg/lock-obj-pub.i686-pc-gnu.h b/src/syscfg/lock-obj-pub.i686-unknown-gnu.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.i686-pc-gnu.h -rename to src/syscfg/lock-obj-pub.i686-unknown-gnu.h -diff --git a/src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h b/src/syscfg/lock-obj-pub.i686-unknown-kfreebsd-gnu.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h -rename to src/syscfg/lock-obj-pub.i686-unknown-kfreebsd-gnu.h -diff --git a/src/syscfg/lock-obj-pub.i686-pc-linux-gnu.h b/src/syscfg/lock-obj-pub.i686-unknown-linux-gnu.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.i686-pc-linux-gnu.h -rename to src/syscfg/lock-obj-pub.i686-unknown-linux-gnu.h -diff --git a/src/syscfg/lock-obj-pub.s390x-ibm-linux-gnu.h b/src/syscfg/lock-obj-pub.s390x-unknown-linux-gnu.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.s390x-ibm-linux-gnu.h -rename to src/syscfg/lock-obj-pub.s390x-unknown-linux-gnu.h -diff --git a/src/syscfg/lock-obj-pub.x86_64-pc-kfreebsd-gnu.h b/src/syscfg/lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.x86_64-pc-kfreebsd-gnu.h -rename to src/syscfg/lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h -diff --git a/src/syscfg/lock-obj-pub.x86_64-pc-linux-gnu.h b/src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.x86_64-pc-linux-gnu.h -rename to src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h -diff --git a/src/syscfg/lock-obj-pub.x86_64-pc-linux-gnux32.h b/src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnux32.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.x86_64-pc-linux-gnux32.h -rename to src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnux32.h -diff --git a/src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h b/src/syscfg/lock-obj-pub.x86_64-unknown-linux-musl.h -similarity index 100% -rename from src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h -rename to src/syscfg/lock-obj-pub.x86_64-unknown-linux-musl.h --- -2.17.1 - diff --git a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0002-syscfg-Add-support-for-arc-unknown-linux-gnu.patch b/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0002-syscfg-Add-support-for-arc-unknown-linux-gnu.patch deleted file mode 100644 index 197652f2..00000000 --- a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/0002-syscfg-Add-support-for-arc-unknown-linux-gnu.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ae6a3f20345dac4b9daab8c39ac2d3fb3f2c21e3 Mon Sep 17 00:00:00 2001 -From: Werner Koch <wk@gnupg.org> -Date: Fri, 21 Sep 2018 14:37:21 +0200 -Subject: [PATCH Libgpg-error] syscfg: Add support for arc-unknown-linux-gnu - -* src/mkheader.c (canon_host_triplet): Add to table. --- - -Note that unknown in the above triplet is actually a wildcard for 4 -part triplets. - -Signed-off-by: Werner Koch <wk@gnupg.org> - -Upstream-Status: Backport [http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commit;h=f4f0da74f526d7e35cedbc2e93454df6440dbfa5] ---- - src/mkheader.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/mkheader.c b/src/mkheader.c -index 7a38a1bec1a4..a4866e96ef43 100644 ---- a/src/mkheader.c -+++ b/src/mkheader.c -@@ -92,7 +92,8 @@ canon_host_triplet (const char *triplet, int no_vendor_hack) - {"i486-pc-linux-gnu", "i686-unknown-linux-gnu" }, - {"i586-pc-linux-gnu" }, - {"i686-pc-linux-gnu" }, -- {"arc-oe-linux-uclibc" }, /* Other CPU but same struct. */ -+ {"arc-oe-linux-gnu" }, /* Other CPU but same struct. */ -+ {"arc-oe-linux-uclibc" }, /* and uclibc is also the same. */ - - {"i486-pc-gnu", "i686-unknown-gnu"}, - {"i586-pc-gnu"}, --- -2.17.1 - diff --git a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch b/external/poky/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch deleted file mode 100644 index dc3d558e..00000000 --- a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch +++ /dev/null @@ -1,161 +0,0 @@ -Upstream-Status: Backport [https://dev.gnupg.org/T4459] -Signed-off-by: Sean Nyekjaer <sean@geanix.com> - -From 37069826e497d6af01e3e48fe5d2220ae7f85449 Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka <gniibe@fsij.org> -Date: Mon, 15 Apr 2019 15:10:44 +0900 -Subject: [PATCH] awk: Prepare for Gawk 5.0. - -* src/Makefile.am: Use pkg_namespace (instead of namespace). -* src/mkerrnos.awk: Likewise. -* lang/cl/mkerrcodes.awk: Don't escape # in regexp. -* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto. - --- - -In Gawk 5.0, regexp routines are replaced by Gnulib implementation, -which only allows escaping specific characters. - -GnuPG-bug-id: 4459 -Reported-by: Marius Schamschula -Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> ---- - lang/cl/mkerrcodes.awk | 2 +- - src/Makefile.am | 2 +- - src/mkerrcodes.awk | 2 +- - src/mkerrcodes1.awk | 2 +- - src/mkerrcodes2.awk | 2 +- - src/mkerrnos.awk | 2 +- - src/mkstrtable.awk | 10 +++++----- - 7 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk -index ae29043..9a1fc18 100644 ---- a/lang/cl/mkerrcodes.awk -+++ b/lang/cl/mkerrcodes.awk -@@ -122,7 +122,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/Makefile.am b/src/Makefile.am -index 42998e4..0ceac9f 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -281,7 +281,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 pkg_namespace=errnos_ \ - $(srcdir)/errnos.in >$@ - - -diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk -index 46d436c..e9c857c 100644 ---- a/src/mkerrcodes.awk -+++ b/src/mkerrcodes.awk -@@ -85,7 +85,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk -index a771a73..4578e29 100644 ---- a/src/mkerrcodes1.awk -+++ b/src/mkerrcodes1.awk -@@ -81,7 +81,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk -index ea58503..188f7a4 100644 ---- a/src/mkerrcodes2.awk -+++ b/src/mkerrcodes2.awk -@@ -91,7 +91,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk -index f79df66..15b1aad 100644 ---- a/src/mkerrnos.awk -+++ b/src/mkerrnos.awk -@@ -83,7 +83,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk -index c9de9c1..285e45f 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 pkg_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 " pkg_namespace "msgstr[] = "; - header = 0; - } - else -@@ -110,7 +110,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -@@ -150,7 +150,7 @@ END { - 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 @@ END { - print " };"; - print ""; - print "static GPG_ERR_INLINE int"; -- print namespace "msgidxof (int code)"; -+ print pkg_namespace "msgidxof (int code)"; - print "{"; - print " return (0 ? 0"; - --- -2.23.0 - diff --git a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch b/external/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch index 3066613d..ca5f6b5c 100644 --- a/external/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch +++ b/external/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch @@ -8,53 +8,21 @@ Upstream-Status: Pending Rebase to 1.28 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +Refactored for 1.33 +Signed-off-by: Armin Kuster <akuster808@gmail.com> + --- configure.ac | 1 + - src/Makefile.am | 4 ++- src/gpg-error.m4 | 71 +++-------------------------------------------------- - src/gpg-error.pc.in | 11 +++++++++ 4 files changed, 18 insertions(+), 69 deletions(-) create mode 100644 src/gpg-error.pc.in -diff --git a/configure.ac b/configure.ac -index aca9300..f7794e9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -621,6 +621,7 @@ AC_CONFIG_FILES([src/Makefile tests/Makefile]) - AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd]) - AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest]) - AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config]) -+AC_CONFIG_FILES([src/gpg-error.pc]) - - AC_OUTPUT - -diff --git a/src/Makefile.am b/src/Makefile.am -index 268c2ab..95f8459 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -87,6 +87,8 @@ bin_SCRIPTS = gpg-error-config - nodist_bin_SCRIPTS = gpgrt-config - m4datadir = $(datadir)/aclocal - m4data_DATA = gpg-error.m4 gpgrt.m4 -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = gpg-error.pc - - EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ - mkerrnos.awk errnos.in README \ -@@ -94,7 +96,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ - mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ - err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 gpgrt.m4 \ - gpg-error.vers gpg-error.def.in \ -- versioninfo.rc.in gpg-error.w32-manifest.in \ -+ versioninfo.rc.in gpg-error.w32-manifest.in gpg-error.pc \ - $(lock_obj_pub) - - BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ -diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 -index 60c88d8..2ef7e3e 100644 ---- a/src/gpg-error.m4 -+++ b/src/gpg-error.m4 -@@ -26,73 +26,13 @@ dnl is added to the gpg_config_script_warn variable. +Index: libgpg-error-1.33/src/gpg-error.m4 +=================================================================== +--- libgpg-error-1.33.orig/src/gpg-error.m4 ++++ libgpg-error-1.33/src/gpg-error.m4 +@@ -26,139 +26,13 @@ dnl is added to the gpg_config_script_wa dnl AC_DEFUN([AM_PATH_GPG_ERROR], [ AC_REQUIRE([AC_CANONICAL_HOST]) @@ -66,14 +34,15 @@ index 60c88d8..2ef7e3e 100644 - AC_HELP_STRING([--with-libgpg-error-prefix=PFX], - [prefix where GPG Error is installed (optional)]), - [gpg_error_config_prefix="$withval"]) -- ++ min_gpg_error_version=ifelse([$1], ,0.0,$1) ++ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) + - dnl Accept --with-gpg-error-prefix and make it work the same as - dnl --with-libgpg-error-prefix above, for backwards compatibility, - dnl but do not document this old, inconsistently-named option. - AC_ARG_WITH(gpg-error-prefix,, - [gpg_error_config_prefix="$withval"]) -+ min_gpg_error_version=ifelse([$1], ,0.0,$1) - +- - if test x"${GPG_ERROR_CONFIG}" = x ; then - if test x"${gpg_error_config_prefix}" != x ; then - GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" @@ -92,19 +61,57 @@ index 60c88d8..2ef7e3e 100644 - esac - fi - fi -+ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) - +- - AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) -- min_gpg_error_version=ifelse([$1], ,0.0,$1) -- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) +- min_gpg_error_version=ifelse([$1], ,1.33,$1) - ok=no -- if test "$GPG_ERROR_CONFIG" != "no" \ -- && test -f "$GPG_ERROR_CONFIG" ; then +- +- if test "$prefix" = NONE ; then +- prefix_option_expanded=/usr/local +- else +- prefix_option_expanded="$prefix" +- fi +- if test "$exec_prefix" = NONE ; then +- exec_prefix_option_expanded=$prefix_option_expanded +- else +- exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix) +- fi +- libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir) +- +- if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then +- gpgrt_libdir=$libdir_option_expanded +- else +- if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then +- if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then +- if test -f $possible_libdir/pkgconfig/gpg-error.pc; then +- gpgrt_libdir=$possible_libdir +- fi +- fi +- fi +- fi +- +- if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then +- AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) +- if test "$GPGRT_CONFIG" = "no"; then +- unset GPGRT_CONFIG +- else +- GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" +- if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then +- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" +- AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) +- gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` +- else +- unset GPGRT_CONFIG +- fi +- fi +- else +- gpg_error_config_version=`$GPG_ERROR_CONFIG --version` +- fi +- if test "$GPG_ERROR_CONFIG" != "no"; then - req_major=`echo $min_gpg_error_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` - req_minor=`echo $min_gpg_error_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` -- gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` - major=`echo $gpg_error_config_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - minor=`echo $gpg_error_config_version | \ @@ -118,20 +125,47 @@ index 60c88d8..2ef7e3e 100644 - fi - fi - fi +- if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then +- if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then +- AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) +- if test "$GPGRT_CONFIG" = "no"; then +- unset GPGRT_CONFIG +- else +- GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" +- if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then +- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" +- AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) +- else +- unset GPGRT_CONFIG +- fi +- fi +- fi +- fi - fi +- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then -- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` -- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` -- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` -- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` +- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` +- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` +- if test -z "$GPGRT_CONFIG"; then +- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` +- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` +- else +- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` +- GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" +- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` +- GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" +- fi - AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) -- gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` -+ gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error` + if test -z "$GPGRT_CONFIG"; then +- gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` +- else +- gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` ++ gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then - AC_MSG_WARN([[ -@@ -107,11 +47,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], +@@ -174,15 +48,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi else @@ -142,24 +176,8 @@ index 60c88d8..2ef7e3e 100644 - AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi - AC_SUBST(GPG_ERROR_CFLAGS) -diff --git a/src/gpg-error.pc.in b/src/gpg-error.pc.in -new file mode 100644 -index 0000000..bc0b174 ---- /dev/null -+++ b/src/gpg-error.pc.in -@@ -0,0 +1,11 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+host=@GPG_ERROR_CONFIG_HOST@ -+ -+Name: gpg-error -+Description: a library that defines common error values for all GnuPG components -+Version: @VERSION@ -+Libs: -L${libdir} -lgpg-error -+Cflags: -I${includedir} --- -1.8.3.1 - +- AC_SUBST(GPG_ERROR_CFLAGS) +- AC_SUBST(GPG_ERROR_LIBS) +- AC_SUBST(GPG_ERROR_MT_CFLAGS) +- AC_SUBST(GPG_ERROR_MT_LIBS) + ]) |