diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h --- a/lib/libarchive/config_freebsd.h +++ b/lib/libarchive/config_freebsd.h @@ -100,7 +100,9 @@ #define HAVE_DIRENT_H 1 #define HAVE_DIRFD 1 #define HAVE_DLFCN_H 1 +#ifndef __linux__ #define HAVE_D_MD_ORDER 1 +#endif #define HAVE_EFTYPE 1 #define HAVE_EILSEQ 1 #define HAVE_ERRNO_H 1 diff --git a/tools/build/Makefile b/tools/build/Makefile --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -208,6 +208,18 @@ SRCS+= progname.c # Stub implementations of fflagstostr/strtofflags SRCS+= fflags.c + +# tar needs readpassphrase +# the version from openssh is already "portable" +# but we need to take care with .PATH as we +# do not want getopt_long.c from crypto/openssh/openbsd-compat +# and we do not want readpassphrase.c from libc/gen +.PATH: ${SRCTOP}/crypto/openssh +OBJS_SRCS_FILTER= T R +SRCS+= openbsd-compat/readpassphrase.c + +INCS+= ${SRCTOP}/crypto/openssh/openbsd-compat/readpassphrase.h + .endif # ${MAKE.OS} == "Linux" .if ${.MAKE.OS} == "Darwin" diff --git a/tools/build/cross-build/include/linux/includes.h b/tools/build/cross-build/include/linux/includes.h new file mode 100644 --- /dev/null +++ b/tools/build/cross-build/include/linux/includes.h @@ -0,0 +1,4 @@ +#include +#include + +#define DEF_WEAK(a) diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -35,7 +35,9 @@ SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 +.if ${.MAKE.OS} == "FreeBSD" || ${MACHINE} != "host" HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +.endif .include diff --git a/usr.bin/tar/Makefile.depend.host b/usr.bin/tar/Makefile.depend.host new file mode 100644 --- /dev/null +++ b/usr.bin/tar/Makefile.depend.host @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.bin/tar/Makefile.depend.options b/usr.bin/tar/Makefile.depend.options new file mode 100644 --- /dev/null +++ b/usr.bin/tar/Makefile.depend.options @@ -0,0 +1,6 @@ +DIRDEPS_OPTIONS = host_egacy + +DIRDEPS.host_egacy.yes = tools/build + +.include +