Merge branch 'vendor/BZIP'
authorPeter Avalos <pavalos@theshell.com>
Mon, 20 Sep 2010 21:22:15 +0000 (11:22 -1000)
committerPeter Avalos <pavalos@theshell.com>
Mon, 20 Sep 2010 21:22:15 +0000 (11:22 -1000)
1  2 
contrib/bzip2/README.DELETED
contrib/bzip2/README.DRAGONFLY
lib/libbz2/Makefile
lib/libstand/Makefile
usr.bin/bzip2/Makefile
usr.bin/bzip2recover/Makefile

index 5d12ccf,0000000..5d12ccf
mode 100644,000000..100644
--- /dev/null
index 1be3a06,0000000..1be3a06
mode 100644,000000..100644
--- /dev/null
index 57ea47b,0000000..c38d0d2
mode 100644,000000..100644
--- /dev/null
@@@ -1,15 -1,0 +1,15 @@@
- BZ2DIR=       ${.CURDIR}/../../contrib/bzip2-1.0
 +# $FreeBSD: src/lib/libbz2/Makefile,v 1.2.2.2 2002/07/22 14:21:49 ru Exp $
 +# $DragonFly: src/lib/libbz2/Makefile,v 1.5 2005/06/29 22:40:20 corecode Exp $
 +
++BZ2DIR=       ${.CURDIR}/../../contrib/bzip2
 +.PATH: ${BZ2DIR}
 +
 +LIB=          bz2
 +SHLIB_MAJOR=  2
 +SRCS=         bzlib.c blocksort.c compress.c crctable.c decompress.c \
 +              huffman.c randtable.c
 +INCS=         bzlib.h
 +CFLAGS+=      -I${BZ2DIR}
 +WARNS?=               3
 +
 +.include <bsd.lib.mk>
index 3612521,0000000..d1d8657
mode 100644,000000..100644
--- /dev/null
@@@ -1,109 -1,0 +1,109 @@@
- BZ2DIR=       ${.CURDIR}/../../contrib/bzip2-1.0
 +# $FreeBSD: src/lib/libstand/Makefile,v 1.14.2.10 2002/07/22 14:21:50 ru Exp $
 +# $DragonFly: src/lib/libstand/Makefile,v 1.12 2008/10/28 16:54:09 swildner Exp $
 +#
 +# Originally from     $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $
 +#
 +# Notes:
 +# - We don't use the libc strerror/sys_errlist because the string table is
 +#   quite large.
 +#
 +
 +LIB=          stand
 +NOPROFILE=    YES
 +NOPIC=                YES
 +INCS=         stand.h
 +MAN=          libstand.3
 +WARNS?=               2
 +
 +# Mostly OK, some of the libc imports are a bit noisy
 +CFLAGS+=      -ffreestanding -std=c99
 +
 +.if ${MACHINE_ARCH} == "x86_64"
 +CFLAGS+=      -m32 -mpreferred-stack-boundary=2
 +.endif
 +.if ${MACHINE_ARCH} == "i386"
 +CFLAGS+=      -mpreferred-stack-boundary=2
 +.endif
 +
 +
 +# standalone components and stuff we have modified locally
 +SRCS+=        __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \
 +      globals.c pager.c printf.c strdup.c strerror.c strtol.c random.c \
 +      sbrk.c twiddle.c zalloc.c zalloc_malloc.c
 +
 +# private (pruned) versions of libc string functions
 +SRCS+=        strcasecmp.c
 +
 +# string functions from libc
 +.PATH:        ${.CURDIR}/../libc/string
 +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 +SRCS+=        bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
 +        memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \
 +        strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \
 +      strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
 +.endif
 +.PATH:  ${.CURDIR}/../libc/quad
 +.if ${MACHINE_ARCH} == "i386"
 +SRCS+=  ucmpdi2.c
 +.endif
 +
 +# _setjmp/_longjmp
 +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 +.PATH:        ${.CURDIR}/i386
 +.else
 +.endif
 +# really only required for i386
 +CFLAGS+=-I${.CURDIR}/../libc/${MACHINE_ARCH}
 +SRCS+=        _setjmp.S
 +
 +# decompression functionality from libbz2
