--- old/usr/src/Makefile.master	Mon Feb  9 11:03:02 2015
+++ new/usr/src/Makefile.master	Mon Feb  9 11:03:02 2015
@@ -23,6 +23,7 @@
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 #
@@ -167,6 +168,8 @@
 PERL=		/usr/bin/perl
 PERL_VERSION=	5.10.0
 PERL_PKGVERS=	-510
+PERL_ARCH =		i86pc-solaris-64int
+$(SPARC_BLD)PERL_ARCH =	sun4-solaris-64int
 PYTHON_26=	/usr/bin/python2.6
 PYTHON=		$(PYTHON_26)
 SORT=		/usr/bin/sort
--- old/usr/src/cmd/perl/Makefile.perl	Mon Feb  9 11:03:02 2015
+++ new/usr/src/cmd/perl/Makefile.perl	Mon Feb  9 11:03:02 2015
@@ -10,17 +10,15 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 include $(SRC)/lib/Makefile.lib
 
-# PERL_VERSION used to be set here,
-# but as it is also needed in usr/src/pkg/Makefile, 
+# PERL_VERSION and PERL_ARCH used to be set here,
+# but as they were also needed in usr/src/pkg/Makefile,
 # the definition was moved to usr/src/Makefile.master
 
-PERL_ARCH = i86pc-solaris-64int
-$(SPARC_BLD)PERL_ARCH = sun4-solaris-64int
-
 PERLDIR = $(ADJUNCT_PROTO)/usr/perl5/$(PERL_VERSION)
 PERLLIBDIR = $(PERLDIR)/lib/$(PERL_ARCH)
 PERLINCDIR = $(PERLLIBDIR)/CORE
--- old/usr/src/cmd/perl/Makefile.targ	Mon Feb  9 11:03:03 2015
+++ new/usr/src/cmd/perl/Makefile.targ	Mon Feb  9 11:03:03 2015
@@ -10,7 +10,7 @@
 #
 #
 # Copyright (c) 2014 Racktop Systems.
-# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 # Link against libc as perl solaris specs
@@ -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	Mon Feb  9 11:03:03 2015
+++ new/usr/src/pkg/Makefile	Mon Feb  9 11:03:03 2015
@@ -21,6 +21,7 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 include $(SRC)/Makefile.master
@@ -176,6 +177,7 @@
 	PKGVERS_BUILTON=$(PKGVERS_BUILTON) \
 	PKGVERS_BRANCH=$(PKGVERS_BRANCH) \
 	PKGVERS=$(PKGVERS) \
+	PERL_ARCH=$(PERL_ARCH) \
 	PERL_VERSION=$(PERL_VERSION) \
 	PERL_PKGVERS=$(PERL_PKGVERS)
 
--- old/usr/src/pkg/manifests/runtime-perl-module-sun-solaris.mf	Mon Feb  9 11:03:03 2015
+++ new/usr/src/pkg/manifests/runtime-perl-module-sun-solaris.mf	Mon Feb  9 11:03:03 2015
@@ -22,11 +22,9 @@
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2014 Racktop Systems.
+# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
-$(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 \
@@ -39,51 +37,41 @@
 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/$(PERL_ARCH)
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/Sun
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/Sun/Solaris
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Intrs
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Kstat
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Lgrp
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Project
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Task
+dir path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/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/$(PERL_ARCH)/Sun/Solaris/Intrs.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/Sun/Solaris/Kstat.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/Sun/Solaris/Lgrp.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/Sun/Solaris/Project.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/Sun/Solaris/Task.pm
+file path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/Sun/Solaris/Utils.pm
 file \
-    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Intrs.pm
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Intrs/Intrs.so
 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
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Kstat/Kstat.so
 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
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Lgrp/Lgrp.so
 file \
-    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/Sun/Solaris/Utils.pm
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Project/Project.so
 file \
-    path=usr/perl5/$(PERL_VERSION)/lib/PLAT-solaris-64int/auto/Sun/Solaris/Intrs/Intrs.so
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/auto/Sun/Solaris/Task/Task.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
+    path=usr/perl5/$(PERL_VERSION)/lib/$(PERL_ARCH)/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
--- old/usr/src/tools/env/illumos.sh	Mon Feb  9 11:03:03 2015
+++ new/usr/src/tools/env/illumos.sh	Mon Feb  9 11:03:03 2015
@@ -21,6 +21,7 @@
 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2010, 2011 Nexenta Systems, Inc.  All rights reserved.
 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
+# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
 #
 
 # Configuration variables for the runtime environment of the nightly
@@ -229,3 +230,10 @@
 
 # Uncomment this to disable support for SMB printing.
 # export ENABLE_SMB_PRINTING='#'
+
+# If your distro uses certain versions of Perl, make sure either Makefile.master
+# contains your new defaults OR your .env file sets them.
+# These are how you would override for building on OmniOS r151012, for example.
+#export PERL_VERSION=5.16.1
+#export PERL_ARCH=i86pc-solaris-thread-multi-64int
+#export PERL_PKGVERS=-5161
