PSARC 2012/357 pigz s11-update
authorMichael Gerdts <mike.gerdts@oracle.com>
Wed, 20 Mar 2013 10:12:13 -0700
branchs11-update
changeset 3420 8e187df4069d
parent 3418 e8909b770a1a
child 3421 fbc84ea2ff1c
PSARC 2012/357 pigz 15824048 SUNBT7205721 bring pigz into userland consolidation
components/pigz/Makefile
components/pigz/patches/Makefile.patch
components/pigz/pigz.license
components/pigz/pigz.p5m
components/pigz/resolve.deps
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pigz/Makefile	Wed Mar 20 10:12:13 2013 -0700
@@ -0,0 +1,59 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+#
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		pigz
+COMPONENT_VERSION=	2.2.5
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_PROJECT_URL=	http://zlib.net/pigz/
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH=	\
+    sha256:e37498cbf3a475d7ebe2519751188c29564bf8dd27ba68bd3c7fe1ac08792759
+COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB=	utility/pigz
+COMPONENT_TEST_TARGETS=	test
+
+TPNO=			11152
+
+include ../../make-rules/prep.mk
+include ../../make-rules/justmake.mk
+include ../../make-rules/ips.mk
+
+PKG_PROTO_DIRS += $(BUILD_DIR_64)
+
+CC += $(CC_BITS)
+COMPONENT_BUILD_ARGS += CC="$(CC)"
+COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
+
+ASLR_MODE = $(ASLR_ENABLE)
+
+# common targets
+build:		$(BUILD_64)
+
+install:	$(BUILD_64)
+
+test:		$(TEST_64)
+
+BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
+
+include ../../make-rules/depend.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pigz/patches/Makefile.patch	Wed Mar 20 10:12:13 2013 -0700
@@ -0,0 +1,15 @@
+# Solaris used to have whereis but it was removed early in S12.  Use type
+# instead.  Because most Linux distros have whereis, this patch is deemed
+# Solaris-centric and thus not worthy of being submitted upstream.
+#
+--- pigz-2.2.5/Makefile.orig	2012-02-11 21:18:18.000000000 -0800
++++ pigz-2.2.5/Makefile	2013-03-15 06:01:46.213801609 -0700
[email protected]@ -39,7 +39,7 @@
+ 	(printf "w" | gzip ; printf "x") | ./pigz -cdf | wc -c | test `cat` -eq 2
+ 	(printf "w" | gzip ; printf "xy") | ./pigz -cdf | wc -c | test `cat` -eq 3
+ 	(printf "w" | gzip ; printf "xyz") | ./pigz -cdf | wc -c | test `cat` -eq 4
+-	[email protected] test "`whereis compress | grep /`" != ""; then \
++	[email protected] test "`type -f compress | grep /`" != ""; then \
+ 	  echo 'compress -f < pigz.c | ./unpigz | cmp - pigz.c' ;\
+ 	  compress -f < pigz.c | ./unpigz | cmp - pigz.c ;\
+ 	fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pigz/pigz.license	Wed Mar 20 10:12:13 2013 -0700
@@ -0,0 +1,24 @@
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the author be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Mark Adler
+  [email protected]
+
+  Mark accepts donations for providing this software.  Donations are not
+  required or expected.  Any amount that you feel is appropriate would be
+  appreciated.  You can use this link:
+
+  https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=536055
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pigz/pigz.p5m	Wed Mar 20 10:12:13 2013 -0700
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability Uncommitted>
+set name=pkg.fmri \
+    value=pkg:/compress/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="parallel implementation of gzip"
+set name=pkg.description \
+    value="Pigz compresses using threads to make use of multiple processors and cores. The compressed data format generated is in the gzip, zlib, or single-entry zip format using the deflate compression method."
+set name=com.oracle.info.description value="parallel gzip"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value="org.opensolaris.category.2008:Applications/System Utilities"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream value="Mark Adler <[email protected]>"
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2012/357
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file pigz path=usr/bin/pigz
+link path=usr/bin/unpigz target=pigz
+file pigz.1 path=usr/share/man/man1/pigz.1
+license pigz.license license=BSD-like
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pigz/resolve.deps	Wed Mar 20 10:12:13 2013 -0700
@@ -0,0 +1,2 @@
+library/zlib
+system/library