PSARC 2015/229 re2c scanner generator
authorRich Burridge <rich.burridge@oracle.com>
Mon, 06 Jul 2015 20:32:51 -0700
changeset 4598 b74b65884262
parent 4597 967ce4c39e36
child 4599 c7cdb20dce6d
PSARC 2015/229 re2c scanner generator 21043484 We should add re2c to userland
components/re2c/Makefile
components/re2c/re2c.license
components/re2c/re2c.p5m
components/re2c/test/results-64.master
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/re2c/Makefile	Mon Jul 06 20:32:51 2015 -0700
@@ -0,0 +1,70 @@
+#
+# 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) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		re2c
+COMPONENT_VERSION=	0.14.2
+COMPONENT_PROJECT_URL=	http://sf.net/projects/re2c/
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH=	\
+    sha256:a702eb63977af4715555edb41eba3b47bbfdcdb44b566d146869a7db022f1c30
+COMPONENT_ARCHIVE_URL=	http://downloads.sourceforge.net/project/$(COMPONENT_NAME)/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB=	utility/re2c
+
+TPNO =			22638
+
+include $(WS_MAKE_RULES)/prep.mk
+include $(WS_MAKE_RULES)/configure.mk
+include $(WS_MAKE_RULES)/ips.mk
+
+COMPILER =		gcc
+GCC_ROOT =		/usr/gcc/4.8
+
+export PATH=$(GCC_ROOT)/bin:/usr/gnu/bin:/usr/bin
+
+# Needed to get the tests to run successfully.
+COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
+
+CONFIGURE_OPTIONS  +=	CFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS  +=	CXXFLAGS="$(CXXFLAGS)"
+
+# Needed for "gmake test" to work successfully.
+# If SHELLOPTS is exported (as it is by the userland makefiles),
+# then all shell options get exported to child invocations of bash,
+# which results in test failures due to nounset and xtrace being
+# set unexpectedly, and errors such as "$1: unbound variable" and
+# diffs failing due to script tracing in output files.
+unexport SHELLOPTS
+
+ASLR_MODE = $(ASLR_ENABLE)
+
+build:		$(BUILD_64)
+
+install:	$(INSTALL_64)
+
+test:		$(TEST_64)
+
+REQUIRED_PACKAGES += system/library
+REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
+REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/re2c/re2c.license	Mon Jul 06 20:32:51 2015 -0700
@@ -0,0 +1,10 @@
+re2c is distributed with no warranty whatever.  The code is certain to
+contain errors.  Neither the author nor any contributor takes
+responsibility for any consequences of its use.
+
+re2c is in the public domain.  The data structures and algorithms used
+in re2c are all either taken from documents available to the general
+public or are inventions of the author.  Programs generated by re2c may
+be distributed freely.  re2c itself may be distributed freely, in source
+or binary, unchanged or modified.  Distributors may charge whatever fees
+they can obtain for re2c.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/re2c/re2c.p5m	Mon Jul 06 20:32:51 2015 -0700
@@ -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) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
+set name=pkg.fmri \
+    value=pkg:/developer/parser/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="re2c scanner generator"
+set name=pkg.description \
+    value="re2c tool for writing very fast and very flexible scanners."
+set name=com.oracle.info.description value="re2c scanner generator"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value="org.opensolaris.category.2008:Development/Other Languages"
+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/2015/229
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file usr/bin/$(MACH64)/re2c path=usr/bin/re2c
+file path=usr/share/man/man1/re2c.1
+license re2c.license license=PublicDomain
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/re2c/test/results-64.master	Mon Jul 06 20:32:51 2015 -0700
@@ -0,0 +1,34 @@
+make[1]: Entering directory `$(@D)'
+/usr/gnu/bin/make  check-am
+make[2]: Entering directory `$(@D)'
+/usr/gnu/bin/make  check-TESTS
+make[3]: Entering directory `$(@D)'
+make[4]: Entering directory `$(@D)'
+FAIL: run_tests.sh
+make[5]: Entering directory `$(@D)'
+/usr/gnu/bin/make  all-am
+make[6]: Entering directory `$(@D)'
+make[6]: Leaving directory `$(@D)'
+make[5]: Leaving directory `$(@D)'
+============================================================================
+Testsuite summary for re2c 0.14.2
+============================================================================
+# TOTAL: 1
+# PASS:  0
+# SKIP:  0
+# XFAIL: 0
+# FAIL:  1
+# XPASS: 0
+# ERROR: 0
+============================================================================
+See ./test-suite.log
+Please report to [email protected]
+============================================================================
+make[4]: *** [test-suite.log] Error 1
+make[4]: Leaving directory `$(@D)'
+make[3]: *** [check-TESTS] Error 2
+make[3]: Leaving directory `$(@D)'
+make[2]: *** [check-am] Error 2
+make[2]: Leaving directory `$(@D)'
+make[1]: *** [check] Error 2
+make[1]: Leaving directory `$(@D)'