add new option to build/use tools/pigz for compressing sets. for now

USE_PIGZGZIP defaults to "no".  (it depends upon local <pthread.h> and -lz.)

you can set it to "yes" on most modern platforms just fine.
This commit is contained in:
mrg 2010-08-15 07:27:33 +00:00
parent 7a40f55864
commit 25c3593d4e
5 changed files with 26 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.79 2010/06/29 05:51:53 mrg Exp $
# $NetBSD: Makefile,v 1.80 2010/08/15 07:27:33 mrg Exp $
# The `all' target must appear before bsd.own.mk is pulled in.
all:
@ -8,6 +8,12 @@ all:
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
.if ${USE_PIGZGZIP} != "no"
COMPRESS_PROGRAM=${TOOL_PIGZ:Q}
.else
COMPRESS_PROGRAM=gzip
.endif
SETSENV= DESTDIR=${DESTDIR:Q} \
MACHINE=${MACHINE:Q} \
MACHINE_ARCH=${MACHINE_ARCH:Q} \
@ -19,7 +25,7 @@ SETSENV= DESTDIR=${DESTDIR:Q} \
MKTEMP=${TOOL_MKTEMP:Q} \
MTREE=${TOOL_MTREE:Q} \
PAX=${TOOL_PAX:Q} \
PIGZ=${TOOL_PIGZ:Q} \
COMPRESS_PROGRAM=${COMPRESS_PROGRAM:Q} \
PKG_CREATE=${TOOL_PKG_CREATE:Q} \
SED=${TOOL_SED:Q} \
TSORT=${TSORT:Q}

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: maketars,v 1.73 2009/12/10 02:22:57 uebayasi Exp $
# $NetBSD: maketars,v 1.74 2010/08/15 07:27:33 mrg Exp $
#
# Make release tar files for some or all lists. Usage:
# maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
@ -217,6 +217,7 @@ for setname in ${lists:-${nlists}}; do
TMPFILES="${TMPFILES} ${tars}/${out}.tmp"
( cd "${dest}"; \
${PAX} -O -w -d -z -N"${etcdir}" ${metalog:+-M} \
--use-compress-program ${COMPRESS_PROGRAM} \
< "${setlistdir}/set.${setname}" ) \
> "${tars}/${out}.tmp" &&
mv "${tars}/${out}.tmp" "${tars}/${out}"

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.README,v 1.273 2010/06/20 06:54:24 mrg Exp $
# $NetBSD: bsd.README,v 1.274 2010/08/15 07:27:33 mrg Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@ -416,6 +416,11 @@ USE_YP If "no", disables building YP (NIS) support into
various system utilities/libraries that support it.
If ${MKYP} is "no", USE_YP will also be forced to "no".
USE_PIGZGZIP If "no", use the host "gzip" program to compress sets.
Otherwise, build tools/pigz and use nbpigz to compress
the sets.
Default: "no".
X11FLAVOUR Set to "Xorg" or "XFree86", depending on whether to build
XFree86 or modular Xorg. Only matters if MKX11!=no.
Default: "Xorg" on amd64, i386, macppc, shark and sparc64,

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.638 2010/08/02 07:08:26 jmmv Exp $
# $NetBSD: bsd.own.mk,v 1.639 2010/08/15 07:27:34 mrg Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@ -869,9 +869,10 @@ ${var}?= yes
#
# USE_* options which default to "no".
#
#.for var in
#${var}?= no
#.endfor
# For now, disable pigz as compressor by default
.for var in USE_PIGZGZIP
${var}?= no
.endfor
#
# Where X11 sources are and where it is installed to.

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.139 2010/06/18 18:57:27 jmcneill Exp $
# $NetBSD: Makefile,v 1.140 2010/08/15 07:27:33 mrg Exp $
.include <bsd.own.mk>
@ -74,6 +74,10 @@ SUBDIR+= mandoc
SUBDIR+= autoconf .WAIT gettext
.endif
.if ${USE_PIGZGZIP} != "no"
SUBDIR+= pigz
.endif
.if ${MACHINE} == "hp700"
SUBDIR+= hp700-mkboot
.endif