24710228 add jq and oniguruma to userland
authorArtem Kachitchkine <artem.kachitchkine@oracle.com>
Wed, 30 Nov 2016 19:29:35 -0800
changeset 7420 a5a56b02087b
parent 7418 13f198c70f3c
child 7421 ff501eb83f43
24710228 add jq and oniguruma to userland
components/jq/Makefile
components/jq/depend.mk
components/jq/jq.license
components/jq/jq.p5m
components/jq/patches/test-setup.patch
components/jq/patches/xpg6.patch
components/jq/test/results-64.master
components/oniguruma/Makefile
components/oniguruma/oniguruma.p5m
components/oniguruma/test/results-64.master
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/jq/Makefile	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,79 @@
+#
+# 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) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+BUILD_BITS = 64
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME =	jq
+COMPONENT_VERSION =	1.5
+COMPONENT_PROJECT_URL =	https://github.com/stedolan/jq
+COMPONENT_ARCHIVE_HASH =	\
+    sha256:c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c
+COMPONENT_ARCHIVE_URL =	$(COMPONENT_PROJECT_URL)/releases/download/$(COMPONENT_NAME)-$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB =	utility/jq
+
+TPNO =			27148
+
+include $(WS_MAKE_RULES)/common.mk
+
+COMPILER =		gcc
+
+# noexbss causes onig.test to fail
+LD_MAP_NOEXBSS.sparc =
+
+# delete all this when build servers are installed with oniguruma
+ONIG_PROTO =		$(WS_COMPONENTS)/oniguruma/build/prototype/$(MACH)
+ONIG_LIBDIR =		$(ONIG_PROTO)$(USRLIBDIR64)
+ONIG_INCDIR =		$(ONIG_PROTO)$(USRINCDIR)
+CONFIGURE_ENV +=	CPPFLAGS="$(CPPFLAGS) -I$(ONIG_INCDIR)"
+CONFIGURE_ENV +=	LDFLAGS="$(LDFLAGS) -L$(ONIG_LIBDIR)"
+CONFIGURE_OPTIONS +=	--with-oniguruma=$(ONIG_PROTO)$(USRDIR)
+
+# couldn't convince autotools to not include the proto runpath
+COMPONENT_POST_INSTALL_ACTION += \
+	( /usr/bin/elfedit -e 'dyn:delete RPATH' -e 'dyn:delete RUNPATH' \
+		"$(PROTOUSRBINDIR)/jq" )
+
+ONIG_MANIFEST =		manifest-$(MACH)-oniguruma.depend
+DEPENDED +=		$(WS_COMPONENTS)/oniguruma/build/$(ONIG_MANIFEST)
+PKG_PROTO_DIRS +=	$(WS_COMPONENTS)/oniguruma
+
+COMPONENT_TEST_ENV +=	JQ="$(PROTOUSRBINDIR)/jq"
+COMPONENT_TEST_ENV +=	LD_LIBRARY_PATH_64="$(ONIG_LIBDIR)"
+COMPONENT_TEST_TRANSFORMS += \
+	'-n ' \
+	'-e "/TOTAL/p" ' \
+	'-e "/SKIP/p" ' \
+	'-e "/PASS/p" ' \
+	'-e "/XPASS/p" ' \
+	'-e "/FAIL/p" ' \
+	'-e "/XFAIL/p" ' \
+	'-e "/ERROR/p" '
+
+# need proto to run tests
+test: install
+
+REQUIRED_PACKAGES +=	library/oniguruma
+REQUIRED_PACKAGES +=	system/library
+REQUIRED_PACKAGES +=	system/library/math
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/jq/depend.mk	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,1 @@
+jq:	oniguruma
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/jq/jq.license	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,77 @@
+jq is copyright (C) 2012 Stephen Dolan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+jq's documentation (everything found under the docs/ subdirectory in the source tree) is licensed under the Creative Commons CC BY 3.0 license, which can be found at:
+
+https://creativecommons.org/licenses/by/3.0/
+
+The documentation website includes a copy of Twitter's Boostrap and relies on Bonsai, Liquid templates and various other projects, look them up for detailed licensing conditions.
+
+
+
+jq incorporates David M. Gay's dtoa.c and g_fmt.c, which bear the following notices:
+
+dtoa.c:
+The author of this software is David M. Gay.
+
+Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
+
+Permission to use, copy, modify, and distribute this software for any purpose without fee is hereby granted, provided that this entire notice is included in all copies of any software which is or includes a copy or modification of this software and in all copies of the supporting documentation for such software.
+
+THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+g_fmt.c:
+The author of this software is David M. Gay.
+
+Copyright (c) 1991, 1996 by Lucent Technologies.
+
+Permission to use, copy, modify, and distribute this software for any purpose without fee is hereby granted, provided that this entire notice is included in all copies of any software which is or includes a copy or modification of this software and in all copies of the supporting documentation for such software.
+
+THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+
+
+/* A Bison parser, made by GNU Bison 3.0.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+You should have received a copy of the GNU General Public License
+along with this program. If not, see . */
+
+/* As a special exception, you may create a larger work that contains
+part or all of the Bison parser skeleton and distribute that work
+under terms of your choice, so long as that work isn't itself a
+parser generator using the skeleton or a modified version thereof
+as a parser skeleton. Alternatively, if you modify or redistribute
+the parser skeleton itself, you may (at your option) remove this
+special exception, which will cause the skeleton and the resulting
+Bison output files to be licensed under the GNU General Public
+License without this special exception.
+This special exception was added by the Free Software Foundation in
+version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+infringing on user name space. This should be done even for local
+variables, as they might otherwise be expanded by user macros.
+There are some unavoidable exceptions within include files to
+define necessary library symbols; they are noted "INFRINGES ON
+USER NAME SPACE" below. */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/jq/jq.p5m	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,40 @@
+#
+# 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) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
+set name=pkg.fmri value=pkg:/text/jq@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="command-line JSON processor"
+set name=com.oracle.info.description \
+    value="jq is a command-line JSON processor. jq is to JSON data what sed/awk/grep is to plain text."
+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-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2016/535
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file path=usr/bin/jq
+file path=usr/share/man/man1/jq.1
+license jq.license license="MIT, CC-BY-3.0"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/jq/patches/test-setup.patch	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,14 @@
+Patch origin: in-house
+Patch status: need to be submitted to upstream
+
+--- a/tests/setup
++++ b/tests/setup
+@@ -6,7 +6,7 @@
+ 
+ JQTESTDIR=$(cd "$(dirname "$0")" && pwd)
+ JQBASEDIR=$JQTESTDIR/..
+-JQ=$JQBASEDIR/jq
++JQ=${JQ:-$JQBASEDIR/jq}
+ 
+ if [ -z "${NO_VALGRIND-}" ] && which valgrind > /dev/null; then
+     VALGRIND="valgrind --error-exitcode=1 --leak-check=full \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/jq/patches/xpg6.patch	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,22 @@
+Patch origin: upstream
+Patch status: expected to be included in a future release
+
+https://github.com/stedolan/jq/pull/1204
+
+--- a/builtin.c
++++ b/builtin.c
+@@ -1,6 +1,14 @@
+ #define _BSD_SOURCE
+ #define _GNU_SOURCE
+ #define _XOPEN_SOURCE
++#define _XOPEN_SOURCE_EXTENDED 1
++#ifndef __sun__
++# define _XOPEN_SOURCE
++# define _XOPEN_SOURCE_EXTENDED 1
++#else
++# define _XPG6
++# define __EXTENSIONS__
++#endif
+ #include <sys/time.h>
+ #include <stdlib.h>
+ #include <stddef.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/jq/test/results-64.master	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,13 @@
+PASS: tests/mantest
+PASS: tests/jqtest
+PASS: tests/onigtest
+PASS: tests/shtest
+# TOTAL: 4
+# PASS:  4
+# SKIP:  0
+# XFAIL: 0
+# XFAIL: 0
+# FAIL:  0
+# XPASS: 0
+# XPASS: 0
+# ERROR: 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/oniguruma/Makefile	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,57 @@
+#
+# 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) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+BUILD_BITS = 64
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME =	onig
+COMPONENT_VERSION =	6.1.1
+COMPONENT_PROJECT_URL =	https://github.com/kkos/oniguruma
+COMPONENT_ARCHIVE_HASH =	\
+    sha256:b9cf2eefef5105820c97f94a2ccd12ed8aa274a576ccdaaed3c632a2aa0d0f04
+COMPONENT_ARCHIVE_URL =	$(COMPONENT_PROJECT_URL)/releases/download/v$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB =	library/oniguruma
+
+TPNO =			31774
+
+include $(WS_MAKE_RULES)/common.mk
+
+COMPILER =		gcc
+CONFIGURE_OPTIONS +=	--enable-static=no
+
+COMPONENT_TEST_ARGS +=	CFLAGS+=-I$(PROTOUSRINCDIR)
+COMPONENT_TEST_ENV +=	libtool_install_magic='%%%MAGIC variable%%%'
+COMPONENT_TEST_ENV +=	libtool_execute_magic='%%%MAGIC variable%%%'
+COMPONENT_TEST_TRANSFORMS += \
+	'-n ' \
+	'-e "/TOTAL/p" ' \
+	'-e "/SKIP/p" ' \
+	'-e "/PASS/p" ' \
+	'-e "/XPASS/p" ' \
+	'-e "/FAIL/p" ' \
+	'-e "/XFAIL/p" ' \
+	'-e "/ERROR/p" '
+
+# need proto to run tests
+test:	install
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/oniguruma/oniguruma.p5m	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,46 @@
+#
+# 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) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+set name=pkg.fmri \
+    value=pkg:/library/oniguruma@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="oniguruma regular expressions library"
+set name=pkg.description \
+    value="oniguruma is a regular expression library that supports a variety of character encodings"
+set name=com.oracle.info.description \
+    value="oniguruma regular expressions library"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value=org.opensolaris.category.2008:System/Libraries
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2016/535
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file path=usr/bin/onig-config
+file path=usr/include/oniggnu.h
+file path=usr/include/onigposix.h
+file path=usr/include/oniguruma.h
+link path=usr/lib/$(MACH64)/libonig.so target=libonig.so.4.0.0
+link path=usr/lib/$(MACH64)/libonig.so.4 target=libonig.so.4.0.0
+file path=usr/lib/$(MACH64)/libonig.so.4.0.0
+file path=usr/lib/$(MACH64)/pkgconfig/oniguruma.pc
+license COPYING license=BSD
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/oniguruma/test/results-64.master	Wed Nov 30 19:29:35 2016 -0800
@@ -0,0 +1,30 @@
+PASS: testc
+PASS: testp
+PASS: testcu
+# TOTAL: 3
+# PASS:  3
+# SKIP:  0
+# XFAIL: 0
+# XFAIL: 0
+# FAIL:  0
+# XPASS: 0
+# XPASS: 0
+# ERROR: 0
+PASS: encode
+PASS: listcap
+PASS: names
+PASS: posix
+PASS: simple
+PASS: sql
+PASS: syntax
+PASS: user_property
+PASS: bug_fix
+# TOTAL: 9
+# PASS:  9
+# SKIP:  0
+# XFAIL: 0
+# XFAIL: 0
+# FAIL:  0
+# XPASS: 0
+# XPASS: 0
+# ERROR: 0