Skip to content

Commit

Permalink
* Support netbsd-* as a valid platform in EMUL_PLATFORMS. Use the
Browse files Browse the repository at this point in the history
  pkgsrc/emulator/compat* and pkgsrc/emulator/netbsd32_compat* packages
  to provide the necessary shared libraries to run dynamically linked
  NetBSD binaries from the days of yore.

* Add some additional compat* packages for completeness:

	compat15, compat20, compat30

* Modify the compat* packages so that "compatNM" only provides files
  that aren't in "NetBSD-N.(M+1)".  For example, compat12 only provides
  files that don't exist in NetBSD-1.3.x, compat13 only provides files
  that don't exist in NetBSD-1.4.x, etc.

  As a result, if you are running NetBSD-3.0/alpha and want to run a
  1.3 dynamically linked binary, there is an automatic dependency
  chain that causes the following packages to be installed:

	compat13, compat14, compat15, compat16, compat20

  There are some deviations from this dependency chain on platforms
  that have changed executable formats, e.g. i386, m68, sparc, etc.
  However, in general pkgsrc will require that you have the necessary
  COMPAT_* options in your kernel to match the installed compat*
  packages.  This restriction is an artificial one imposed by pkgsrc,
  but allows for a single set of distfiles to be used on all versions
  of NetBSD.

* Provide compat* package support for every supported architecture
  of NetBSD.  Verily, it is now possible to run 1.2 binaries on
  NetBSD-1.5.3/pc532 by installing the compat12 package from pkgsrc.
  Rejoice, one and all!

* The netbsd32_compat* packages mirror the corresponding compat*
  packages for use by sparc64 and x86_64 to allow running 32-bit
  binaries with COMPAT_NETBSD32 kernel support.  The "extras" packages
  supply the additional shared libraries from the corresponding release
  of NetBSD so that the set of files in /emul/netbsd32 will be complete.

* pkgsrc/emulators/compat_netbsd contains infrastructure files shared
  by all of the compat* packages.
  • Loading branch information
jlam committed Aug 21, 2007
1 parent 74b9ae8 commit 06dbf3f
Show file tree
Hide file tree
Showing 166 changed files with 3,633 additions and 1,369 deletions.
22 changes: 21 additions & 1 deletion doc/CHANGES-2007
@@ -1,4 +1,4 @@
$NetBSD: CHANGES-2007,v 1.1852 2007/08/21 15:44:27 abs Exp $
$NetBSD: CHANGES-2007,v 1.1853 2007/08/21 22:49:02 jlam Exp $

Changes to the packages collection and infrastructure in 2007:

Expand Down Expand Up @@ -3385,3 +3385,23 @@ Changes to the packages collection and infrastructure in 2007:
Added devel/bazaar version 0.90rc1 [agc 2007-08-20]
Updated devel/svk to 2.0.2 [bad 2007-08-21]
Updated devel/cpuflags to 1.12 [abs 2007-08-21]
Updated emulators/compat12 to 1.2.1 [jlam 2007-08-21]
Updated emulators/compat13 to 1.3.3 [jlam 2007-08-21]
Updated emulators/compat14 to 1.4.3 [jlam 2007-08-21]
Added emulators/compat15 version 1.5.3 [jlam 2007-08-21]
Added emulators/compat15-extras version 1.5.3 [jlam 2007-08-21]
Updated emulators/compat16 to 1.6.2 [jlam 2007-08-21]
Added emulators/compat16-extras version 1.6.2 [jlam 2007-08-21]
Added emulators/compat20 version 2.1 [jlam 2007-08-21]
Added emulators/compat20-extras version 2.1 [jlam 2007-08-21]
Added emulators/compat30 version 3.1 [jlam 2007-08-21]
Added emulators/compat30-extras version 3.1 [jlam 2007-08-21]
Removed emulators/netbsd32_compat14 [jlam 2007-08-21]
Added emulators/netbsd32_compat15 version 1.5.3 [jlam 2007-08-21]
Added emulators/netbsd32_compat15-extras version 1.5.3 [jlam 2007-08-21]
Updated emulators/netbsd32_compat16 to 1.6.2 [jlam 2007-08-21]
Added emulators/netbsd32_compat16-extras version 1.6.2 [jlam 2007-08-21]
Added emulators/netbsd32_compat20 version 2.1 [jlam 2007-08-21]
Added emulators/netbsd32_compat20-extras version 2.1 [jlam 2007-08-21]
Added emulators/netbsd32_compat30 version 3.1 [jlam 2007-08-21]
Added emulators/netbsd32_compat30-extras version 3.1 [jlam 2007-08-21]
17 changes: 15 additions & 2 deletions emulators/Makefile
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.162 2007/08/16 14:01:38 jlam Exp $
# $NetBSD: Makefile,v 1.163 2007/08/21 22:49:03 jlam Exp $
#

