Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] dar: correctly fix cross patch
@ 2020-12-30 15:52 ndowens
  2020-12-30 20:46 ` [WIP] " ndowens
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ndowens @ 2020-12-30 15:52 UTC (permalink / raw)
  To: ml

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

There is a new 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

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

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: 17518 bytes --]

From 9532772756e380fc070443f02e66abb6a3d0994c 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-builds.patch   | 233 ++++++++++++++++++
 srcpkgs/dar/patches/fix-configure.patch       |  36 ---
 srcpkgs/dar/template                          |   7 +-
 3 files changed, 238 insertions(+), 38 deletions(-)
 create mode 100644 srcpkgs/dar/patches/0001-fix-cross-builds.patch
 delete mode 100644 srcpkgs/dar/patches/fix-configure.patch

diff --git a/srcpkgs/dar/patches/0001-fix-cross-builds.patch b/srcpkgs/dar/patches/0001-fix-cross-builds.patch
new file mode 100644
index 00000000000..5abc4fb90d0
--- /dev/null
+++ b/srcpkgs/dar/patches/0001-fix-cross-builds.patch
@@ -0,0 +1,233 @@
+From d2187f4908f3ceba7254e29bc2c7caa4db25c7ab Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 09:39:27 -0600
+Subject: [PATCH] fix cross-builds
+
+---
+diff --git configure.ac configure.ac
+index cfe6d41..2577aee 100644
+--- configure.ac
++++ configure.ac
+@@ -30,10 +30,10 @@ 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.18)
+ XGETTEXT_EXTRA_OPTIONS='--keyword=dar_gettext'
+ AM_ICONV
+-
++m4_pattern_allow([^AC_])
+ ####
+ # configure checks what is available from the operational system:
+ # - it displays things on output for the user running the configure script has status information
+@@ -72,7 +72,7 @@ AC_PROG_MAKE_SET
+ AC_PROG_RANLIB
+ 
+ AC_MSG_CHECKING([for C++ compiler usability])
+-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
++AC_TRY_LINK([AC_LANG_PROGRAM([],
+                                   [ class test { public: int test; }; ])],
+                   [AC_MSG_RESULT(ok)],
+                   [AC_MSG_ERROR([No C++ compiler found])])
+@@ -461,7 +461,7 @@ AS_IF(       [test "x$enable_libz_linking" != "xyes"],
+                                         local_libz="no"
+                                        ])
+                if test "$local_libz" = "yes" ; then
+-               AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++               AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                            #if HAVE_ZLIB_H
+                                                            #include <zlib.h>
+                                                            #endif
+@@ -502,7 +502,7 @@ AS_IF(      [test "x$enable_libbz2_linking" != "xyes"],
+                                        local_libbz2="no"
+                                       ])
+                if test "$local_libbz2" = "yes" ; then
+-                 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++                 AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                        #if HAVE_BZLIB_H
+                                                        #include <bzlib.h>
+                                                        #endif
+@@ -544,7 +544,7 @@ AS_IF(      [test "x$enable_liblzo2_linking" != "xyes"],
+                                        local_liblzo2="no"
+                                       ])
+               if test "$local_liblzo2" = "yes" ; then
+-                 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++                 AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                        #if HAVE_LZO_LZO1X_H
+                                                        #include <lzo/lzo1x.h>
+                                                        #endif
+@@ -584,7 +584,7 @@ AS_IF(       [test "x$enable_libxz_linking" != "xyes"],
+                                         local_libxz="no"
+                                        ])
+                if test "$local_libxz" = "yes" ; then
+-               AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++               AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                            #if HAVE_LZMA_H
+                                                            #include <lzma.h>
+                                                            #endif
+@@ -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_TRY_COMPILE([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_TRY_COMPILE([AC_LANG_PROGRAM([[ extern "C"
+                                                                     {
+                                                                      #if HAVE_GCRYPT_H
+                                                                      #include <gcrypt.h>
+@@ -705,7 +705,7 @@ AS_IF(          [test "x$enable_ea_support" != "xyes"],
+                 [ AC_CHECK_HEADERS([attr/xattr.h sys/xattr.h])
+                   AC_CHECK_LIB(attr, [lgetxattr], [], [])
+                   AC_MSG_CHECKING([for Unix Extended Attribute support])
+-                  AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++                  AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                                      #if HAVE_SYS_TYPES_H
+                                                      #include <sys/types.h>
+                                                      #endif
+@@ -728,7 +728,7 @@ AS_IF(          [test "x$enable_ea_support" != "xyes"],
+                                         AC_CHECK_HEADERS([sys/xattr.h])
+                                         AC_CHECK_LIB(c, [fgetxattr])
+                                         AC_MSG_CHECKING([for Mac OS X Extended Attribute support])
+-                                        AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++                                        AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                                                          #if HAVE_SYS_XATTR_H
+                                                                          #include <sys/xattr.h>
+                                                                          #endif
+@@ -760,7 +760,7 @@ AC_ARG_ENABLE(  [nodump-flag],
+ 
+ AS_IF(          [test "x$enable_nodump_flag" != "xyes"],
+                 [AC_MSG_RESULT([extX FSA disabled])],
+-                [AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++                [AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                                     #include <ext2fs/ext2_fs.h>
+                                                     #if HAVE_SYS_IOCTL_H
+                                                     #include <sys/ioctl.h>
+@@ -774,7 +774,7 @@ AS_IF(          [test "x$enable_nodump_flag" != "xyes"],
+                                 AC_MSG_RESULT([found <ext2fs/ext2_fs.h>])
+                                 ],
+                                 [
+-                                AC_LINK_IFELSE(  [AC_LANG_PROGRAM([[extern "C" {
++                                AC_TRY_LINK(  [AC_LANG_PROGRAM([[extern "C" {
+                                                                     #include <linux/ext2_fs.h>
+                                                                     #if HAVE_SYS_IOCTL_H
+                                                                     #include <sys/ioctl.h>
+@@ -806,7 +806,7 @@ AC_ARG_ENABLE( [birthtime],
+ 
+ AS_IF(         [test "x$enable_birthtime" != "xyes"],
+                [AC_MSG_RESULT([hfs+ FSA disabled])],
+-               [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++               [AC_TRY_LINK([AC_LANG_PROGRAM([[
+                                                 extern "C" {
+                                                 #if HAVE_SYS_TYPE_H
+                                                 #include <sys/types.h>
+@@ -875,7 +875,7 @@ AS_IF(        [test "x$enable_librsync_linking" != "xyes"],
+                                          local_librsync="no"
+                                         ])
+                 if test "$local_librsync" = "yes" ; then
+-                AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++                AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                             #if HAVE_LIBRSYNC_H
+                                                             #include <stdio.h>
+                                                             #include <librsync.h>
+@@ -933,7 +933,7 @@ AS_IF(         [test "x$enable_libcurl_linking" != "xyes"],
+                         ])
+ 
+                  if test "$local_libcurl" = "yes" ; then
+-                        AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++                        AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                                   #if HAVE_CURL_CURL_H
+                                                                   #include <curl/curl.h>
+                                                                   #endif
+@@ -990,7 +990,7 @@ AS_IF(          [test "x$enable_fadvise" != "xyes"],
+      )
+ 
+ AC_MSG_CHECKING([for getopt() availability]);
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                    #if HAVE_STDIO_H
+                                    #include <stdio.h>
+                                    #endif
+@@ -1009,7 +1009,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
+                   [AC_MSG_ERROR([absent but required])])
+ 
+ AC_MSG_CHECKING([for getopt_long() availability]);
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                    #if HAVE_STDIO_H
+                                    #include <stdio.h>
+                                    #endif
+@@ -1085,7 +1085,7 @@ AS_IF(         [test "x$enable_furtive_read" != "xyes"],
+                  AC_MSG_WARN([Furtive read mode disabled])
+                ],
+                [ AC_MSG_CHECKING([furtive read mode availability])
+-                 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++                 AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                  #if HAVE_SYS_TYPE_H
+                                                  #include <sys/types.h>
+                                                  #endif
+@@ -1247,7 +1247,7 @@ AS_IF(          [ test "x$enable_gpgme_linking" != "xyes" ],
+                                   AC_CHECK_HEADERS([gpgme.h])
+                                   AC_CHECK_LIB(gpgme, [gpgme_signers_add], [], [])
+                                   AC_MSG_CHECKING([for libgpgme usability])
+-                                  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                                  AC_TRY_LINK([AC_LANG_PROGRAM([[
+                                                                     #if HAVE_GPGME_H
+                                                                     #include <gpgme.h>
+                                                                     #endif
+@@ -1296,7 +1296,7 @@ AS_IF(          [ test "x$enable_thread_safe" != "xyes" ],
+                 [ AC_MSG_NOTICE([thread-safe support disabled])],
+                 [ AC_CHECK_LIB(pthread, [pthread_mutex_init], [], [])
+                   AC_MSG_CHECKING([for POSIX mutex])
+-                  AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++                  AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                                         #if HAVE_PTHREAD_H
+                                                         #include <pthread.h>
+                                                         #endif
+@@ -1312,7 +1312,7 @@ AS_IF(          [ test "x$enable_thread_safe" != "xyes" ],
+                                  ],
+                                  [ AC_MSG_RESULT(no)])
+                   AC_MSG_CHECKING([for reentrant stdlib calls])
+-                  AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++                  AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                                          #if HAVE_TIME_H
+                                                          #include <time.h>
+                                                          #endif
+@@ -1385,7 +1385,7 @@ AS_IF(       [ test "x$enable_execinfo" != "xyes" ],
+                AC_CHECK_HEADERS([execinfo.h])
+                AC_CHECK_LIB(execinfo, [backtrace], [], [])
+                AC_MSG_CHECKING([for backtrace() usability])
+-               AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern "C" {
++               AC_TRY_LINK([AC_LANG_PROGRAM([[extern "C" {
+                                                #if HAVE_EXECINFO_H
+                                                #include <execinfo.h>
+                                                #endif
+@@ -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_TRY_COMPILE([AC_LANG_PROGRAM( [[
+                                     #if HAVE_LIBTHREADAR_LIBTHREADAR_HPP
+                                     #include <libthreadar/libthreadar.hpp>
+                                     #endif
+@@ -1523,7 +1523,7 @@ LDFLAGS="$LDFLAGS -static"
+ LIBS__cache="$LIBS"
+ LIBS="$LIBS $GPGME_LIBS $LIBCURL_LIBS $LIBTHREADAR_LIBS $CXXSTDFLAGS"
+ AC_MSG_CHECKING([static linking])
+-AC_LINK_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
++AC_TRY_LINK([AC_LANG_PROGRAM([[ extern "C" {
+                                                 #if HAVE_STDIO_H
+                                                 #include <stdio.h>
+                                                 #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
 	:

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-30 21:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-30 15:52 [PR PATCH] dar: correctly fix cross patch ndowens
2020-12-30 20:46 ` [WIP] " ndowens
2020-12-30 21:33 ` [PR PATCH] [Updated] " ndowens
2020-12-30 21:34 ` ndowens
2020-12-30 21:35 ` ndowens

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).