From: Peter Avalos Date: Mon, 20 Sep 2010 21:22:15 +0000 (-1000) Subject: Merge branch 'vendor/BZIP' X-Git-Url: https://gitweb.dragonflybsd.org/~uqs/games.git/commitdiff_plain/7295dc4694612795b7574965e1527509404c9c0f Merge branch 'vendor/BZIP' --- 7295dc4694612795b7574965e1527509404c9c0f diff --cc contrib/bzip2/README.DELETED index 5d12ccf6c0,0000000000..5d12ccf6c0 mode 100644,000000..100644 --- a/contrib/bzip2/README.DELETED +++ b/contrib/bzip2/README.DELETED diff --cc contrib/bzip2/README.DRAGONFLY index 1be3a06663,0000000000..1be3a06663 mode 100644,000000..100644 --- a/contrib/bzip2/README.DRAGONFLY +++ b/contrib/bzip2/README.DRAGONFLY diff --cc lib/libbz2/Makefile index 57ea47b385,0000000000..c38d0d2a3d mode 100644,000000..100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@@ -1,15 -1,0 +1,15 @@@ +# $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-1.0 ++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 diff --cc lib/libstand/Makefile index 361252157b,0000000000..d1d8657e36 mode 100644,000000..100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile @@@ -1,109 -1,0 +1,109 @@@ +# $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-1.0 ++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 + +.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 diff --cc usr.bin/bzip2/Makefile index f18755b6e1,0000000000..388460c70e mode 100644,000000..100644 --- a/usr.bin/bzip2/Makefile +++ b/usr.bin/bzip2/Makefile @@@ -1,45 -1,0 +1,45 @@@ +# $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-1.0 ++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 diff --cc usr.bin/bzip2recover/Makefile index ae920f3231,0000000000..b4d827853e mode 100644,000000..100644 --- a/usr.bin/bzip2recover/Makefile +++ b/usr.bin/bzip2recover/Makefile @@@ -1,10 -1,0 +1,10 @@@ +# $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-1.0 ++BZ2DIR= ${.CURDIR}/../../contrib/bzip2 +.PATH: ${BZ2DIR} + +PROG= bzip2recover +NOMAN= + +.include