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 @@ -167,6 +167,9 @@ .if ${.MAKE.OS} != "FreeBSD" .PATH: ${.CURDIR}/cross-build +# tar needs this +INCS+= ${SRCTOP}/include/readpassphrase.h + # Needed by our sys/types.h wrapper SYSINCS+= ${SRCTOP}/sys/sys/bitcount.h diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -35,6 +35,10 @@ SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 +.if ${.MAKE.OS} == "Linux" +LIBADD+= bsd +.endif + HAS_TESTS= SUBDIR.${MK_TESTS}+= tests 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 +