--- old/usr/src/Makefile.master	2014-06-02 17:29:28.822270857 +0400
+++ new/usr/src/Makefile.master	2014-06-02 17:29:28.856416389 +0400
@@ -164,6 +164,7 @@
 XREF=		$(ONBLD_TOOLS)/bin/xref
 FIND=		/usr/bin/find
 PERL=		/usr/bin/perl
+PERL_VERSION=	5.10.0
 PYTHON_26=	/usr/bin/python2.6
 PYTHON=		$(PYTHON_26)
 SORT=		/usr/bin/sort
--- old/usr/src/cmd/perl/Makefile.perl	2014-06-02 17:29:29.567992286 +0400
+++ new/usr/src/cmd/perl/Makefile.perl	2014-06-02 17:29:29.593267482 +0400
@@ -14,7 +14,9 @@
 
 include $(SRC)/lib/Makefile.lib
 
-PERL_VERSION = 5.10.0
+# PERL_VERSION used to be set here,
+# but as it is also needed in usr/src/pkg/Makefile, 
+# the difinition was moved to usr/src/Makefile.master
 
 PERL_ARCH = i86pc-solaris-64int
 $(SPARC_BLD)PERL_ARCH = sun4-solaris-64int
--- old/usr/src/cmd/perl/Makefile.targ	2014-06-02 17:29:30.324612614 +0400
+++ new/usr/src/cmd/perl/Makefile.targ	2014-06-02 17:29:30.352413579 +0400
@@ -23,8 +23,8 @@
 $(ROOTPERLMOD) := FILEMODE = 0444
 
 # CFLAGS for perl, specifically.
-PCFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV \
-	-D_TS_ERRNO
+PCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+	-DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
 
 $(MACH):
 	$(INS.dir)
--- old/usr/src/pkg/Makefile	2014-06-02 17:29:31.155685543 +0400
+++ new/usr/src/pkg/Makefile	2014-06-02 17:29:31.198752268 +0400
@@ -137,6 +137,8 @@
 PKGVERS_BUILTON= $(RELEASE)
 PKGVERS_BRANCH= 0.$(ONNV_BUILDNUM)
 PKGVERS= $(PKGVERS_COMPONENT),$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
+PERL_PKGVERS.cmd= print $(PERL_VERSION) | sed 's/\.//g' | head -c 3
+PERL_PKGVERS= $(PERL_PKGVERS.cmd:sh)
 
 #
 # The ARCH32 and ARCH64 macros are used in the manifests to express
@@ -175,7 +177,9 @@
 	PKGVERS_COMPONENT=$(PKGVERS_COMPONENT) \
 	PKGVERS_BUILTON=$(PKGVERS_BUILTON) \
 	PKGVERS_BRANCH=$(PKGVERS_BRANCH) \
-	PKGVERS=$(PKGVERS)
+	PKGVERS=$(PKGVERS) \
+	PERL_VERSION=$(PERL_VERSION) \
+	PERL_PKGVERS=$(PERL_PKGVERS)
 
 PKGDEP_TOKENS_i386= \
 	'PLATFORM=i86hvm' \
--- old/usr/src/pkg/manifests/SUNWcs.mf	2014-06-02 17:29:31.902987042 +0400
+++ new/usr/src/pkg/manifests/SUNWcs.mf	2014-06-02 17:29:31.942201961 +0400
@@ -1884,7 +1884,11 @@
 #
 # intrd and others use the illumos-defaulted perl interpreter
 #
-depend fmri=runtime/perl-510 type=require
+depend fmri=runtime/perl-$(PERL_PKGVERS) type=require
+#
+# intrd uses sun-solaris Perl modules
+#
+depend fmri=runtime/perl-$(PERL_PKGVERS)/module/sun-solaris type=require
 #
 # The loadkeys binary needs the keytables.
 #
