PSARC 2015/241 Locale::gettext Perl module
authorRich Burridge <rich.burridge@oracle.com>
Thu, 20 Aug 2015 14:26:17 -0700
changeset 4802 62e47da66002
parent 4801 c249904bb056
child 4805 ad8cc19e4aec
PSARC 2015/241 Locale::gettext Perl module 21091517 We should add the Perl Locale::gettext module to Userland
components/perl_modules/gettext/Makefile
components/perl_modules/gettext/gettext-PERLVER.p5m
components/perl_modules/gettext/gettext.license
components/perl_modules/gettext/patches/001-compatibility-with-POSIX-module.patch
components/perl_modules/gettext/test/results-all.master
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/gettext/Makefile	Thu Aug 20 14:26:17 2015 -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) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		gettext
+COMPONENT_VERSION=	1.0.5
+HUMAN_VERSION=		1.05
+COMPONENT_PROJECT_URL=	http://search.cpan.org/~pvandry/gettext-1.05/gettext.pm
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(HUMAN_VERSION)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH=	\
+    sha256:27367f3dc1be79c9ed178732756e37e4cfce45f9e2a27ebf26e1f40d80124694
+COMPONENT_ARCHIVE_URL=	http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB=	perl-mod/gettext
+
+TPNO=			22740
+
+include $(WS_MAKE_RULES)/prep.mk
+include $(WS_MAKE_RULES)/ips.mk
+include $(WS_MAKE_RULES)/makemaker.mk
+
+COMPONENT_TEST_TARGETS = test
+COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
+COMPONENT_TEST_TRANSFORMS += \
+	'-n ' \
+	'-e "/ ok/p" ' \
+	'-e "/All /p" ' \
+	'-e "/Result: /p" '
+
+ASLR_MODE = $(ASLR_NOT_APPLICABLE)
+
+build:		$(BUILD_32_and_64)
+
+install:	$(INSTALL_32_and_64)
+
+test:		$(TEST_32_and_64)
+
+system-test:	$(SYSTEM_TESTS_NOT_IMPLEMENTED)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/gettext/gettext-PERLVER.p5m	Thu Aug 20 14:26:17 2015 -0700
@@ -0,0 +1,43 @@
+#
+# 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 volatile>
+set name=pkg.fmri \
+    value=pkg:/library/perl-5/gettext-$(PLV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary \
+    value="Locale::gettext - message handling functions Perl module."
+set name=pkg.description \
+    value="The Locale::gettext module permits access from perl to the gettext() family of functions for retrieving message strings from databases constructed to internationalize software."
+set name=com.oracle.info.description value="the Locale::gettext Perl module"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value=org.opensolaris.category.2008:Development/Perl
+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/241
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file path=usr/perl5/$(PERLVER)/man/man3/Locale::gettext.3
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/Locale/gettext.pm
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/auto/Locale/gettext/.packlist
+file path=usr/perl5/vendor_perl/$(PERLVER)/$(PERL_ARCH)/auto/Locale/gettext/gettext.so
+license gettext.license license=Artistic
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/gettext/gettext.license	Thu Aug 20 14:26:17 2015 -0700
@@ -0,0 +1,142 @@
+Portions of this program use gettext 1.0.5, the open source version is made
+available by Phillip Vandry under the terms of the below version of the
+Artistic License. As such, Oracle is required to provide the following notices.
+Note, however, that the Oracle program license that accompanied this program
+determines your right to use the Oracle program, including gettext, and the
+terms contained in the following notices do not change those rights.
+
+Extensions to gettext have been made by Oracle to support current versions
+of Solaris and provide additional tools.  These changes are detailed in the
+patches subdirectory.
+
+The current open source version of gettext can be downloaded at:
+http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz
+
+
+			 The "Artistic License"
+
+				Preamble
+
+The intent of this document is to state the conditions under which a
+Package may be copied, such that the Copyright Holder maintains some
+semblance of artistic control over the development of the package,
+while giving the users of the package the right to use and distribute
+the Package in a more-or-less customary fashion, plus the right to make
+reasonable modifications.
+
+Definitions:
+
+	"Package" refers to the collection of files distributed by the
+	Copyright Holder, and derivatives of that collection of files
+	created through textual modification.
+
+	"Standard Version" refers to such a Package if it has not been
+	modified, or has been modified in accordance with the wishes
+	of the Copyright Holder as specified below.
+
+	"Copyright Holder" is whoever is named in the copyright or
+	copyrights for the package.
+
+	"You" is you, if you're thinking about copying or distributing
+	this Package.
+
+	"Reasonable copying fee" is whatever you can justify on the
+	basis of media cost, duplication charges, time of people involved,
+	and so on.  (You will not be required to justify it to the
+	Copyright Holder, but only to the computing community at large
+	as a market that must bear the fee.)
+
+	"Freely Available" means that no fee is charged for the item
+	itself, though there may be fees involved in handling the item.
+	It also means that recipients of the item may redistribute it
+	under the same conditions they received it.
+
+1. You may make and give away verbatim copies of the source form of the
+Standard Version of this Package without restriction, provided that you
+duplicate all of the original copyright notices and associated disclaimers.
+
+2. You may apply bug fixes, portability fixes and other modifications
+derived from the Public Domain or from the Copyright Holder.  A Package
+modified in such a way shall still be considered the Standard Version.
+
+3. You may otherwise modify your copy of this Package in any way, provided
+that you insert a prominent notice in each changed file stating how and
+when you changed that file, and provided that you do at least ONE of the
+following:
+
+    a) place your modifications in the Public Domain or otherwise make them
+    Freely Available, such as by posting said modifications to Usenet or
+    an equivalent medium, or placing the modifications on a major archive
+    site such as uunet.uu.net, or by allowing the Copyright Holder to include
+    your modifications in the Standard Version of the Package.
+
+    b) use the modified Package only within your corporation or organization.
+
+    c) rename any non-standard executables so the names do not conflict
+    with standard executables, which must also be provided, and provide
+    a separate manual page for each non-standard executable that clearly
+    documents how it differs from the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+4. You may distribute the programs of this Package in object code or
+executable form, provided that you do at least ONE of the following:
+
+    a) distribute a Standard Version of the executables and library files,
+    together with instructions (in the manual page or equivalent) on where
+    to get the Standard Version.
+
+    b) accompany the distribution with the machine-readable source of
+    the Package with your modifications.
+
+    c) give non-standard executables non-standard names, and clearly
+    document the differences in manual pages (or equivalent), together
+    with instructions on where to get the Standard Version.
+
+    d) make other distribution arrangements with the Copyright Holder.
+
+5. You may charge a reasonable copying fee for any distribution of this
+Package.  You may charge any fee you choose for support of this
+Package.  You may not charge a fee for this Package itself.  However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you do not advertise this Package as a
+product of your own.  You may embed this Package's interpreter within
+an executable of yours (by linking); this shall be construed as a mere
+form of aggregation, provided that the complete Standard Version of the
+interpreter is so embedded.
+
+6. The scripts and library files supplied as input to or produced as
+output from the programs of this Package do not automatically fall
+under the copyright of this Package, but belong to whoever generated
+them, and may be sold commercially, and may be aggregated with this
+Package.  If such scripts or library files are aggregated with this
+Package via the so-called "undump" or "unexec" methods of producing a
+binary executable image, then distribution of such an image shall
+neither be construed as a distribution of this Package nor shall it
+fall under the restrictions of Paragraphs 3 and 4, provided that you do
+not represent such an executable image as a Standard Version of this
+Package.
+
+7. C subroutines (or comparably compiled subroutines in other
+languages) supplied by you and linked into this Package in order to
+emulate subroutines and variables of the language defined by this
+Package shall not be considered part of this Package, but are the
+equivalent of input as in Paragraph 6, provided these subroutines do
+not change the language in any way that would cause it to fail the
+regression tests for the language.
+
+8. Aggregation of this Package with a commercial distribution is always
+permitted provided that the use of this Package is embedded; that is,
+when no overt attempt is made to make this Package's interfaces visible
+to the end user of the commercial distribution.  Such use shall not be
+construed as a distribution of this Package.
+
+9. The name of the Copyright Holder may not be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+				The End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/gettext/patches/001-compatibility-with-POSIX-module.patch	Thu Aug 20 14:26:17 2015 -0700
@@ -0,0 +1,20 @@
+Debian Bug report logs - #479803
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479803
+
+liblocale-gettext-perl: defines LC_* slightly differently from Perl 5.10's
+POSIX.pm
+
+New patch debian/patches/compatibility-with-POSIX-module.diff so that
+Locale::Gettext re-exports the LC_* constants coming from POSIX instead
+of those coming from its own XS implementation.
+
+--- gettext-1.05/gettext.pm.orig	2015-05-14 09:06:58.288075712 -0700
++++ gettext-1.05/gettext.pm	2015-05-14 09:07:23.772010237 -0700
[email protected]@ -32,6 +32,7 @@
+ =cut
+ 
+ use Carp;
++use POSIX qw(:locale_h);
+ 
+ require Exporter;
+ require DynaLoader;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl_modules/gettext/test/results-all.master	Thu Aug 20 14:26:17 2015 -0700
@@ -0,0 +1,7 @@
+t/bind.t ....... ok
+t/frconvert.t .. ok
+t/jaconvert.t .. ok
+t/raw.t ........ ok
+t/use.t ........ ok
+All tests successful.
+Result: PASS