PSARC 2016/309 flex version 2.6.1
authorRich Burridge <rich.burridge@oracle.com>
Tue, 31 May 2016 11:48:20 -0700
changeset 6090 32b4c33eb722
parent 6089 515030044b0c
child 6092 a2af9dc56276
PSARC 2016/309 flex version 2.6.1 23209271 Upgrade flex to 2.6.1
components/flex/Makefile
components/flex/flex.license
components/flex/flex.p5m
components/flex/flexruntime.p5m
components/flex/patches/000-flex-2.5.35.Makefile.in.patch
components/flex/patches/001-flex-2.5.35.test-pthread.Makefile.in.patch
components/flex/patches/solaris-port-fixups.patch
components/flex/test/results-all.master
--- a/components/flex/Makefile	Tue May 31 06:27:16 2016 -0700
+++ b/components/flex/Makefile	Tue May 31 11:48:20 2016 -0700
@@ -26,30 +26,37 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		flex
-COMPONENT_VERSION=	2.5.35
-COMPONENT_PROJECT_URL=	http://flex.sourceforge.net/
-COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
+COMPONENT_VERSION=	2.6.1
+COMPONENT_PROJECT_URL=	https://github.com/westes/flex
+COMPONENT_ARCHIVE=	v$(COMPONENT_VERSION).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:0becbd4b2b36b99c67f8c22ab98f7f80c9860aec70f0350a0018f29a88704e7b
-COMPONENT_ARCHIVE_URL=	http://softlayer.dl.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.bz2
+    sha256:b38b05d1383100f74fcffb335cee38b5e588f8525fa08ac54c12acadd7897987
+COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)/archive/$(COMPONENT_ARCHIVE)
 
-TPNO=			14883
+TPNO=			28921
 
-SONAME=libfl.so.1
 LDFLAGS += $(CC_BITS)
 
 include $(WS_MAKE_RULES)/common.mk
 
+COMPONENT_PREP_ACTION +=	( cd $(@D) ; $(CONFIG_SHELL) autogen.sh );
+
+COMPONENT_PRE_CONFIGURE_ACTION += ($(CLONEY) $(SOURCE_DIR) $(@D))
+
 CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
 CONFIGURE_OPTIONS  +=		M4="$(GNUBIN)/m4"
 
-COMPONENT_BUILD_ENV +=		SONAME="$(SONAME)"
-COMPONENT_INSTALL_ENV +=	SONAME="$(SONAME)"
+COMPONENT_TEST_ENV +=		PATH=$(GNUBIN):$(USRBINDIR)
+COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
 
-COMPONENT_TEST_ENV +=		PATH=$(GNUBIN):$(USRBINDIR)
-
-COMPONENT_BUILD_TARGETS += $(SONAME)
-COMPONENT_INSTALL_TARGETS += $(SONAME)
+COMPONENT_TEST_TRANSFORMS += \
+	'-n ' \
+	'-e "/=====/p" ' \
+	'-e "/TOTAL/p" ' \
+	'-e "/SKIP/p" ' \
+	'-e "/PASS/p" ' \
+	'-e "/FAIL/p" ' \
+	'-e "/ERROR/p" '
 
 REQUIRED_PACKAGES += developer/macro/gnu-m4
 REQUIRED_PACKAGES += system/library/math
--- a/components/flex/flex.license	Tue May 31 06:27:16 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-Flex carries the copyright used for BSD software, slightly modified
-because it originated at the Lawrence Berkeley (not Livermore!) Laboratory,
-which operates under a contract with the Department of Energy:
-
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The Flex Project.
-
-Copyright (c) 1990, 1997 The Regents of the University of California.
-All rights reserved.
-
-This code is derived from software contributed to Berkeley by
-Vern Paxson.
-
-The United States Government has rights in this work pursuant
-to contract no. DE-AC03-76SF00098 between the United States
-Department of Energy and the University of California.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-Neither the name of the University nor the names of its contributors
-may be used to endorse or promote products derived from this software
-without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-This basically says "do whatever you please with this software except
-remove this notice or take advantage of the University's (or the flex
-authors') name".
-
-Note that the "flex.skl" scanner skeleton carries no copyright notice.
-You are free to do whatever you please with scanners generated using flex;
-for them, you are not even bound by the above copyright.
--- a/components/flex/flex.p5m	Tue May 31 06:27:16 2016 -0700
+++ b/components/flex/flex.p5m	Tue May 31 11:48:20 2016 -0700
@@ -18,9 +18,10 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
+<transform file path=usr.*/man/.+ -> default mangler.man.stability "pass-through volatile">
 set name=pkg.fmri \
     value=pkg:/developer/lexer/flex@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Flex Lexer"