--- old/usr/src/pkg/manifests/developer-appcert.mf	2014-06-02 17:29:32.720207926 +0400
+++ new/usr/src/pkg/manifests/developer-appcert.mf	2014-06-02 17:29:32.747481763 +0400
@@ -54,4 +54,4 @@
     name="ABI Application Certification Tools"
 license cr_Sun license=cr_Sun
 license lic_CDDL license=lic_CDDL
-depend fmri=runtime/perl-510 type=require
+depend fmri=runtime/perl-$(PERL_PKGVERS) type=require
--- old/usr/src/pkg/manifests/developer-object-file.mf	2014-06-02 17:29:33.374965058 +0400
+++ new/usr/src/pkg/manifests/developer-object-file.mf	2014-06-02 17:29:33.416661062 +0400
@@ -160,4 +160,4 @@
 link path=usr/lib/elfedit/32 target=.
 link path=usr/lib/elfedit/64 target=$(ARCH64)
 depend fmri=developer/macro/cpp type=require
-depend fmri=runtime/perl-510 type=require
+depend fmri=runtime/perl-$(PERL_PKGVERS) type=require
--- old/usr/src/pkg/manifests/developer-opensolaris-osnet.mf	2014-06-02 17:29:34.119683702 +0400
+++ new/usr/src/pkg/manifests/developer-opensolaris-osnet.mf	2014-06-02 17:29:34.141395011 +0400
@@ -48,8 +48,7 @@
 depend fmri=library/security/trousers@0.3.2-0.133 type=require
 depend fmri=print/cups@1.4.2-0.133 type=require
 depend fmri=print/filter/ghostscript@8.64-0.133 type=require
-depend fmri=runtime/perl-510/extra@5.10.0-0.133 type=require
-depend fmri=runtime/perl-510@5.10.0-0.133 type=require
+depend fmri=runtime/perl-$(PERL_PKGVERS)@5.10.0-0.133 type=require
 depend fmri=system/header@0.5.11-0.133 type=require
 depend fmri=system/library/dbus@0.5.11-0.133 type=require
 depend fmri=system/library/install@0.5.11-0.133 type=require
--- old/usr/src/pkg/manifests/print-lp-print-client-commands.mf	2014-06-02 17:29:34.865535581 +0400
+++ new/usr/src/pkg/manifests/print-lp-print-client-commands.mf	2014-06-02 17:29:34.887943348 +0400
@@ -81,4 +81,4 @@
 link path=usr/sbin/reject target=./print-service
 link path=usr/share/man/man1/disable.1 target=enable.1
 link path=usr/share/man/man1m/reject.1m target=accept.1m
