changeset 12639:884a64bb4385

6861643 Perl Sun::Solaris modules ought to be delivered for 5.10 6875355 Perl's Sun::Solaris::Intrs doesn't include pci_tools.h properly
author John Sonnenschein <John.Sonnenschein@Oracle.com>
date Wed, 16 Jun 2010 22:08:14 -0700
parents 4cce88587bfc
children b4f09d1fd79d
files usr/src/cmd/perl/Makefile usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL usr/src/cmd/perl/skel/Makefile usr/src/pkg/manifests/runtime-perl-510-module-sun-solaris.mf
diffstat 6 files changed, 280 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/perl/Makefile	Wed Jun 16 20:48:30 2010 -0700
+++ b/usr/src/cmd/perl/Makefile	Wed Jun 16 22:08:14 2010 -0700
@@ -20,9 +20,7 @@
 #
 
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
+# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../Makefile.cmd
@@ -33,8 +31,13 @@
 clean	:= TARGET = clean
 test	:= TARGET = test
 
-PERL_VERSIONS = \
-    5.8.4
+# PERL_LEGACY is versions of Perl still delivered through ON
+PERL_LEGACY = 5.8.4
+
+# WOS_PERL is non-ON Perl
+WOS_PERL = 5.10.0
+
+PERL_VERSIONS = $(PERL_LEGACY) $(WOS_PERL)
 
 .PARALLEL: $(PERL_VERSIONS)
 
@@ -51,7 +54,7 @@
 clean: $(PERL_VERSIONS)
 
 clobber: $(PERL_VERSIONS)
-	$(RM) contrib/copy_contrib THIRDPARTYLICENSE
+	$(RM) -r contrib/copy_contrib THIRDPARTYLICENSE $(WOS_PERL)
 
 #
 # Perl is not lint-clean.  Fake up a target.
@@ -61,7 +64,10 @@
 	@ $(TRUE)
 
 $(PERL_VERSIONS): FRC
-	@ cd $@; pwd; $(MAKE) $(TARGET)
+	@ if [ ! -d $@ ]; then \
+	    $(CP) -r skel $@; \
+	fi
+	@ cd $@; pwd; PERL_VERSION=$@ $(MAKE) $(TARGET)
 
 PODDIR = 5.8.4/distrib/pod
 ARTLIC_SRC = $(PODDIR)/perlartistic.pod
--- a/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs	Wed Jun 16 20:48:30 2010 -0700
+++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs	Wed Jun 16 22:08:14 2010 -0700
@@ -20,8 +20,7 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 #include <sys/types.h>
@@ -34,7 +33,7 @@
 #include <errno.h>
 
 /* Non-shipping header - see Makefile.PL */
-#include <pci_tools.h>
+#include <sys/pci_tools.h>
 
 #include "EXTERN.h"
 #include "perl.h"
--- a/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL	Wed Jun 16 20:48:30 2010 -0700
+++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL	Wed Jun 16 22:08:14 2010 -0700
@@ -20,8 +20,7 @@
 #
 
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
 require 5.8.4;
@@ -39,7 +38,13 @@
     NAME		=> 'Sun::Solaris::Intrs',
     VERSION_FROM	=> 'Intrs.pm',
     DEFINE		=> exists($ENV{RELEASE_BUILD}) ? '-DNDEBUG' : '',
+
+    # ../../../../../../../uts/common can be removed when Perl leaves O/N
+
+    # ../../../../../../../uts/common refers to 5.8.4 building in 5.8.4/contrib
+    # whereas later versions build in $(VERSION)/
+
     # Must be a relative path to avoid being interpreted as a proto area path.
-    INC			=> "-I../../../../../../../uts/common/sys",
+    INC			=> "-I../../../../../../../uts/common -I../../../../../../uts/common",
     MAN3PODS		=> {},
 );
--- a/usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL	Wed Jun 16 20:48:30 2010 -0700
+++ b/usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL	Wed Jun 16 22:08:14 2010 -0700
@@ -20,9 +20,7 @@
 #
 
 #
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
+# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
 require 5.8.4;
@@ -51,7 +49,9 @@
 my $pver = sprintf('%vd', $^V);
 
 # Figure out the appropriate Config.pm.  Use an older version if necessary.
-my $configpm = "config/$pver/$rel/$arch/Config.pm";
+my $perlarch = ($arch eq "sparc") ? "sun4-solaris-64int":"i86pc-solaris-64int";
+
+my $configpm = "/usr/perl5/$pver/lib/$perlarch/Config.pm";
 if (! -f $configpm) {
 	my $p = "config/$pver";
 	my $dh;
@@ -68,6 +68,19 @@
 		die("Unsupported version of Perl/OS/Architecture " .
 		    "$pver/$rel/$arch\n");
 	}
+} else {
+	open CONFIGPM, "<", $configpm or die $!;
+	open CONFIGPM_OUT, ">", "Config.pm" or die $!;
+	while(<CONFIGPM>) {
+		if (/'cc/) {
+			s/=>\s*'cc/=> 'gcc/;
+			s/=\s*'cc/='gcc/;
+		}
+		print CONFIGPM_OUT $_;
+	}
+	close CONFIGPM;
+	close CONFIGPM_OUT;
+	$configpm = "Config.pm";
 }
 
 our %man1pods;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/perl/skel/Makefile	Wed Jun 16 22:08:14 2010 -0700