COMMENT= Emulators for other operating systems
Expand All @@ -24,7 +24,15 @@ SUBDIR+= ckmame
SUBDIR+= compat12
SUBDIR+= compat13
SUBDIR+= compat14
SUBDIR+= compat15
SUBDIR+= compat15-extras
SUBDIR+= compat16
SUBDIR+= compat16-extras
SUBDIR+= compat20
SUBDIR+= compat20-extras
SUBDIR+= compat30
SUBDIR+= compat30-extras
#SUBDIR+= compat_netbsd # only contains Makefile fragments
SUBDIR+= cygwin_esound
SUBDIR+= cygwin_lib
SUBDIR+= darcnes
Expand Down Expand Up @@ -63,9 +71,14 @@ SUBDIR+= makeppf
SUBDIR+= mednafen
SUBDIR+= minivmac
SUBDIR+= mmix
SUBDIR+= netbsd32_compat14
SUBDIR+= netbsd32_compat15
SUBDIR+= netbsd32_compat15-extras
SUBDIR+= netbsd32_compat16
SUBDIR+= netbsd32_compat16-extras
SUBDIR+= netbsd32_compat20
SUBDIR+= netbsd32_compat20-extras
SUBDIR+= netbsd32_compat30
SUBDIR+= netbsd32_compat30-extras
SUBDIR+= openmsx
SUBDIR+= or1ksim
SUBDIR+= osf1_lib
Expand Down
14 changes: 0 additions & 14 deletions emulators/compat12/DEINSTALL

This file was deleted.

7 changes: 2 additions & 5 deletions emulators/compat12/DESCR
@@ -1,5 +1,2 @@
This package supplies the user files necessary for full compatibility with
dynamically linked executables compiled under NetBSD 1.1 through 1.2.1.
You still need the option COMPAT_12 in your kernel configuration (and
probably others; see options(4) for more information) to make use of
NetBSD 1.2 binaries.
This package supplies the user files needed to run dynamically linked
executables compiled under NetBSD 1.1 through 1.2.
50 changes: 0 additions & 50 deletions emulators/compat12/INSTALL

This file was deleted.

7 changes: 7 additions & 0 deletions emulators/compat12/MESSAGE
@@ -0,0 +1,7 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2007/08/21 22:49:03 jlam Exp $

The COMPAT_12 option must be included in the kernel configuration (and
possibly others; see options(4) for more information) to make use of
NetBSD 1.2 binaries.
===========================================================================
61 changes: 24 additions & 37 deletions emulators/compat12/Makefile
@@ -1,44 +1,31 @@
# $NetBSD: Makefile,v 1.32 2006/10/19 19:37:38 wiz Exp $
#
# $NetBSD: Makefile,v 1.33 2007/08/21 22:49:04 jlam Exp $

DISTNAME= compat12-${MACHINE_ARCH}
PKGNAME= compat12-1.2.1
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_LOCAL}
DISTNAME= compat12 # overridden below
NETBSD_VERSION= 1.2
PKGREVISION= 1

MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.NetBSD.org/Releases/formal-1.2/index.html
COMMENT= Shared libraries for NetBSD 1.2 (and earlier) compatibility

ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-m68k NetBSD-*-ns32k \
NetBSD-*-sparc
NO_SRC_ON_FTP= Already in MASTER_SITE_LOCAL

NO_BUILD= yes
NO_MTREE= yes
CHECK_SHLIBS_SUPPORTED= no

FILES_SUBST+= COMPAT_LIBDIR=${COMPAT_LIBDIR:Q}
FILES_SUBST+= MACHINE_ARCH=${MACHINE_ARCH:Q}
FILES_SUBST+= OBJECT_FMT=${OBJECT_FMT:Q}
FILES_SUBST+= LDCONFIG=${LDCONFIG:Q}

.include "../../mk/bsd.prefs.mk"

