dar: fix cross
This commit is contained in:
parent
c24622459f
commit
c5633fbdf6
2 changed files with 153 additions and 1 deletions
143
srcpkgs/dar/patches/cross-configure_ac.patch
Normal file
143
srcpkgs/dar/patches/cross-configure_ac.patch
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
Our libgcrypt is recent enough so patch out the tests which
|
||||||
|
prevent cross compiling dar. Also set the required gettext
|
||||||
|
version to 0.19 and remove a test for static linking, which
|
||||||
|
always works for Void Linux.
|
||||||
|
|
||||||
|
--- configure.ac 2017-01-21 11:59:32.000000000 +0100
|
||||||
|
+++ configure.ac 2017-01-25 12:42:51.662888147 +0100
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
@@ -528,58 +528,10 @@
|
||||||
|
local_crypto="no"
|
||||||
|
])
|
||||||
|
if test "$local_crypto" = "yes" ; then
|
||||||
|
- min_version_gcrypt="1.4.0"
|
||||||
|
- AC_DEFINE_UNQUOTED(MIN_VERSION_GCRYPT, "$min_version_gcrypt", [libgcrypt minimum version])
|
||||||
|
- 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"
|
||||||
|
- {
|
||||||
|
- #if HAVE_GCRYPT_H
|
||||||
|
- #include <gcrypt.h>
|
||||||
|
- #endif
|
||||||
|
- }
|
||||||
|
- #include <iostream>
|
||||||
|
- using namespace std;
|
||||||
|
- ]],
|
||||||
|
- [[
|
||||||
|
- if(!gcry_check_version(MIN_VERSION_GCRYPT))
|
||||||
|
- {
|
||||||
|
- cout << "ligcrypt version too low, minimum version is " << MIN_VERSION_GCRYPT << endl;
|
||||||
|
- exit(1);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- exit(0);
|
||||||
|
- ]])
|
||||||
|
- ],
|
||||||
|
- [ 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"
|
||||||
|
- {
|
||||||
|
- #if HAVE_GCRYPT_H
|
||||||
|
- #include <gcrypt.h>
|
||||||
|
- #endif
|
||||||
|
- }
|
||||||
|
- ]],
|
||||||
|
- [[
|
||||||
|
- if(!gcry_check_version(MIN_VERSION_GCRYPT_HASH_BUG))
|
||||||
|
- exit(1);
|
||||||
|
- else
|
||||||
|
- exit(0);
|
||||||
|
- ]])
|
||||||
|
- ],
|
||||||
|
- [],
|
||||||
|
- [ libgcrypt_hash_bug="yes" ])
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- if test "$?" = "1" ; then
|
||||||
|
- AC_MSG_RESULT([failed: need libgcypt >= $min_version_gcrypt, disabling strong encryption support])
|
||||||
|
- else
|
||||||
|
- AC_MSG_RESULT([failed: libgcrypt is unusable, cannot even call gcry_check_version(). Disabling strong encryption support])
|
||||||
|
- fi
|
||||||
|
- local_crypto="no"
|
||||||
|
- ])
|
||||||
|
- else
|
||||||
|
+ AC_DEFINE_UNQUOTED(MIN_VERSION_GCRYPT, "1.4.0", [libgcrypt minimum version])
|
||||||
|
+ AC_DEFINE_UNQUOTED(MIN_VERSION_GCRYPT_HASH_BUG, "1.6.0", [ligcrypt minimum version without hash bug])
|
||||||
|
+ AC_DEFINE(CRYPTO_AVAILABLE, 1, [header and linking is available to have strong encryption works])
|
||||||
|
+ else
|
||||||
|
AC_MSG_WARN([strong encryption support not available])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
@@ -1119,61 +1119,8 @@
|
||||||
|
],
|
||||||
|
[])
|
||||||
|
|
||||||
|
-
|
||||||
|
-MEM_LDFLAGS=$LDFLAGS
|
||||||
|
-MEM_CXXFLAGS=$CXXFLAGS
|
||||||
|
-LDFLAGS="-static $MEM_LDFLAGS $GPGME_LIBS"
|
||||||
|
-CXXFLAGS="$CXXFLAGS $GPGME_CFLAGS"
|
||||||
|
-AC_MSG_CHECKING([static linking])
|
||||||
|
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[ extern "C" {
|
||||||
|
- #if HAVE_STDIO_H
|
||||||
|
- #include <stdio.h>
|
||||||
|
- #endif
|
||||||
|
- #if HAVE_EXECINFO_H
|
||||||
|
- #include <execinfo.h>
|
||||||
|
- #endif
|
||||||
|
- #if HAVE_STDLIB_H
|
||||||
|
- #include <stdlib.h>
|
||||||
|
- #endif
|
||||||
|
- #if HAVE_PTHREAD_H
|
||||||
|
- #include <pthread.h>
|
||||||
|
- #endif
|
||||||
|
- }
|
||||||
|
- ]],
|
||||||
|
- [[
|
||||||
|
- #if HAVE_EXECINFO_H
|
||||||
|
- const int buf_size = 20;
|
||||||
|
- void *buffer[buf_size];
|
||||||
|
- int size = backtrace(buffer, buf_size);
|
||||||
|
- char **symbols = backtrace_symbols(buffer, size);
|
||||||
|
-
|
||||||
|
- if(symbols != nullptr)
|
||||||
|
- free(symbols);
|
||||||
|
- #endif
|
||||||
|
- #if MUTEX_WORKS
|
||||||
|
- pthread_mutex_t test;
|
||||||
|
- if(pthread_mutex_init(&test, NULL) == 0)
|
||||||
|
- {
|
||||||
|
- if(pthread_mutex_lock(&test) == 0)
|
||||||
|
- pthread_mutex_unlock(&test);
|
||||||
|
- }
|
||||||
|
- pthread_mutex_destroy(&test);
|
||||||
|
- #endif
|
||||||
|
-
|
||||||
|
- printf("Hello World!");
|
||||||
|
- return 0;
|
||||||
|
- ]])
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- AC_MSG_RESULT([yes, perfect!])
|
||||||
|
- static_pb="no"
|
||||||
|
- ],
|
||||||
|
- [
|
||||||
|
- AC_MSG_RESULT([failed])
|
||||||
|
- static_pb="yes"
|
||||||
|
- ])
|
||||||
|
-LDFLAGS=$MEM_LDFLAGS
|
||||||
|
-CXXFLAGS=$MEM_CXXFLAGS
|
||||||
|
+# static linking supported
|
||||||
|
+static_pb="yes"
|
||||||
|
|
||||||
|
AM_CONDITIONAL([MAKE_ALL_DIR], [test $examples = "yes"])
|
||||||
|
AM_CONDITIONAL([BUILD_DAR_STATIC], [test $build_static = "yes" -a $static_pb = "no"])
|
|
@ -5,6 +5,7 @@ revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--disable-upx --disable-build-html"
|
configure_args="--disable-upx --disable-build-html"
|
||||||
conf_files="/etc/darrc"
|
conf_files="/etc/darrc"
|
||||||
|
hostmakedepends="automake libtool pkg-config gettext-devel gpgme-devel"
|
||||||
makedepends="acl-devel zlib-devel bzip2-devel lzo-devel liblzma-devel libgcrypt-devel e2fsprogs-devel"
|
makedepends="acl-devel zlib-devel bzip2-devel lzo-devel liblzma-devel libgcrypt-devel e2fsprogs-devel"
|
||||||
short_desc="Shell command that backs up directory trees and files"
|
short_desc="Shell command that backs up directory trees and files"
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
|
@ -13,7 +14,15 @@ homepage="http://dar.linux.free.fr/"
|
||||||
distfiles="${SOURCEFORGE_SITE}/dar/dar-${version}.tar.gz"
|
distfiles="${SOURCEFORGE_SITE}/dar/dar-${version}.tar.gz"
|
||||||
checksum=6973614afa970d095719bf43d91855c450d0fa5dcf0a45b580055625500ba92e
|
checksum=6973614afa970d095719bf43d91855c450d0fa5dcf0a45b580055625500ba92e
|
||||||
|
|
||||||
nocross=yes
|
if [ -n "$CROSS_BUILD" ]; then
|
||||||
|
configure_args+=" --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr"
|
||||||
|
configure_args+=" ac_cv_lib_gcrypt_gcry_check_version=false"
|
||||||
|
LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib -lgcrypt"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
autoreconf -fi
|
||||||
|
}
|
||||||
|
|
||||||
libdar_package() {
|
libdar_package() {
|
||||||
short_desc+=" - runtime library"
|
short_desc+=" - runtime library"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue