--- old/usr/src/pkg/manifests/developer-debug-mdb.mf	2014-04-11 13:24:06.746581402 +0100
+++ new/usr/src/pkg/manifests/developer-debug-mdb.mf	2014-04-11 13:24:06.754838072 +0100
@@ -21,6 +21,7 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2014 Andrew Stormont.
 #
 
 set name=pkg.fmri value=pkg:/developer/debug/mdb@$(PKGVERS)
@@ -56,16 +57,16 @@
 dir path=usr group=sys
 dir path=usr/bin
 dir path=usr/bin/$(ARCH32)
-dir path=usr/bin/$(ARCH64)
+$(BUILD64)dir path=usr/bin/$(ARCH64)
 dir path=usr/include
 dir path=usr/include/sys
 dir path=usr/lib
 dir path=usr/lib/mdb group=sys
 dir path=usr/lib/mdb/kvm group=sys
-dir path=usr/lib/mdb/kvm/$(ARCH64) group=sys
+$(BUILD64)dir path=usr/lib/mdb/kvm/$(ARCH64) group=sys
 dir path=usr/lib/mdb/proc group=sys
-$(sparc_ONLY)dir path=usr/lib/mdb/proc/$(ARCH64) group=sys
-$(i386_ONLY)dir path=usr/lib/mdb/proc/$(ARCH64)
+$(sparc_BUILD64)dir path=usr/lib/mdb/proc/$(ARCH64) group=sys
+$(i386_BUILD64)dir path=usr/lib/mdb/proc/$(ARCH64)
 dir path=usr/lib/mdb/raw group=sys
 dir path=usr/platform group=sys
 $(i386_ONLY)dir path=usr/platform/i86pc group=sys
@@ -203,48 +204,50 @@
 $(sparc_ONLY)file path=platform/sun4v/kernel/kmdb/$(ARCH64)/vdsk group=sys \
     mode=0555
 file path=usr/bin/$(ARCH32)/mdb mode=0555
-file path=usr/bin/$(ARCH64)/mdb mode=0555
+$(BUILD64)file path=usr/bin/$(ARCH64)/mdb mode=0555
 file path=usr/include/sys/mdb_modapi.h