@@ -0,0 +1,123 @@
+#
+# 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) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+include ../../Makefile.cmd
+
+# To turn KEEP_STATE off the following two environment variables must be unset.
+KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES
+
+# Perl installs files we don't want to ship, so we install to a
+# staging area to postprocess and install the result to $(ROOT)
+STAGE = $(SRC)/cmd/perl/$(PERL_VERSION)/staging
+
+PERL=/usr/perl5/$(PERL_VERSION)/bin/perl
+
+PERL_MM_ARGS = INSTALLDIRS=perl CC='$(CC)' LD='$(CC)'
+
+# Prefix for Solaris-specific extensions that are maintained by
+# Sun/Oracle.
+SUN_SOLARIS = Sun/Solaris
+
+# Add any XS extensions here.
+PERL_DYNAMIC_EXT = \
+    $(SUN_SOLARIS)/Utils \
+    $(SUN_SOLARIS)/Kstat \
+    $(SUN_SOLARIS)/Intrs \
+    $(SUN_SOLARIS)/Project \
+    $(SUN_SOLARIS)/Task \
+    $(SUN_SOLARIS)/Exacct \
+    $(SUN_SOLARIS)/Privilege \
+    $(SUN_SOLARIS)/Lgrp \
+    $(SUN_SOLARIS)/Ucred
+
+# Add any pure-perl extensions here.
+PERL_NONXS_EXT = \
+    $(SUN_SOLARIS)/BSM \
+    $(SUN_SOLARIS)/PerlGcc
+
+PERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
+PERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
+
+all: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
+
+.PARALLEL: $(PERL_EXT_MAKEFILES) $(PERL_EXT)
+
+install: all
+	for ext in $(PERL_EXT); do \
+		if [ -d $$ext ]; then \
+			( \
+			cd $$ext; pwd; \
+			$(KEEP_STATE_OFF); $(MAKE) $(PERL_MM_ARGS) \
+				DESTDIR=$(STAGE) install; \
+			cd $(STAGE); \
+			find . \( -name ".packlist" -o -name "perllocal.pod" \) \
+				-exec $(RM) {} \; ; \
+			/usr/bin/pax -rwpe ./*  ${ROOT} ; \
+			) \
+		else \
+			/bin/false; \
+		fi \
+	done
+
+#
+# copy_contrib copies the clearfiles from ../contrib to here.
+#
+copy_contrib:
+	@ $(SH) ../contrib/copy_contrib.sh ../contrib . $(PERL_EXT)
+
+clean:
+	for ext in $(PERL_EXT); do \
+		if [ -d $$ext ]; then \
+			( \
+			cd $$ext; pwd; \
+			$(KEEP_STATE_OFF); $(MAKE) clean; \
+			) \
+		fi \
+	done
+
+# Remove Sun/Solaris
+clobber:
+	@ $(RM) -r Sun
+
+test: all
+	for ext in $(PERL_EXT); do \
+		( \
+		cd $$ext; pwd; \
+		$(KEEP_STATE_OFF); $(MAKE) test; \
+		) \
+	done
+
+#
+# Ensure that the extension's makefile is built before
+# trying to build the extension
+#
+%/Makefile: %/Makefile.PL $(PERL_CONFIGDEP)
+	@ cd $(@D); pwd; $(PERL) $(<F) $(PERL_MM_ARGS) 2>&1 /dev/null
+
+# Pattern-matching rule for extensions.
+$(SUN_SOLARIS)/%: $(SUN_SOLARIS)/%/Makefile FRC
+	@ cd $@; pwd; $(KEEP_STATE_OFF) ; \
+		$(PERL_MM_ARGS) $(MAKE) DESTDIR=$(STAGE) all
+
+FRC:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkg/manifests/runtime-perl-510-module-sun-solaris.mf	Wed Jun 16 22:08:14 2010 -0700
@@ -0,0 +1,117 @@
+#
+# 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) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+set name=pkg.fmri \
+    value=pkg:/runtime/perl-510/module/sun-solaris@0.5.11,$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
+set name=pkg.summary value="Perl 5.10.0 Sun::Solaris Modules"
+set name=info.classification \
+    value=org.opensolaris.category.2008:Development/Perl
+set name=variant.arch value=$(ARCH)
+set name=variant.opensolaris.zone value=global value=nonglobal
+
+$(i386_ONLY)<transform file dir path=.*PLAT.* -> edit path PLAT i86pc>
+$(sparc_ONLY)<transform file dir path=.*PLAT.* -> edit path PLAT sun4>
+
+<transform file path=.*\.(pm|bs) -> default mode 0444>
+<transform file path=.*\.so -> default mode 0555>
+
+dir path=usr group=sys
+dir path=usr/bin
+dir path=usr/perl5
+dir path=usr/perl5/5.10.0
+dir path=usr/perl5/5.10.0/bin
+dir path=usr/perl5/5.10.0/lib
+dir path=usr/perl5/5.10.0/lib/Sun
+dir path=usr/perl5/5.10.0/lib/Sun/Solaris
+dir path=usr/perl5/5.10.0/lib/Sun/Solaris/BSM
+dir path=usr/perl5/5.10.0/lib/Sun/Solaris/PerlGcc
+
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Exacct
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Lgrp
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Project
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Ucred
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Privilege
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Intrs
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Task
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Utils
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/PerlGcc
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Object
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/File
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Catalog
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/BSM
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/BSM/_BSMparse
+dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Kstat
+
+file path=usr/perl5/5.10.0/bin/perlgcc mode=0555
+file path=usr/perl5/5.10.0/lib/Sun/Solaris/BSM/_BSMparse.pm 
+file path=usr/perl5/5.10.0/lib/Sun/Solaris/PerlGcc/Config.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Intrs.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Task.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Lgrp.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Ucred.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Utils.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Kstat.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Exacct/Catalog.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Exacct/File.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Exacct/Object.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Privilege.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Exacct.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/Sun/Solaris/Project.pm 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Lgrp/Lgrp.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Lgrp/Lgrp.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Project/Project.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Project/Project.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Ucred/Ucred.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Ucred/Ucred.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Privilege/Privilege.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Privilege/Privilege.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Intrs/Intrs.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Intrs/Intrs.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Task/Task.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Task/Task.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Utils/Utils.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Utils/Utils.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Exacct.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Object/Object.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Object/Object.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Exacct.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/File/File.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/File/File.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Catalog/Catalog.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Exacct/Catalog/Catalog.so 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Kstat/Kstat.bs 
+file path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Kstat/Kstat.so 
+
+license cmd/perl/THIRDPARTYLICENSE license=cmd/perl/THIRDPARTYLICENSE
+license cr_Sun license=cr_Sun
+depend fmri=runtime/perl-510 type=require
+depend fmri=runtime/perl-510/extra type=require