Author: mm
Date: Mon May 10 06:59:50 2010
New Revision: 207842
URL: http://svn.freebsd.org/changeset/base/207842

Log:
  Import of liblzma, xz, xzdec, lzmainfo from vendor branch
  Add support for xz and lzma to lesspipe.sh (xzless, lzless)
  Bump __FreeBSD_version
  
  Approved by:  delphij (mentor)
  MFC after:    2 weeks

Added:
  head/contrib/xz/
     - copied from r207829, vendor/xz/dist/
  head/contrib/xz/FREEBSD-Xlist   (contents, props changed)
  head/contrib/xz/FREEBSD-upgrade   (contents, props changed)
  head/lib/liblzma/
  head/lib/liblzma/Makefile   (contents, props changed)
  head/lib/liblzma/config.h   (contents, props changed)
  head/usr.bin/lzmainfo/
  head/usr.bin/lzmainfo/Makefile   (contents, props changed)
  head/usr.bin/xz/
  head/usr.bin/xz/Makefile   (contents, props changed)
  head/usr.bin/xzdec/
  head/usr.bin/xzdec/Makefile   (contents, props changed)
Modified:
  head/etc/mtree/BSD.include.dist
  head/lib/Makefile
  head/share/mk/bsd.libnames.mk
  head/sys/sys/param.h
  head/usr.bin/Makefile
  head/usr.bin/less/Makefile
  head/usr.bin/less/lesspipe.sh

