Github messages for voidlinux
 help / color / mirror / Atom feed
From: ndowens <ndowens@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] dar: correctly fix cross patch
Date: Wed, 30 Dec 2020 22:34:53 +0100	[thread overview]
Message-ID: <20201230213453.OvhTczsaHCTu1BuzhCL6C45mgeAck37-o9YzoBpgzqk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27557@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

There is an updated pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages dar
https://github.com/void-linux/void-packages/pull/27557

[WIP] dar: correctly fix cross patch
Will be attempting to submit this patch upstream as it should work fine for others

this patch actually works to check if libgcrypt is usable or not

A patch file from https://github.com/void-linux/void-packages/pull/27557.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dar-27557.patch --]
[-- Type: text/x-diff, Size: 6052 bytes --]

From 8a196745a2c40f7291584bdba64c73fe53f9ecd2 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 09:51:42 -0600
Subject: [PATCH] dar: correctly fix cross patch

---
 .../dar/patches/0001-fix-cross-build.patch    | 50 +++++++++++++++++++
 srcpkgs/dar/patches/fix-configure.patch       | 36 -------------
 srcpkgs/dar/template                          |  7 ++-
 3 files changed, 55 insertions(+), 38 deletions(-)
 create mode 100644 srcpkgs/dar/patches/0001-fix-cross-build.patch
 delete mode 100644 srcpkgs/dar/patches/fix-configure.patch

diff --git a/srcpkgs/dar/patches/0001-fix-cross-build.patch b/srcpkgs/dar/patches/0001-fix-cross-build.patch
new file mode 100644
index 00000000000..970e717c5fb
--- /dev/null
+++ b/srcpkgs/dar/patches/0001-fix-cross-build.patch
@@ -0,0 +1,50 @@
+From 4a8e09f9ebdc5c8efcbc75933138c9337c98e1bb Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 15:31:53 -0600
+Subject: [PATCH] fix cross build
+
+Replace AC_RUN_* with AC_COMPILE_*
+---
+diff --git configure.ac configure.ac
+index cfe6d41..0fca5f3 100644
+--- configure.ac
++++ configure.ac
+@@ -30,7 +30,7 @@ AC_DEFINE_UNQUOTED(DAR_VERSION, "AC_PACKAGE_VERSION", [dar and dar_suite version
+ 
+ AM_INIT_AUTOMAKE([subdir-objects])
+ AM_GNU_GETTEXT([external])
+-AM_GNU_GETTEXT_VERSION
++AM_GNU_GETTEXT_VERSION([0.19])
+ XGETTEXT_EXTRA_OPTIONS='--keyword=dar_gettext'
+ AM_ICONV
+ 
+@@ -634,7 +634,7 @@ AS_IF(      [test "x$enable_libgcrypt_linking" != "xyes"],
+                  min_version_gcrypt_hash_bug="1.6.0"
+                  AC_DEFINE_UNQUOTED(MIN_VERSION_GCRYPT_HASH_BUG, "$min_version_gcrypt_hash_bug", [ligcrypt minimum version without hash bug])
+                  AC_MSG_CHECKING([for libgcrypt usability])
+-                 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ extern "C"
++                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ extern "C"
+                                                   {
+                                                        #if HAVE_GCRYPT_H
+                                                        #include <gcrypt.h>
+@@ -655,7 +655,7 @@ AS_IF(      [test "x$enable_libgcrypt_linking" != "xyes"],
+                                 ],
+                                 [ AC_DEFINE(CRYPTO_AVAILABLE, 1, [header and linking is available to have strong encryption works])
+                                   AC_MSG_RESULT([ok])
+-                                  AC_RUN_IFELSE([AC_LANG_PROGRAM([[ extern "C"
++                                  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ extern "C"
+                                                                     {
+                                                                      #if HAVE_GCRYPT_H
+                                                                      #include <gcrypt.h>
+@@ -1464,7 +1464,7 @@ AS_IF(       [ test "x$enable_threadar" != "xyes" ],
+                                [ AC_MSG_WARN([Cannot find libthreadar.h header file]) ]
+                               )
+                AC_MSG_CHECKING([for libthreadar() operationability])
+-               AC_RUN_IFELSE([AC_LANG_PROGRAM( [[
++               AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[
+                                     #if HAVE_LIBTHREADAR_LIBTHREADAR_HPP
+                                     #include <libthreadar/libthreadar.hpp>
+                                     #endif
+-- 
+2.30.0
+
diff --git a/srcpkgs/dar/patches/fix-configure.patch b/srcpkgs/dar/patches/fix-configure.patch
deleted file mode 100644
index 1e3111bb8e6..00000000000
--- a/srcpkgs/dar/patches/fix-configure.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Disable cross compile checks for libgcrypt usability
-tests. They are not required.
-
---- configure	2015-10-18 14:02:02.423216637 +0200
-+++ configure	2015-10-18 14:04:45.198228372 +0200
-@@ -22294,7 +22294,7 @@
- 
- 		 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgcrypt usability" >&5
- $as_echo_n "checking for libgcrypt usability... " >&6; }
--                 if test "$cross_compiling" = yes; then :
-+                 if test "$cross_compiling" = xxx; then :
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- as_fn_error $? "cannot run test program while cross compiling
-@@ -22334,7 +22334,7 @@
- 
- 				  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
- $as_echo "ok" >&6; }
--                                  if test "$cross_compiling" = yes; then :
-+                                  if test "$cross_compiling" = xxx; then :
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- as_fn_error $? "cannot run test program while cross compiling
-diff --git configure configure
-index 157b7a9..7c6a50d 100755
---- configure
-+++ configure
-@@ -25481,7 +25481,7 @@ fi
- 
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libthreadar() operationability" >&5
- $as_echo_n "checking for libthreadar() operationability... " >&6; }
--               if test "$cross_compiling" = yes; then :
-+               if test "$cross_compiling" = xxx; then :
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- as_fn_error $? "cannot run test program while cross compiling
diff --git a/srcpkgs/dar/template b/srcpkgs/dar/template
index c289909e812..efc5ba830ef 100644
--- a/srcpkgs/dar/template
+++ b/srcpkgs/dar/template
@@ -16,11 +16,14 @@ distfiles="${SOURCEFORGE_SITE}/dar/dar-${version}.tar.gz"
 checksum=3fea9ff9e55fb9827e17a080de7d1a2605b82c2320c0dec969071efefdbfd097
 
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr
-	 ac_cv_lib_gcrypt_gcry_check_version=false"
+	configure_args+=" --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr"
 	LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib -lgcrypt"
 fi
 
+pre_configure() {
+	autoreconf -fi
+}
+
 do_check() {
 	# need to be run as root
 	:

  parent reply	other threads:[~2020-12-30 21:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 15:52 [PR PATCH] " ndowens
2020-12-30 20:46 ` [WIP] " ndowens
2020-12-30 21:33 ` [PR PATCH] [Updated] " ndowens
2020-12-30 21:34 ` ndowens [this message]
2020-12-30 21:35 ` ndowens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201230213453.OvhTczsaHCTu1BuzhCL6C45mgeAck37-o9YzoBpgzqk@z \
    --to=ndowens@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).