-file path=usr/lib/mdb/kvm/$(ARCH64)/arp.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/cpc.so group=sys mode=0555
-$(i386_ONLY)file path=usr/lib/mdb/kvm/$(ARCH64)/cpu.generic.so group=sys \
-    mode=0555
-$(i386_ONLY)file path=usr/lib/mdb/kvm/$(ARCH64)/cpu_ms.AuthenticAMD.15.so \
-    group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/crypto.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/genunix.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/hook.so group=sys mode=0555
-$(sparc_ONLY)file path=usr/lib/mdb/kvm/$(ARCH64)/intr.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/ip.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/ipc.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/ipp.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/krtld.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/lofs.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/logindmux.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/mac.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/md.so group=sys mode=0555
-$(i386_ONLY)file path=usr/lib/mdb/kvm/$(ARCH64)/mdb_kb.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/mdb_ks.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/mpt.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/mpt_sas.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/mr_sas.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/nca.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/neti.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/nfs.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/ptm.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/random.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/s1394.so group=sys mode=0555
-$(i386_ONLY)file path=usr/lib/mdb/kvm/$(ARCH64)/sata.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/scsi_vhci.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/sctp.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/sd.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/sockfs.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/specfs.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/sppp.so group=sys mode=0555
-$(sparc_ONLY)file path=usr/lib/mdb/kvm/$(ARCH64)/ssd.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/ufs.so group=sys mode=0555
-$(i386_ONLY)file path=usr/lib/mdb/kvm/$(ARCH64)/uhci.so group=sys mode=0555
-file path=usr/lib/mdb/kvm/$(ARCH64)/usba.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/arp.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/cpc.so group=sys mode=0555
+$(i386_BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/cpu.generic.so group=sys \
+    mode=0555
+$(i386_BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/cpu_ms.AuthenticAMD.15.so \
+    group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/crypto.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/genunix.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/hook.so group=sys mode=0555
+$(sparc_BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/intr.so group=sys \
+    mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/ip.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/ipc.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/ipp.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/krtld.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/lofs.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/logindmux.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/mac.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/md.so group=sys mode=0555
+$(i386_BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/mdb_kb.so group=sys \
+    mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/mdb_ks.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/mpt.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/mpt_sas.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/mr_sas.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/nca.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/neti.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/nfs.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/ptm.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/random.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/s1394.so group=sys mode=0555
+$(i386_BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/sata.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/scsi_vhci.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/sctp.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/sd.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/sockfs.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/specfs.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/sppp.so group=sys mode=0555
+$(sparc_BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/ssd.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/ufs.so group=sys mode=0555
+$(i386_BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/uhci.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/kvm/$(ARCH64)/usba.so group=sys mode=0555
 $(i386_ONLY)file path=usr/lib/mdb/kvm/arp.so group=sys mode=0555
 $(i386_ONLY)file path=usr/lib/mdb/kvm/cpc.so group=sys mode=0555
 $(i386_ONLY)file path=usr/lib/mdb/kvm/cpu.generic.so group=sys mode=0555
@@ -282,19 +285,23 @@
 $(i386_ONLY)file path=usr/lib/mdb/kvm/ufs.so group=sys mode=0555
 $(i386_ONLY)file path=usr/lib/mdb/kvm/uhci.so group=sys mode=0555
 $(i386_ONLY)file path=usr/lib/mdb/kvm/usba.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/ld.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libavl.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libc.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libcmdutils.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libnvpair.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libproc.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libpython2.6.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libsysevent.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libtopo.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libumem.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/libuutil.so group=sys mode=0555
-file path=usr/lib/mdb/proc/$(ARCH64)/mdb_ds.so group=sys mode=0555
-$(i386_ONLY)file path=usr/lib/mdb/proc/$(ARCH64)/mdb_test.so group=sys \
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/ld.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libavl.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libc.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libcmdutils.so group=sys \
+    mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libnvpair.so group=sys \
+    mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libproc.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libpython2.6.so group=sys \
+    mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libsysevent.so group=sys \
+    mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libtopo.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libumem.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/libuutil.so group=sys mode=0555
+$(BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/mdb_ds.so group=sys mode=0555
+$(i386_BUILD64)file path=usr/lib/mdb/proc/$(ARCH64)/mdb_test.so group=sys \
     mode=0555
 file path=usr/lib/mdb/proc/ld.so group=sys mode=0555
 file path=usr/lib/mdb/proc/libavl.so group=sys mode=0555
@@ -364,7 +371,8 @@
 file path=usr/share/man/man1/kmdb.1
 file path=usr/share/man/man1/mdb.1
 hardlink path=usr/bin/$(ARCH32)/adb target=../../../usr/bin/$(ARCH32)/mdb
-hardlink path=usr/bin/$(ARCH64)/adb target=../../../usr/bin/$(ARCH64)/mdb
+$(BUILD64)hardlink path=usr/bin/$(ARCH64)/adb \
+    target=../../../usr/bin/$(ARCH64)/mdb
 hardlink path=usr/bin/adb target=../../usr/lib/isaexec
 hardlink path=usr/bin/mdb target=../../usr/lib/isaexec
 legacy pkg=SUNWmdb desc="Modular Debugger (MDB)" name="Modular Debugger"
@@ -381,7 +389,7 @@
 $(sparc_ONLY)link path=kernel/kmdb/$(ARCH64)/pcipsy target=intr
 $(sparc_ONLY)link path=kernel/kmdb/$(ARCH64)/pcisch target=intr
 $(sparc_ONLY)link path=kernel/kmdb/$(ARCH64)/px target=intr
-$(sparc_ONLY)link path=usr/lib/mdb/kvm/$(ARCH64)/niumx.so target=intr.so
-$(sparc_ONLY)link path=usr/lib/mdb/kvm/$(ARCH64)/pcipsy.so target=intr.so
-$(sparc_ONLY)link path=usr/lib/mdb/kvm/$(ARCH64)/pcisch.so target=intr.so
-$(sparc_ONLY)link path=usr/lib/mdb/kvm/$(ARCH64)/px.so target=intr.so
+$(sparc_BUILD64)link path=usr/lib/mdb/kvm/$(ARCH64)/niumx.so target=intr.so
+$(sparc_BUILD64)link path=usr/lib/mdb/kvm/$(ARCH64)/pcipsy.so target=intr.so
+$(sparc_BUILD64)link path=usr/lib/mdb/kvm/$(ARCH64)/pcisch.so target=intr.so
+$(sparc_BUILD64)link path=usr/lib/mdb/kvm/$(ARCH64)/px.so target=intr.so
