diff options
| author | John Sonnenschein <John.Sonnenschein@Oracle.com> | 2010-06-16 22:08:14 -0700 |
|---|---|---|
| committer | John Sonnenschein <John.Sonnenschein@Oracle.com> | 2010-06-16 22:08:14 -0700 |
| commit | e436569b69740525d1c9f25a0c4b57e2ff041221 (patch) | |
| tree | c3891b49d72a2ccc920e34057af13962058e1e44 /usr/src/cmd | |
| parent | b13a95430748795770df36722891ee4065f08f5a (diff) | |
| download | illumos-joyent-e436569b69740525d1c9f25a0c4b57e2ff041221.tar.gz | |
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
Diffstat (limited to 'usr/src/cmd')
| -rw-r--r-- | usr/src/cmd/perl/Makefile | 20 | ||||
| -rw-r--r-- | usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs | 5 | ||||
| -rw-r--r-- | usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL | 11 | ||||
| -rw-r--r-- | usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL | 21 | ||||
| -rw-r--r-- | usr/src/cmd/perl/skel/Makefile | 123 |
5 files changed, 163 insertions, 17 deletions
diff --git a/usr/src/cmd/perl/Makefile b/usr/src/cmd/perl/Makefile index 8e989c2022..245e8729f4 100644 --- a/usr/src/cmd/perl/Makefile +++ b/usr/src/cmd/perl/Makefile @@ -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 @@ clobber := TARGET = clobber 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 @@ all install: THIRDPARTYLICENSE 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 @@ lint: @ $(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 diff --git a/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs b/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs index 93dfd93117..d532daf734 100644 --- a/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs +++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Intrs.xs @@ -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" diff --git a/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL b/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL index 90fa291de2..fb2b3ba137 100644 --- a/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL +++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Intrs/Makefile.PL @@ -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 @@ WriteMakefile( 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 => {}, ); diff --git a/usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL b/usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL index 634a557a56..cbd36eb367 100644 --- a/usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL +++ b/usr/src/cmd/perl/contrib/Sun/Solaris/PerlGcc/Makefile.PL @@ -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 $arch = qx{uname -p}; chomp($arch); 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 @@ if (! -f $configpm) { 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; diff --git a/usr/src/cmd/perl/skel/Makefile b/usr/src/cmd/perl/skel/Makefile new file mode 100644 index 0000000000..17c4e359ca --- /dev/null +++ b/usr/src/cmd/perl/skel/Makefile @@ -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: |
