summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2012-01-18 00:52:20 +0000
committersbd <sbd@pkgsrc.org>2012-01-18 00:52:20 +0000
commit893a3fd469f5e32966f4aea552db656a2bf063ba (patch)
treee373188958c77e9dfb2c595bfd9e3116d7bb6e91 /mk
parentc27b72befa07f87fc941566863c3c2ca0b59de97 (diff)
downloadpkgsrc-893a3fd469f5e32966f4aea552db656a2bf063ba.tar.gz
While 64bit Linux systems can emulate 32bit systems the EMUL_TYPE is not
"native" it's "builtin". So if Linux emulation is wanted on a Linux system set EMUL_TYPE.linux to "native" if the EMUL_ARCH and MACHINE_ARCH are the same, otherwise set it to "none". If the EMUL_TYPE is 'none' disable the package by setting NOT_FOR_PLATFORM to this platform. If someone wants to use Linux 32bit "builtin" emulation they should ensure that the native 32bit library packages that are needed are installed (e.g. libc6-i386 ... ) and put "EMUL_TYPE.linux=builtin" in mk.conf.
Diffstat (limited to 'mk')
-rw-r--r--mk/emulator/linux.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/emulator/linux.mk b/mk/emulator/linux.mk
index bdc3f70a0ac..858f030271d 100644
--- a/mk/emulator/linux.mk
+++ b/mk/emulator/linux.mk
@@ -1,10 +1,14 @@
-# $NetBSD: linux.mk,v 1.13 2012/01/18 00:37:46 sbd Exp $
+# $NetBSD: linux.mk,v 1.14 2012/01/18 00:52:20 sbd Exp $
#
# Linux binary emulation framework
#
.if ${OPSYS} == "Linux"
+. if ${EMUL_ARCH} == ${MACHINE_ARCH}
EMUL_TYPE.linux?= native
+. else
+EMUL_TYPE.linux?= none
+. endif
.else
# NetBSD 5.99.50 or later default to 11.3, otherwise 10.0
@@ -86,6 +90,9 @@ _EMUL_MODULES+= xml2
.if ${_EMUL_TYPE} == "builtin"
EMUL_DISTRO= builtin-linux # managed outside pkgsrc
+.elif ${_EMUL_TYPE} == "none"
+EMUL_DISTRO= none
+NOT_FOR_PLATFORM= Linux-*-${MACHINE_ARCH}
.elif ${_EMUL_TYPE} == "native"
EMUL_DISTRO= native-linux # native Linux installation
EMULDIR= ${PREFIX}
@@ -94,7 +101,8 @@ EMULSUBDIR= # empty
. include "linux-${_EMUL_TYPE}.mk"
.endif
-.if (${_EMUL_TYPE} == "builtin") || (${_EMUL_TYPE} == "native")
+.if (${_EMUL_TYPE} == "builtin") || (${_EMUL_TYPE} == "native") || \
+ (${_EMUL_TYPE} == "none")
. for _mod_ in ${_EMUL_MODULES}
DEPENDS_${EMUL_DISTRO}.${_mod_}= # empty
. endfor