Added: head/contrib/xz/FREEBSD-Xlist
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/xz/FREEBSD-Xlist       Mon May 10 06:59:50 2010        
(r207842)
@@ -0,0 +1,37 @@
+$FreeBSD$
+*/*/*/Makefile.*
+*/*/Makefile.*
+*/.gitignore
+*/Makefile.*
+.git
+.gitignore
+ABOUT-NLS
+COPYING.GPLv2
+COPYING.GPLv3
+COPYING.LGPLv2.1
+Doxyfile.in
+INSTALL
+INSTALL.generic
+Makefile
+Makefile.*
+NEWS
+PACKAGERS
+aclocal.m4
+autogen.sh
+build-aux/
+config.h.in
+configure
+configure.ac
+debug/
+doc/
+dos/
+extra/
+lib/
+m4/
+makefile.am
+src/*/*.rc
+src/liblzma/liblzma.pc.in
+src/scripts/
+tests/
+version.sh
+windows/

Added: head/contrib/xz/FREEBSD-upgrade
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/xz/FREEBSD-upgrade     Mon May 10 06:59:50 2010        
(r207842)
@@ -0,0 +1,28 @@
+$FreeBSD$
+
+xz
+
+The source code is pulled with git:
+
+       git clone git://ctrl.tukaani.org/xz.git xz
+
+ChangeLog is generated with:
+       
+       git log > ChangeLog
+
+For the import files and directories were pruned by:
+       
+sh -c 'for F in `cat FREEBSD-Xlist | grep -v FreeBSD`; do rm -rf ./$F ; done'
+
+You may check if there are any new files that we don't need.
+
+The instructions for importing new release and merging to HEAD can be found
+at FreeBSD wiki:
+
+       http://wiki.freebsd.org/SubversionPrimer/VendorImports
+
+To make local changes to xz, simply patch and commit to the trunk
+branch (aka HEAD).  Never make local changes on the vendor branch.
+
+...@freebsd.org
+10-May-2010

Modified: head/etc/mtree/BSD.include.dist
==============================================================================
--- head/etc/mtree/BSD.include.dist     Mon May 10 06:59:07 2010        
(r207841)
+++ head/etc/mtree/BSD.include.dist     Mon May 10 06:59:50 2010        
(r207842)
@@ -207,6 +207,8 @@
     ..
     lwres
     ..
+    lzma
+    ..
     machine
         pc
         ..

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile   Mon May 10 06:59:07 2010        (r207841)
+++ head/lib/Makefile   Mon May 10 06:59:50 2010        (r207842)
@@ -76,6 +76,7 @@ SUBDIR=       ${SUBDIR_ORDERED} \
        ${_libipx} \
        libjail \
        libkiconv \
+       liblzma \
        libmagic \
        libmemstat \
        ${_libmilter} \

Added: head/lib/liblzma/Makefile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/liblzma/Makefile   Mon May 10 06:59:50 2010        (r207842)
@@ -0,0 +1,135 @@
+# $FreeBSD$
+
+LIB=   lzma
+SHLIB_MAJOR=   0
+LZMADIR=       ${.CURDIR}/../../contrib/xz/src/liblzma
+
+.PATH: ${LZMADIR}/../common
+SRCS+= tuklib_physmem.c
+
+.PATH: ${LZMADIR}/api/lzma
+
+MAININCS=      ../lzma.h
+MAININCSDIR=   ${INCLUDEDIR}
+
+LZMAINCS+=     base.h \
+               bcj.h \
+               block.h \
+               check.h \
+               container.h \
+               delta.h \
+               filter.h \
+               index_hash.h \
+               lzma.h \
+               stream_flags.h \
+               subblock.h \
+               version.h \
+               vli.h
+
+LZMAINCSDIR=   ${INCLUDEDIR}/lzma
+
+INCSGROUPS=    MAININCS LZMAINCS
+
+.PATH: ${LZMADIR}/common
+SRCS+= common.c \
+       block_util.c \
+       easy_preset.c \
+       filter_common.c \
+       hardware_physmem.c \
+       index.c \
+       stream_flags_common.c \
+       vli_size.c \
+       alone_encoder.c \
+       block_buffer_encoder.c \
+       block_encoder.c \
+       block_header_encoder.c \
+       easy_buffer_encoder.c \
+       easy_encoder.c \
+       easy_encoder_memusage.c \
+       filter_buffer_encoder.c \
+       filter_encoder.c \
+       filter_flags_encoder.c \
+       index_encoder.c \
+       stream_buffer_encoder.c \
+       stream_encoder.c \
+       stream_flags_encoder.c \
+       vli_encoder.c \
+       alone_decoder.c \
+       auto_decoder.c \
+       block_buffer_decoder.c \
+       block_decoder.c \
+       block_header_decoder.c \
+       easy_decoder_memusage.c \
+       filter_buffer_decoder.c \
+       filter_decoder.c \
+       filter_flags_decoder.c \
+       index_decoder.c \
+       index_hash.c \
+       stream_buffer_decoder.c \
+       stream_decoder.c \
+       stream_flags_decoder.c \
+       vli_decoder.c
+
+.PATH: ${LZMADIR}/check
+SRCS+= check.c \
+       crc32_table.c \
+       crc64_table.c \
+       sha256.c
+.if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
+SRCS+= crc32_x86.S \
+       crc64_x86.S
+.else
+SRCS+= crc32_fast.c \
+       crc64_fast.c
+.endif
+
+.PATH: ${LZMADIR}/lz
+SRCS+= lz_encoder.c \
+       lz_encoder_mf.c \
+       lz_decoder.c
+
+.PATH: ${LZMADIR}/lzma
+SRCS+= lzma_encoder.c \
+       lzma_encoder_presets.c \
+       lzma_encoder_optimum_fast.c \
+       lzma_encoder_optimum_normal.c \
+       fastpos_table.c \
+       lzma_decoder.c \
+       lzma2_encoder.c \
+       lzma2_decoder.c
+
+.PATH: ${LZMADIR}/rangecoder
+SRCS+= price_table.c
+
+.PATH: ${LZMADIR}/delta
+SRCS+= delta_common.c \
+       delta_encoder.c \
+       delta_decoder.c
+
+.PATH: ${LZMADIR}/simple
+SRCS+= simple_coder.c \
+       simple_encoder.c \
+       simple_decoder.c \
+       x86.c \
+       powerpc.c \
+       ia64.c \
+       arm.c \
+       armthumb.c \
+       sparc.c
+               
+WARNS?=        3
+
+CFLAGS+=       -DHAVE_CONFIG_H \
+               -I${.CURDIR} \
+               -I${LZMADIR}/api \
+               -I${LZMADIR}/common \
+               -I${LZMADIR}/check \
+               -I${LZMADIR}/lz \
+               -I${LZMADIR}/rangecoder \
+               -I${LZMADIR}/lzma \
+               -I${LZMADIR}/subblock \
+               -I${LZMADIR}/delta \
+               -I${LZMADIR}/simple \
+               -I${LZMADIR}/../common
+
+.include <bsd.lib.mk>

Added: head/lib/liblzma/config.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/liblzma/config.h   Mon May 10 06:59:50 2010        (r207842)
@@ -0,0 +1,95 @@
+// $FreeBSD$
+#define ASSUME_RAM 128
+#define HAVE_CHECK_CRC32 1
+#define HAVE_CHECK_CRC64 1
+#define HAVE_CHECK_SHA256 1
+#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
+#define HAVE_DECODER 1
+#define HAVE_DECODER_ARM 1
+#define HAVE_DECODER_ARMTHUMB 1
+#define HAVE_DECODER_DELTA 1
+#define HAVE_DECODER_IA64 1
+#define HAVE_DECODER_LZMA1 1
+#define HAVE_DECODER_LZMA2 1
+#define HAVE_DECODER_POWERPC 1
+#define HAVE_DECODER_SPARC 1
+#define HAVE_DECODER_X86 1
+#define HAVE_DLFCN_H 1
+#define HAVE_ENCODER 1
+#define HAVE_ENCODER_ARM 1
+#define HAVE_ENCODER_ARMTHUMB 1
+#define HAVE_ENCODER_DELTA 1
+#define HAVE_ENCODER_IA64 1
+#define HAVE_ENCODER_LZMA1 1
+#define HAVE_ENCODER_LZMA2 1
+#define HAVE_ENCODER_POWERPC 1
+#define HAVE_ENCODER_SPARC 1
+#define HAVE_ENCODER_X86 1
+#define HAVE_FCNTL_H 1
+#define HAVE_FUTIMES 1
+#define HAVE_GETOPT_H 1
+#define HAVE_GETOPT_LONG 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_MF_BT2 1
+#define HAVE_MF_BT3 1
+#define HAVE_MF_BT4 1
+#define HAVE_MF_HC3 1
+#define HAVE_MF_HC4 1
+#define HAVE_OPTRESET 1
+#define HAVE_PTHREAD 1
+#define HAVE_STDBOOL_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
+#define HAVE_SYS_ENDIAN_H 1
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_UINTPTR_T 1
+#define HAVE_UNISTD_H 1
+#define HAVE_VISIBILITY 1
+#define HAVE__BOOL 1
+#define LT_OBJDIR ".libs/"
+#define NDEBUG 1
+#define PACKAGE "xz"
+#define PACKAGE_BUGREPORT "lasse.col...@tukaani.org"
+#define PACKAGE_NAME "XZ Utils"
+#define PACKAGE_STRING "XZ Utils 4.999.9beta"
+#define PACKAGE_TARNAME "xz"
+#define PACKAGE_URL "http://tukaani.org/xz/";
+#define PACKAGE_VERSION "4.999.9beta"
+#define SIZEOF_SIZE_T 8
+#define STDC_HEADERS 1
+#define TUKLIB_CPUCORES_SYSCONF 1
+#define TUKLIB_FAST_UNALIGNED_ACCESS 1
+#define TUKLIB_PHYSMEM_SYSCONF 1
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+#define VERSION "4.999.9beta"
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif

Modified: head/share/mk/bsd.libnames.mk
==============================================================================
--- head/share/mk/bsd.libnames.mk       Mon May 10 06:59:07 2010        
(r207841)
+++ head/share/mk/bsd.libnames.mk       Mon May 10 06:59:50 2010        
(r207842)
@@ -82,6 +82,7 @@ LIBLN?=               "don't use LIBLN, use LIBL"
 .if ${MK_BIND} != "no"
 LIBLWRES?=     ${DESTDIR}${LIBDIR}/liblwres.a
 .endif
+LIBLZMA?=      ${DESTDIR}${LIBDIR}/liblzma.a
 LIBM?=         ${DESTDIR}${LIBDIR}/libm.a
 LIBMAGIC?=     ${DESTDIR}${LIBDIR}/libmagic.a
 LIBMD?=                ${DESTDIR}${LIBDIR}/libmd.a

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h        Mon May 10 06:59:07 2010        (r207841)
+++ head/sys/sys/param.h        Mon May 10 06:59:50 2010        (r207842)
@@ -58,7 +58,7 @@
  *             in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 900011       /* Master, propagated to newvers */
