package/libgcrypt: replace reconfigure patch with upstream patch
authorJörg Krause <joerg.krause@embedded.rocks>
Sun, 28 Jul 2019 06:10:21 +0000 (08:10 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 28 Jul 2019 11:42:02 +0000 (13:42 +0200)
The `ac_cv_sys_symbol_underscore` reconfigure patch was added to
Buildroot back in 2007 [1], but was not reported to upstream back then.

Meanwhile, the issue has been fixed upstream [2] after the version bump to
version 1.8.4.

In order to add another upstream patch, which will add a pkg-config file
for libgrypt and therefore requires autoreconfiguration as well, replace the
current patch with the upstream patch.

[1] https://git.buildroot.net/buildroot/commit/package/libgcrypt?id=f1bcdf518fa7868b7819b0248f4b8da02a954dde
[2] https://github.com/gpg/libgcrypt/commit/0f4545b441b6fbdd6e9c4e95f5f2a367483e78ad

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libgcrypt/0001-build-Don-t-default-to-underscore-yes-for-cross-buil.patch [new file with mode: 0644]
package/libgcrypt/0001-reconfigure.patch [deleted file]
package/libgcrypt/libgcrypt.mk

diff --git a/package/libgcrypt/0001-build-Don-t-default-to-underscore-yes-for-cross-buil.patch b/package/libgcrypt/0001-build-Don-t-default-to-underscore-yes-for-cross-buil.patch
new file mode 100644 (file)
index 0000000..032cb7c
--- /dev/null
@@ -0,0 +1,48 @@
+From 7fec3ac22efb86fce90a9edc5696e16ee88a65c7 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Wed, 24 Oct 2018 14:29:45 +0900
+Subject: [PATCH] build: Don't default to underscore=yes for cross-build.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* acinclude.m4: Don't set ac_cv_sys_symbol_underscore
+for cross build.
+
+--
+
+It made sense in the past when cross compile were basically for a.out
+system, but nowadays, it's better not to assume that.
+
+Fetched from: 0f4545b441b6fbdd6e9c4e95f5f2a367483e78ad
+
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
+---
+ acinclude.m4 | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index fc208c53..6f7789d0 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -111,14 +111,10 @@ case "${host}" in
+         ac_cv_sys_symbol_underscore=yes
+         ;;
+     *)
+-      if test "$cross_compiling" = yes; then
+-        if test "x$ac_cv_sys_symbol_underscore" = x ; then
+-           ac_cv_sys_symbol_underscore=yes
+-        fi
+-      else
++      if test "$cross_compiling" != yes; then
+          tmp_do_check="yes"
+       fi
+-       ;;
++      ;;
+ esac
+ if test "$tmp_do_check" = "yes"; then
+   AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
+-- 
+2.22.0
+
diff --git a/package/libgcrypt/0001-reconfigure.patch b/package/libgcrypt/0001-reconfigure.patch
deleted file mode 100644 (file)
index 87d29a2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/configure b/configure
-index 70a6d50..8f55d95 100755
---- a/configure
-+++ b/configure
-@@ -22306,14 +22306,15 @@ case "${host}" in
-     i386-emx-os2 | i345686-pc-os2*emx | i386-pc-msdosdjgpp)
-         ac_cv_sys_symbol_underscore=yes
-         ;;
--    *)
--      if test "$cross_compiling" = yes; then
--        if test "x$ac_cv_sys_symbol_underscore" = x ; then
--           ac_cv_sys_symbol_underscore=yes
-+    *)if test -z "$ac_cv_sys_symbol_underscore";then
-+        if test "$cross_compiling" = yes; then
-+            if test "x$ac_cv_sys_symbol_underscore" = x ; then
-+                ac_cv_sys_symbol_underscore=yes
-+            fi
-+        else
-+            tmp_do_check="yes"
-+        fi
-         fi
--      else
--         tmp_do_check="yes"
--      fi
-        ;;
- esac
- if test "$tmp_do_check" = "yes"; then
index 452cf17ce1f255b36c6a97fb754b9e30f8a5387a..5aa44481aee723450389c05216987ffd4d7e0594 100644 (file)
@@ -13,8 +13,8 @@ LIBGCRYPT_INSTALL_STAGING = YES
 LIBGCRYPT_DEPENDENCIES = libgpg-error
 LIBGCRYPT_CONFIG_SCRIPTS = libgcrypt-config
 
-LIBGCRYPT_CONF_ENV = \
-       ac_cv_sys_symbol_underscore=no
+# Patching acinclude.m4 in 0001
+LIBGCRYPT_AUTORECONF = YES
 LIBGCRYPT_CONF_OPTS = \
        --with-gpg-error-prefix=$(STAGING_DIR)/usr