Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src add new option to build/use tools/pigz for compressing sets....



details:   https://anonhg.NetBSD.org/src/rev/241128a23023
branches:  trunk
changeset: 757111:241128a23023
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Aug 15 07:27:33 2010 +0000

description:
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.

diffstat:

 distrib/sets/Makefile |  10 ++++++++--
 distrib/sets/maketars |   3 ++-
 share/mk/bsd.README   |   7 ++++++-
 share/mk/bsd.own.mk   |   9 +++++----
 tools/Makefile        |   6 +++++-
 5 files changed, 26 insertions(+), 9 deletions(-)

diffs (114 lines):

diff -r 49b66ac16010 -r 241128a23023 distrib/sets/Makefile
--- a/distrib/sets/Makefile     Sun Aug 15 06:48:56 2010 +0000
+++ b/distrib/sets/Makefile     Sun Aug 15 07:27:33 2010 +0000
@@ -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 @@
 .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 @@
                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}
diff -r 49b66ac16010 -r 241128a23023 distrib/sets/maketars
--- a/distrib/sets/maketars     Sun Aug 15 06:48:56 2010 +0000
+++ b/distrib/sets/maketars     Sun Aug 15 07:27:33 2010 +0000
@@ -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 @@
                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}"
diff -r 49b66ac16010 -r 241128a23023 share/mk/bsd.README
--- a/share/mk/bsd.README       Sun Aug 15 06:48:56 2010 +0000
+++ b/share/mk/bsd.README       Sun Aug 15 07:27:33 2010 +0000
@@ -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 @@
                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,
diff -r 49b66ac16010 -r 241128a23023 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Sun Aug 15 06:48:56 2010 +0000
+++ b/share/mk/bsd.own.mk       Sun Aug 15 07:27:33 2010 +0000
@@ -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 @@
 #
 # 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.
diff -r 49b66ac16010 -r 241128a23023 tools/Makefile
--- a/tools/Makefile    Sun Aug 15 06:48:56 2010 +0000
+++ b/tools/Makefile    Sun Aug 15 07:27:33 2010 +0000
@@ -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+=       autoconf .WAIT gettext
 .endif
 
+.if ${USE_PIGZGZIP} != "no"
+SUBDIR+=       pigz
+.endif
+
 .if ${MACHINE} == "hp700"
 SUBDIR+=       hp700-mkboot
 .endif



Home | Main Index | Thread Index | Old Index