+#define __FreeBSD_version 900012       /* Master, propagated to newvers */
 
 #ifndef LOCORE
 #include <sys/types.h>

Modified: head/usr.bin/Makefile
==============================================================================
--- head/usr.bin/Makefile       Mon May 10 06:59:07 2010        (r207841)
+++ head/usr.bin/Makefile       Mon May 10 06:59:50 2010        (r207842)
@@ -116,6 +116,7 @@ SUBDIR=     alias \
        look \
        lorder \
        lsvfs \
+       lzmainfo \
        m4 \
        ${_mail} \
        ${_make} \
@@ -233,6 +234,8 @@ SUBDIR=     alias \
        xinstall \
        ${_xlint} \
        ${_xstr} \
+       xz \
+       xzdec \
        ${_yacc} \
        yes \
        ${_ypcat} \

Modified: head/usr.bin/less/Makefile
==============================================================================
--- head/usr.bin/less/Makefile  Mon May 10 06:59:07 2010        (r207841)
+++ head/usr.bin/less/Makefile  Mon May 10 06:59:50 2010        (r207842)
@@ -11,7 +11,9 @@ SCRIPTSNAME_lesspipe.sh=lesspipe.sh
 DPADD= ${LIBTERMCAP}
 LDADD= -ltermcap
 LINKS= ${BINDIR}/less ${BINDIR}/more \