-depend fmri=runtime/perl-510 type=require
+depend fmri=runtime/perl-$(PERL_PKGVERS) type=require
--- old/usr/src/pkg/manifests/runtime-perl-510-module-sun-solaris.mf	2014-06-02 17:29:35.579152157 +0400
+++ /dev/null	2014-06-02 17:29:35.000000000 +0400
@@ -1,86 +0,0 @@
-#
-# 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.
-# Copyright (c) 2014 Racktop Systems.
-#
-
-$(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>
-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)
-dir path=usr group=sys
-dir path=usr/perl5
-dir path=usr/perl5/5.10.0
-dir path=usr/perl5/5.10.0/lib
-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/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/Intrs
-dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Kstat
-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/Task
-dir path=usr/perl5/5.10.0/lib/PLAT-solaris-64int/auto/Sun/Solaris/Utils
-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/share/man
-dir path=usr/share/man/man3perl
-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/Kstat.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/Project.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/Utils.pm
-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/Kstat/Kstat.so
-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/Project/Project.so
-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/Utils/Utils.so
-file path=usr/perl5/5.10.0/lib/Sun/Solaris/BSM/_BSMparse.pm
-file path=usr/perl5/5.10.0/lib/Sun/Solaris/Pg.pm
-file path=usr/share/man/man3perl/Kstat.3perl
-file path=usr/share/man/man3perl/Lgrp.3perl
-file path=usr/share/man/man3perl/Project.3perl
-file path=usr/share/man/man3perl/Task.3perl
-license cr_Sun license=cr_Sun
-license usr/src/cmd/perl/THIRDPARTYLICENSE \
-    license=usr/src/cmd/perl/THIRDPARTYLICENSE
-depend fmri=runtime/perl-510/extra type=require
--- /dev/null	2014-06-02 17:29:35.000000000 +0400
+++ new/usr/src/pkg/manifests/runtime-perl-module-sun-solaris.mf	2014-06-02 17:29:35.849078264 +0400
@@ -0,0 +1,95 @@
+#
+# 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.
+# Copyright (c) 2014 Racktop Systems.
+#
+
+$(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>
+set name=pkg.fmri \
+    value=pkg:/runtime/perl-$(PERL_PKGVERS)/module/sun-solaris@0.5.11,$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
+set name=pkg.summary value="Perl $(PERL_VERSION) Sun::Solaris Modules"
+set name=info.classification \
+    value=org.opensolaris.category.2008:Development/Perl
+set name=variant.arch value=$(ARCH)
+dir path=usr group=sys
+dir path=usr/perl5
+dir path=usr/perl5/$(PERL_VERSION)
+dir path=usr/perl5/$(PERL_VERSION)/lib
+dir path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int
+dir path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun
+dir path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris
+dir path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto
+dir path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun
+dir path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris
+dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Intrs
+dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Kstat
+dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Lgrp
+dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Project
+dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Task
+dir \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Utils
+dir path=usr/perl5/$(PERL_VERSION)/lib/Sun
+dir path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris
+dir path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris/BSM
+dir path=usr/share/man
+dir path=usr/share/man/man3perl
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Intrs.pm
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Kstat.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Lgrp.pm
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Project.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Task.pm
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Utils.pm
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Intrs/Intrs.so
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Kstat/Kstat.so
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Lgrp/Lgrp.so
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Project/Project.so
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Task/Task.so
+file \
+    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Utils/Utils.so
+file path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris/BSM/_BSMparse.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/Sun/Solaris/Pg.pm
+file path=usr/share/man/man3perl/Kstat.3perl
+file path=usr/share/man/man3perl/Lgrp.3perl
+file path=usr/share/man/man3perl/Project.3perl
+file path=usr/share/man/man3perl/Task.3perl
+license cr_Sun license=cr_Sun
+license usr/src/cmd/perl/THIRDPARTYLICENSE \
+    license=usr/src/cmd/perl/THIRDPARTYLICENSE
--- old/usr/src/pkg/manifests/service-network-smtp-sendmail.mf	2014-06-02 17:29:36.461613366 +0400
+++ new/usr/src/pkg/manifests/service-network-smtp-sendmail.mf	2014-06-02 17:29:36.482377423 +0400
@@ -232,4 +232,4 @@
 link path=usr/share/man/man4/forward.4 target=aliases.4
 link path=usr/share/man/man4/sendmail.cf.4 target=sendmail.4
 link path=usr/share/man/man4/submit.cf.4 target=sendmail.4
-depend fmri=runtime/perl-510 type=require
+depend fmri=runtime/perl-$(PERL_PKGVERS) type=require
--- old/usr/src/pkg/manifests/system-extended-system-utilities.mf	2014-06-02 17:29:37.154086358 +0400
+++ new/usr/src/pkg/manifests/system-extended-system-utilities.mf	2014-06-02 17:29:37.174802155 +0400
@@ -278,4 +278,4 @@
 link path=usr/share/man/man1/unexpand.1 target=expand.1
 link path=usr/share/man/man1/unpack.1 target=pack.1
 link path=usr/share/man/man1/zcat.1 target=compress.1
-depend fmri=runtime/perl-510 type=require
+depend fmri=runtime/perl-$(PERL_PKGVERS) type=require