# This installs in /usr (or /emul/aout/usr) to avoid dynamic linker annoyances
.if ${OBJECT_FMT} == "ELF" && \
(${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "sparc")
EMULSUBDIR= emul/aout
COMPAT_LIBDIR= ${EMULSUBDIR}/usr/lib
.elif ${OPSYS} == "NetBSD"
LOCALBASE= /usr
COMPAT_LIBDIR= lib
.endif
COMMENT= Shared libraries for NetBSD 1.2 compatibility

EMUL_PLATFORMS= netbsd-i386 netbsd-m68k netbsd-ns32k netbsd-sparc

ONLY_FOR_PLATFORM= NetBSD-1.2[A-Z]*-* NetBSD-1.[3-9]*-* \
NetBSD-[2-9]*-* NetBSD-[1-9][0-9]*-*

PLIST_SUBST+= COMPAT_LIBDIR=${COMPAT_LIBDIR:Q}
.include "../../emulators/compat_netbsd/Makefile.common"

do-install:
${INSTALL_DATA_DIR} ${PREFIX}/${COMPAT_LIBDIR}
${INSTALL_DATA} ${WRKDIR}/lib*.so* ${PREFIX}/${COMPAT_LIBDIR}
.if (${EMUL_PLATFORM} == "netbsd-ns32k")
DISTNAME= compat12-${EMUL_ARCH}-1.2
.else
DISTNAME= compat12-${EMUL_ARCH}-1.2.1
.endif

# We need to depend on the compat13 package to supply shared libraries
# missing from compat12 on NetBSD>1.3.
#
.if empty(OS_VERSION:M0.[0-9]*) && empty(OS_VERSION:M1.[0-2]*) && \
empty(OS_VERSION:M1.3) && empty(OS_VERSION:M1.3.*)
DEPENDS+= compat13>=1.3:../../emulators/compat13
.endif

.include "../../mk/bsd.pkg.mk"
5 changes: 0 additions & 5 deletions emulators/compat12/PLIST

This file was deleted.

7 changes: 7 additions & 0 deletions emulators/compat12/PLIST.a.out
@@ -0,0 +1,7 @@
@comment $NetBSD: PLIST.a.out,v 1.1 2007/08/21 22:49:04 jlam Exp $
${EMULSUBDIRSLASH}usr/lib/libedit.so.0.0
${EMULSUBDIRSLASH}usr/lib/libg++.so.2.0
${EMULSUBDIRSLASH}usr/lib/libg++.so.3.0
${EMULSUBDIRSLASH}usr/lib/libutil.so.3.2
@dirrm ${EMULSUBDIRSLASH}usr/lib
@dirrm ${EMULSUBDIRSLASH}usr
2 changes: 2 additions & 0 deletions emulators/compat12/PLIST.i386
@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST.i386,v 1.1 2007/08/21 22:49:04 jlam Exp $
${EMULSUBDIRSLASH}usr/lib/libkafs.so.2.0
3 changes: 3 additions & 0 deletions emulators/compat12/PLIST.m68k
@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST.m68k,v 1.1 2007/08/21 22:49:04 jlam Exp $
${EMULSUBDIRSLASH}usr/lib/libkafs.so.2.0
${EMULSUBDIRSLASH}usr/lib/libkvm.so.4.0
2 changes: 2 additions & 0 deletions emulators/compat12/PLIST.ns32k
@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST.ns32k,v 1.1 2007/08/21 22:49:04 jlam Exp $
${EMULSUBDIRSLASH}usr/lib/libkvm.so.4.0
2 changes: 2 additions & 0 deletions emulators/compat12/PLIST.sparc
@@ -0,0 +1,2 @@
@comment $NetBSD: PLIST.sparc,v 1.1 2007/08/21 22:49:05 jlam Exp $
${EMULSUBDIRSLASH}usr/lib/libkvm.so.4.0
26 changes: 13 additions & 13 deletions emulators/compat12/distinfo
@@ -1,14 +1,14 @@
$NetBSD: distinfo,v 1.4 2005/10/23 14:32:06 rillig Exp $
$NetBSD: distinfo,v 1.5 2007/08/21 22:49:05 jlam Exp $

SHA1 (compat12-i386.tar.gz) = bce1f72c4fd9cdbe25a219a65ee0af7dd5257f16
RMD160 (compat12-i386.tar.gz) = 63ea39032c6ea1a514aea0e80494d3910b31b33f
Size (compat12-i386.tar.gz) = 285376 bytes
SHA1 (compat12-m68k.tar.gz) = d319f63b47dbf28692796be296bbf7fcba2e5b4f
RMD160 (compat12-m68k.tar.gz) = 55bb1555c20f617f950a917c2ebdf35ae5a7bcea
Size (compat12-m68k.tar.gz) = 277202 bytes
SHA1 (compat12-ns32k.tar.gz) = 66cb355f99369d2ce0a0e07c0f97593d57a5c2f1
RMD160 (compat12-ns32k.tar.gz) = 688e2b2b812945861a289a8bc8459c7b1116bdee
Size (compat12-ns32k.tar.gz) = 267367 bytes
SHA1 (compat12-sparc.tar.gz) = 4af06ed70c66af5d676b292fe24dd0f945337916
RMD160 (compat12-sparc.tar.gz) = e8e6d4a8b090e1f4bac9783ed49813bda70d52b7
Size (compat12-sparc.tar.gz) = 298095 bytes
SHA1 (compat12-i386-1.2.1.tar.bz2) = 84a9c002fc3a67f5a6eccbaee395f01980d562f8
RMD160 (compat12-i386-1.2.1.tar.bz2) = 38c9d8dd303f6e8d14837cbc205bb5bbeb23449c
Size (compat12-i386-1.2.1.tar.bz2) = 243236 bytes
SHA1 (compat12-m68k-1.2.1.tar.bz2) = 0cccfcff8e7fea3177fa963afbed44aa16923cb0
RMD160 (compat12-m68k-1.2.1.tar.bz2) = 1ca54e91cb4d0025d30e30ed1fe02438d82a6b82
Size (compat12-m68k-1.2.1.tar.bz2) = 240457 bytes
SHA1 (compat12-ns32k-1.2.tar.bz2) = dfcd0f03e554dec5622a4e1a12b27cdbf467714b
RMD160 (compat12-ns32k-1.2.tar.bz2) = 3d0b27a62b825a297b9592730302f7492d94274e
Size (compat12-ns32k-1.2.tar.bz2) = 235752 bytes
SHA1 (compat12-sparc-1.2.1.tar.bz2) = fe9b7b34b71332cdf1cf7a86f10ea1ce7be015b6
RMD160 (compat12-sparc-1.2.1.tar.bz2) = d7d19aa0d5ed30185f16b4504474a82183f3a40a
Size (compat12-sparc-1.2.1.tar.bz2) = 255268 bytes
51 changes: 51 additions & 0 deletions emulators/compat12/emulator.mk
@@ -0,0 +1,51 @@
# $NetBSD: emulator.mk,v 1.1 2007/08/21 22:49:05 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.
#
# OPSYS_EMULDIR
# Path through which the platform expects to find a "chroot"
# installation of the files and directories, e.g. /emul/aout.
#
# DEPENDS_${EMUL_DISTRO}.*
# A table that maps "modules" to NetBSD package dependencies.
#

EMUL_DISTRO= netbsd-1.2

# i386 and sparc switched from a.out to ELF post-1.4.
# arm, m68k and vax switched from a.out to ELF post-1.5.
# ns32k never switched from a.out.
#
.if (${EMUL_ARCH} == "arm") || (${EMUL_ARCH} == "i386") || \
(${EMUL_ARCH} == "m68k") || (${EMUL_ARCH} == "ns32k") || \
(${EMUL_ARCH} == "sparc") || (${EMUL_ARCH} == "vax")
EMUL_EXEC_FMT= a.out
.else
EMUL_EXEC_FMT= ELF
.endif

.if (${NATIVE_EXEC_FMT} == "ELF") && (${EMUL_EXEC_FMT} == "a.out")
EMULSUBDIR= emul/aout
OPSYS_EMULDIR= ${_OPSYS_EMULDIR.aout}
.else
EMULSUBDIR= emul/netbsd
OPSYS_EMULDIR= ${_OPSYS_EMULDIR.netbsd}
.endif

# We need a dependency only for NetBSD>=1.3.
.if empty(OS_VERSION:M0.[0-9]*) && empty(OS_VERSION:M1.[0-1]*) && \
empty(OS_VERSION:M1.2) && empty(OS_VERSION:M1.2.*)
DEPENDS_netbsd-1.2.base?= compat12>=1.2:../../emulators/compat12
.endif
21 changes: 0 additions & 21 deletions emulators/compat13/DEINSTALL

This file was deleted.

6 changes: 2 additions & 4 deletions emulators/compat13/DESCR
@@ -1,4 +1,2 @@
This package supplies the user files necessary for full compatibility with
dynamically linked executables compiled under NetBSD 1.3. You still need
the option COMPAT_13 in your kernel configuration (and probably others;
see options(4) for more information) to make use of NetBSD 1.3 binaries.
This package supplies the user files needed to run dynamically linked
executables compiled under NetBSD 1.3.

0 comments on commit 06dbf3f

Please sign in to comment.