@@ -30,9 +31,10 @@
     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/2007/289
+set name=org.opensolaris.arc-caseid value=PSARC/2007/289 value=PSARC/2016/309
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 file path=usr/bin/flex
+link path=usr/bin/flex++ target=flex
 file path=usr/include/FlexLexer.h
 link path=usr/sfw/bin/flex target=../../bin/flex
 file path=usr/share/info/flex.info
@@ -41,21 +43,28 @@
 file path=usr/share/locale/ca/LC_MESSAGES/flex.mo
 file path=usr/share/locale/da/LC_MESSAGES/flex.mo
 file path=usr/share/locale/de/LC_MESSAGES/flex.mo
+file path=usr/share/locale/en@boldquot/LC_MESSAGES/flex.mo
+file path=usr/share/locale/en@quot/LC_MESSAGES/flex.mo
+file path=usr/share/locale/eo/LC_MESSAGES/flex.mo
 file path=usr/share/locale/es/LC_MESSAGES/flex.mo
+file path=usr/share/locale/fi/LC_MESSAGES/flex.mo
 file path=usr/share/locale/fr/LC_MESSAGES/flex.mo
 file path=usr/share/locale/ga/LC_MESSAGES/flex.mo
+file path=usr/share/locale/hr/LC_MESSAGES/flex.mo
 file path=usr/share/locale/ko/LC_MESSAGES/flex.mo
 file path=usr/share/locale/nl/LC_MESSAGES/flex.mo
 file path=usr/share/locale/pl/LC_MESSAGES/flex.mo
 file path=usr/share/locale/pt_BR/LC_MESSAGES/flex.mo
 file path=usr/share/locale/ro/LC_MESSAGES/flex.mo
 file path=usr/share/locale/ru/LC_MESSAGES/flex.mo
+file path=usr/share/locale/sr/LC_MESSAGES/flex.mo
 file path=usr/share/locale/sv/LC_MESSAGES/flex.mo
 file path=usr/share/locale/tr/LC_MESSAGES/flex.mo
 file path=usr/share/locale/vi/LC_MESSAGES/flex.mo
 file path=usr/share/locale/zh_CN/LC_MESSAGES/flex.mo
-file path=usr/share/man/man1/flex.1 mangler.man.stability=volatile
+file path=usr/share/locale/zh_TW/LC_MESSAGES/flex.mo
+file path=usr/share/man/man1/flex.1
 legacy pkg=SUNWflexlex desc="The Flex Lexer - A lex replacement/substitute" \
     name="Flex Lexer"
-license flex.license license=BSD
+license COPYING license=BSD
 depend type=require fmri=__TBD pkg.debug.depend.file=usr/gnu/bin/m4
--- a/components/flex/flexruntime.p5m	Tue May 31 06:27:16 2016 -0700
+++ b/components/flex/flexruntime.p5m	Tue May 31 11:48:20 2016 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
@@ -30,15 +30,20 @@
     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/2007/289
