From b047d446251369ba51a811a750cdf2c575fb8a1f Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Wed, 30 Dec 2020 09:51:42 -0600 Subject: [PATCH] dar: correctly fix cross patch --- .../dar/patches/0001-fix-cross-build.patch | 52 +++++++++++++++++++ srcpkgs/dar/patches/fix-configure.patch | 36 ------------- srcpkgs/dar/template | 7 ++- 3 files changed, 57 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..0e1edfa8698 --- /dev/null +++ b/srcpkgs/dar/patches/0001-fix-cross-build.patch @@ -0,0 +1,52 @@ +From 4a8e09f9ebdc5c8efcbc75933138c9337c98e1bb Mon Sep 17 00:00:00 2001 +From: Nathan Owens +Date: Wed, 30 Dec 2020 15:31:53 -0600 +Subject: [PATCH] fix cross build + +--- + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +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 +@@ -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 +@@ -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 + #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 :