svn commit: r213667 - in stable/8: lib/libarchive usr.bin/ar usr.bin/tar

Martin Matuska mm at FreeBSD.org
Sun Oct 10 08:41:08 UTC 2010


Author: mm
Date: Sun Oct 10 08:41:08 2010
New Revision: 213667
URL: http://svn.freebsd.org/changeset/base/213667

Log:
  - Add liblzma support to libarchive and usr.bin/tar
  - Do not link usr.bin/ar to liblzma if building bootstrap-tools and
  the local system doesn't include liblzma (fixes world build on FreeBSD 7.x)
  
  This is a direct commit.
  
  Approved by:	delphij (mentor)

Modified:
  stable/8/lib/libarchive/Makefile
  stable/8/usr.bin/ar/Makefile
  stable/8/usr.bin/tar/Makefile

Modified: stable/8/lib/libarchive/Makefile
==============================================================================
--- stable/8/lib/libarchive/Makefile	Sun Oct 10 07:28:56 2010	(r213666)
+++ stable/8/lib/libarchive/Makefile	Sun Oct 10 08:41:08 2010	(r213667)
@@ -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

Modified: stable/8/usr.bin/ar/Makefile
==============================================================================
--- stable/8/usr.bin/ar/Makefile	Sun Oct 10 07:28:56 2010	(r213666)
+++ stable/8/usr.bin/ar/Makefile	Sun Oct 10 08:41:08 2010	(r213667)
@@ -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

Modified: stable/8/usr.bin/tar/Makefile
==============================================================================
--- stable/8/usr.bin/tar/Makefile	Sun Oct 10 07:28:56 2010	(r213666)
+++ stable/8/usr.bin/tar/Makefile	Sun Oct 10 08:41:08 2010	(r213667)
@@ -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


More information about the svn-src-all mailing list