-       ${BINDIR}/zless ${BINDIR}/bzless
+       ${BINDIR}/zless ${BINDIR}/bzless \
+       ${BINDIR}/zless ${BINDIR}/xzless \
+       ${BINDIR}/zless ${BINDIR}/lzless
 MLINKS=        less.1 more.1
 CLEANFILES= less.1
 

Modified: head/usr.bin/less/lesspipe.sh
==============================================================================
--- head/usr.bin/less/lesspipe.sh       Mon May 10 06:59:07 2010        
(r207841)
+++ head/usr.bin/less/lesspipe.sh       Mon May 10 06:59:50 2010        
(r207842)
@@ -13,4 +13,10 @@ case "$1" in
        *.bz2)
                exec bzip2 -d -c "$1"   2>/dev/null
                ;;
+       *.xz)
+               exec xz -d -c "$1"      2>/dev/null
+               ;;
+       *.lzma)
+               exec lzma -d -c "$1"    2>/dev/null
+               ;;
 esac

Added: head/usr.bin/lzmainfo/Makefile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/lzmainfo/Makefile      Mon May 10 06:59:50 2010        
(r207842)
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PROG=  lzmainfo
+
+XZDIR= ${.CURDIR}/../../contrib/xz/src
+LZMALIBDIR=    ${.CURDIR}/../../lib/liblzma
+
+.PATH: ${XZDIR}/lzmainfo
+SRCS+= lzmainfo.c
+
+.PATH: ${XZDIR}/common
+SRCS+= tuklib_progname.c \
+       tuklib_exit.c
+
+WARNS?=        3
+
+CFLAGS+=       -DHAVE_CONFIG_H \
+               -I${LZMALIBDIR} \
+               -I${XZDIR}/common \
+               -I${XZDIR}/liblzma/api
+
+DPADD= ${LIBLZMA}
+LDADD= -llzma
+
+.include <bsd.prog.mk>

Added: head/usr.bin/xz/Makefile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/xz/Makefile    Mon May 10 06:59:50 2010        (r207842)
@@ -0,0 +1,47 @@
+# $FreeBSD$
+
+PROG=  xz
+
+LINKS= ${BINDIR}/xz ${BINDIR}/unxz
+LINKS+=        ${BINDIR}/xz ${BINDIR}/lzma
+LINKS+=        ${BINDIR}/xz ${BINDIR}/unlzma
+LINKS+=        ${BINDIR}/xz ${BINDIR}/xzcat
+LINKS+=        ${BINDIR}/xz ${BINDIR}/lzcat
+
+MLINKS= xz.1 unxz.1 xz.1 lzma.1 xz.1 unlzma.1 xz.1 xzcat.1 xz.1 lzcat.1
+
+XZDIR= ${.CURDIR}/../../contrib/xz/src
+LZMALIBDIR=    ${.CURDIR}/../../lib/liblzma
+
+.PATH: ${XZDIR}/xz
+
+SRCS=  args.c \
+       coder.c \
+       file_io.c \
+       hardware.c \
+       list.c \
+       main.c \
+       message.c \
+       options.c \
+       signals.c \
+       suffix.c \
+       util.c
+
+.PATH: ${XZDIR}/common
+
+SRCS+= tuklib_open_stdxxx.c \
+       tuklib_progname.c \
+       tuklib_exit.c \
+       tuklib_cpucores.c
+
+WARNS?=        3
+
+CFLAGS+=       -DHAVE_CONFIG_H \
+               -I${LZMALIBDIR} \
+               -I${XZDIR}/common \
+               -I${XZDIR}/liblzma/api
+
+DPADD= ${LIBLZMA}
+LDADD= -llzma
+
+.include <bsd.prog.mk>

Added: head/usr.bin/xzdec/Makefile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/xzdec/Makefile Mon May 10 06:59:50 2010        (r207842)
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+PROG=  xzdec
+
+LINKS= ${BINDIR}/xzdec ${BINDIR}/lzdec
+
+MLINKS= xzdec.1 lzmadec.1
+
+XZDIR= ${.CURDIR}/../../contrib/xz/src
+LZMALIBDIR=    ${.CURDIR}/../../lib/liblzma
+
+.PATH: ${XZDIR}/xzdec
+
+SRCS=  xzdec.c
+
+.PATH: ${XZDIR}/common
+
+SRCS+= tuklib_progname.c \
+       tuklib_exit.c
+
+WARNS?=        3
+
+CFLAGS+=       -DHAVE_CONFIG_H \
+               -I${LZMALIBDIR} \
+               -I${XZDIR}/common \
+               -I${XZDIR}/liblzma/api
+
+DPADD= ${LIBLZMA}
+LDADD= -llzma
+
+.include <bsd.prog.mk>
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to