++BZ2DIR=       ${.CURDIR}/../../contrib/bzip2
 +.PATH:        ${BZ2DIR}
 +CFLAGS+=-I${BZ2DIR} -DBZ_NO_STDIO -DBZ_NO_COMPRESS
 +SRCS+=        bzlib.c crctable.c decompress.c huffman.c randtable.c bzlib.h \
 +      bzlib_private.h
 +
 +# check your belt - ugly bzip2 stuff ahead
 +.for file in bzlib.c
 +CLEANFILES+=   ${file}
 +
 +${file}: ${BZ2DIR}/${file} ${file}.diff
 +      patch -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
 +.endfor
 +
 +.include "../libz/Makefile.stand"
 +
 +# io routines
 +SRCS+=        closeall.c dev.c ioctl.c nullfs.c stat.c \
 +      fstat.c close.c lseek.c open.c read.c write.c readdir.c
 +
 +# network routines
 +SRCS+=        arp.c ether.c inet_ntoa.c in_cksum.c net.c udp.c netif.c rpc.c
 +
 +# network info services:
 +SRCS+=        bootp.c rarp.c bootparam.c
 +
 +# boot filesystems
 +SRCS+=        ufs.c nfs.c cd9660.c tftp.c zipfs.c bzipfs.c gzipfs.c
 +SRCS+=        netif.c nfs.c
 +SRCS+=        dosfs.c ext2fs.c
 +SRCS+=        splitfs.c
 +SRCS+=        hammerread.c
 +
 +.include <bsd.lib.mk>
 +
 +.if ${MACHINE_ARCH} == "x86_64"
 +CFLAGS+= -I${.OBJDIR}
 +
 +beforedepend ${OBJS}: machine cpu
 +
 +machine::
 +      mkdir -p machine
 +      ${LN} -fs ${.CURDIR}/../../sys/cpu/i386/include/* machine
 +      ${LN} -fs ${.CURDIR}/../../sys/platform/pc32/include/* machine
 +
 +cpu::
 +      ${LN} -hfs ${.CURDIR}/../../sys/cpu/i386/include cpu
 +
 +CLEANDIRS+=   machine cpu
 +.endif
index f18755b,0000000..388460c
mode 100644,000000..100644
--- /dev/null
@@@ -1,45 -1,0 +1,45 @@@
- BZ2DIR=       ${.CURDIR}/../../contrib/bzip2-1.0
 +# $FreeBSD: src/usr.bin/bzip2/Makefile,v 1.5.2.2 2001/08/02 01:09:06 obrien Exp $
 +# $DragonFly: src/usr.bin/bzip2/Makefile,v 1.8 2007/08/27 16:50:51 pavalos Exp $
 +
++BZ2DIR=       ${.CURDIR}/../../contrib/bzip2
 +
 +.PATH: ${BZ2DIR}
 +
 +PROG= bzip2
 +WARNS?=       2
 +
 +CFLAGS+= -D_FILE_OFFSET_BITS=64
 +
 +DPADD=        ${LIBBZ2}
 +LDADD=        -lbz2
 +
 +NOSHARED?=    YES
 +
 +LINKS=        ${BINDIR}/bzip2 ${BINDIR}/bunzip2
 +LINKS+=       ${BINDIR}/bzip2 ${BINDIR}/bzcat
 +MLINKS=       bzip2.1 bunzip2.1 bzip2.1 bzcat.1 bzip2.1 bzip2recover.1
 +
 +REFFILES=     sample1.ref sample2.ref sample3.ref 
 +DREFFILES=    sample1.bz2 sample2.bz2 sample3.bz2 
 +TESTFILES=    ${REFFILES} ${DREFFILES}
 +
 +CLEANFILES+=  sample1.rb2 sample2.rb2 sample3.rb2 \
 +              sample1.tst sample2.tst sample3.tst
 +
 +test:  bzip2 ${TESTFILES}
 +      @cat ${BZ2DIR}/words1
 +      ./bzip2 -1  < ${BZ2DIR}/sample1.ref > sample1.rb2
 +      ./bzip2 -2  < ${BZ2DIR}/sample2.ref > sample2.rb2
 +      ./bzip2 -3  < ${BZ2DIR}/sample3.ref > sample3.rb2
 +      ./bzip2 -d  < ${BZ2DIR}/sample1.bz2 > sample1.tst
 +      ./bzip2 -d  < ${BZ2DIR}/sample2.bz2 > sample2.tst
 +      ./bzip2 -ds < ${BZ2DIR}/sample3.bz2 > sample3.tst
 +      cmp ${BZ2DIR}/sample1.bz2 sample1.rb2 
 +      cmp ${BZ2DIR}/sample2.bz2 sample2.rb2
 +      cmp ${BZ2DIR}/sample3.bz2 sample3.rb2
 +      cmp sample1.tst ${BZ2DIR}/sample1.ref
 +      cmp sample2.tst ${BZ2DIR}/sample2.ref
 +      cmp sample3.tst ${BZ2DIR}/sample3.ref
 +      @cat ${BZ2DIR}/words3
 +
 +.include <bsd.prog.mk>
index ae920f3,0000000..b4d8278
mode 100644,000000..100644
--- /dev/null
@@@ -1,10 -1,0 +1,10 @@@
- BZ2DIR=       ${.CURDIR}/../../contrib/bzip2-1.0
 +# $FreeBSD: src/usr.bin/bzip2recover/Makefile,v 1.1.2.1 2003/01/04 17:17:08 obrien Exp $
 +# $DragonFly: src/usr.bin/bzip2recover/Makefile,v 1.4 2005/06/29 22:40:20 corecode Exp $
 +
++BZ2DIR=       ${.CURDIR}/../../contrib/bzip2
 +.PATH: ${BZ2DIR}
 +
 +PROG= bzip2recover
 +NOMAN=
 +
 +.include <bsd.prog.mk>