summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2007-12-31 20:06:37 +0000
committerjlam <jlam>2007-12-31 20:06:37 +0000
commit2853245b5e8449c0763315cb6a926497ddd85cd0 (patch)
tree726efe268adfaa4f45279c5fb874d6a6f8742b6c
parentce92104f4c2e28a46d8d127f7a5478bb9a58d05a (diff)
downloadpkgsrc-2853245b5e8449c0763315cb6a926497ddd85cd0.tar.gz
Add support for NetBSD 4.0 compatibility through installing compat40
and netbsd32_compat40 packages. The compat40 packages are currently built by comparing the 4.0 release against the 20071230 version of HEAD. Commit approved by <agc>.
-rw-r--r--doc/CHANGES-20076
-rw-r--r--emulators/Makefile6
-rw-r--r--emulators/compat30/Makefile8
-rw-r--r--emulators/compat40-extras/DESCR4
-rw-r--r--emulators/compat40-extras/Makefile31
-rw-r--r--emulators/compat40-extras/PLIST460
-rw-r--r--emulators/compat40-extras/PLIST.i38613
-rw-r--r--emulators/compat40-extras/PLIST.sparc5
-rw-r--r--emulators/compat40-extras/distinfo8
-rw-r--r--emulators/compat40/DESCR2
-rw-r--r--emulators/compat40/MESSAGE7
-rw-r--r--emulators/compat40/Makefile64
-rw-r--r--emulators/compat40/PLIST7
-rw-r--r--emulators/compat40/distinfo38
-rw-r--r--emulators/compat40/emulator.mk44
-rw-r--r--emulators/netbsd32_compat40-extras/Makefile5
-rw-r--r--emulators/netbsd32_compat40/Makefile5
-rw-r--r--mk/emulator/netbsd-compat.mk6
18 files changed, 711 insertions, 8 deletions
diff --git a/doc/CHANGES-2007 b/doc/CHANGES-2007
index 581238babb6..3844a8b0ef1 100644
--- a/doc/CHANGES-2007
+++ b/doc/CHANGES-2007
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-2007,v 1.2724 2007/12/31 09:22:57 taca Exp $
+$NetBSD: CHANGES-2007,v 1.2725 2007/12/31 20:06:37 jlam Exp $
Changes to the packages collection and infrastructure in 2007:
@@ -4927,3 +4927,7 @@ Changes to the packages collection and infrastructure in 2007:
Updated www/sarg to 2.1nb3 [obache 2007-12-31]
Updated www/screws to 0.56nb4 [obache 2007-12-31]
Updated net/netatalk to 2.0.3nb6 [taca 2007-12-31]
+ Added emulators/compat40 version 4.0 [jlam 2007-12-31]
+ Added emulators/compat40-extras version 4.0 [jlam 2007-12-31]
+ Added emulators/netbsd32_compat40 version 4.0 [jlam 2007-12-31]
+ Added emulators/netbsd32_compat40-extras version 4.0 [jlam 2007-12-31]
diff --git a/emulators/Makefile b/emulators/Makefile
index 314917806a2..515f744b1d2 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.165 2007/09/07 22:56:23 wiz Exp $
+# $NetBSD: Makefile,v 1.166 2007/12/31 20:06:38 jlam Exp $
#
COMMENT= Emulators for other operating systems
@@ -32,6 +32,8 @@ SUBDIR+= compat20
SUBDIR+= compat20-extras
SUBDIR+= compat30
SUBDIR+= compat30-extras
+SUBDIR+= compat40
+SUBDIR+= compat40-extras
#SUBDIR+= compat_netbsd # only contains Makefile fragments
SUBDIR+= cygwin_esound
SUBDIR+= cygwin_lib
@@ -79,6 +81,8 @@ SUBDIR+= netbsd32_compat20
SUBDIR+= netbsd32_compat20-extras
SUBDIR+= netbsd32_compat30
SUBDIR+= netbsd32_compat30-extras
+SUBDIR+= netbsd32_compat40
+SUBDIR+= netbsd32_compat40-extras
SUBDIR+= openmsx
SUBDIR+= or1ksim
SUBDIR+= osf1_lib
diff --git a/emulators/compat30/Makefile b/emulators/compat30/Makefile
index 29152559f4f..d965204adb2 100644
--- a/emulators/compat30/Makefile
+++ b/emulators/compat30/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2007/10/09 19:19:09 martti Exp $
+# $NetBSD: Makefile,v 1.5 2007/12/31 20:06:38 jlam Exp $
COMPAT_PKG= compat30 # for compat_netbsd/Makefile.common
NETBSD_VERSION= 3.0
@@ -38,8 +38,7 @@ COMPAT_EXTRAS= netbsd32_compat30-extras-${COMPAT_VERSION}{,nb*}:../../emulators/
. if !empty(COMPAT_EXTRAS)
DEPENDS+= ${COMPAT_EXTRAS}
. else
-# XXX This package doesn't exist yet.
-#DEPENDS+= netbsd32_compat40>=4.0:../../emulators/netbsd32_compat40
+DEPENDS+= netbsd32_compat40>=4.0:../../emulators/netbsd32_compat40
. endif
#
# vax running NetBSD-4.x lacks any shared libraries, so depend on the
@@ -56,8 +55,7 @@ DEPENDS+= compat30-extras-${COMPAT_VERSION}{,nb*}:../../emulators/compat30-extra
.elif empty(OS_VERSION:M[0-3].*) && empty(OS_VERSION:M4.[0-9]) && \
empty(OS_VERSION:M4.[0-9].*) && empty(OS_VERSION:M4.[1-8][0-9].*) && \
empty(OS_VERSION:M4.9[0-8]*)
-# XXX This package doesn't exist yet.
-#DEPENDS+= compat40>=4.0:../../emulators/compat40
+DEPENDS+= compat40>=4.0:../../emulators/compat40
.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/compat40-extras/DESCR b/emulators/compat40-extras/DESCR
new file mode 100644
index 00000000000..c92bdc6557c
--- /dev/null
+++ b/emulators/compat40-extras/DESCR
@@ -0,0 +1,4 @@
+This package supplies the extra user files needed to run dynamically
+linked executables compiled under NetBSD 4.0, including user files
+that might be found in NetBSD versions beyond 4.0 that are missing
+from the pkgsrc/emulators/compat40 package.
diff --git a/emulators/compat40-extras/Makefile b/emulators/compat40-extras/Makefile
new file mode 100644
index 00000000000..16797fc14b0
--- /dev/null
+++ b/emulators/compat40-extras/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1 2007/12/31 20:06:40 jlam Exp $
+
+COMPAT_PKG= compat40 # for compat_netbsd/Makefile.common
+NETBSD_VERSION= 4.0
+
+HOMEPAGE= http://www.NetBSD.org/releases/formal-4/index.html
+COMMENT= Additional shared libraries for NetBSD 4.0 compatibility
+
+EMUL_PLATFORMS= netbsd-i386 netbsd-sparc
+
+.include "../../emulators/compat_netbsd/Makefile.common"
+
+DISTNAME= compat40-extras-${EMUL_ARCH}-4.0
+
+# XXX Until NetBSD 5.0 is released, we fetch the distfiles into a date-specific
+# XXX subdirectory where the date corresponds to the build of HEAD against
+# XXX which these compat40 packages were generated.
+#
+DIST_SUBDIR= 20071230
+
+# This package should only be installed for COMPAT_NETBSD32 emulation
+# on machines running NetBSD-4.x.
+#
+.if defined(NETBSD_COMPAT32)
+ACCEPTABLE_NETBSD= NetBSD-3.99.* NetBSD-4.[0-9] \
+ NetBSD-4.[1-8][0-9].* NetBSD-4.9[0-8].*
+.else
+NOT_FOR_PLATFORM= NetBSD-*-${MACHINE_ARCH}
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/compat40-extras/PLIST b/emulators/compat40-extras/PLIST
new file mode 100644
index 00000000000..d1006134667
--- /dev/null
+++ b/emulators/compat40-extras/PLIST
@@ -0,0 +1,460 @@
+@comment $NetBSD: PLIST,v 1.1 2007/12/31 20:06:40 jlam Exp $
+${EMULSUBDIRSLASH}lib/libc.so
+${EMULSUBDIRSLASH}lib/libc.so.12
+${EMULSUBDIRSLASH}lib/libc.so.12.149
+${EMULSUBDIRSLASH}lib/libcrypt.so
+${EMULSUBDIRSLASH}lib/libcrypt.so.0
+${EMULSUBDIRSLASH}lib/libcrypt.so.0.2
+${EMULSUBDIRSLASH}lib/libcrypto.so
+${EMULSUBDIRSLASH}lib/libcrypto.so.3
+${EMULSUBDIRSLASH}lib/libcrypto.so.3.2
+${EMULSUBDIRSLASH}lib/libedit.so
+${EMULSUBDIRSLASH}lib/libedit.so.2
+${EMULSUBDIRSLASH}lib/libedit.so.2.10
+${EMULSUBDIRSLASH}lib/libevent.so
+${EMULSUBDIRSLASH}lib/libevent.so.1
+${EMULSUBDIRSLASH}lib/libevent.so.1.0
+${EMULSUBDIRSLASH}lib/libipsec.so
+${EMULSUBDIRSLASH}lib/libipsec.so.2
+${EMULSUBDIRSLASH}lib/libipsec.so.2.2
+${EMULSUBDIRSLASH}lib/libkvm.so
+${EMULSUBDIRSLASH}lib/libkvm.so.5
+${EMULSUBDIRSLASH}lib/libkvm.so.5.2
+${EMULSUBDIRSLASH}lib/libm.so
+${EMULSUBDIRSLASH}lib/libm.so.0
+${EMULSUBDIRSLASH}lib/libm.so.0.5
+${EMULSUBDIRSLASH}lib/libprop.so
+${EMULSUBDIRSLASH}lib/libprop.so.0
+${EMULSUBDIRSLASH}lib/libprop.so.0.5
+${EMULSUBDIRSLASH}lib/libradius.so
+${EMULSUBDIRSLASH}lib/libradius.so.1
+${EMULSUBDIRSLASH}lib/libradius.so.1.0
+${EMULSUBDIRSLASH}lib/libtermcap.so
+${EMULSUBDIRSLASH}lib/libtermcap.so.0
+${EMULSUBDIRSLASH}lib/libtermcap.so.0.6
+${EMULSUBDIRSLASH}lib/libtermlib.so
+${EMULSUBDIRSLASH}lib/libtermlib.so.0
+${EMULSUBDIRSLASH}lib/libtermlib.so.0.6
+${EMULSUBDIRSLASH}lib/libutil.so
+${EMULSUBDIRSLASH}lib/libutil.so.7
+${EMULSUBDIRSLASH}lib/libutil.so.7.11
+${EMULSUBDIRSLASH}lib/libz.so
+${EMULSUBDIRSLASH}lib/libz.so.1
+${EMULSUBDIRSLASH}lib/libz.so.1.0
+${EMULSUBDIRSLASH}libexec/ld.elf_so
+${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib/common/xlibi18n.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib/common/xlocale.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libFS.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libFS.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libFS.so.6.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGL.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGL.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGL.so.1.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGLU.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGLU.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGLU.so.1.3
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGLw.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGLw.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libGLw.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libICE.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libICE.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libICE.so.6.3
+${EMULSUBDIRSLASH}usr/X11R6/lib/libOSMesa.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libOSMesa.so.4
+${EMULSUBDIRSLASH}usr/X11R6/lib/libOSMesa.so.4.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libSM.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libSM.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libSM.so.6.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libX11.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libX11.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libX11.so.6.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXRes.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXRes.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXRes.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXTrap.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXTrap.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXTrap.so.6.4
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXau.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXau.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXau.so.6.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXaw.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXaw.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXaw.so.6.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXaw.so.7
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXaw.so.7.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXcursor.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXcursor.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXcursor.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXdmcp.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXdmcp.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXdmcp.so.6.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXext.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXext.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXext.so.6.4
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXfont.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXfont.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXfont.so.1.5
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXfontcache.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXfontcache.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXfontcache.so.1.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXft.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXft.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXft.so.1.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXft.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXft.so.2.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXi.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXi.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXi.so.6.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXinerama.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXinerama.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXinerama.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXmu.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXmu.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXmu.so.6.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXmuu.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXmuu.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXmuu.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXp.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXp.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXp.so.6.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXpm.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXpm.so.4
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXpm.so.4.11
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXrandr.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXrandr.so.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXrandr.so.2.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXrender.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXrender.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXrender.so.1.2
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXss.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXss.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXss.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXt.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXt.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXt.so.6.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXtst.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXtst.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXtst.so.6.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXv.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXv.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXv.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXvMC.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXvMC.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXvMC.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86dga.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86dga.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86dga.so.1.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86misc.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86misc.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86misc.so.1.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86vm.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86vm.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libXxf86vm.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdmx.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdmx.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdmx.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdps.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdps.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdps.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdpstk.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdpstk.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libdpstk.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libexpat.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libexpat.so.4
+${EMULSUBDIRSLASH}usr/X11R6/lib/libexpat.so.4.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfontconfig.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfontconfig.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfontconfig.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfontenc.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfontenc.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfontenc.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfreetype.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfreetype.so.9
+${EMULSUBDIRSLASH}usr/X11R6/lib/libfreetype.so.9.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/liboldX.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/liboldX.so.6
+${EMULSUBDIRSLASH}usr/X11R6/lib/liboldX.so.6.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libpsres.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libpsres.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libpsres.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libxkbfile.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libxkbfile.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libxkbfile.so.1.0
+${EMULSUBDIRSLASH}usr/X11R6/lib/libxkbui.so
+${EMULSUBDIRSLASH}usr/X11R6/lib/libxkbui.so.1
+${EMULSUBDIRSLASH}usr/X11R6/lib/libxkbui.so.1.0
+${EMULSUBDIRSLASH}usr/lib/i18n/libBIG5.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libBIG5.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libBIG5.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libEUC.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libEUC.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libEUC.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libEUCTW.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libEUCTW.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libEUCTW.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libGBK2K.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libGBK2K.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libGBK2K.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libHZ.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libHZ.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libHZ.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libISO2022.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libISO2022.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libISO2022.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libJOHAB.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libJOHAB.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libJOHAB.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libMSKanji.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libMSKanji.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libMSKanji.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUES.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libUES.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUES.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF1632.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF1632.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF1632.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF7.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF7.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF7.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF8.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF8.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libUTF8.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libVIQR.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libVIQR.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libVIQR.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libZW.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libZW.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libZW.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libiconv_none.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libiconv_none.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libiconv_none.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libiconv_std.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libiconv_std.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libiconv_std.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_646.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_646.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_646.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_none.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_none.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_none.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_parallel.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_parallel.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_parallel.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_serial.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_serial.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_serial.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_std.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_std.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_std.so.4.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_zone.so
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_zone.so.4
+${EMULSUBDIRSLASH}usr/lib/i18n/libmapper_zone.so.4.4
+${EMULSUBDIRSLASH}usr/lib/libamu.so.3
+${EMULSUBDIRSLASH}usr/lib/libamu.so.3.0
+${EMULSUBDIRSLASH}usr/lib/libasn1.so
+${EMULSUBDIRSLASH}usr/lib/libasn1.so.6
+${EMULSUBDIRSLASH}usr/lib/libasn1.so.6.1
+${EMULSUBDIRSLASH}usr/lib/libbfd.so.8
+${EMULSUBDIRSLASH}usr/lib/libbfd.so.8.0
+${EMULSUBDIRSLASH}usr/lib/libbluetooth.so
+${EMULSUBDIRSLASH}usr/lib/libbluetooth.so.3
+${EMULSUBDIRSLASH}usr/lib/libbluetooth.so.3.0
+${EMULSUBDIRSLASH}usr/lib/libbsdmalloc.so
+${EMULSUBDIRSLASH}usr/lib/libbsdmalloc.so.0
+${EMULSUBDIRSLASH}usr/lib/libbsdmalloc.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libbz2.so
+${EMULSUBDIRSLASH}usr/lib/libbz2.so.1
+${EMULSUBDIRSLASH}usr/lib/libbz2.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libc.so
+${EMULSUBDIRSLASH}usr/lib/libc.so.12
+${EMULSUBDIRSLASH}usr/lib/libc.so.12.149
+${EMULSUBDIRSLASH}usr/lib/libcom_err.so
+${EMULSUBDIRSLASH}usr/lib/libcom_err.so.4
+${EMULSUBDIRSLASH}usr/lib/libcom_err.so.4.1
+${EMULSUBDIRSLASH}usr/lib/libcrypt.so
+${EMULSUBDIRSLASH}usr/lib/libcrypt.so.0
+${EMULSUBDIRSLASH}usr/lib/libcrypt.so.0.2
+${EMULSUBDIRSLASH}usr/lib/libcrypto.so
+${EMULSUBDIRSLASH}usr/lib/libcrypto.so.3
+${EMULSUBDIRSLASH}usr/lib/libcrypto.so.3.2
+${EMULSUBDIRSLASH}usr/lib/libcurses.so
+${EMULSUBDIRSLASH}usr/lib/libcurses.so.6
+${EMULSUBDIRSLASH}usr/lib/libcurses.so.6.1
+${EMULSUBDIRSLASH}usr/lib/libdes.so
+${EMULSUBDIRSLASH}usr/lib/libdes.so.7
+${EMULSUBDIRSLASH}usr/lib/libdes.so.7.0
+${EMULSUBDIRSLASH}usr/lib/libedit.so
+${EMULSUBDIRSLASH}usr/lib/libedit.so.2
+${EMULSUBDIRSLASH}usr/lib/libedit.so.2.10
+${EMULSUBDIRSLASH}usr/lib/libevent.so
+${EMULSUBDIRSLASH}usr/lib/libevent.so.1
+${EMULSUBDIRSLASH}usr/lib/libevent.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libform.so
+${EMULSUBDIRSLASH}usr/lib/libform.so.5
+${EMULSUBDIRSLASH}usr/lib/libform.so.5.0
+${EMULSUBDIRSLASH}usr/lib/libgcc_s.so
+${EMULSUBDIRSLASH}usr/lib/libgcc_s.so.1
+${EMULSUBDIRSLASH}usr/lib/libgcc_s.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libgnumalloc.so
+${EMULSUBDIRSLASH}usr/lib/libgnumalloc.so.0
+${EMULSUBDIRSLASH}usr/lib/libgnumalloc.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libgssapi.so
+${EMULSUBDIRSLASH}usr/lib/libgssapi.so.5
+${EMULSUBDIRSLASH}usr/lib/libgssapi.so.5.0
+${EMULSUBDIRSLASH}usr/lib/libhdb.so
+${EMULSUBDIRSLASH}usr/lib/libhdb.so.9
+${EMULSUBDIRSLASH}usr/lib/libhdb.so.9.0
+${EMULSUBDIRSLASH}usr/lib/libintl.so
+${EMULSUBDIRSLASH}usr/lib/libintl.so.0
+${EMULSUBDIRSLASH}usr/lib/libintl.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libipsec.so
+${EMULSUBDIRSLASH}usr/lib/libipsec.so.2
+${EMULSUBDIRSLASH}usr/lib/libipsec.so.2.2
+${EMULSUBDIRSLASH}usr/lib/libiscsi.so
+${EMULSUBDIRSLASH}usr/lib/libiscsi.so.0
+${EMULSUBDIRSLASH}usr/lib/libiscsi.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libkadm5clnt.so
+${EMULSUBDIRSLASH}usr/lib/libkadm5clnt.so.8
+${EMULSUBDIRSLASH}usr/lib/libkadm5clnt.so.8.0
+${EMULSUBDIRSLASH}usr/lib/libkadm5srv.so
+${EMULSUBDIRSLASH}usr/lib/libkadm5srv.so.9
+${EMULSUBDIRSLASH}usr/lib/libkadm5srv.so.9.0
+${EMULSUBDIRSLASH}usr/lib/libkafs.so
+${EMULSUBDIRSLASH}usr/lib/libkafs.so.7
+${EMULSUBDIRSLASH}usr/lib/libkafs.so.7.0
+${EMULSUBDIRSLASH}usr/lib/libkrb5.so
+${EMULSUBDIRSLASH}usr/lib/libkrb5.so.20
+${EMULSUBDIRSLASH}usr/lib/libkrb5.so.20.1
+${EMULSUBDIRSLASH}usr/lib/libkvm.so
+${EMULSUBDIRSLASH}usr/lib/libkvm.so.5
+${EMULSUBDIRSLASH}usr/lib/libkvm.so.5.2
+${EMULSUBDIRSLASH}usr/lib/libm.so
+${EMULSUBDIRSLASH}usr/lib/libm.so.0
+${EMULSUBDIRSLASH}usr/lib/libm.so.0.5
+${EMULSUBDIRSLASH}usr/lib/libmagic.so
+${EMULSUBDIRSLASH}usr/lib/libmagic.so.1
+${EMULSUBDIRSLASH}usr/lib/libmagic.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libmenu.so
+${EMULSUBDIRSLASH}usr/lib/libmenu.so.5
+${EMULSUBDIRSLASH}usr/lib/libmenu.so.5.0
+${EMULSUBDIRSLASH}usr/lib/libobjc.so
+${EMULSUBDIRSLASH}usr/lib/libobjc.so.2
+${EMULSUBDIRSLASH}usr/lib/libobjc.so.2.1
+${EMULSUBDIRSLASH}usr/lib/libossaudio.so
+${EMULSUBDIRSLASH}usr/lib/libossaudio.so.0
+${EMULSUBDIRSLASH}usr/lib/libossaudio.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libpam.so
+${EMULSUBDIRSLASH}usr/lib/libpam.so.0
+${EMULSUBDIRSLASH}usr/lib/libpam.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libpcap.so
+${EMULSUBDIRSLASH}usr/lib/libpcap.so.2
+${EMULSUBDIRSLASH}usr/lib/libpcap.so.2.0
+${EMULSUBDIRSLASH}usr/lib/libpci.so
+${EMULSUBDIRSLASH}usr/lib/libpci.so.1
+${EMULSUBDIRSLASH}usr/lib/libpci.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libposix.so
+${EMULSUBDIRSLASH}usr/lib/libposix.so.0
+${EMULSUBDIRSLASH}usr/lib/libposix.so.0.1
+${EMULSUBDIRSLASH}usr/lib/libprop.so
+${EMULSUBDIRSLASH}usr/lib/libprop.so.0
+${EMULSUBDIRSLASH}usr/lib/libprop.so.0.5
+${EMULSUBDIRSLASH}usr/lib/libpthread.so
+${EMULSUBDIRSLASH}usr/lib/libpthread.so.0
+${EMULSUBDIRSLASH}usr/lib/libpthread.so.0.6
+${EMULSUBDIRSLASH}usr/lib/libpthread_dbg.so
+${EMULSUBDIRSLASH}usr/lib/libpuffs.so
+${EMULSUBDIRSLASH}usr/lib/libpuffs.so.0
+${EMULSUBDIRSLASH}usr/lib/libpuffs.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libradius.so
+${EMULSUBDIRSLASH}usr/lib/libradius.so.1
+${EMULSUBDIRSLASH}usr/lib/libradius.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libresolv.so
+${EMULSUBDIRSLASH}usr/lib/libresolv.so.1
+${EMULSUBDIRSLASH}usr/lib/libresolv.so.1.1
+${EMULSUBDIRSLASH}usr/lib/libroken.so
+${EMULSUBDIRSLASH}usr/lib/libroken.so.12
+${EMULSUBDIRSLASH}usr/lib/libroken.so.12.3
+${EMULSUBDIRSLASH}usr/lib/librpcsvc.so
+${EMULSUBDIRSLASH}usr/lib/librpcsvc.so.0
+${EMULSUBDIRSLASH}usr/lib/librpcsvc.so.0.0
+${EMULSUBDIRSLASH}usr/lib/librt.so
+${EMULSUBDIRSLASH}usr/lib/librt.so.0
+${EMULSUBDIRSLASH}usr/lib/librt.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libsdp.so
+${EMULSUBDIRSLASH}usr/lib/libsdp.so.2
+${EMULSUBDIRSLASH}usr/lib/libsdp.so.2.0
+${EMULSUBDIRSLASH}usr/lib/libskey.so
+${EMULSUBDIRSLASH}usr/lib/libskey.so.1
+${EMULSUBDIRSLASH}usr/lib/libskey.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libsl.so
+${EMULSUBDIRSLASH}usr/lib/libsl.so.2
+${EMULSUBDIRSLASH}usr/lib/libsl.so.2.0
+${EMULSUBDIRSLASH}usr/lib/libss.so
+${EMULSUBDIRSLASH}usr/lib/libss.so.4
+${EMULSUBDIRSLASH}usr/lib/libss.so.4.0
+${EMULSUBDIRSLASH}usr/lib/libssh.so
+${EMULSUBDIRSLASH}usr/lib/libssl.so
+${EMULSUBDIRSLASH}usr/lib/libssl.so.4
+${EMULSUBDIRSLASH}usr/lib/libssl.so.4.0
+${EMULSUBDIRSLASH}usr/lib/libstdc++.so
+${EMULSUBDIRSLASH}usr/lib/libstdc++.so.6
+${EMULSUBDIRSLASH}usr/lib/libstdc++.so.6.0
+${EMULSUBDIRSLASH}usr/lib/libtermcap.so
+${EMULSUBDIRSLASH}usr/lib/libtermcap.so.0
+${EMULSUBDIRSLASH}usr/lib/libtermcap.so.0.6
+${EMULSUBDIRSLASH}usr/lib/libtermlib.so
+${EMULSUBDIRSLASH}usr/lib/libtermlib.so.0
+${EMULSUBDIRSLASH}usr/lib/libtermlib.so.0.6
+${EMULSUBDIRSLASH}usr/lib/libusbhid.so
+${EMULSUBDIRSLASH}usr/lib/libusbhid.so.1
+${EMULSUBDIRSLASH}usr/lib/libusbhid.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libutil.so
+${EMULSUBDIRSLASH}usr/lib/libutil.so.7
+${EMULSUBDIRSLASH}usr/lib/libutil.so.7.11
+${EMULSUBDIRSLASH}usr/lib/libwrap.so
+${EMULSUBDIRSLASH}usr/lib/libwrap.so.0
+${EMULSUBDIRSLASH}usr/lib/libwrap.so.0.2
+${EMULSUBDIRSLASH}usr/lib/libz.so
+${EMULSUBDIRSLASH}usr/lib/libz.so.1
+${EMULSUBDIRSLASH}usr/lib/libz.so.1.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_afslog.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_chroot.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_deny.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_echo.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_exec.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_ftpusers.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_group.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_guest.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_krb5.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_ksu.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_lastlog.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_login_access.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_nologin.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_permit.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_radius.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_rhosts.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_rootok.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_securetty.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_self.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_skey.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_ssh.so.0
+${EMULSUBDIRSLASH}usr/lib/security/pam_unix.so.0
+${EMULSUBDIRSLASH}usr/libexec/ld.elf_so
+${EMULSUBDIRSLASH}usr/libexec/ld.so
+@dirrm ${EMULSUBDIRSLASH}usr/libexec
+@dirrm ${EMULSUBDIRSLASH}usr/lib/security
+@dirrm ${EMULSUBDIRSLASH}usr/lib/i18n
+@dirrm ${EMULSUBDIRSLASH}usr/lib
+@dirrm ${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib/common
+@dirrm ${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale/lib
+@dirrm ${EMULSUBDIRSLASH}usr/X11R6/lib/X11/locale
+@dirrm ${EMULSUBDIRSLASH}usr/X11R6/lib/X11
+@dirrm ${EMULSUBDIRSLASH}usr/X11R6/lib
+@dirrm ${EMULSUBDIRSLASH}usr/X11R6
+@dirrm ${EMULSUBDIRSLASH}usr
+@dirrm ${EMULSUBDIRSLASH}libexec
+@dirrm ${EMULSUBDIRSLASH}lib
diff --git a/emulators/compat40-extras/PLIST.i386 b/emulators/compat40-extras/PLIST.i386
new file mode 100644
index 00000000000..dc1ce2cdf8e
--- /dev/null
+++ b/emulators/compat40-extras/PLIST.i386
@@ -0,0 +1,13 @@
+@comment $NetBSD: PLIST.i386,v 1.1 2007/12/31 20:06:40 jlam Exp $
+${EMULSUBDIRSLASH}lib/libm387.so
+${EMULSUBDIRSLASH}lib/libm387.so.0
+${EMULSUBDIRSLASH}lib/libm387.so.0.1
+${EMULSUBDIRSLASH}usr/lib/libi386.so
+${EMULSUBDIRSLASH}usr/lib/libi386.so.1
+${EMULSUBDIRSLASH}usr/lib/libi386.so.1.0
+${EMULSUBDIRSLASH}usr/lib/libm387.so
+${EMULSUBDIRSLASH}usr/lib/libm387.so.0
+${EMULSUBDIRSLASH}usr/lib/libm387.so.0.1
+${EMULSUBDIRSLASH}usr/lib/libpmc.so
+${EMULSUBDIRSLASH}usr/lib/libpmc.so.0
+${EMULSUBDIRSLASH}usr/lib/libpmc.so.0.0
diff --git a/emulators/compat40-extras/PLIST.sparc b/emulators/compat40-extras/PLIST.sparc
new file mode 100644
index 00000000000..70d5f245cd7
--- /dev/null
+++ b/emulators/compat40-extras/PLIST.sparc
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST.sparc,v 1.1 2007/12/31 20:06:41 jlam Exp $
+${EMULSUBDIRSLASH}lib/libsparc_v8.so.0
+${EMULSUBDIRSLASH}lib/libsparc_v8.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libsparc_v8.so.0
+${EMULSUBDIRSLASH}usr/lib/libsparc_v8.so.0.0
diff --git a/emulators/compat40-extras/distinfo b/emulators/compat40-extras/distinfo
new file mode 100644
index 00000000000..e29b6685d88
--- /dev/null
+++ b/emulators/compat40-extras/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2007/12/31 20:06:41 jlam Exp $
+
+SHA1 (20071230/compat40-extras-i386-4.0.tar.bz2) = 03c8aae8d7d437365a0077c341dbf887c7283277
+RMD160 (20071230/compat40-extras-i386-4.0.tar.bz2) = fdf7a452de100d6aaa897f1c7baefbb6e16623b4
+Size (20071230/compat40-extras-i386-4.0.tar.bz2) = 5622349 bytes
+SHA1 (20071230/compat40-extras-sparc-4.0.tar.bz2) = 54e405dd211003e18fd69babac28ddb0bc2a239f
+RMD160 (20071230/compat40-extras-sparc-4.0.tar.bz2) = fe23addd36370c81e68515774a44e2d240238fdc
+Size (20071230/compat40-extras-sparc-4.0.tar.bz2) = 5928204 bytes
diff --git a/emulators/compat40/DESCR b/emulators/compat40/DESCR
new file mode 100644
index 00000000000..8d53c368cb9
--- /dev/null
+++ b/emulators/compat40/DESCR
@@ -0,0 +1,2 @@
+This package supplies the user files needed to run dynamically linked
+executables compiled under NetBSD 4.0.
diff --git a/emulators/compat40/MESSAGE b/emulators/compat40/MESSAGE
new file mode 100644
index 00000000000..ffeb8986c98
--- /dev/null
+++ b/emulators/compat40/MESSAGE
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2007/12/31 20:06:39 jlam Exp $
+
+The COMPAT_40 option must be included in the kernel configuration (and
+possibly others; see options(4) for more information) to make use of
+NetBSD 4.0 binaries.
+===========================================================================
diff --git a/emulators/compat40/Makefile b/emulators/compat40/Makefile
new file mode 100644
index 00000000000..dd1c6bae406
--- /dev/null
+++ b/emulators/compat40/Makefile
@@ -0,0 +1,64 @@
+# $NetBSD: Makefile,v 1.1 2007/12/31 20:06:39 jlam Exp $
+
+COMPAT_PKG= compat40 # for compat_netbsd/Makefile.common
+NETBSD_VERSION= 4.0
+
+HOMEPAGE= http://www.NetBSD.org/releases/formal-4/index.html
+COMMENT= Shared libraries for NetBSD 4.0 compatibility
+
+.if defined(NETBSD_COMPAT32)
+EMUL_PLATFORMS= netbsd-i386 netbsd-sparc
+
+ACCEPTABLE_NETBSD= NetBSD-3.99.* NetBSD-4.[0-9] \
+ NetBSD-4.[1-8][0-9]* NetBSD-4.9[0-8]* \
+ NetBSD-4.99.* NetBSD-[5-9]* NetBSD-[1-9][0-9]*
+.else
+EMUL_PLATFORMS= netbsd-alpha netbsd-arm netbsd-i386 netbsd-m68k \
+ netbsd-mipseb netbsd-mipsel netbsd-powerpc \
+ netbsd-sh3eb netbsd-sh3el netbsd-sparc \
+ netbsd-sparc64 netbsd-x86_64
+
+# XXX These platforms are currently not supported or broken.
+#EMUL_PLATFORMS= netbsd-vax
+
+ONLY_FOR_PLATFORM= NetBSD-4.99.*-* NetBSD-[5-9]*-* NetBSD-[1-9][0-9]*-*
+.endif
+
+.include "../../emulators/compat_netbsd/Makefile.common"
+
+DISTNAME= compat40-${EMUL_ARCH}-${COMPAT_VERSION}
+COMPAT_VERSION= 4.0
+
+# XXX Until NetBSD 5.0 is released, we fetch the distfiles into a date-specific
+# XXX subdirectory where the date corresponds to the build of HEAD against
+# XXX which these compat40 packages were generated.
+#
+DIST_SUBDIR= 20071230
+
+# For COMPAT_NETBSD32, we need to depend on the compat40-extras package
+# on NetBSD-4.0 to supply the missing shared libraries; otherwise, we
+# just depend on the compat50 package for the missing shared libraries.
+#
+.if defined(NETBSD_COMPAT32)
+COMPAT_EXTRAS= # empty
+. for _netbsd_ in ${ACCEPTABLE_NETBSD}
+COMPAT_EXTRAS= netbsd32_compat40-extras-${COMPAT_VERSION}{,nb*}:../../emulators/netbsd32_compat40-extras
+. endfor
+. if !empty(COMPAT_EXTRAS)
+DEPENDS+= ${COMPAT_EXTRAS}
+. else
+# XXX This package doesn't exist yet.
+#DEPENDS+= netbsd32_compat50>=5.0:../../emulators/netbsd32_compat50
+. endif
+#
+# We need to depend on the compat50 package to supply shared libraries
+# missing from compat40 on NetBSD>5.x.
+#
+.elif empty(OS_VERSION:M[0-4].*) && empty(OS_VERSION:M5.[0-9]) && \
+ empty(OS_VERSION:M5.[0-9].*) && empty(OS_VERSION:M5.[1-8][0-9].*) && \
+ empty(OS_VERSION:M5.9[0-8]*)
+# XXX This package doesn't exist yet.
+#DEPENDS+= compat50>=5.0:../../emulators/compat50
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/compat40/PLIST b/emulators/compat40/PLIST
new file mode 100644
index 00000000000..82d14b859ab
--- /dev/null
+++ b/emulators/compat40/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2007/12/31 20:06:39 jlam Exp $
+${EMULSUBDIRSLASH}usr/lib/libpthread_dbg.so.0
+${EMULSUBDIRSLASH}usr/lib/libpthread_dbg.so.0.0
+${EMULSUBDIRSLASH}usr/lib/libssh.so.5
+${EMULSUBDIRSLASH}usr/lib/libssh.so.5.0
+@dirrm ${EMULSUBDIRSLASH}usr/lib
+@dirrm ${EMULSUBDIRSLASH}usr
diff --git a/emulators/compat40/distinfo b/emulators/compat40/distinfo
new file mode 100644
index 00000000000..a504ad12521
--- /dev/null
+++ b/emulators/compat40/distinfo
@@ -0,0 +1,38 @@
+$NetBSD: distinfo,v 1.1 2007/12/31 20:06:40 jlam Exp $
+
+SHA1 (20071230/compat40-alpha-4.0.tar.bz2) = 836b30ccdf3f8f54a651c42c0a5a7818cd06d535
+RMD160 (20071230/compat40-alpha-4.0.tar.bz2) = b6a8a08ffaab06c3ec7d39ea62e06202d02d5871
+Size (20071230/compat40-alpha-4.0.tar.bz2) = 111405 bytes
+SHA1 (20071230/compat40-arm-4.0.tar.bz2) = a8e6cf8647c4313584a9a78f40cdeb884e90a664
+RMD160 (20071230/compat40-arm-4.0.tar.bz2) = 2493d728d68e2727815b98a78f90ee3d97d16c4c
+Size (20071230/compat40-arm-4.0.tar.bz2) = 94148 bytes
+SHA1 (20071230/compat40-i386-4.0.tar.bz2) = bbe24e5b9f779557cd356949d3d62fc5365c5485
+RMD160 (20071230/compat40-i386-4.0.tar.bz2) = f9a3d197b95def78406bd626fc95d8c3934e4184
+Size (20071230/compat40-i386-4.0.tar.bz2) = 92478 bytes
+SHA1 (20071230/compat40-m68k-4.0.tar.bz2) = 04c57c35e16f7e27cfd9f098010ac43ff34be83c
+RMD160 (20071230/compat40-m68k-4.0.tar.bz2) = 3335d3a91e683c5c89a7aa69bfc0a33cc9d0f07d
+Size (20071230/compat40-m68k-4.0.tar.bz2) = 98942 bytes
+SHA1 (20071230/compat40-mipseb-4.0.tar.bz2) = e6c211b2a3ea15ff878913134571dea3fc0449bf
+RMD160 (20071230/compat40-mipseb-4.0.tar.bz2) = 0ece15da35495cc1ce3e9d52482a392c5e0f8c2d
+Size (20071230/compat40-mipseb-4.0.tar.bz2) = 95186 bytes
+SHA1 (20071230/compat40-mipsel-4.0.tar.bz2) = 67b51abab5bcf252cbc3042436971a1adbd15b75
+RMD160 (20071230/compat40-mipsel-4.0.tar.bz2) = 132666f4eaf022c90abc340d4d5e0d222fd57bb8
+Size (20071230/compat40-mipsel-4.0.tar.bz2) = 96384 bytes
+SHA1 (20071230/compat40-powerpc-4.0.tar.bz2) = 37df20dd8a6adf9e10cd6249c68b6c3a397100ce
+RMD160 (20071230/compat40-powerpc-4.0.tar.bz2) = ea48f2a8cecda64cfcc4b810e8a60411059a80b6
+Size (20071230/compat40-powerpc-4.0.tar.bz2) = 100987 bytes
+SHA1 (20071230/compat40-sh3eb-4.0.tar.bz2) = 761aab766afa49864cf4e800224a59531d935d6c
+RMD160 (20071230/compat40-sh3eb-4.0.tar.bz2) = f6faf2f61610543a7ed1a560d8a0f59901eae2d7
+Size (20071230/compat40-sh3eb-4.0.tar.bz2) = 103513 bytes
+SHA1 (20071230/compat40-sh3el-4.0.tar.bz2) = 03fd74f811a692fd7383f246052b6353cefab1b3
+RMD160 (20071230/compat40-sh3el-4.0.tar.bz2) = c6dfa9b1f22f92f536499c9989b1f8e2ef02fd51
+Size (20071230/compat40-sh3el-4.0.tar.bz2) = 102351 bytes
+SHA1 (20071230/compat40-sparc-4.0.tar.bz2) = cba88e97bba4f708ea35e38ffbd7ed4341d0efe2
+RMD160 (20071230/compat40-sparc-4.0.tar.bz2) = 1266ce0e7b064e16b8aaf9044fa48c6d527e83b9
+Size (20071230/compat40-sparc-4.0.tar.bz2) = 98322 bytes
+SHA1 (20071230/compat40-sparc64-4.0.tar.bz2) = a98fe9f5383488e468d89febbe5d4af246eb1cc0
+RMD160 (20071230/compat40-sparc64-4.0.tar.bz2) = 9e6c1f45697c7327573b8b77583d8bfc0423e5bb
+Size (20071230/compat40-sparc64-4.0.tar.bz2) = 101630 bytes
+SHA1 (20071230/compat40-x86_64-4.0.tar.bz2) = 92eb513a0ec0b62127c66654b1528de6e66d6ef5
+RMD160 (20071230/compat40-x86_64-4.0.tar.bz2) = 5e28688b7f828fe176661dc876b36c8277e3f992
+Size (20071230/compat40-x86_64-4.0.tar.bz2) = 102891 bytes
diff --git a/emulators/compat40/emulator.mk b/emulators/compat40/emulator.mk
new file mode 100644
index 00000000000..003aa718d52
--- /dev/null
+++ b/emulators/compat40/emulator.mk
@@ -0,0 +1,44 @@
+# $NetBSD: emulator.mk,v 1.1 2007/12/31 20:06:40 jlam Exp $
+#
+# This file is included by netbsd-compat.mk in the emulator framework.
+#
+# Variables set by this file:
+#
+# EMUL_DISTRO
+# The NetBSD distribution used to provide the files.
+#
+# EMUL_EXEC_FMT
+# The executable format of the emulated operating system.
+#
+# EMULSUBDIR
+# Path relative to ${PREFIX} where the files and directories are
+# located, e.g. emul/aout.
+#
+# DEPENDS_${EMUL_DISTRO}.*
+# A table that maps "modules" to NetBSD package dependencies.
+#
+
+EMUL_DISTRO= netbsd-4.0
+
+EMUL_EXEC_FMT= ELF
+EMULSUBDIR= emul/netbsd
+OPSYS_EMULDIR= ${_OPSYS_EMULDIR.netbsd}
+
+# For COMPAT_NETBSD32, we always need the dependency to supply 32-bit
+# shared libaries for NetBSD-4.0.
+#
+.if ((${EMUL_ARCH} == "i386") && (${MACHINE_ARCH} == "x86_64")) || \
+ ((${EMUL_ARCH} == "sparc") && (${MACHINE_ARCH} == "sparc64"))
+EMULSUBDIR= emul/netbsd32
+OPSYS_EMULDIR= ${_OPSYS_EMULDIR.netbsd32}
+
+DEPENDS_netbsd-4.0.base?= netbsd32_compat40>=4.0:../../emulators/netbsd32_compat40
+#
+# We need to depend on the compat40 package to supply missing shared
+# libraries only on NetBSD>4.0.
+#
+.elif empty(OS_VERSION:M[0-3].*) && empty(OS_VERSION:M4.[0-9]) && \
+ empty(OS_VERSION:M4.[0-9].*) && empty(OS_VERSION:M4.[1-8][0-9].*) && \
+ empty(OS_VERSION:M4.9[0-8]*)
+DEPENDS_netbsd-4.0.base?= compat40>=4.0:../../emulators/compat40
+.endif
diff --git a/emulators/netbsd32_compat40-extras/Makefile b/emulators/netbsd32_compat40-extras/Makefile
new file mode 100644
index 00000000000..37e9a9c23ae
--- /dev/null
+++ b/emulators/netbsd32_compat40-extras/Makefile
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2007/12/31 20:06:41 jlam Exp $
+
+NETBSD_COMPAT32= yes
+
+.include "${.CURDIR}/../compat40-extras/Makefile"
diff --git a/emulators/netbsd32_compat40/Makefile b/emulators/netbsd32_compat40/Makefile
new file mode 100644
index 00000000000..6de47731e6d
--- /dev/null
+++ b/emulators/netbsd32_compat40/Makefile
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2007/12/31 20:06:41 jlam Exp $
+
+NETBSD_COMPAT32= yes
+
+.include "${.CURDIR}/../compat40/Makefile"
diff --git a/mk/emulator/netbsd-compat.mk b/mk/emulator/netbsd-compat.mk
index a88f2ad4495..6dcd25a53fd 100644
--- a/mk/emulator/netbsd-compat.mk
+++ b/mk/emulator/netbsd-compat.mk
@@ -1,4 +1,4 @@
-# $NetBSD: netbsd-compat.mk,v 1.2 2007/08/23 18:20:32 jlam Exp $
+# $NetBSD: netbsd-compat.mk,v 1.3 2007/12/31 20:06:41 jlam Exp $
#
# COMPAT_* for NetBSD -- see options(4).
#
@@ -38,6 +38,7 @@ _EMUL_PKG.compat-1.5= compat15
_EMUL_PKG.compat-1.6= compat16
_EMUL_PKG.compat-2.0= compat20
_EMUL_PKG.compat-3.0= compat30
+_EMUL_PKG.compat-4.0= compat40
_EMUL_PKG.compat= # defined, but empty
# EMUL_TYPE.netbsd can be "compat" or "compat-[0-9]*". If a particular
@@ -69,6 +70,9 @@ _EMUL_PKG.compat= # defined, but empty
. elif !empty(NETBSD_VERSION_REQD:M3.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-3.0}/emulator.mk"
+. elif !empty(NETBSD_VERSION_REQD:M4.*)
+. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-4.0}/emulator.mk"
+
. endif
.else