Enable liblzma support in libarchive

Adjust dependencies for programs using libarchive
Add xz and linkage against liblzma to rescue system

Approved by:	kientzle, delphij (mentor)
MFC after:	2 weeks
This commit is contained in:
Martin Matuska 2010-05-10 15:28:44 +00:00
parent c3fd23a2dc
commit 7fbeb03eb7
8 changed files with 18 additions and 17 deletions

View File

@ -1113,7 +1113,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \
lib/libbz2 lib/libcom_err lib/libcrypt \
lib/libexpat lib/libfetch \
${_lib_libgssapi} ${_lib_libipx} \
lib/libkiconv lib/libkvm lib/libmd \
lib/libkiconv lib/libkvm lib/liblzma lib/libmd \
lib/ncurses/ncurses lib/ncurses/ncursesw \
lib/libopie lib/libpam ${_lib_libthr} \
lib/libradius lib/libsbuf lib/libtacplus \

View File

@ -2,8 +2,8 @@
.include <bsd.own.mk>
LIB= archive
DPADD= ${LIBBZ2} ${LIBZ} ${LIBMD}
LDADD= -lbz2 -lz -lmd
DPADD= ${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBLZMA}
LDADD= -lbz2 -lz -lmd -llzma
# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
# It has no real relation to the libarchive version number.
@ -11,10 +11,7 @@ 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
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
.if ${MK_OPENSSL} != "no"
CFLAGS+= -DWITH_OPENSSL

View File

@ -208,6 +208,10 @@ CRUNCH_PROGS_usr.bin+= bzip2
CRUNCH_ALIAS_bzip2= bunzip2 bzcat
CRUNCH_LIBS+= -lbz2
CRUNCH_PROGS_usr.bin+= xz
CRUNCH_ALIAS_xz= unxz lzma unlzma xzcat lzcat
CRUNCH_LIBS+= -llzma
CRUNCH_PROGS_usr.bin+= tar
CRUNCH_LIBS+= -larchive -lmd
.if ${MK_OPENSSL} != "no"

View File

@ -3,8 +3,8 @@
PROG= ar
SRCS= ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF}
LDADD= -larchive -lbz2 -lz -lelf
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} ${LIBELF}
LDADD= -larchive -lbz2 -lz -llzma -lelf
CFLAGS+=-I. -I${.CURDIR}

View File

@ -12,8 +12,8 @@ CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
# statically linked, cannot use -lcrypto, and are size sensitive.
CFLAGS+= -DSMALLER
.endif
DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBMD}
LDADD= -larchive -lz -lbz2 -lmd
DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2} ${LIBMD} ${LIBLZMA}
LDADD= -larchive -lz -lbz2 -lmd -llzma
.if ${MK_OPENSSL} != "no"
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto

View File

@ -42,10 +42,10 @@ CLEANFILES+= list.h bsdcpio_test
NO_MAN=yes
PROG=bsdcpio_test
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
CFLAGS+= -I..
LDADD= -larchive -lz -lbz2
LDADD= -larchive -lz -lbz2 -llzma
CFLAGS+= -static -g -O2 -Wall
CFLAGS+= -I${.OBJDIR}
CFLAGS+= -I${CPIO_SRCDIR}

View File

@ -15,8 +15,8 @@ SRCS= bsdtar.c \
tree.c \
util.c \
write.c
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBMD}
LDADD= -larchive -lbz2 -lz -lmd
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBLZMA}
LDADD= -larchive -lbz2 -lz -lmd -llzma
.if ${MK_OPENSSL} != "no"
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto

View File

@ -34,10 +34,10 @@ CLEANFILES+= list.h
NO_MAN=yes
PROG=bsdtar_test
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA}
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
CFLAGS+= -I..
LDADD= -larchive -lz -lbz2
LDADD= -larchive -lz -lbz2 -llzma
CFLAGS+= -static -g -O2 -Wall
CFLAGS+= -I${.OBJDIR}
CFLAGS+= -I${TAR_SRCDIR}