25766761 prepare Userland for 11.4
authorJohn Beck <John.Beck@Oracle.COM>
Tue, 04 Apr 2017 16:12:22 -0700
changeset 7829 2de4f4ace09c
parent 7828 f7ee70770225
child 7830 a19af6ab1a9c
25766761 prepare Userland for 11.4
components/Makefile
components/apache24/apache-24.p5m
components/apr-util-1_5/Makefile
components/apr-util-1_5/apr-util-15-dbd-mysql.p5m
components/bash/Makefile
components/bind/Makefile
components/cups/Makefile
components/curl/Makefile
components/desktop/libproxy/Makefile
components/desktop/libxklavier/libxklavier.p5m
components/desktop/polkit/Makefile
components/fetchmail/Makefile
components/gcc4/Makefile
components/gcc5/Makefile
components/gcc5/developer-gcc-gcc-common-5.p5m
components/gnome/glib2/Makefile
components/gnome/gnome-doc-utils/Makefile
components/gnome/gtk-doc/Makefile
components/gutenprint/gutenprint.p5m
components/hplip/Makefile
components/httping/Makefile
components/imagemagick/Makefile
components/libgsl/libgsl.p5m
components/libmemcached/Makefile
components/libneon/Makefile
components/libpcap/libpcap.p5m
components/libpcap/patches/fix-man-page.patch
components/libpki/Makefile
components/libpki/patches/01-configure.patch
components/libusb/wrapper/libusb.p5m
components/lighttpd/Makefile
components/llvm/Makefile
components/llvm/clang.p5m
components/meta-packages/history/Makefile
components/meta-packages/history/sfw-incorporation.p5m
components/mutt/Makefile
components/nmap/Makefile
components/open-fabrics/ofed-component.mk
components/openldap/Makefile
components/openscap/Makefile
components/opensp/Makefile
components/pam_pkcs11/Makefile
components/pam_pkcs11/pam_pkcs11.p5m
components/php/php56/Makefile
components/pinentry/Makefile
components/pkg-config/Makefile
components/postfix/Makefile
components/proftpd/Makefile
components/python/pep8/pep8-PYVER.p5m
components/python/python-ldap/Makefile
components/python/simplejson/Makefile
components/rpm2cpio/rpm2cpio.p5m
components/rtorrent/Makefile
components/ruby/augeas/Makefile
components/ruby/augeas/ruby-augeas.p5m
components/sendmail/Makefile
components/sendmail/patches/conf.h.patch
components/sendmail/test/results-all.master
components/serf/Makefile
components/squid/Makefile
components/subversion/Makefile
components/sudo/Makefile
components/tcpdump/Makefile
components/tcsh/tcsh.p5m
components/timezone/Makefile
components/timezone/system-data-timezone-message-files.p5m
components/timezone/system-data-timezone.p5m
components/trousers/Makefile
components/trousers/trousers.p5m
components/unixodbc/Makefile
components/which/which.p5m
components/zsh/Makefile
doc/packaging.txt
make-rules/ips.mk
make-rules/shared-macros.mk
--- a/components/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../make-rules/shared-macros.mk
@@ -161,7 +161,7 @@
 incorporation:
 	$(WS_TOOLS)/userland-incorporator \
 		--repository $(PKG_REPO) \
-		--version $(OS_VERSION),$(BUILD_VERSION) \
+		--version $(OS_RELEASE),$(BUILD_VERSION) \
 		--publisher $(PUBLISHER) \
 		--consolidation $(CONSOLIDATION) \
 		--destdir $(WS_MACH) \
@@ -174,10 +174,10 @@
 
 publish:
 	$(PKGREPO) refresh -s $(PKG_REPO)
-# The package below is obsolete in S12, but cannot yet be removed from S11
-# because runtime/python-26 has an optional dependency on it.
+# The package below is obsolete in S12/11.4, but cannot yet be removed from
+# S11.3 because runtime/python-26 has an optional dependency on it.
 ifeq ($(BUILD_TYPE),evaluation)
-ifeq ($(OS_VERSION),5.11)
+ifeq ($(OS_VERSION),11.3)
 	-$(PKGREPO) remove -s $(PKG_REPO) \
 	    library/python/tkinter-26
 	$(PKGREPO) refresh -s $(PKG_REPO)
--- a/components/apache24/apache-24.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/apache24/apache-24.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
 <transform file link hardlink path=usr/apache2/2.4/build/.* -> \
@@ -239,7 +239,7 @@
 file path=usr/apache2/2.4/libexec/mod_proxy_connect.so
 file path=usr/apache2/2.4/libexec/mod_proxy_express.so
 file path=usr/apache2/2.4/libexec/mod_proxy_fcgi.so
-$(SOLARIS_12_ONLY)file path=usr/apache2/2.4/libexec/mod_proxy_fdpass.so
+$(SOLARIS_11_4_ONLY)file path=usr/apache2/2.4/libexec/mod_proxy_fdpass.so
 file path=usr/apache2/2.4/libexec/mod_proxy_ftp.so
 file path=usr/apache2/2.4/libexec/mod_proxy_hcheck.so
 file path=usr/apache2/2.4/libexec/mod_proxy_html.so
--- a/components/apr-util-1_5/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/apr-util-1_5/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -96,7 +96,7 @@
 REQUIRED_PACKAGES += developer/documentation-tool/doxygen
 REQUIRED_PACKAGES += library/apr-15
 REQUIRED_PACKAGES += library/expat
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/library/math
 REQUIRED_PACKAGES += system/network/ldap/openldap
--- a/components/apr-util-1_5/apr-util-15-dbd-mysql.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/apr-util-1_5/apr-util-15-dbd-mysql.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 set name=pkg.fmri \
     value=pkg:/library/apr-util-15/dbd-mysql@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
@@ -36,7 +36,7 @@
 file path=usr/apr-util/1.5/lib/$(MACH64)/apr-util-1/apr_dbd_mysql-1.so
 link path=usr/apr-util/1.5/lib/$(MACH64)/apr-util-1/apr_dbd_mysql.so \
     target=apr_dbd_mysql-1.so
-$(SOLARIS_11_ONLY)file path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql-1.so
-$(SOLARIS_11_ONLY)link path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql.so \
+$(SOLARIS_11_3_ONLY)file path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql-1.so
+$(SOLARIS_11_3_ONLY)link path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql.so \
     target=apr_dbd_mysql-1.so
 license apr-util.license license="Apache v2.0"
--- a/components/bash/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/bash/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -69,19 +69,13 @@
 # the required libraries for them. We avoid linking with libthread.so.1
 # just because we pass -mt, by explicitly passing -lc.
 LIBS =	-lc -lgen
-ifeq ($(OS_VERSION),5.11)
-LIBS +=	-lsocket
-endif
+LIBS +=	$(LIBSOCKET)
 
 # -z redlocsym -- let's shrink the SHT_SYMTAB as much as we can
 LDFLAGS =	$(LD_Z_REDLOCSYM)
 
 # This avoids the need to patch configure or other files for these dependencies.
-ifeq ($(OS_VERSION), 5.11)
-CONFIGURE_ENV += LD_OPTIONS="-lc -lm -lgen -lsocket -lnsl -lresolv $(LD_Z_IGNORE)"
-else
-CONFIGURE_ENV += LD_OPTIONS="-lc -lm -lgen -lresolv $(LD_Z_IGNORE)"
-endif
+CONFIGURE_ENV += LD_OPTIONS="-lc -lm -lgen $(LIBSOCKET) $(LIBNSL) -lresolv $(LD_Z_IGNORE)"
 
 CONFIGURE_ENV +=	LIBS="$(LIBS)"
 
--- a/components/bind/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/bind/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -171,11 +171,7 @@
 REQUIRED_PACKAGES += network/dns/bind
 REQUIRED_PACKAGES += runtime/python-34
 REQUIRED_PACKAGES += security/kerberos-5
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += service/security/kerberos-5
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += service/security/kerberos-5
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/core-os
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += system/library/security/gss
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/gss
--- a/components/cups/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/cups/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -105,15 +105,11 @@
 REQUIRED_PACKAGES += library/zlib
 REQUIRED_PACKAGES += $(PERL_PKG)
 REQUIRED_PACKAGES += security/kerberos-5
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += service/security/kerberos-5
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += service/security/kerberos-5
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/core-os
 REQUIRED_PACKAGES += system/library/c++-runtime
 REQUIRED_PACKAGES += system/library/libdbus
 REQUIRED_PACKAGES += system/library/math
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += system/library/security/gss
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/gss
 REQUIRED_PACKAGES += system/network/ldap/openldap
--- a/components/curl/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/curl/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -103,12 +103,10 @@
 REQUIRED_PACKAGES += library/libidn
 REQUIRED_PACKAGES += library/libssh2
 REQUIRED_PACKAGES += library/nghttp2
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += library/zlib
 REQUIRED_PACKAGES += security/kerberos-5
 REQUIRED_PACKAGES += shell/ksh93
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += system/library/security/gss
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/gss
 REQUIRED_PACKAGES += system/network/ldap/openldap
--- a/components/desktop/libproxy/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/desktop/libproxy/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -62,8 +62,9 @@
 # Always build pacrunner as a module.
 CMAKE_OPTIONS += -DBIPR=ON
 
-ifeq ($(OS_VERSION),5.11)
-LDFLAGS +=       -lsocket -lnsl -lxnet
+LDFLAGS +=       $(LIBSOCKET) $(LIBNSL) $(LIBXNET)
+
+ifeq ($(OS_VERSION),11.3)
 CMAKE_OPTIONS += -DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)"
 CMAKE_OPTIONS += -DPERL_EXECUTABLE="$(PERL)"
 endif
--- a/components/desktop/libxklavier/libxklavier.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/desktop/libxklavier/libxklavier.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform dir file link hardlink path=usr/share/gtk-doc/.* -> \
@@ -66,15 +66,15 @@
 file path=usr/share/gtk-doc/html/libxklavier/home.png
 file path=usr/share/gtk-doc/html/libxklavier/index.html
 file path=usr/share/gtk-doc/html/libxklavier/index.sgml
-$(SOLARIS_12_ONLY)file path=usr/share/gtk-doc/html/libxklavier/left-insensitive.png
+$(SOLARIS_11_4_ONLY)file path=usr/share/gtk-doc/html/libxklavier/left-insensitive.png
 file path=usr/share/gtk-doc/html/libxklavier/left.png
 file path=usr/share/gtk-doc/html/libxklavier/libxklavier-xkl-engine.html
 file path=usr/share/gtk-doc/html/libxklavier/libxklavier-xklavier.html
 file path=usr/share/gtk-doc/html/libxklavier/libxklavier.devhelp2
-$(SOLARIS_12_ONLY)file path=usr/share/gtk-doc/html/libxklavier/right-insensitive.png
+$(SOLARIS_11_4_ONLY)file path=usr/share/gtk-doc/html/libxklavier/right-insensitive.png
 file path=usr/share/gtk-doc/html/libxklavier/right.png
 file path=usr/share/gtk-doc/html/libxklavier/style.css
-$(SOLARIS_12_ONLY)file path=usr/share/gtk-doc/html/libxklavier/up-insensitive.png
+$(SOLARIS_11_4_ONLY)file path=usr/share/gtk-doc/html/libxklavier/up-insensitive.png
 file path=usr/share/gtk-doc/html/libxklavier/up.png
 
 
--- a/components/desktop/polkit/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/desktop/polkit/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -83,7 +83,7 @@
 
 # Largefile support breaks use of <procfs.h> when build environment is older
 # than s12_84 due to Solaris bug 21833491
-ifeq ($(OS_VERSION), 5.11)
+ifeq ($(OS_VERSION), 11.3)
   CONFIGURE_OPTIONS += --disable-largefile
 endif
 
--- a/components/fetchmail/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/fetchmail/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -67,7 +67,5 @@
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += runtime/python-27
 REQUIRED_PACKAGES += security/kerberos-5
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += service/security/kerberos-5
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += service/security/kerberos-5
 REQUIRED_PACKAGES += shell/ksh93
--- a/components/gcc4/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/gcc4/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -131,8 +131,8 @@
 
 COMPONENT_PRE_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
 
-# We don't have DejaGNU in S11.
-ifeq ($(OS_VERSION), 5.12)
+# We don't have DejaGNU in S11.3.
+ifneq ($(OS_VERSION), 11.3)
   COMPONENT_PRE_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
 endif
 
--- a/components/gcc5/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/gcc5/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -134,8 +134,8 @@
 
 COMPONENT_PRE_TEST_ENV += TCL_LIBRARY="$(USRLIBDIR)/tcl8.5"
 
-# We don't have DejaGNU in S11.
-ifeq ($(OS_VERSION), 5.12)
+# We don't have DejaGNU in S11.3.
+ifneq ($(OS_VERSION), 11.3)
   COMPONENT_PRE_TEST_ENV += DEJAGNULIBS="$(USRSHAREDIR)/dejagnu"
 endif
 
--- a/components/gcc5/developer-gcc-gcc-common-5.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/gcc5/developer-gcc-gcc-common-5.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability 'pass-thru volatile'>
@@ -77,16 +77,16 @@
 file \
     path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/$(MACH64)/libgcov.a \
     variant.arch=drop
-$(SOLARIS_11_ONLY)file \
+$(SOLARIS_11_3_ONLY)file \
     path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crt1.o \
     variant.arch=sparc
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtbegin.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtbeginS.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtbeginS.o
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtend.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtendS.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtendS.o
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtfastmath.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtp.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtpg.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtp.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtpg.o
 file \
     path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/crtprec32.o \
     variant.arch=i386
@@ -102,16 +102,16 @@
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/32/libgcov.a
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/collect2 \
     mode=0555
-$(SOLARIS_11_ONLY)file \
+$(SOLARIS_11_3_ONLY)file \
     path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crt1.o \
     variant.arch=sparc
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtbegin.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtbeginS.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtbeginS.o
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtend.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtendS.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtendS.o
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtfastmath.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtp.o
-$(SOLARIS_12_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtpg.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtp.o
+$(SOLARIS_11_4_ONLY)file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtpg.o
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtprec32.o \
     variant.arch=i386
 file path=$(GCC_BASEDIR)/lib/gcc/$(GNU_ARCH)/$(COMPONENT_VERSION)/crtprec64.o \
--- a/components/gnome/glib2/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/gnome/glib2/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -116,7 +116,7 @@
         '-e "/ERROR/p" '
 
 REQUIRED_PACKAGES += $(PERL_PKG)
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += data/docbook
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += data/docbook
 REQUIRED_PACKAGES += data/docbook/docbook-dtds
 REQUIRED_PACKAGES += data/docbook/docbook-style-dsssl
 REQUIRED_PACKAGES += data/docbook/docbook-style-xsl
--- a/components/gnome/gnome-doc-utils/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/gnome/gnome-doc-utils/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -55,7 +55,7 @@
 # Assumes GNU xgettext in PATH.
 CONFIGURE_ENV += PATH=$(GNUBIN):$(PATH)
 
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += data/docbook
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += data/docbook
 REQUIRED_PACKAGES += data/docbook/docbook-dtds
 REQUIRED_PACKAGES += data/docbook/docbook-style-dsssl
 REQUIRED_PACKAGES += data/docbook/docbook-style-xsl 
--- a/components/gnome/gtk-doc/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/gnome/gtk-doc/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -61,7 +61,7 @@
         '-e "/FAIL:/p" ' \
         '-e "/ERROR:/p" '
 
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += data/docbook
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += data/docbook
 REQUIRED_PACKAGES += data/docbook/docbook-dtds
 REQUIRED_PACKAGES += data/docbook/docbook-style-dsssl
 REQUIRED_PACKAGES += data/docbook/docbook-style-xsl 
@@ -69,7 +69,7 @@
 REQUIRED_PACKAGES += data/xml-common
 REQUIRED_PACKAGES += developer/documentation-tool/itstool
 REQUIRED_PACKAGES += developer/documentation-tool/openjade
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += developer/gnome/gettext
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += developer/gnome/gettext
 REQUIRED_PACKAGES += developer/gnome/gnome-doc-utils
 REQUIRED_PACKAGES += developer/intltool
 REQUIRED_PACKAGES += editor/vim
--- a/components/gutenprint/gutenprint.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/gutenprint/gutenprint.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
@@ -62,10 +62,10 @@
 file path=usr/include/gutenprint/vars.h
 file path=usr/include/gutenprint/weave.h
 file path=usr/include/gutenprint/xml.h
-$(SOLARIS_12_ONLY)file path=usr/include/gutenprintui2/curve.h
-$(SOLARIS_12_ONLY)file path=usr/include/gutenprintui2/gammacurve.h
-$(SOLARIS_12_ONLY)file path=usr/include/gutenprintui2/gutenprintui.h
-$(SOLARIS_12_ONLY)file path=usr/include/gutenprintui2/typebuiltins.h
+$(SOLARIS_11_4_ONLY)file path=usr/include/gutenprintui2/curve.h
+$(SOLARIS_11_4_ONLY)file path=usr/include/gutenprintui2/gammacurve.h
+$(SOLARIS_11_4_ONLY)file path=usr/include/gutenprintui2/gutenprintui.h
+$(SOLARIS_11_4_ONLY)file path=usr/include/gutenprintui2/typebuiltins.h
 file path=usr/lib/cups/driver/gutenprint.5.2
 file path=usr/lib/cups/filter/commandtocanon
 file path=usr/lib/cups/filter/commandtoepson
@@ -83,13 +83,13 @@
 link path=usr/lib/libgutenprint.so target=libgutenprint.so.2.0.8
 link path=usr/lib/libgutenprint.so.2 target=libgutenprint.so.2.0.8
 file path=usr/lib/libgutenprint.so.2.0.8
-$(SOLARIS_12_ONLY)link path=usr/lib/libgutenprintui2.so \
+$(SOLARIS_11_4_ONLY)link path=usr/lib/libgutenprintui2.so \
     target=libgutenprintui2.so.1.0.0
-$(SOLARIS_12_ONLY)link path=usr/lib/libgutenprintui2.so.1 \
+$(SOLARIS_11_4_ONLY)link path=usr/lib/libgutenprintui2.so.1 \
     target=libgutenprintui2.so.1.0.0
-$(SOLARIS_12_ONLY)file path=usr/lib/libgutenprintui2.so.1.0.0
+$(SOLARIS_11_4_ONLY)file path=usr/lib/libgutenprintui2.so.1.0.0
 file path=usr/lib/pkgconfig/gutenprint.pc
-$(SOLARIS_12_ONLY)file path=usr/lib/pkgconfig/gutenprintui2.pc
+$(SOLARIS_11_4_ONLY)file path=usr/lib/pkgconfig/gutenprintui2.pc
 file path=usr/sbin/cups-genppd.5.2
 file path=usr/sbin/cups-genppdupdate
 file path=usr/share/cups/calibrate.ppm
--- a/components/hplip/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/hplip/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -46,7 +46,7 @@
 
 CONFIGURE_OPTIONS +=	--localedir=$(CONFIGURE_LOCALEDIR)
 CONFIGURE_OPTIONS +=	--with-hpppddir=$(USRSHAREDIR)/cups/model/hplip
-ifeq ($(OS_VERSION),5.11)
+ifeq ($(OS_VERSION),11.3)
 CONFIGURE_OPTIONS +=	--enable-libusb01_build
 endif
 CONFIGURE_OPTIONS +=	--enable-fax-build
@@ -62,9 +62,7 @@
 # bye, bye SANE backends
 CONFIGURE_OPTIONS +=	--disable-scan-build
 
-ifeq ($(OS_VERSION),5.11)
-LDFLAGS += -lnsl
-endif
+LDFLAGS += $(LIBNSL)
 
 COMPONENT_INSTALL_ARGS += -e
 
--- a/components/httping/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/httping/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -41,9 +41,7 @@
 TEST_TARGET= $(NO_TESTS)
 include $(WS_MAKE_RULES)/common.mk
 
-ifeq ($(OS_VERSION),5.11)
-EXTRA_LIBRARIES =	-lsocket -lnsl
-endif
+EXTRA_LIBRARIES =	$(LIBSOCKET) $(LIBNSL)
 EXTRA_LIBRARIES +=	-lncurses -lfftw3 -lssl -lcrypto -lresolv -lm
 
 # The usual Solaris curses.h vs ncurses/curses.h mess.
--- a/components/imagemagick/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/imagemagick/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -69,10 +69,8 @@
 	-e 's|need_relink=yes|need_relink=not_on_solaris|' \
 	libtool)
 
-ifeq ($(OS_VERSION),5.11)
-LIBS += -lsocket -lnsl
+LIBS += $(LIBSOCKET) $(LIBNSL)
 CONFIGURE_ENV += LIBS="$(LIBS)"
-endif
 
 # Prevent older versions of libMagick{Core,Wand}-6.Q16.so from the build
 # machine from being found ahead of new versions from the proto area.
--- a/components/libgsl/libgsl.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libgsl/libgsl.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -286,16 +286,16 @@
 link path=usr/lib/$(MACH64)/libgsl.so target=libgsl.so.19.2.0
 link path=usr/lib/$(MACH64)/libgsl.so.19 target=libgsl.so.19.2.0
 file path=usr/lib/$(MACH64)/libgsl.so.19.2.0
-$(SOLARIS_11_ONLY)link path=usr/lib/$(MACH64)/libgslcblas.so \
+$(SOLARIS_11_3_ONLY)link path=usr/lib/$(MACH64)/libgslcblas.so \
     target=../studio/$(MACH64)/libsunperf.so
-$(SOLARIS_12_ONLY)link path=usr/lib/$(MACH64)/libgslcblas.so \
+$(SOLARIS_11_4_ONLY)link path=usr/lib/$(MACH64)/libgslcblas.so \
     target=libsunperf.so
 file path=usr/lib/$(MACH64)/pkgconfig/gsl.pc
 link path=usr/lib/libgsl.so target=libgsl.so.19.2.0
 link path=usr/lib/libgsl.so.19 target=libgsl.so.19.2.0
 file path=usr/lib/libgsl.so.19.2.0
-$(SOLARIS_12_ONLY)link path=usr/lib/libgslcblas.so target=libsunperf.so
-$(SOLARIS_11_ONLY)link path=usr/lib/libgslcblas.so target=studio/libsunperf.so
+$(SOLARIS_11_4_ONLY)link path=usr/lib/libgslcblas.so target=libsunperf.so
+$(SOLARIS_11_3_ONLY)link path=usr/lib/libgslcblas.so target=studio/libsunperf.so
 file path=usr/lib/pkgconfig/gsl.pc
 file path=usr/share/aclocal/gsl.m4
 file path=usr/share/info/gsl-ref.info
--- a/components/libmemcached/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libmemcached/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -38,8 +38,8 @@
 
 include $(WS_MAKE_RULES)/common.mk
 
-ifeq ($(OS_VERSION),5.11)
-LDFLAGS += -lsocket -lnsl
+LDFLAGS += $(LIBSOCKET) $(LIBNSL)
+ifeq ($(OS_VERSION),11.3)
 CONFIGURE_OPTIONS += ax_cv_check_cflags__Werror__fPIE=no
 CONFIGURE_OPTIONS += ax_cv_check_cflags__Werror__pie=no
 CONFIGURE_OPTIONS += ax_cv_check_cxxflags__Werror__fPIE=no
--- a/components/libneon/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libneon/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -97,6 +97,4 @@
 REQUIRED_PACKAGES += library/zlib
 REQUIRED_PACKAGES += security/kerberos-5
 REQUIRED_PACKAGES += shell/ksh93
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += system/library/security/gss
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/gss
--- a/components/libpcap/libpcap.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libpcap/libpcap.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
 # The libpcap man pages should go in section 3pcap instead of
@@ -141,14 +141,14 @@
 file path=usr/share/man/man3pcap/pcap_strerror.3pcap
 file path=usr/share/man/man3pcap/pcap_tstamp_type_name_to_val.3pcap
 file path=usr/share/man/man3pcap/pcap_tstamp_type_val_to_name.3pcap
-$(SOLARIS_11_ONLY)file path=usr/share/man/man4/pcap-savefile.4
-$(SOLARIS_11_ONLY)file path=usr/share/man/man5/pcap-filter.5
-$(SOLARIS_11_ONLY)file path=usr/share/man/man5/pcap-linktype.5
-$(SOLARIS_12_ONLY)file path=usr/share/man/man5/pcap-savefile.5
-$(SOLARIS_11_ONLY)file path=usr/share/man/man5/pcap-tstamp.5
-$(SOLARIS_12_ONLY)file path=usr/share/man/man7/pcap-filter.7
-$(SOLARIS_12_ONLY)file path=usr/share/man/man7/pcap-linktype.7
-$(SOLARIS_12_ONLY)file path=usr/share/man/man7/pcap-tstamp.7
+$(SOLARIS_11_3_ONLY)file path=usr/share/man/man4/pcap-savefile.4
+$(SOLARIS_11_3_ONLY)file path=usr/share/man/man5/pcap-filter.5
+$(SOLARIS_11_3_ONLY)file path=usr/share/man/man5/pcap-linktype.5
+$(SOLARIS_11_4_ONLY)file path=usr/share/man/man5/pcap-savefile.5
+$(SOLARIS_11_3_ONLY)file path=usr/share/man/man5/pcap-tstamp.5
+$(SOLARIS_11_4_ONLY)file path=usr/share/man/man7/pcap-filter.7
+$(SOLARIS_11_4_ONLY)file path=usr/share/man/man7/pcap-linktype.7
+$(SOLARIS_11_4_ONLY)file path=usr/share/man/man7/pcap-tstamp.7
 #
 license license.pcap license=BSD
 depend type=require fmri=system/network/bpf
--- a/components/libpcap/patches/fix-man-page.patch	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libpcap/patches/fix-man-page.patch	Tue Apr 04 16:12:22 2017 -0700
@@ -6,13 +6,11 @@
     
     There are two problems:
     a) usermod and ethers man pages lie in nonstandard path
-    b) Solaris 12 has the man pages sections reordered completely
+    b) Newer Solaris versions have the man pages sections reordered completely
 
-diff --git a/configure.in b/configure.in
-index da2f940..b4943d5 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1191,6 +1191,8 @@ fi
+--- a/configure.in	2015-04-22 13:19:15.000000000 +0000
++++ b/configure.in	2017-03-22 10:07:21.877704267 +0000
+@@ -1077,6 +1077,8 @@
  DYEXT="none"
  MAN_FILE_FORMATS=5
  MAN_MISC_INFO=7
@@ -21,18 +19,16 @@
  case "$host_os" in
  
  aix*)
-@@ -1423,12 +1425,25 @@ sinix*)
+@@ -1309,12 +1311,23 @@
  solaris*)
  	AC_DEFINE(HAVE_SOLARIS,1,[On solaris])
  
-+	case "`uname -r`" in
-+	    5.12)
++	if test -f /usr/share/man/man7/attributes.7 ; then
 +		MAN_USERMOD_SECTION=8
 +		MAN_ETHERS_SECTION=5
 +		MAN_FILE_FORMATS=5
 +		MAN_MISC_INFO=7
-+		;;
-+	    *)
++	else
 +		#
 +		# Use System V conventions for man pages.
 +		#
@@ -41,7 +37,7 @@
 +		MAN_ETHERS_SECTION=4
 +		MAN_FILE_FORMATS=4
 +		MAN_MISC_INFO=5
-+	esac
++	fi
 +
  	DYEXT="so"
 -	#
@@ -52,7 +48,7 @@
  	;;
  esac
  
-@@ -1472,6 +1487,8 @@ AC_SUBST(SSRC)
+@@ -1364,6 +1377,8 @@
  AC_SUBST(DYEXT)
  AC_SUBST(MAN_FILE_FORMATS)
  AC_SUBST(MAN_MISC_INFO)
@@ -61,8 +57,6 @@
  
  AC_ARG_ENABLE([usb],
  [AC_HELP_STRING([--enable-usb],[enable nusb support @<:@default=yes, if support available@:>@])],
-diff --git a/pcap-filter.manmisc.in b/pcap-filter.manmisc.in
-index 9d3f34b..f10560e 100644
 --- a/pcap-filter.manmisc.in
 +++ b/pcap-filter.manmisc.in
 @@ -182,7 +182,7 @@ be checked for a match.
@@ -74,8 +68,6 @@
  for numeric format).
  .IP "\fBether src \fIehost\fP"
  True if the Ethernet source address is \fIehost\fP.
-diff --git a/pcap.3pcap.in b/pcap.3pcap.in
-index 93478f1..dd57798 100644
 --- a/pcap.3pcap.in
 +++ b/pcap.3pcap.in
 @@ -244,7 +244,7 @@ that device.  A user can be given that privilege by, for example, adding
--- a/components/libpki/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libpki/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -78,7 +78,7 @@
 	'-e "/\# ERROR:/p" '
 
 REQUIRED_PACKAGES += library/libxml2
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
 REQUIRED_PACKAGES += shell/ksh93
--- a/components/libpki/patches/01-configure.patch	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libpki/patches/01-configure.patch	Tue Apr 04 16:12:22 2017 -0700
@@ -146,12 +146,12 @@
 -		library_ldflags=[-L$_prefix/lib]
 -		library_ldadd=[-lldap_r]
 +	dnl A directory path where ldap.h exists.
-+	dnl The deafult is $_prefix/include, but it can be different depending on
-+	dnl operating systems and versions.
++	dnl The default is $_prefix/include, but it can be different depending
++	dnl on operating systems and versions.
 +	ldap_include_dir=$_prefix/include
 +
 +	if [[ "$myarch" = "solaris" ]] ; then
-+		if [[ "$DIST_VERSION" = "5.12" ]] ; then
++		if [[ $EGREP -s "OpenLDAP" "$_prefix/include/ldap.h" ]] ; then
 +			dnl On Solaris 12, we force to build with OpenLDAP.
 +			AC_DEFINE(LDAP_VENDOR_OPENLDAP)
 +			AC_MSG_RESULT([yes])
--- a/components/libusb/wrapper/libusb.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/libusb/wrapper/libusb.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -45,8 +45,8 @@
 file $(MACH32)/libusb.pc path=usr/lib/pkgconfig/libusb.pc
 file $(MACH32)/libusb.txt path=usr/share/doc/libusb/libusb.txt
 # This page is pre-Solarified, so no mangling needed.
-$(SOLARIS_12_ONLY)file libusb.3lib path=usr/share/man/man3lib/libusb.3lib \
-    $(SOLARIS_12_ONLY)mangler.bypass=true
+$(SOLARIS_11_4_ONLY)file libusb.3lib path=usr/share/man/man3lib/libusb.3lib \
+    $(SOLARIS_11_4_ONLY)mangler.bypass=true
 legacy pkg=SUNWlibusb desc="Sun wrapper library for libusb" \
     name="Sun wrapper library for libusb"
 license libusb.license license=BSD
--- a/components/lighttpd/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/lighttpd/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -59,10 +59,10 @@
 CONFIGURE_OPTIONS +=	--with-openssl
 CONFIGURE_OPTIONS +=	--with-pcre
 CONFIGURE_OPTIONS +=	--with-ldap
-ifeq ($(OS_VERSION), 5.12)
+ifeq ($(OS_VERSION), 11.3)
+CONFIGURE_OPTIONS +=	--with-mysql=$(USRDIR)/mysql/5.5/bin/mysql_config
+else
 CONFIGURE_OPTIONS +=	--with-mysql=$(USRDIR)/mysql/5.7/bin/mysql_config
-else
-CONFIGURE_OPTIONS +=	--with-mysql=$(USRDIR)/mysql/5.5/bin/mysql_config
 endif
 CONFIGURE_OPTIONS +=    PCRECONFIG="$(USRBINDIR64)/pcre-config"
 
@@ -72,14 +72,11 @@
 	'-e "/.*/d" '
 
 REQUIRED_PACKAGES += compress/bzip2
-ifeq ($(OS_VERSION), 5.12)
-REQUIRED_PACKAGES += database/mysql-57
-REQUIRED_PACKAGES += database/mysql-57/library
-else
-REQUIRED_PACKAGES += database/mysql-55
-REQUIRED_PACKAGES += database/mysql-55/library
-endif
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += database/mysql-55
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += database/mysql-55/library
+$(SOLARIS_11_4_ONLY)REQUIRED_PACKAGES += database/mysql-57
+$(SOLARIS_11_4_ONLY)REQUIRED_PACKAGES += database/mysql-57/library
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/pcre
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
--- a/components/llvm/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/llvm/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -130,9 +130,6 @@
 LLVM_BINDIR=$(BUILD_DIR_$(BITS))/bin
 
 INSTALL_CXA_FINALIZE := 0
-ifeq ($(SOLARIS_11_ONLY),)
-  INSTALL_CXA_FINALIZE = 1
-endif
 
 SCAN_VIEW_FILES=Reporter.py ScanView.py
 CLANG_FORMAT_FILES=clang-format-diff.py clang-format-sublime.py \
--- a/components/llvm/clang.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/llvm/clang.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -131,10 +131,10 @@
 file path=usr/lib/clang/$(COMPONENT_VERSION)/include/xsaveoptintrin.h
 file path=usr/lib/clang/$(COMPONENT_VERSION)/include/xsavesintrin.h
 file path=usr/lib/clang/$(COMPONENT_VERSION)/include/xtestintrin.h
-$(SOLARIS_11_ONLY)file path=usr/lib/clang/$(MACH64)/cxa_finalize.o
-$(SOLARIS_11_ONLY)file path=usr/lib/clang/$(MACH64)/cxa_finalize_pic.o
-$(SOLARIS_11_ONLY)file path=usr/lib/clang/cxa_finalize.o
-$(SOLARIS_11_ONLY)file path=usr/lib/clang/cxa_finalize_pic.o
+$(SOLARIS_11_3_ONLY)file path=usr/lib/clang/$(MACH64)/cxa_finalize.o
+$(SOLARIS_11_3_ONLY)file path=usr/lib/clang/$(MACH64)/cxa_finalize_pic.o
+$(SOLARIS_11_3_ONLY)file path=usr/lib/clang/cxa_finalize.o
+$(SOLARIS_11_3_ONLY)file path=usr/lib/clang/cxa_finalize_pic.o
 file path=usr/lib/python2.7/vendor-packages/Reporter.py
 file path=usr/lib/python2.7/vendor-packages/ScanView.py
 file path=usr/lib/python2.7/vendor-packages/clang-format-diff.py
--- a/components/meta-packages/history/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/meta-packages/history/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../../make-rules/shared-macros.mk
@@ -63,7 +63,7 @@
 
 PKG_MACROS =		CONSOLIDATION=$(CONSOLIDATION)
 PKG_MACROS +=		BUILD_VERSION=$(BUILD_VERSION)
-PKG_MACROS +=		OS_VERSION=$(OS_VERSION)
+PKG_MACROS +=		OS_RELEASE=$(OS_RELEASE)
 
 PKG_OPTIONS +=		$(PKG_MACROS:%=-D %)
 
--- a/components/meta-packages/history/sfw-incorporation.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/meta-packages/history/sfw-incorporation.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,11 +18,11 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
-    value=pkg:/consolidation/sfw/sfw-incorporation@0.$(OS_VERSION),$(BUILD_VERSION)
+    value=pkg:/consolidation/sfw/sfw-incorporation@0.$(OS_RELEASE),$(BUILD_VERSION)
 set name=pkg.summary value="sfw consolidation incorporation"
 set name=pkg.description \
     value="This incorporation constrains packages from the sfw consolidation."
--- a/components/mutt/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/mutt/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -67,5 +67,5 @@
 REQUIRED_PACKAGES += $(PERL_PKG)
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/library/math
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += system/library/security/libsasl
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/libsasl
 REQUIRED_PACKAGES += system/library/security/libsasl2
--- a/components/nmap/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/nmap/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -47,9 +47,7 @@
 
 PKG_MACROS +=		PYVER=$(PYTHON_VERSION)
 
-ifeq ($(OS_VERSION),5.11)
-CONFIGURE_OPTIONS  +=   LIBS="-lsocket -lnsl"
-endif
+CONFIGURE_OPTIONS  +=   LIBS="$(LIBSOCKET) $(LIBNSL)"
 
 # Fix 64-bit linking via compiler.
 LDFLAGS += $(CC_BITS)
--- a/components/open-fabrics/ofed-component.mk	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/open-fabrics/ofed-component.mk	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 #
@@ -36,11 +36,9 @@
 
 ASLR_MODE= $(ASLR_ENABLE)
 
-# Almost every component requires these before Solaris 12.  Those that do not
+# Almost every component requires these in Solaris 11.3.  Those that do not
 # can simply override.
-ifeq ($(OS_VERSION),5.11)
-LIBS +=	-lsocket -lnsl
-endif
+LIBS +=	$(LIBSOCKET) $(LIBNSL)
 
 # common targets
 test:		$(NO_TESTS)
--- a/components/openldap/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/openldap/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -133,7 +133,7 @@
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/core-os
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += system/library/security/libsasl
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/libsasl
 REQUIRED_PACKAGES += system/library/security/libsasl2
 REQUIRED_PACKAGES += system/network
 REQUIRED_PACKAGES += text/groff/groff-core
--- a/components/openscap/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/openscap/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -96,9 +96,7 @@
 CONFIGURE_OPTIONS +=	am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
 CONFIGURE_OPTIONS +=	am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
 EXTRA_LIBS =		-lldap_r
-ifeq ($(OS_VERSION),5.11)
-EXTRA_LIBS +=		-lnsl -lsocket
-endif
+EXTRA_LIBS +=		$(LIBNSL) $(LIBSOCKET)
 EXTRA_LIBS +=		-lscf -ldlpi -lsec -lv12n
 CONFIGURE_OPTIONS +=	LDFLAGS="$(LDFLAGS) $(EXTRA_LIBS)"
 
--- a/components/opensp/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/opensp/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -46,9 +46,7 @@
 CONFIGURE_OPTIONS +=	--disable-http
 CONFIGURE_OPTIONS +=	--disable-nls
 CONFIGURE_OPTIONS +=	--enable-default-catalog="CATALOG:/etc/sgml/catalog:/usr/share/sgml/CATALOG"
-ifeq ($(OS_VERSION),5.11)
-EXTRA_LIBRARIES =     -lsocket -lnsl
-endif
+EXTRA_LIBRARIES =	$(LIBSOCKET) $(LIBNSL)
 CONFIGURE_OPTIONS +=	LDFLAGS="$(LDFLAGS) $(EXTRA_LIBRARIES)"
 
 # 21786575 for gmake test failures
--- a/components/pam_pkcs11/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/pam_pkcs11/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -46,9 +46,7 @@
 COMPONENT_PREP_ACTION += (cd $(@D); autoreconf -fiv)
 
 OPENSSL_LIBS= -lssl -lcrypto
-ifeq ($(OS_VERSION),5.11)
-OPENSSL_LIBS +=	-lsocket -lnsl
-endif
+OPENSSL_LIBS +=	$(LIBSOCKET) $(LIBNSL)
 
 CONFIGURE_BINDIR.32= $(USRLIB.32)/pam_pkcs11
 CONFIGURE_BINDIR.64= $(USRLIB.64)/pam_pkcs11
@@ -64,7 +62,7 @@
 CONFIGURE_OPTIONS += --with-pcsclite=yes
 CONFIGURE_OPTIONS += PCSC_CFLAGS="-I /usr/include/PCSC"
 
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += library/security/pcsc/pcsclite
 REQUIRED_PACKAGES += shell/bash
--- a/components/pam_pkcs11/pam_pkcs11.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/pam_pkcs11/pam_pkcs11.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,17 +18,17 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 # Bypass the mangler for these files because they are pre-Solarified.
 <transform file path=usr/share/man/.+$ -> add mangler.bypass true >
-$(SOLARIS_12_ONLY)file files/ja/pkcs11_inspect.1 $(SOLARIS_12_ONLY)path=usr/share/man/ja_JP.UTF-8/man1/pkcs11_inspect.1
-$(SOLARIS_12_ONLY)file files/ja/pklogin_finder.1 $(SOLARIS_12_ONLY)path=usr/share/man/ja_JP.UTF-8/man1/pklogin_finder.1
-$(SOLARIS_12_ONLY)file files/pkcs11_inspect.1 $(SOLARIS_12_ONLY)path=usr/share/man/man1/pkcs11_inspect.1
-$(SOLARIS_12_ONLY)file files/pklogin_finder.1 $(SOLARIS_12_ONLY)path=usr/share/man/man1/pklogin_finder.1
-$(SOLARIS_12_ONLY)file files/zh/pkcs11_inspect.1 $(SOLARIS_12_ONLY)path=usr/share/man/zh_CN.UTF-8/man1/pkcs11_inspect.1
-$(SOLARIS_12_ONLY)file files/zh/pklogin_finder.1 $(SOLARIS_12_ONLY)path=usr/share/man/zh_CN.UTF-8/man1/pklogin_finder.1
+$(SOLARIS_11_4_ONLY)file files/ja/pkcs11_inspect.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/ja_JP.UTF-8/man1/pkcs11_inspect.1
+$(SOLARIS_11_4_ONLY)file files/ja/pklogin_finder.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/ja_JP.UTF-8/man1/pklogin_finder.1
+$(SOLARIS_11_4_ONLY)file files/pkcs11_inspect.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/man1/pkcs11_inspect.1
+$(SOLARIS_11_4_ONLY)file files/pklogin_finder.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/man1/pklogin_finder.1
+$(SOLARIS_11_4_ONLY)file files/zh/pkcs11_inspect.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/zh_CN.UTF-8/man1/pkcs11_inspect.1
+$(SOLARIS_11_4_ONLY)file files/zh/pklogin_finder.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/zh_CN.UTF-8/man1/pklogin_finder.1
 set name=pkg.fmri \
     value=pkg:/library/security/pam/module/pam-pkcs11@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="The OpenSC PKCS#11 PAM Login Tools"
--- a/components/php/php56/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/php/php56/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -130,7 +130,7 @@
 
 REQUIRED_PACKAGES += developer/icu
 REQUIRED_PACKAGES += library/libxml2
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += system/dtrace
 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
--- a/components/pinentry/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/pinentry/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -74,10 +74,8 @@
 CFLAGS += $(CC_PIC)
 
 # prevent libtool from removing these
-ifeq ($(OS_VERSION),5.11)
-LDFLAGS += -lsocket -lnsl
-LIBS += -lsocket -lnsl
-endif
+LDFLAGS += $(LIBSOCKET) $(LIBNSL)
+LIBS += $(LIBSOCKET) $(LIBNSL)
 
 LDFLAGS += -lpkcs11
 LIBS += -lpkcs11
--- a/components/pkg-config/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/pkg-config/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -54,7 +54,7 @@
 	'-e "/Leaving directory/d"' \
 	'-e "/^make/d"'
 
-ifeq ($(OS_VERSION),5.11)
+ifeq ($(OS_VERSION),11.3)
 OLD_DESKTOP_BUILD=	0.175.2.0.0.21.0
 else
 OLD_DESKTOP_BUILD=	5.12.0.0.0.25.0
--- a/components/postfix/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/postfix/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -78,7 +78,7 @@
 REQUIRED_PACKAGES += database/berkeleydb-5
 REQUIRED_PACKAGES += database/sqlite-3
 REQUIRED_PACKAGES += library/icu
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/pcre
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += shell/ksh93
--- a/components/proftpd/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/proftpd/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -72,7 +72,7 @@
 IPS_COMPONENT_VERSION=  $(COMPONENT_VERSION).2
 
 CFLAGS += -I$(USRINCDIR)/kerberosv5 -DHAVE_KRB5_H=1 -DKRB5_DLLIMP= -DHAVE__GETGRPSBYMEMBER -D_SOLARIS_DTRACE
-ifeq ($(OS_VERSION), 5.11)
+ifeq ($(OS_VERSION), 11.3)
 CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
 endif
 LDFLAGS +=	-m$(BITS)
--- a/components/python/pep8/pep8-PYVER.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/python/pep8/pep8-PYVER.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,11 +18,11 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
-$(SOLARIS_11_ONLY)<transform file path=usr/lib/python$(PYVER)/vendor-packages/pep8.py -> add pkg.depend.bypass-generate .*/time.* >
+$(SOLARIS_11_3_ONLY)<transform file path=usr/lib/python$(PYVER)/vendor-packages/pep8.py -> add pkg.depend.bypass-generate .*/time.* >
 #
 set name=pkg.fmri \
     value=pkg:/library/python/pep8-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
--- a/components/python/python-ldap/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/python/python-ldap/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -77,7 +77,7 @@
 
 system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
 
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/python/pyasn1-27
 REQUIRED_PACKAGES += library/python/pyasn1-modules-27
 REQUIRED_PACKAGES += system/library
--- a/components/python/simplejson/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/python/simplejson/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -44,7 +44,7 @@
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
-ifeq ($(OS_VERSION),5.11)
+ifeq ($(OS_VERSION),11.3)
 OLD_DESKTOP_BUILD=	0.5.11,5.11-0.175.2.0.0.20.0
 else
 OLD_DESKTOP_BUILD=	5.12-5.12.0.0.0.14.0
--- a/components/rpm2cpio/rpm2cpio.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/rpm2cpio/rpm2cpio.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,14 +18,14 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 # Bypass the mangler for these files because they are pre-Solarified.
 <transform file path=usr.*/man/.+ -> add mangler.bypass true >
-$(SOLARIS_12_ONLY)file man/ja/rpm2cpio.1 $(SOLARIS_12_ONLY)path=usr/share/man/ja_JP.UTF-8/man1/rpm2cpio.1
-$(SOLARIS_12_ONLY)file man/rpm2cpio.1 $(SOLARIS_12_ONLY)path=usr/share/man/man1/rpm2cpio.1
-$(SOLARIS_12_ONLY)file man/zh/rpm2cpio.1 $(SOLARIS_12_ONLY)path=usr/share/man/zh_CN.UTF-8/man1/rpm2cpio.1
+$(SOLARIS_11_4_ONLY)file man/ja/rpm2cpio.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/ja_JP.UTF-8/man1/rpm2cpio.1
+$(SOLARIS_11_4_ONLY)file man/rpm2cpio.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/man1/rpm2cpio.1
+$(SOLARIS_11_4_ONLY)file man/zh/rpm2cpio.1 $(SOLARIS_11_4_ONLY)path=usr/share/man/zh_CN.UTF-8/man1/rpm2cpio.1
 set name=pkg.fmri \
     value=pkg:/package/rpm@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Utilities for processing RPM archives"
--- a/components/rtorrent/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/rtorrent/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -55,9 +55,7 @@
 CXXFLAGS += -std=c++11
 
 LDFLAGS += -L$(GNULIB64) -R$(GNULIB64)
-ifeq ($(OS_VERSION),5.11)
-LDFLAGS += -lnsl -lsocket
-endif
+LDFLAGS += $(LIBNSL) $(LIBSOCKET)
 
 CXXFLAGS +=		-I$(USRINCDIR)/ncurses
 CONFIGURE_OPTIONS.64 +=	--srcdir=$(BUILD_DIR_64)
--- a/components/ruby/augeas/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/ruby/augeas/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -51,6 +51,15 @@
 include $(WS_MAKE_RULES)/gem.mk
 include $(WS_MAKE_RULES)/ruby.mk
 
+# Before the 12 -> 11.4 rename, RUBY_DIR_VERS would always be the same as
+# SOLARIS_VERSION (minus the leading "2.").  After the rename, there is a
+# potential mismatch, because the triple $(MACH64)-solaris-$(SOLARIS_VERSION)
+# is embedded in ruby, so we need to handle both the before and after cases.
+# Once the transition is complete and build machines are running 11.4, these
+# lines can be removed and the corresponding .p5m file changes can be reverted.
+RUBY_DIR_VERS=$(shell $(RUBY) --version | $(GSED) -e 's/^.*solaris2.//' -e 's/]//')
+PKG_PROTO_DIRS += $(PROTO_DIR)/usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/gems/$(RUBY_LIB_VERSION)/extensions/$(MACH64)-solaris-2.$(RUBY_DIR_VERS)/$(RUBY_LIB_VERSION)/ruby-augeas-$(COMPONENT_VERSION)
+
 COMPONENT_TEST_CMD=	/usr/bin/rake
 COMPONENT_TEST_DIR=	$(SOURCE_DIR)
 COMPONENT_TEST_ARGS+=	test
--- a/components/ruby/augeas/ruby-augeas.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/ruby/augeas/ruby-augeas.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 set name=pkg.fmri \
@@ -94,8 +94,10 @@
 file path=$(VENDOR_RUBY)/doc/ruby-augeas-$(COMPONENT_VERSION)/ri/Augeas/touch-i.ri
 file path=$(VENDOR_RUBY)/doc/ruby-augeas-$(COMPONENT_VERSION)/ri/Augeas/transform-i.ri
 file path=$(VENDOR_RUBY)/doc/ruby-augeas-$(COMPONENT_VERSION)/ri/cache.ri
-file path=$(VENDOR_RUBY)/extensions/$(MACH64)-solaris-$(SOLARIS_VERSION)/$(RUBY_LIB_VERSION)/ruby-augeas-$(COMPONENT_VERSION)/_augeas.so
-file path=$(VENDOR_RUBY)/extensions/$(MACH64)-solaris-$(SOLARIS_VERSION)/$(RUBY_LIB_VERSION)/ruby-augeas-$(COMPONENT_VERSION)/gem.build_complete
+file _augeas.so \
+    path=$(VENDOR_RUBY)/extensions/$(MACH64)-solaris-$(SOLARIS_VERSION)/$(RUBY_LIB_VERSION)/ruby-augeas-$(COMPONENT_VERSION)/_augeas.so
+file gem.build_complete \
+    path=$(VENDOR_RUBY)/extensions/$(MACH64)-solaris-$(SOLARIS_VERSION)/$(RUBY_LIB_VERSION)/ruby-augeas-$(COMPONENT_VERSION)/gem.build_complete
 file path=$(VENDOR_RUBY)/gems/ruby-augeas-$(COMPONENT_VERSION)/COPYING
 file path=$(VENDOR_RUBY)/gems/ruby-augeas-$(COMPONENT_VERSION)/NEWS
 file path=$(VENDOR_RUBY)/gems/ruby-augeas-$(COMPONENT_VERSION)/README.rdoc
--- a/components/sendmail/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/sendmail/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -57,7 +57,7 @@
 # which is why the macros just below only have values for 64.  libmilter
 # is dealt with further below.
 PKG_PROTO_DIRS += $(BUILD_DIR_64)
-PKG_PROTO_DIRS += $(BUILD_DIR_64)/obj.SunOS.$(OS_VERSION).$(ARCH)
+PKG_PROTO_DIRS += $(BUILD_DIR_64)/obj.SunOS.$(OS_RELEASE).$(ARCH)
 PKG_PROTO_DIRS += $(COMPONENT_DIR)/files/man
 
 # Userland default includes -mt which links with libthread which we don't need.
@@ -71,7 +71,7 @@
 endif
 FILE_DIR=$(COMPONENT_DIR)/files
 M4_ARG=-D_NO_MAKEINFO_
-SM_BUILD_SUB_DIR=obj.SunOS.$(OS_VERSION).$(ARCH)
+SM_BUILD_SUB_DIR=obj.SunOS.$(OS_RELEASE).$(ARCH)
 SM_BUILD_DIR=$(@D)/$(SM_BUILD_SUB_DIR)
 
 # libmilter is built 32- and 64-bit, but its Makefile installs into a common
@@ -87,10 +87,18 @@
 COMPONENT_PREP_ACTION =	$(GSED) -i -e 's/\(Version\[\] = "8\.[^"]*\)/\1+Sun/' \
     $(COMPONENT_SRC)/sendmail/version.c
 
+# For 5.11, we need to distinguish between different versions, so use OS_VERSION.
+# For other releases, SOLARIS_VERSION, which comes from OS_RELEASE, is sufficient.
+ifeq ($(OS_RELEASE),5.11)
+SOLARIS= 	$(shell echo $(OS_VERSION) | \
+    $(GSED) -e 's/^/2/' -e 's/\.//' -e 's/$$/0/')
+else
+SOLARIS=	$(shell echo $(SOLARIS_VERSION) | \
+    $(GSED) -e 's/\.//' -e 's/$$/00/')
+endif
+SM_DEFS=	-DSOLARIS=$(SOLARIS)
 # libmilter and sendmail must come before include, so appending to the default
 # value of LINT_FLAGS will not work; we must redefine it here.
-SM_DEFS=	-DSOLARIS=$(shell echo $(SOLARIS_VERSION) | \
-    $(GSED) -e 's/\.//' -e 's/$$/00/')
 SM_INCLUDES=	-I$(SM_BUILD_DIR)/libmilter -I$(SOURCE_DIR)/sendmail \
     -I$(SOURCE_DIR)/include -I$(SOURCE_DIR) -I.
 LINT_FLAGS =	-nsvx $(SM_DEFS) $(SM_INCLUDES)
