2007-10-09 22:34:48 +02:00
|
|
|
# $NetBSD: emulator-vars.mk,v 1.8 2007/10/09 20:34:48 rillig Exp $
|
2007-07-29 07:18:36 +02:00
|
|
|
#
|
* Support netbsd-* as a valid platform in EMUL_PLATFORMS. Use the
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.
2007-08-22 00:49:02 +02:00
|
|
|
# This file is included by bsd.prefs.mk only if EMUL_PLATFORMS is defined
|
2007-07-29 07:18:36 +02:00
|
|
|
# and non-empty.
|
|
|
|
#
|
|
|
|
# User-settable variables:
|
|
|
|
#
|
|
|
|
# EMUL_TYPE.${EMUL_OPSYS}
|
|
|
|
# Specifies the "type" or "variant" of ${EMUL_OPSYS} to use, e.g.
|
|
|
|
# ${EMUL_TYPE.linux} == "suse".
|
|
|
|
#
|
|
|
|
# EMUL_PLATFORM
|
|
|
|
# Specifies the platform to emulate, and is of the form
|
|
|
|
# ${EMUL_OPSYS}-${EMUL_ARCH}, e.g. linux-i386. By default
|
|
|
|
# this is the best-matching platform listed in EMUL_PLATFORMS
|
|
|
|
# chosen based on EMUL_PREFER.
|
|
|
|
#
|
|
|
|
# EMUL_PREFER
|
|
|
|
# The list of platforms to try to emulate in order of preference.
|
|
|
|
# By default, only try to emulate the native platform. See the
|
|
|
|
# _EMUL_PREFER.* table below for additional preferences for various
|
|
|
|
# platforms.
|
|
|
|
#
|
|
|
|
# Package-settable variables:
|
|
|
|
#
|
|
|
|
# EMUL_PLATFORMS
|
|
|
|
# List of "${EMUL_OPSYS}-${EMUL_ARCH}" binary emulations supported
|
|
|
|
# by the package. This should be set prior to the inclusion of
|
|
|
|
# bsd.prefs.mk.
|
|
|
|
#
|
|
|
|
# Default value: undefined
|
|
|
|
#
|
|
|
|
# Variables defined by this file:
|
|
|
|
#
|
|
|
|
# EMUL_ARCH
|
|
|
|
# The machine architecture being emulated, e.g. i386. If the
|
|
|
|
# package isn't supported on this machine, then its value is
|
|
|
|
# "none".
|
|
|
|
#
|
|
|
|
# EMUL_OPSYS
|
|
|
|
# The operating system being emulated, e.g. linux. If the
|
|
|
|
# package isn't supported on this machine, then its value is
|
|
|
|
# "none".
|
|
|
|
#
|
2007-08-23 15:43:57 +02:00
|
|
|
# EMUL_IS_NATIVE
|
|
|
|
# Whether or not the operating system being emulated matches the
|
|
|
|
# native operating system. It is either defined or undefined.
|
|
|
|
#
|
2007-07-29 07:18:36 +02:00
|
|
|
|
2007-10-09 22:34:48 +02:00
|
|
|
_VARGROUPS+= emulator
|
|
|
|
_USER_VARS.emulator= EMUL_TYPE.${EMUL_OPSYS} EMUL_PLATFORM EMUL_PREFER
|
|
|
|
_PKG_VARS.emulator= EMUL_PLATFORMS
|
|
|
|
_SYS_VARS.emulator= EMUL_ARCH EMUL_OPSYS EMUL_IS_NATIVE
|
|
|
|
|
2007-07-29 07:18:36 +02:00
|
|
|
# _EMUL_OPSYS
|
|
|
|
# A table that maps ${OPSYS} to the operating system names
|
|
|
|
# (${EMUL_OPSYS}) used by the emulator framework.
|
|
|
|
#
|
|
|
|
# _EMUL_MACHINE_PLATFORM
|
|
|
|
# An "opsys-arch" pair that describes the "native" platform.
|
|
|
|
#
|
|
|
|
# _EMUL_PREFER.*
|
|
|
|
# A table that maps ${_EMUL_MACHINE_PLATFORM} to a list of
|
|
|
|
# platforms to try to emulate on the native platform, excluding
|
|
|
|
# itself.
|
|
|
|
#
|
|
|
|
_EMUL_OPSYS.HPUX= hpux
|
|
|
|
_EMUL_OPSYS.IRIX= irix
|
|
|
|
_EMUL_OPSYS.OSF1= osf1
|
|
|
|
.if !empty(OS_VERSION:M4.*)
|
|
|
|
_EMUL_OPSYS.SunOS= sunos
|
|
|
|
.else
|
|
|
|
_EMUL_OPSYS.SunOS= solaris
|
|
|
|
.endif
|
|
|
|
.if defined(_EMUL_OPSYS.${OPSYS})
|
|
|
|
_EMUL_OPSYS= ${_EMUL_OPSYS.${OPSYS}}
|
|
|
|
.else
|
|
|
|
_EMUL_OPSYS= ${LOWER_OPSYS}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
_EMUL_MACHINE_PLATFORM= ${_EMUL_OPSYS}-${MACHINE_ARCH}
|
|
|
|
|
|
|
|
_EMUL_PREFER.netbsd-alpha= osf1-alpha linux-alpha
|
|
|
|
_EMUL_PREFER.netbsd-arm= linux-arm
|
2007-08-01 18:28:08 +02:00
|
|
|
_EMUL_PREFER.netbsd-i386= linux-i386 freebsd-i386 solaris-i386 darwin-i386
|
2007-07-29 07:18:36 +02:00
|
|
|
_EMUL_PREFER.netbsd-m68k= sunos-m68k linux-m68k
|
2007-08-01 18:28:08 +02:00
|
|
|
_EMUL_PREFER.netbsd-powerpc= linux-powerpc darwin-powerpc
|
* Support netbsd-* as a valid platform in EMUL_PLATFORMS. Use the
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.
2007-08-22 00:49:02 +02:00
|
|
|
_EMUL_PREFER.netbsd-sparc64= netbsd-sparc solaris-sparc64 solaris-sparc sunos-sparc
|
2007-07-29 07:18:36 +02:00
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-1.*-sparc*)
|
|
|
|
_EMUL_PREFER.netbsd-sparc= sunos-sparc
|
|
|
|
.else
|
|
|
|
_EMUL_PREFER.netbsd-sparc= solaris-sparc sunos-sparc
|
|
|
|
.endif
|
* Support netbsd-* as a valid platform in EMUL_PLATFORMS. Use the
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.
2007-08-22 00:49:02 +02:00
|
|
|
_EMUL_PREFER.netbsd-x86_64= netbsd-i386 linux-x86_64 linux-i386
|
2007-07-29 07:18:36 +02:00
|
|
|
|
2007-08-04 01:16:02 +02:00
|
|
|
_EMUL_PREFER.dragonfly-i386= linux-i386
|
|
|
|
|
2007-07-29 07:18:36 +02:00
|
|
|
_EMUL_PREFER.solaris-sparc64= solaris-sparc
|
|
|
|
_EMUL_PREFER.solaris-x86_64= solaris-i386
|
|
|
|
|
|
|
|
_EMUL_PREFER.linux-sparc64= linux-sparc
|
|
|
|
_EMUL_PREFER.linux-x86_64= linux-i386
|
|
|
|
|
|
|
|
# Prefer "emulating" the native operating system, then fall back to
|
|
|
|
# the other preferences listed above.
|
|
|
|
#
|
|
|
|
EMUL_PREFER?= ${_EMUL_MACHINE_PLATFORM} \
|
|
|
|
${_EMUL_PREFER.${_EMUL_MACHINE_PLATFORM}}
|
|
|
|
|
|
|
|
.for _platform_ in ${EMUL_PREFER}
|
|
|
|
. if !empty(EMUL_PLATFORMS:M${_platform_})
|
|
|
|
EMUL_PLATFORM?= ${_platform_}
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
EMUL_PLATFORM?= none
|
|
|
|
|
|
|
|
.if ${EMUL_PLATFORM} == "none"
|
|
|
|
EMUL_ARCH?= none
|
|
|
|
EMUL_OPSYS?= none
|
|
|
|
.else
|
|
|
|
EMUL_ARCH?= ${EMUL_PLATFORM:C/.*-//}
|
|
|
|
EMUL_OPSYS?= ${EMUL_PLATFORM:C/-.*//}
|
|
|
|
.endif
|
2007-08-23 15:43:57 +02:00
|
|
|
|
|
|
|
.if ${_EMUL_OPSYS} == ${EMUL_OPSYS}
|
|
|
|
EMUL_IS_NATIVE= defined
|
|
|
|
.endif
|