summaryrefslogtreecommitdiff
path: root/mk/emulator
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-08-01 16:28:08 +0000
committerjlam <jlam@pkgsrc.org>2007-08-01 16:28:08 +0000
commit8101baad23bae9da2e4b8eeaff22842eaa651415 (patch)
treec94dc724eaf481131c6d47457aedd727fea132e9 /mk/emulator
parentede3ad6e6bc7a058a0e90840a3e0efc916a49c3d (diff)
downloadpkgsrc-8101baad23bae9da2e4b8eeaff22842eaa651415.tar.gz
Support automatically using pkgsrc/emulators/darwin_lib to satisfy
EMUL_PLATFORMs darwin-i386 and darwin-powerpc.
Diffstat (limited to 'mk/emulator')
-rw-r--r--mk/emulator/darwin-opendarwin.mk20
-rw-r--r--mk/emulator/darwin.mk44
-rw-r--r--mk/emulator/emulator-vars.mk6
3 files changed, 67 insertions, 3 deletions
diff --git a/mk/emulator/darwin-opendarwin.mk b/mk/emulator/darwin-opendarwin.mk
new file mode 100644
index 00000000000..0ad79f43cae
--- /dev/null
+++ b/mk/emulator/darwin-opendarwin.mk
@@ -0,0 +1,20 @@
+# $NetBSD: darwin-opendarwin.mk,v 1.1 2007/08/01 16:28:08 jlam Exp $
+#
+# OpenDarwin
+#
+
+# EMUL_TYPE.darwin can be "opendarwin" or "opendarwin-[0-9]*". If the
+# former, then use the default OpenDarwin version, otherwise use the
+# specific version requested.
+#
+.if !empty(EMUL_TYPE.darwin:Mopendarwin-6.x)
+. include "${PKGSRCDIR}/emulators/darwin_lib/emulator.mk"
+
+.elif !empty(EMUL_TYPE.darwin:Mopendarwin)
+ # default to highest version of OpenDarwin
+. include "${PKGSRCDIR}/emulators/darwin_lib/emulator.mk"
+
+.else
+EMUL_DISTRO= opendarwin-0
+PKG_FAIL_REASON+= "[darwin-opendarwin.mk] ${EMUL_TYPE.darwin} is not a supported EMUL_TYPE.darwin"
+.endif
diff --git a/mk/emulator/darwin.mk b/mk/emulator/darwin.mk
new file mode 100644
index 00000000000..caad9ccb55c
--- /dev/null
+++ b/mk/emulator/darwin.mk
@@ -0,0 +1,44 @@
+# $NetBSD: darwin.mk,v 1.1 2007/08/01 16:28:08 jlam Exp $
+#
+# Darwin (Mac OS X) binary emulation framework
+#
+
+.if !empty(OPSYS:MDarwin*)
+EMUL_TYPE.darwin?= native
+.else
+EMUL_TYPE.darwin?= opendarwin
+.endif
+EMUL_MODULES.darwin?= # empty
+
+EMULSUBDIR= emul/darwin
+EMULDIR= ${PREFIX}/${EMULSUBDIR}
+OPSYS_EMULDIR= ${_OPSYS_EMULDIR.darwin}
+
+# _EMUL_TYPES
+# List of recognized Darwin types that a user may request.
+#
+# _EMUL_MODULES
+# List of recognized Darwin "modules" that packages may request.
+#
+_EMUL_TYPES= builtin
+_EMUL_TYPES+= native
+_EMUL_TYPES+= opendarwin
+_EMUL_TYPE?= ${EMUL_TYPE.darwin}
+
+_EMUL_MODULES= # empty
+
+.if ${_EMUL_TYPE} == "builtin"
+EMUL_DISTRO= builtin-darwin # managed outside pkgsrc
+.elif ${_EMUL_TYPE} == "native"
+EMUL_DISTRO= native-darwin # native OSF/1 (Tru64)
+EMULDIR= ${PREFIX}
+EMULSUBDIR= # empty
+.else
+. include "${PKGSRCDIR}/mk/emulator/darwin-${_EMUL_TYPE}.mk"
+.endif
+
+.if (${_EMUL_TYPE} == "builtin") || (${_EMUL_TYPE} == "native")
+. for _mod_ in ${_EMUL_MODULES}
+DEPENDS_${EMUL_DISTRO}.${_mod_}?= # empty
+. endfor
+.endif
diff --git a/mk/emulator/emulator-vars.mk b/mk/emulator/emulator-vars.mk
index 9a3d2e0a25b..ebbc043434f 100644
--- a/mk/emulator/emulator-vars.mk
+++ b/mk/emulator/emulator-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: emulator-vars.mk,v 1.2 2007/08/01 15:20:10 jlam Exp $
+# $NetBSD: emulator-vars.mk,v 1.3 2007/08/01 16:28:09 jlam Exp $
#
# This file is included by bsd.prefs.mk only if EMUL_PLATORMS is defined
# and non-empty.
@@ -89,9 +89,9 @@ _EMUL_MACHINE_PLATFORM= ${_EMUL_OPSYS}-${MACHINE_ARCH}
_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-i386= linux-i386 freebsd-i386 solaris-i386 darwin-i386
_EMUL_PREFER.netbsd-m68k= sunos-m68k linux-m68k
-_EMUL_PREFER.netbsd-powerpc= linux-powerpc
+_EMUL_PREFER.netbsd-powerpc= linux-powerpc darwin-powerpc
_EMUL_PREFER.netbsd-sparc64= solaris-sparc64 solaris-sparc sunos-sparc
.if !empty(MACHINE_PLATFORM:MNetBSD-1.*-sparc*)
_EMUL_PREFER.netbsd-sparc= sunos-sparc