summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2010-10-10 08:41:08 +0000
committerMartin Matuska <mm@FreeBSD.org>2010-10-10 08:41:08 +0000
commit5b2dca63157d0573655857cd15bed7d697bdba2d (patch)
tree1abad6e26c6c09a121138f3199cc7abf6fc9eb2e
parentbfc03e2015a7aeb6c312aa45680fc95e693cc4c7 (diff)
Notes
-rw-r--r--lib/libarchive/Makefile16
-rw-r--r--usr.bin/ar/Makefile7
-rw-r--r--usr.bin/tar/Makefile5
3 files changed, 20 insertions, 8 deletions
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile
index c377f9b2d477..cff043ea86c8 100644
--- a/lib/libarchive/Makefile
+++ b/lib/libarchive/Makefile
@@ -2,8 +2,16 @@
.include <bsd.own.mk>
LIB= archive
-DPADD= ${LIBBZ2} ${LIBZ} ${LIBMD}
-LDADD= -lbz2 -lz -lmd
+DPADD= ${LIBZ} ${LIBMD}
+LDADD= -lz -lmd
+
+DPADD+= ${LIBBZ2}
+LDADD+= -lbz2
+CFLAGS+= -DHAVE_BZLIB_H=1
+
+DPADD+= ${LIBLZMA}
+LDADD+= -llzma
+CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
# It has no real relation to the libarchive version number.
@@ -11,10 +19,6 @@ SHLIB_MAJOR= 5
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
CFLAGS+= -I${.OBJDIR}
-#Uncomment to build with full lzma/xz support via liblzma
-#liblzma is not (yet?) part of the FreeBSD base system
-#CFLAGS+= -I/usr/local/include -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
-#LDADD+= -L/usr/local/lib -llzma
.if ${MK_OPENSSL} != "no"
CFLAGS+= -DWITH_OPENSSL
diff --git a/usr.bin/ar/Makefile b/usr.bin/ar/Makefile
index 533f9317d02f..b0c5044c9878 100644
--- a/usr.bin/ar/Makefile
+++ b/usr.bin/ar/Makefile
@@ -8,6 +8,13 @@ WARNS?= 5
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF}
LDADD= -larchive -lbz2 -lz -lelf
+# Do not depend on liblzma if we are building the bootstrap-tools and
+# the local system doesn't include liblzma
+.if !defined(BOOTSTRAPPING) || ${BOOTSTRAPPING} >= 800505
+DPADD+= ${LIBLZMA}
+LDADD+= -llzma
+.endif
+
CFLAGS+=-I. -I${.CURDIR}
NO_SHARED?= yes
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile
index 10998462d91a..80f8c9a1ad07 100644
--- a/usr.bin/tar/Makefile
+++ b/usr.bin/tar/Makefile
@@ -5,13 +5,14 @@ PROG= bsdtar
BSDTAR_VERSION_STRING=2.7.0
SRCS= bsdtar.c cmdline.c getdate.c matching.c read.c siginfo.c subst.c tree.c util.c write.c
WARNS?= 5
-DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
-LDADD= -larchive -lbz2 -lz -lmd
+DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
+LDADD= -larchive -lbz2 -lz -lmd -llzma
.if ${MK_OPENSSL} != "no"
LDADD+= -lcrypto
.endif
CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\"
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
+CFLAGS+= -DHAVE_LIBLZMA
CFLAGS+= -I${.CURDIR}
SYMLINKS= bsdtar ${BINDIR}/tar
MLINKS= bsdtar.1 tar.1