pkgsrc/mk/emulator/emulator-vars.mk
jlam 33f30156fb * Add new emulator framework in pkgsrc/mk/emulator that handles all
binary-only packages that require binary "emulation" on the native
  operating system.  Please see pkgsrc/mk/emulator/README for more
  details.

* Teach the plist framework to automatically use any existing
  PLIST.${EMUL_PLATFORM} as part of the default PLIST_SRC definition.

* Convert all of the binary-only packages in pkgsrc to use the
  emulator framework.  Most of them have been tested to install and
  deinstall correctly.  This involves the following cleanup actions:

    * Remove use of custom PLIST code and use PLIST.${EMUL_PLATFORM}
      more consistently.

    * Simplify packages by using default INSTALL and DEINSTALL scripts
      instead of custom INSTALL/DEINSTALL code.

    * Remove "SUSE_COMPAT32" and "PKG_OPTIONS.suse" from pkgsrc.
      Packages only need to state exactly which emulations they support,
      and the framework handles any i386-on-x86_64 or sparc-on-sparc64
      uses.

    * Remove "USE_NATIVE_LINUX" from pkgsrc.  The framework will
      automatically detect when the package is installing on Linux.

  Specific changes to packages include:

    * Bump the PKGREVISIONs for all of the suse100* and suse91* packages
      due to changes in the +INSTALL/+DEINSTALL scripts used in all
      of the packages.

    * Remove pkgsrc/emulators/suse_linux, which is unused by any
      packages.

    * cad/lc -- remove custom code to create the distinfo file for
	all supported platforms; just use "emul-fetch" and "emul-distinfo"
	instead.

    * lang/Cg-compiler -- install the shared libraries under ${EMULDIR}
	instead of ${PREFIX}/lib so that compiled programs will find
	the shared libraries.

    * mail/thunderbird-bin-nightly -- update to latest binary
	distributions for supported platforms.

    * multimedia/ns-flash -- update Linux version to 9.0.48 as the
	older version is no longer available for interactive fetch.

    * security/uvscan -- set LD_LIBRARY_PATH explicitly so that
	it's not necessary to install library symlinks into
	${EMULDIR}/usr/local/lib.

    * www/firefox-bin-flash -- update Linux version to 9.0.48 as the
	older version is no longer available for interactive fetch.
2007-07-29 05:18:36 +00:00

156 lines
4.3 KiB
Makefile

# $NetBSD: emulator-vars.mk,v 1.1 2007/07/29 05:19:42 jlam Exp $
#
# This file is included by bsd.prefs.mk only if EMUL_PLATORMS is defined
# 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".
#
# EMUL_DISTRO
# The distribution of the emulated operating system being used,
# e.g. native-linux, suse-10.0, etc. If the package isn't
# supported on this machine, then its value is "none".
#
# EMULDIR
# Convenience variable that expands to ${PREFIX}/${EMULSUBDIR}
#
# EMULSUBDIR
# Path relative to ${PREFIX} where the files and directories
# are located, e.g. emul/linux.
#
# OPSYS_EMULDIR
# Path through which the platform expects to find a "chroot"
# installation of the files and directories, e.g. /emul/linux.
#
# _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_OPSYSES
# A list of supported binary emulations.
#
# _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_OPSYSES+= bsdi
_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_OPSYSES+= darwin
_EMUL_OPSYSES+= freebsd
_EMUL_OPSYSES+= hpux
_EMUL_OPSYSES+= irix
_EMUL_OPSYSES+= linux
_EMUL_OPSYSES+= netbsd
_EMUL_OPSYSES+= osf1
_EMUL_OPSYSES+= sunos
_EMUL_OPSYSES+= solaris
_EMUL_PREFER.netbsd-alpha= osf1-alpha linux-alpha
_EMUL_PREFER.netbsd-arm= linux-arm
_EMUL_PREFER.netbsd-i386= linux-i386 freebsd-i386 solaris-i386
_EMUL_PREFER.netbsd-m68k= sunos-m68k linux-m68k
_EMUL_PREFER.netbsd-powerpc= linux-powerpc
_EMUL_PREFER.netbsd-sparc64= solaris-sparc64 solaris-sparc sunos-sparc
.if !empty(MACHINE_PLATFORM:MNetBSD-1.*-sparc*)
_EMUL_PREFER.netbsd-sparc= sunos-sparc
.else
_EMUL_PREFER.netbsd-sparc= solaris-sparc sunos-sparc
.endif
_EMUL_PREFER.netbsd-x86_64= linux-x86_64 linux-i386
_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
# _EMUL_RUN_LDCONFIG
# This is YesNo variable that is modified by makefiles in the
# emulator framework. This is used as the default value of
# RUN_LDCONFIG by any package that uses the emulator framework.
#
# Default value: no
#
_EMUL_RUN_LDCONFIG= no
.if ${EMUL_PLATFORM} == "none"
EMUL_ARCH?= none
EMUL_OPSYS?= none
EMUL_DISTRO?= none
EMULSUBDIR?= # empty
EMULDIR?= ${PREFIX}
OPSYS_EMULDIR?= # empty
.else
EMUL_ARCH?= ${EMUL_PLATFORM:C/.*-//}
EMUL_OPSYS?= ${EMUL_PLATFORM:C/-.*//}
. include "../../mk/emulator/${EMUL_OPSYS}.mk"
.endif