dar: unbreak musl and cross

This commit is contained in:
Jürgen Buchmüller 2015-10-18 14:11:23 +02:00
parent 6af3d502bd
commit e6f5ed5785
3 changed files with 43 additions and 1 deletions

View file

@ -0,0 +1,23 @@
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

View file

@ -0,0 +1,19 @@
Since the musl libc constellation results in unistd.h being
included, which defines the getopt() function but not the
getopt globals, define them here as well.
--- src/dar_suite/my_getopt_long.h 2015-10-17 10:42:50.000000000 +0200
+++ src/dar_suite/my_getopt_long.h 2015-10-18 13:13:32.631006858 +0200
@@ -27,6 +27,12 @@
#ifndef MY_GETOPT_LONG_H
#define MY_GETOPT_LONG_H
+#if !defined(__GLIBC__)
+// declare externs which would be defined when including getopt.h
+extern char *optarg;
+extern int optind, opterr, optopt, optreset;
+#endif
+
// getopt may be declated in <unistd.h> on systems like FreeBSD.
// if you want to use libgnugetopt you need to include <getopt.h>
// on this system. Thus a conflict appear because the getopt is

View file

@ -1,7 +1,7 @@
# Template file for 'dar'
pkgname=dar
version=2.5.1
revision=1
revision=2
build_style=gnu-configure
configure_args="--disable-upx --disable-build-html"
conf_files="/etc/darrc"