@@ -131,6 +139,7 @@
 APPENDDEF(`conf_sendmail_LIBS', `-lcrypto')
 APPENDDEF(`confMAPDEF', `-DLDAPMAP')
 APPENDDEF(`confLIBS', `-lldap_r-2.4 -llber-2.4 -lc')
+define(`confENVDEF', `-DSOLARIS=$(SOLARIS) -DNETINET6')
 define(`confDEPEND_TYPE', `Solaris')
 define(`confINCDIRS', `-I/usr/include/openldap')
 define(`confMKDIR', `/usr/bin/mkdir')
@@ -185,11 +194,15 @@
 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
 
 COMPONENT_TEST_TRANSFORMS += \
-    '-e "s|$(SM_BUILD_SUB_DIR)|\\$$(SM_BUILD_SUB_DIR)|g" ' \
-    '-e "s|$(OS_VERSION)|\\$$(OS_VERSION)|g" ' \
-    '-e "s|$(ARCH)|\\$$(ARCH)|g" ' \
+    '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
+    '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
+    '-e "s|^make.*: Nothing to be.*$$|XXX_CC_XXX|g" ' \
     '-e "s|^$(CC).*$$|XXX_CC_XXX|g" ' \
-    '-e "/^XXX_CC_XXX\\$$/d" '
+    '-e "/^XXX_CC_XXX\\$$/d" ' \
+    '-e "/^Configuration:.*$$/d" ' \
+    '-e "/^Creating.*$$/d" ' \
+    '-e "/^Including.*$$/d" ' \
+    '-e "/^Making.*in.*$$/d" '
 
 INSTALL_64=
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/sendmail/patches/conf.h.patch	Tue Apr 04 16:12:22 2017 -0700
@@ -0,0 +1,18 @@
+This patch comes from in-house; it will be submitted upstream once the
+S12 -> 11.4 name change has been announced.
+
+--- sendmail-8.15.2/include/sm/conf.h.orig	2015-06-17 09:51:58.000000000 +0000
++++ sendmail-8.15.2/include/sm/conf.h	2017-03-28 08:06:57.565907621 +0000
+@@ -473,9 +473,9 @@
+ #   ifndef HASGETUSERSHELL
+ #    define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps pre-2.7 */
+ #   endif /* ! HASGETUSERSHELL */
+-#   if SOLARIS < 21200
+-#    define SIGWAIT_TAKES_1_ARG	1	/* S12 moves to UNIX V7 semantic */
+-#   endif /* SOLARIS < 21200 */
++#   if SOLARIS < 21140
++#    define SIGWAIT_TAKES_1_ARG	1	/* S11.4 moves to UNIX V7 semantic */
++#   endif /* SOLARIS < 21140 */
+ 
+ #  else /* SOLARIS */
+ 			/* SunOS 4.0.3 or 4.1.x */
--- a/components/sendmail/test/results-all.master	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/sendmail/test/results-all.master	Tue Apr 04 16:12:22 2017 -0700
@@ -1,15 +1,7 @@
-make[1]: Entering directory `$(@D)'
-Making check in:
 $(@D)/libsm
-Configuration: pfx=, os=SunOS, rel=$(OS_VERSION), rbase=5, rroot=$(OS_VERSION), arch=$(ARCH), sfx=, variant=optimized
-Making in $(@D)/$(SM_BUILD_SUB_DIR)/libsm
-make[2]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/libsm'
 make t-event  t-exc  t-rpool  t-string  t-smstdio  t-fget  t-match  t-strio  t-heap  t-fopen  t-strl  t-strrevcmp  t-types  t-path  t-float  t-scanf  t-shm  t-sem  t-inet6_ntop  t-qic 
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/libsm'
 "t-types.c", line 64: warning: integer overflow detected: op "-"
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/libsm'
 make check-TESTS
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/libsm'
 8 of 8 tests completed successfully
 This test may hang. If there is no output within twelve seconds, abort it
 and recompile with -DSM_CONF_SETITIMER=0
@@ -68,42 +60,14 @@
 ===================
 All 20 tests passed
 ===================
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/libsm'
-make[2]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/libsm'
-Making check in:
 $(@D)/libmilter
-Configuration: pfx=, os=SunOS, rel=$(OS_VERSION), rbase=5, rroot=$(OS_VERSION), arch=$(ARCH), sfx=, variant=optimized
-Making in $(@D)/$(SM_BUILD_SUB_DIR)/libmilter
-make[2]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/libmilter'
 make 
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/libmilter'
-make[3]: Nothing to be done for `all'.
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/libmilter'
 make check-TESTS
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/libmilter'
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/libmilter'
-make[2]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/libmilter'
-Making check in:
 $(@D)/sendmail
-Configuration: pfx=, os=SunOS, rel=$(OS_VERSION), rbase=5, rroot=$(OS_VERSION), arch=$(ARCH), sfx=, variant=optimized
-Making in $(@D)/$(SM_BUILD_SUB_DIR)/sendmail
-make[2]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/sendmail'
 make 
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/sendmail'
-make[3]: Nothing to be done for `all'.
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/sendmail'
 make check-TESTS
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/sendmail'
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/sendmail'
-make[2]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/sendmail'
-Making check in:
 $(@D)/test
-Configuration: pfx=, os=SunOS, rel=$(OS_VERSION), rbase=5, rroot=$(OS_VERSION), arch=$(ARCH), sfx=, variant=optimized
 Using M4=/usr/bin/gm4
-Creating $(@D)/$(SM_BUILD_SUB_DIR)/test using $(@D)/devtools/OS/SunOS.$(OS_VERSION)
-Including $(@D)/devtools/Site/site.SunOS.$(OS_VERSION).m4
-Making dependencies in $(@D)/$(SM_BUILD_SUB_DIR)/test
-make[2]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
 if [ -r /usr/include/sysexits.h ]; \
 then \
 	ln -s /usr/include/sysexits.h; \
@@ -116,9 +80,6 @@
 t_setgid.c:
 t_setreuid.c:
 t_setuid.c:
-make[2]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
-Making in $(@D)/$(SM_BUILD_SUB_DIR)/test
-make[2]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
 "t_dropgid.c", line 73: warning: implicit function declaration: exit
 "t_exclopen.c", line 61: warning: implicit function declaration: exit
 "t_pathconf.c", line 45: warning: implicit function declaration: exit
@@ -129,11 +90,4 @@
 "t_setreuid.c", line 55: warning: implicit function declaration: exit
 "t_setuid.c", line 53: warning: implicit function declaration: exit
 make 
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
-make[3]: Nothing to be done for `all'.
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
 make check-TESTS
-make[3]: Entering directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
-make[3]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
-make[2]: Leaving directory `$(@D)/$(SM_BUILD_SUB_DIR)/test'
-make[1]: Leaving directory `$(@D)'
--- a/components/serf/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/serf/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -97,7 +97,7 @@
 REQUIRED_PACKAGES += library/apr-15
 REQUIRED_PACKAGES += library/apr-util-15
 REQUIRED_PACKAGES += library/expat
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += library/zlib
 REQUIRED_PACKAGES += system/library
--- a/components/squid/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/squid/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -52,8 +52,8 @@
 
 CFLAGS += -I$(USRINCDIR)/kerberosv5
 CFLAGS += $(CPP_LARGEFILES)
-# <getopt.h> changed between 11 & 12.
-ifeq ($(OS_VERSION), 5.11)
+# <getopt.h> changed after 11.3.
+ifeq ($(OS_VERSION), 11.3)
 CXXFLAGS +=	-Wno-write-strings
 endif
 
@@ -156,19 +156,15 @@
 REQUIRED_PACKAGES += library/security/nettle
 REQUIRED_PACKAGES += $(PERL_PKG)
 REQUIRED_PACKAGES += security/kerberos-5
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += service/security/kerberos-5
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += service/security/kerberos-5
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/core-os
 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
 REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
 REQUIRED_PACKAGES += system/library/math
 REQUIRED_PACKAGES += system/library/security/crypto
-ifeq ($(OS_VERSION),5.11)
-REQUIRED_PACKAGES += system/library/security/gss
-REQUIRED_PACKAGES += system/library/security/libsasl
-endif
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/gss
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/libsasl
 REQUIRED_PACKAGES += system/library/security/libsasl2
 REQUIRED_PACKAGES += system/network
 REQUIRED_PACKAGES += system/network/ldap/openldap
--- a/components/subversion/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/subversion/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -227,6 +227,5 @@
 REQUIRED_PACKAGES += runtime/perl-522
 REQUIRED_PACKAGES += security/kerberos-5
 REQUIRED_PACKAGES += system/library/c++-runtime
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += system/library/security/libsasl
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += system/library/security/libsasl
 REQUIRED_PACKAGES += system/library/security/libsasl2
-
--- a/components/sudo/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/sudo/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -96,7 +96,7 @@
 
 VISUDO=$(BUILD_DIR_64)/plugins/sudoers/visudo
 
-$(SOLARIS_11_ONLY)REQUIRED_PACKAGES += library/openldap
+$(SOLARIS_11_3_ONLY)REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/zlib
 REQUIRED_PACKAGES += system/library/security/crypto
 REQUIRED_PACKAGES += system/network/ldap/openldap
--- a/components/tcpdump/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/tcpdump/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -42,7 +42,7 @@
 SYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_64)
 include $(WS_MAKE_RULES)/common.mk
 
-ifeq ($(OS_VERSION),5.11)
+ifeq ($(OS_VERSION),11.3)
 # Prevent macro redefinition error
 CFLAGS += -D _NETINET_IP_H
 endif
--- a/components/tcsh/tcsh.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/tcsh/tcsh.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
@@ -34,7 +34,7 @@
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=org.opensolaris.arc-caseid value=PSARC/2007/025
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
-$(SOLARIS_12_ONLY)link path=usr/bin/csh target=tcsh mediator=csh \
+$(SOLARIS_11_4_ONLY)link path=usr/bin/csh target=tcsh mediator=csh \
     mediator-implementation=tcsh
 file path=usr/bin/tcsh
 file $(MACH64)/nls/german.cat path=usr/share/locale/de/LC_MESSAGES/tcsh.cat
--- a/components/timezone/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/timezone/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -33,12 +33,12 @@
 TPNO=			24870
 COMPONENT_ANITYA_ID=	5021
 
-# Build info part of pkg(5) FMRI dropped ",$(OS_VERSION)" between 11 and 12;
+# Build info part of pkg(5) FMRI dropped ",$(OS_RELEASE)" between 11 and 12;
 # needed for evaluation repo where we build the default repo from 12 on 11.
-ifeq ($(OS_VERSION),5.11)
-OS_META_VERSION=	,$(OS_VERSION)-$(OS_VERSION)
+ifeq ($(OS_VERSION),11.3)
+OS_META_VERSION=	,$(OS_RELEASE)-$(OS_RELEASE)
 else
-OS_META_VERSION=	-$(OS_VERSION)
+OS_META_VERSION=	-$(PKG_SOLARIS_VERSION)
 endif
 
 # "etcetera" must be listed before "backward" because it sets up links that
--- a/components/timezone/system-data-timezone-message-files.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/timezone/system-data-timezone-message-files.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 
-# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
 
 set name=pkg.fmri \
     value=pkg://$(PUBLISHER_LOCALIZABLE)/system/data/timezone-message-files@$(IPS_COMPONENT_VERSION)$(OS_META_VERSION)
@@ -31,7 +31,7 @@
 set name=pkg.linted.userland.manifest001.0 value=true
 set name=com.oracle.info.description \
     value="the translatable content for Timezone Definition"
-$(SOLARIS_12_ONLY)set name=com.oracle.info.version value=$(HUMAN_VERSION)
+$(SOLARIS_11_4_ONLY)set name=com.oracle.info.version value=$(HUMAN_VERSION)
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 file zoneinfo.po \
     path=usr/lib/locale/__LOCALE__/LC_MESSAGES/SUNW_OST_ZONEINFO.po group=sys
--- a/components/timezone/system-data-timezone.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/timezone/system-data-timezone.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -29,7 +29,7 @@
 set name=pkg.human-version value=$(HUMAN_VERSION)
 set name=com.oracle.info.description value="the timezone definition files"
 set name=com.oracle.info.tpno value=$(TPNO)
-$(SOLARIS_12_ONLY)set name=com.oracle.info.version value=$(HUMAN_VERSION)
+$(SOLARIS_11_4_ONLY)set name=com.oracle.info.version value=$(HUMAN_VERSION)
 set name=info.classification value=org.opensolaris.category.2008:System/Core
 set name=org.opensolaris.arc-caseid value=LSARC/2001/015
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
--- a/components/trousers/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/trousers/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -41,9 +41,8 @@
 
 PATCH_LEVEL=0
 
-ifeq ($(OS_VERSION),5.11)
-# These libraries are in libc for S12:
-LIBS=-lnsl -lsocket
+LIBS=$(LIBNSL) $(LIBSOCKET)
+ifeq ($(OS_VERSION),11.3)
 # Use the "new" POSIX thread API (not the "draft" prototype):
 CFLAGS += "-D_POSIX_PTHREAD_SEMANTICS"
 endif
--- a/components/trousers/trousers.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/trousers/trousers.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -171,5 +171,6 @@
 # by package iconv-core. This is for function Trspi_Native_To_UNICODE() which
 # calls iconv_open()
 #
-$(SOLARIS_12_ONLY)depend type=require fmri=pkg:/system/library/iconv/iconv-core
-$(SOLARIS_11_ONLY)depend type=require fmri=pkg:/system/library/iconv/utf-8
+$(SOLARIS_11_4_ONLY)depend type=require \
+    fmri=pkg:/system/library/iconv/iconv-core
+$(SOLARIS_11_3_ONLY)depend type=require fmri=pkg:/system/library/iconv/utf-8
--- a/components/unixodbc/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/unixodbc/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -62,10 +62,7 @@
 X11LIB.32 = $(CONFIGURE_LIBDIR.32)
 X11LIB.64 = $(CONFIGURE_LIBDIR.64)
 
-ifeq ($(OS_VERSION),5.11)
-LD_OPTIONS += -lsocket -lnsl
-endif
-
+LD_OPTIONS += $(LIBSOCKET) $(LIBNSL)
 LD_OPTIONS += -lresolv -lgen
 
 CONFIGURE_OPTIONS  +=	--includedir=$(CONFIGURE_PREFIX)/include/odbc
--- a/components/which/which.p5m	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/which/which.p5m	Tue Apr 04 16:12:22 2017 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -36,14 +36,14 @@
 set name=org.opensolaris.arc-caseid value=PSARC/2007/049
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 link path=usr/bin/gwhich target=../gnu/bin/which facet.compat.gnulinks=true
-$(SOLARIS_12_ONLY)link path=usr/bin/which target=../gnu/bin/which \
+$(SOLARIS_11_4_ONLY)link path=usr/bin/which target=../gnu/bin/which \
     mediator=which mediator-implementation=gnu mediator-priority=vendor
 file path=usr/gnu/bin/which
 file path=usr/gnu/share/man/man1/which.1
 file path=usr/share/info/which.info
 link path=usr/share/man/man1/gwhich.1 \
     target=../../../gnu/share/man/man1/which.1 facet.compat.gnulinks=all
-$(SOLARIS_12_ONLY)link path=usr/share/man/man1/which.1 \
+$(SOLARIS_11_4_ONLY)link path=usr/share/man/man1/which.1 \
     target=../../../gnu/share/man/man1/which.1 mediator=which \
     mediator-implementation=gnu mediator-priority=vendor
 license COPYING license=GPLv3
--- a/components/zsh/Makefile	Tue Apr 04 10:36:17 2017 -0700
+++ b/components/zsh/Makefile	Tue Apr 04 16:12:22 2017 -0700
@@ -49,9 +49,7 @@
 CONFIGURE_OPTIONS += --enable-function-subdirs
 # Zsh uses the compiler to link, so we need to pass CC_BITS, not LD_BITS.
 CONFIGURE_OPTIONS += --enable-ldflags="$(CC_BITS) -zignore"
-ifeq ($(OS_VERSION),5.11)
-CONFIGURE_OPTIONS += --enable-libs="-lnsl"
-endif
+CONFIGURE_OPTIONS += --enable-libs="$(LIBNSL)"
 CONFIGURE_OPTIONS += --enable-additional-fpath=/usr/share/zsh/vendor-functions/Completion
 CONFIGURE_OPTIONS += --enable-maildir-support
 CONFIGURE_OPTIONS += --enable-multibyte
--- a/doc/packaging.txt	Tue Apr 04 10:36:17 2017 -0700
+++ b/doc/packaging.txt	Tue Apr 04 16:12:22 2017 -0700
@@ -105,7 +105,7 @@
         $(CONSOLIDATION)
         $(BUILD_VERSION)
         $(SOLARIS_VERSION)
-        $(OS_VERSION)
+        $(OS_RELEASE)
         $(IPS_COMPONENT_VERSION)
         $(COMPONENT_VERSION)
         $(COMPONENT_PROJECT_URL)
--- a/make-rules/ips.mk	Tue Apr 04 10:36:17 2017 -0700
+++ b/make-rules/ips.mk	Tue Apr 04 16:12:22 2017 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
 #
 
 #
@@ -99,7 +99,7 @@
 # For items defined as variables or that may contain whitespace, add
 # them to a list to be expanded into PKG_OPTIONS later.
 PKG_VARS += ARC_CASE TPNO
-PKG_VARS += BUILD_VERSION OS_VERSION SOLARIS_VERSION PKG_SOLARIS_VERSION
+PKG_VARS += BUILD_VERSION OS_RELEASE SOLARIS_VERSION PKG_SOLARIS_VERSION
 PKG_VARS += CONSOLIDATION CONSOLIDATION_CHANGESET CONSOLIDATION_REPOSITORY_URL
 PKG_VARS += COMPONENT_VERSION IPS_COMPONENT_VERSION HUMAN_VERSION
 PKG_VARS += COMPONENT_ARCHIVE_URL COMPONENT_PROJECT_URL COMPONENT_NAME
@@ -107,7 +107,7 @@
 PKG_VARS += GIT_COMMIT_ID GIT_REPO GIT_TAG
 PKG_VARS += MACH MACH32 MACH64
 PKG_VARS += PUBLISHER PUBLISHER_LOCALIZABLE
-PKG_VARS += SOLARIS_11_ONLY SOLARIS_12_ONLY
+PKG_VARS += SOLARIS_11_3_ONLY SOLARIS_11_4_ONLY
 
 # Include TPNO_* Makefile variables in PKG_VARS.
 $(foreach macro, $(filter TPNO_%, $(.VARIABLES)), \
@@ -245,7 +245,7 @@
 	$(PKGFMT) $(PKGFMT_CHECK_ARGS) $(CANONICAL_MANIFESTS)
 	$(PKGMOGRIFY) -D PYVER=$(1) -D MAYBE_PYVER_SPACE="$(1) " \
 		-D MAYBE_SPACE_PYVER=" $(1)" \
-		-D SOLARIS_11_ONLY="$(SOLARIS_11_ONLY)" \
+		-D SOLARIS_11_3_ONLY="$(SOLARIS_11_3_ONLY)" \
 		-D PYV=$(shell echo $(1) | tr -d .) $$< > $$@
 endef
 $(foreach ver,$(PYTHON_VERSIONS),$(eval $(call python-manifest-rule,$(ver))))
@@ -271,7 +271,7 @@
 $(MANIFEST_BASE)-%.p5m: %-PYVER.p5m $(BUILD_DIR)/mkgeneric-python
 	$(PKGFMT) $(PKGFMT_CHECK_ARGS) $(CANONICAL_MANIFESTS)
 	$(PKGMOGRIFY) -D PYV=###PYV### -D MAYBE_PYVER_SPACE= \
-		-D SOLARIS_11_ONLY="$(SOLARIS_11_ONLY)" \
+		-D SOLARIS_11_3_ONLY="$(SOLARIS_11_3_ONLY)" \
 		-D MAYBE_SPACE_PYVER= $(BUILD_DIR)/mkgeneric-python \
 		$(WS_TOP)/transforms/mkgeneric $< > $@
 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
--- a/make-rules/shared-macros.mk	Tue Apr 04 10:36:17 2017 -0700
+++ b/make-rules/shared-macros.mk	Tue Apr 04 16:12:22 2017 -0700
@@ -106,20 +106,35 @@
 CONSOLIDATION_REPOSITORY_URL=https://github.com/oracle/solaris-userland.git
 
 # Native OS version
-OS_VERSION :=		$(shell uname -r)
-SOLARIS_VERSION =	$(OS_VERSION:5.%=2.%)
+OS_RELEASE :=		$(shell uname -r)
+SOLARIS_VERSION =	$(OS_RELEASE:5.%=2.%)
+OS_SUB_VERS_1 :=	$(shell uname -v)
+OS_SUB_VERS_2 =		$(OS_SUB_VERS_1:s%=%)
+OS_SUB_VERS_3 =		$(subst _, ,$(OS_SUB_VERS_2))
+OS_VERSION ?=	$(firstword $(OS_SUB_VERS_3))
 # Target OS version
 PKG_SOLARIS_VERSION ?= 5.12
 
 # We generally build the default branch on the latest release.  But for
 # the FOSS evaluation repo project, we build on the previous release.
-# Add macros to make that easier.
-ifeq ($(OS_VERSION),5.12)
-SOLARIS_12_ONLY =
-SOLARIS_11_ONLY =\#
+# Add macros to make that easier.  Note: what started out as Solaris 12
+# later became 11.4, which is why SOLARIS_11_4_ONLY is set when OS_RELEASE
+# is "5.12".
+ifeq ($(OS_RELEASE),5.12)
+SOLARIS_11_4_ONLY =
+SOLARIS_11_3_ONLY =\#
 else
-SOLARIS_12_ONLY =\#
-SOLARIS_11_ONLY =
+ifeq ($(OS_VERSION),11.4)
+SOLARIS_11_4_ONLY =
+SOLARIS_11_3_ONLY =\#
+else
+ifeq ($(OS_VERSION),11.3)
+SOLARIS_11_4_ONLY =\#
+SOLARIS_11_3_ONLY =
+else
+$(error Unknown OS version "$(OS_VERSION)"; set OS_VERSION to "11.3" or "11.4")
+endif
+endif
 endif
 
 include $(WS_MAKE_RULES)/ips-buildinfo.mk
@@ -726,6 +741,10 @@
 PKG_CONFIG_PATH    = $(subst $(space),:,$(strip \
 			$(PKG_CONFIG_PATHS) $(PKG_CONFIG_DEFAULT)))
 
+LIBNSL=$(shell elfdump -d /usr/lib/libnsl.so.1 | $(NAWK) 'BEGIN {ret="-lnsl"} $$2 == "FILTER" && $$4 == "libc.so.1" {ret=""} END {print ret}')
+LIBSOCKET=$(shell elfdump -d /usr/lib/libsocket.so.1 | $(NAWK) 'BEGIN {ret="-lsocket"} $$2 == "FILTER" && $$4 == "libc.so.1" {ret=""} END {print ret}')
+LIBXNET=$(shell elfdump -d /usr/lib/libxnet.so.1 | $(NAWK) 'BEGIN {ret="-lxnet"} $$2 == "FILTER" && $$4 == "libc.so.1" {ret=""} END {print ret}')
+
 #
 # C preprocessor flag sets to ease feature selection.  Add the required
 # feature to your Makefile with CPPFLAGS += $(FEATURE_MACRO) and add to
@@ -1021,11 +1040,11 @@
 LD_Z_PIE_MODE =		$(LD_Z_PIE_DISABLE)
 
 # generic macro names for enabling/disabling security extensions
-# -z<extname> is deprecated, but supported, on S12, in favor of
-# the more flexible -zsx=<extname> format. Security extensions which
+# -z<extname> is deprecated, but supported, on S11.4 and later, in favor
+# of the more flexible -zsx=<extname> format. Security extensions which
 # are not supported on S11 use -zsx=<extname> by default.
 
-ifeq ($(OS_VERSION), 5.11)
+ifeq ($(OS_VERSION), 11.3)
 ASLR_ENABLE = 			-zaslr=enable
 ASLR_DISABLE = 			-zaslr=disable
 ASLR_NOT_APPLICABLE = 		-zaslr=disable
@@ -1092,9 +1111,9 @@
 # to explicitly enable ADISTACK, set ADISTACK_MODE = $(ADISTACK_ENABLE)
 # to explicitly disable ADISTACK, set ADISTACK_MODE = $(ADISTACK_DISABLE)
 #
-# ADIHEAP and ADISTACK are not supported on Solaris 11.
+# ADIHEAP and ADISTACK are not supported on Solaris 11.3.
 #
-ifneq ($(OS_VERSION), 5.11)
+ifneq ($(OS_VERSION), 11.3)
 LD_Z_ADIHEAP =		$(ADIHEAP_MODE)
 LD_Z_ADISTACK =		$(ADISTACK_MODE)
 endif