<commit_before># $FreeBSD$

MAINTAINER=<EMAIL>

BZ2DIR=	${.CURDIR}/../../contrib/bzip2
.PATH: ${BZ2DIR}

PROG=	bzip2
MAN=	bzip2.1
CFLAGS=	-D_FILE_OFFSET_BITS=64

DPADD=	${LIBBZ2}
LDADD=	-lbz2

LINKS=	${BINDIR}/bzip2 ${BINDIR}/bunzip2
LINKS+=	${BINDIR}/bzip2 ${BINDIR}/bzcat
MLINKS= bzip2.1 bunzip2.1 bzip2.1 bzcat.1

REFFILES=	sample1.ref sample2.ref sample3.ref 
DREFFILES=	sample1.bz2 sample2.bz2 sample3.bz2 
TESTFILES=	${REFFILES} ${DREFFILES}

CLEANFILES+=	${TESTFILES} \
		sample1.rb2 sample2.rb2 sample3.rb2 \
		sample1.tst sample2.tst sample3.tst

.for f in ${REFFILES}
${f}:	${f}.gz.uu
	uudecode -p ${BZ2DIR}/${f}.gz.uu | gunzip > ${f}
.endfor
.for f in ${DREFFILES}
${f}:	${f}.uu
	uudecode ${BZ2DIR}/${f}.uu
.endfor

test:  bzip2 ${TESTFILES}
	@cat ${BZ2DIR}/words1
	./bzip2 -1  < sample1.ref > sample1.rb2
	./bzip2 -2  < sample2.ref > sample2.rb2
	./bzip2 -3  < sample3.ref > sample3.rb2<commit_msg>By default link statically (like we did in the port) - it provides 8-10% faster comperssion, which in the bzip2's case could be a big win.<commit_after># $FreeBSD$

MAINTAINER=<EMAIL>

BZ2DIR=	${.CURDIR}/../../contrib/bzip2
.PATH: ${BZ2DIR}

PROG=	bzip2
MAN=	bzip2.1
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

REFFILES=	sample1.ref sample2.ref sample3.ref 
DREFFILES=	sample1.bz2 sample2.bz2 sample3.bz2 
TESTFILES=	${REFFILES} ${DREFFILES}

CLEANFILES+=	${TESTFILES} \
		sample1.rb2 sample2.rb2 sample3.rb2 \
		sample1.tst sample2.tst sample3.tst

.for f in ${REFFILES}
${f}:	${f}.gz.uu
	uudecode -p ${BZ2DIR}/${f}.gz.uu | gunzip > ${f}
.endfor
.for f in ${DREFFILES}
${f}:	${f}.uu
	uudecode ${BZ2DIR}/${f}.uu
.endfor

test:  bzip2 ${TESTFILES}
	@cat ${BZ2DIR}/words1
	./bzip2 -1  < sample1.ref > sample1.rb2
	./bzip2 -2  < sample2.ref > sample2.rb2
	./bzip2 -3  < sample3.ref > sample3.rb2
{'fraction_non_alphanumeric': 0.17950025497195307, 'fraction_numerical': 0.06119326874043855, 'mean_word_length': 3.92964824120603, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4589446', 'n_tokens_mistral': 996, 'n_tokens_neox': 974, 'n_words': 195}