+set name=org.opensolaris.arc-caseid value=PSARC/2007/289 value=PSARC/2016/309
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
-link path=usr/lib/$(MACH64)/libfl-2.5.4.so.0 target=./libfl.so.1
-link path=usr/lib/$(MACH64)/libfl.so target=./libfl.so.1
-file path=usr/lib/$(MACH64)/libfl.so.1
-link path=usr/lib/libfl-2.5.4.so target=./libfl.so.1
-link path=usr/lib/libfl.so target=./libfl.so.1
-file path=usr/lib/libfl.so.1
-legacy pkg=SUNWflexruntime \
-    desc="The Flex Lexer - A lex replacement/substitute runtime" \
-    name="Flex Lexer"
-license flex.license license=BSD
+link path=usr/lib/$(MACH64)/libfl.so target=libfl.so.2.0.0
+link path=usr/lib/$(MACH64)/libfl.so.1 target=libfl.so.2.0.0
+link path=usr/lib/$(MACH64)/libfl.so.2 target=libfl.so.2.0.0
+file path=usr/lib/$(MACH64)/libfl.so.2.0.0
+link path=usr/lib/$(MACH64)/libfl_pic.so target=libfl_pic.so.2.0.0
+link path=usr/lib/$(MACH64)/libfl_pic.so.2 target=libfl_pic.so.2.0.0
+file path=usr/lib/$(MACH64)/libfl_pic.so.2.0.0
+link path=usr/lib/libfl.so target=libfl.so.2.0.0
+link path=usr/lib/libfl.so.1 target=libfl.so.2.0.0
+link path=usr/lib/libfl.so.2 target=libfl.so.2.0.0
+file path=usr/lib/libfl.so.2.0.0
+link path=usr/lib/libfl_pic.so target=libfl_pic.so.2.0.0
+link path=usr/lib/libfl_pic.so.2 target=libfl_pic.so.2.0.0
+file path=usr/lib/libfl_pic.so.2.0.0
+license COPYING license=BSD
--- a/components/flex/patches/000-flex-2.5.35.Makefile.in.patch	Tue May 31 06:27:16 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
---- flex-2.5.35/Makefile.in	Tue Feb 26 21:34:10 2008
-+++ flex-2.5.35/Makefile.in	Thu Mar 24 20:50:14 2011
-@@ -274,8 +274,7 @@
- m4 = @M4@
- indent = @INDENT@
- lib_LIBRARIES = \
--	libfl.a \
--	libfl_pic.a
-+	$(SONAME) 
- 
- flex_SOURCES = \
- 	ccl.c \
-@@ -309,7 +308,9 @@
- 	libyywrap.c
- 
- libfl_pic_a_CFLAGS = \
--	-fPIC         \
-+	-DPIC         \
-+	-KPIC	\
-+	-Qoption cg -xregs=no%appl \
- 	$(AM_CFLAGS)
- 
- noinst_HEADERS = \
-@@ -484,6 +485,8 @@
- 	-rm -f libfl_pic.a
- 	$(libfl_pic_a_AR) libfl_pic.a $(libfl_pic_a_OBJECTS) $(libfl_pic_a_LIBADD)
- 	$(RANLIB) libfl_pic.a
-+$(SONAME): $(libfl_pic_a_OBJECTS) $(libfl_pic_a_DEPENDENCIES) 
-+	$(CC) $(CFLAGS) -G -h $(SONAME) -o $(SONAME) $(libfl_pic_a_OBJECTS) $(libfl_pic_a_LIBADD)
- install-binPROGRAMS: $(bin_PROGRAMS)
- 	@$(NORMAL_INSTALL)
- 	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
--- a/components/flex/patches/001-flex-2.5.35.test-pthread.Makefile.in.patch	Tue May 31 06:27:16 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- flex-2.5.35/tests/test-pthread/Makefile.in	2008-02-26 13:34:09.000000000 -0800
-+++ flex-2.5.35/tests/test-pthread/Makefile.in	2013-03-19 12:37:17.679581930 -0700
-@@ -346,7 +346,7 @@
- 	$(FLEX) $(LFLAGS) $<
- 
- $(testname)$(EXEEXT): $(OBJS)
--	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-+	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LOADLIBES)
- 
- test: $(testname)$(EXEEXT)
- 	./$(testname) $(srcdir)/test-*.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/flex/patches/solaris-port-fixups.patch	Tue May 31 11:48:20 2016 -0700
@@ -0,0 +1,52 @@
+Copy the scan.l file to the build directory so that the .c file can be
+successfully generated.
+
+Run help2man on the flex file in the build directory to generate the man page.
+
+Make sure that we always use /usr/gnu/bin/m4 rather than what is available
+via the M4 environment variable or what's in the PATH environment variable.
+
+These changes have been sent upstream. See email thread starting at:
+
+  https://sourceforge.net/p/flex/mailman/message/35103749/
+
+--- flex-2.6.1/src/Makefile.am.orig	2016-05-19 06:21:16.631609293 -0700
++++ flex-2.6.1/src/Makefile.am	2016-05-19 14:19:29.394717203 -0700
+@@ -87,7 +87,7 @@
+ 	mv skel.c.tmp $(srcdir)/skel.c
+ 
+ stage1scan.l: scan.l
+-	cp $(srcdir)/scan.l $(srcdir)/stage1scan.l
++	cp $(srcdir)/scan.l $(top_builddir)/src/stage1scan.l
+ 
+ stage1scan.c: stage1scan.l stage1flex$(EXEEXT)
+ 	$(top_builddir)/src/stage1flex$(EXEEXT) -o $@ $<
+--- flex-2.6.1/doc/Makefile.am.orig	2016-05-19 06:45:26.670565152 -0700
++++ flex-2.6.1/doc/Makefile.am	2016-05-19 06:45:45.734263762 -0700
+@@ -26,5 +26,5 @@
+ 	for i in $(dist_man_MANS) ; do \
+ 	$(help2man) --name='$(PACKAGE_NAME)' \
+ 	--section=`echo $$i | sed -e 's/.*\.\([^.]*\)$$/\1/'` \
+-	 $(top_srcdir)/src/flex$(EXEEXT) > $$i || rm -f $$i ; \
++	 $(top_builddir)/src/flex$(EXEEXT) > $$i || rm -f $$i ; \
+ 	done
+--- flex-2.6.1/src/main.c.orig	2016-05-19 14:36:18.569346881 -0700
++++ flex-2.6.1/src/main.c	2016-05-20 07:59:04.169569771 -0700
+@@ -348,6 +348,7 @@
+ 
+     /* Setup the filter chain. */
+     output_chain = filter_create_int(NULL, filter_tee_header, headerfilename);
++#ifndef __sun
+     if ( !(m4 = getenv("M4"))) {
+ 	    char *slash;
+ 		m4 = M4;
+@@ -389,6 +390,9 @@
+ 		}
+ 	}
+     filter_create_ext(output_chain, m4, "-P", 0);
++#else
++    filter_create_ext(output_chain, "/usr/gnu/bin/m4", "-P", 0);
++#endif
+     filter_create_int(output_chain, filter_fix_linedirs, NULL);
+ 
+     /* For debugging, only run the requested number of filters. */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/flex/test/results-all.master	Tue May 31 11:48:20 2016 -0700
@@ -0,0 +1,124 @@
+PASS: alloc_extra
+PASS: array_nr
+PASS: array_r
+PASS: basic_nr
+PASS: basic_r
+PASS: bison_nr
+PASS: bison_yylloc
+PASS: bison_yylval
+PASS: c_cxx_nr
+PASS: c_cxx_r
+PASS: ccl
+PASS: cxx_basic
+PASS: cxx_multiple_scanners
+PASS: debug_nr
+PASS: debug_r
+PASS: extended
+PASS: header_nr
+PASS: header_r
+PASS: mem_nr
+PASS: mem_r
+PASS: multiple_scanners_nr
+PASS: multiple_scanners_r
+PASS: noansi_nr
+PASS: noansi_r
+PASS: posix
+PASS: posixly_correct
+PASS: prefix_nr
+PASS: prefix_r
+PASS: quotes
+PASS: string_nr
+PASS: string_r
+PASS: top
+PASS: yyextra
+PASS: reject_nr.reject
+PASS: reject_r.reject
+PASS: reject_ver.table
+PASS: reject_ser.table
+PASS: include_by_buffer.direct
+PASS: include_by_push.direct
+PASS: include_by_reentrant.direct
+PASS: rescan_nr.direct
+PASS: rescan_r.direct
+PASS: cxx_yywrap.i3
+PASS: pthread.pthread
+PASS: lineno_nr.one
+PASS: lineno_r.one
+PASS: lineno_trailing.one
+PASS: tableopts_opt_nr-Ca.opt
+PASS: tableopts_opt_nr-Ce.opt
+PASS: tableopts_opt_nr-Cf.opt
+PASS: tableopts_opt_nr-CF.opt
+PASS: tableopts_opt_nr-Cm.opt
+PASS: tableopts_opt_nr-Cem.opt
+PASS: tableopts_opt_nr-Cae.opt
+PASS: tableopts_opt_nr-Caef.opt
+PASS: tableopts_opt_nr-CaeF.opt
+PASS: tableopts_opt_nr-Cam.opt
+PASS: tableopts_opt_nr-Caem.opt
+PASS: tableopts_opt_r-Ca.opt
+PASS: tableopts_opt_r-Ce.opt
+PASS: tableopts_opt_r-Cf.opt
+PASS: tableopts_opt_r-CF.opt
+PASS: tableopts_opt_r-Cm.opt
+PASS: tableopts_opt_r-Cem.opt
+PASS: tableopts_opt_r-Cae.opt
+PASS: tableopts_opt_r-Caef.opt
+PASS: tableopts_opt_r-CaeF.opt
+PASS: tableopts_opt_r-Cam.opt
+PASS: tableopts_opt_r-Caem.opt
+PASS: tableopts_ser_nr-Ca.ser
+PASS: tableopts_ser_nr-Ce.ser
+PASS: tableopts_ser_nr-Cf.ser
+PASS: tableopts_ser_nr-CF.ser
+PASS: tableopts_ser_nr-Cm.ser
+PASS: tableopts_ser_nr-Cem.ser
+PASS: tableopts_ser_nr-Cae.ser
+PASS: tableopts_ser_nr-Caef.ser
+PASS: tableopts_ser_nr-CaeF.ser
+PASS: tableopts_ser_nr-Cam.ser
+PASS: tableopts_ser_nr-Caem.ser
+PASS: tableopts_ser_r-Ca.ser
+PASS: tableopts_ser_r-Ce.ser
+PASS: tableopts_ser_r-Cf.ser
+PASS: tableopts_ser_r-CF.ser
+PASS: tableopts_ser_r-Cm.ser
+PASS: tableopts_ser_r-Cem.ser
+PASS: tableopts_ser_r-Cae.ser
+PASS: tableopts_ser_r-Caef.ser
+PASS: tableopts_ser_r-CaeF.ser
+PASS: tableopts_ser_r-Cam.ser
+PASS: tableopts_ser_r-Caem.ser
+PASS: tableopts_ver_nr-Ca.ver
+PASS: tableopts_ver_nr-Ce.ver
+PASS: tableopts_ver_nr-Cf.ver
+PASS: tableopts_ver_nr-CF.ver
+PASS: tableopts_ver_nr-Cm.ver
+PASS: tableopts_ver_nr-Cem.ver
+PASS: tableopts_ver_nr-Cae.ver
+PASS: tableopts_ver_nr-Caef.ver
+PASS: tableopts_ver_nr-CaeF.ver
+PASS: tableopts_ver_nr-Cam.ver
+PASS: tableopts_ver_nr-Caem.ver
+PASS: tableopts_ver_r-Ca.ver
+PASS: tableopts_ver_r-Ce.ver
+PASS: tableopts_ver_r-Cf.ver
+PASS: tableopts_ver_r-CF.ver
+PASS: tableopts_ver_r-Cm.ver
+PASS: tableopts_ver_r-Cem.ver
+PASS: tableopts_ver_r-Cae.ver
+PASS: tableopts_ver_r-Caef.ver
+PASS: tableopts_ver_r-CaeF.ver
+PASS: tableopts_ver_r-Cam.ver
+PASS: tableopts_ver_r-Caem.ver
+PASS: options.cn
+============================================================================
+============================================================================
+# TOTAL: 114
+# PASS:  114
+# SKIP:  0
+# XFAIL: 0
+# FAIL:  0
+# XPASS: 0
+# ERROR: 0
+============================================================================