From 797811e459b3190957546edcfc131ce88f4ef0de Mon Sep 17 00:00:00 2001 From: jlam Date: Thu, 23 Aug 2007 18:20:30 +0000 Subject: Allow a nicer syntax for expressing needing at least a certain version of an emulated operating system. Instead of proliferating things like SUSE_VERSION_REQD, NETBSD_VERSION_REQD, SOLARIS_VERSION_REQD, etc., a package can say: EMUL_REQD= suse>=9.1 netbsd>=2.0 solaris>=10 all in one, succinct line. --- mk/emulator/emulator.mk | 6 +++++- mk/emulator/linux-suse.mk | 5 ++++- mk/emulator/netbsd-compat.mk | 6 +++++- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'mk') diff --git a/mk/emulator/emulator.mk b/mk/emulator/emulator.mk index 6dd1a707217..b9952c3fee3 100644 --- a/mk/emulator/emulator.mk +++ b/mk/emulator/emulator.mk @@ -1,9 +1,13 @@ -# $NetBSD: emulator.mk,v 1.7 2007/08/23 17:39:47 jlam Exp $ +# $NetBSD: emulator.mk,v 1.8 2007/08/23 18:20:36 jlam Exp $ # # This file is included by bsd.pkg.mk. # # Package-settable variables: # +# EMUL_REQD +# List of required versions for different emulation types, e.g +# suse>=10.0, netbsd>=1.2, etc. +# # EMUL_MODULES.${EMUL_OPSYS} # List of modules of ${EMUL_OPSYS} that are used by the package. # diff --git a/mk/emulator/linux-suse.mk b/mk/emulator/linux-suse.mk index bc181cf4614..9529695ee48 100644 --- a/mk/emulator/linux-suse.mk +++ b/mk/emulator/linux-suse.mk @@ -1,9 +1,12 @@ -# $NetBSD: linux-suse.mk,v 1.1 2007/07/29 05:19:42 jlam Exp $ +# $NetBSD: linux-suse.mk,v 1.2 2007/08/23 18:20:32 jlam Exp $ # # SuSE Linux # # Most Linux software only need suse>=6.4. +.for _version_ in ${EMUL_REQD:Msuse>=*:S/suse>=//} +SUSE_VERSION_REQD?= ${_version_} +.endfor SUSE_VERSION_REQD?= 6.4 # When building the SuSE packages, force the Linux type to be the specific diff --git a/mk/emulator/netbsd-compat.mk b/mk/emulator/netbsd-compat.mk index 7b7e78dbd36..a88f2ad4495 100644 --- a/mk/emulator/netbsd-compat.mk +++ b/mk/emulator/netbsd-compat.mk @@ -1,4 +1,4 @@ -# $NetBSD: netbsd-compat.mk,v 1.1 2007/08/21 22:49:33 jlam Exp $ +# $NetBSD: netbsd-compat.mk,v 1.2 2007/08/23 18:20:32 jlam Exp $ # # COMPAT_* for NetBSD -- see options(4). # @@ -15,6 +15,10 @@ NATIVE_EXEC_FMT= ${_NATIVE_EXEC_FMT_cmd:sh} _NATIVE_EXEC_FMT_cmd= sh ${.CURDIR}/../../mk/scripts/shlib-type \ ${_OPSYS_SHLIB_TYPE:Q} ${MAKE:Q} +# Most NetBSD (i386) software need netbsd>=1.6 +.for _version_ in ${EMUL_REQD:Mnetbsd>=*:S/netbsd>=//} +NETBSD_VERSION_REQD?= ${_version_} +.endfor NETBSD_VERSION_REQD?= 1.6 # When building a NetBSD "compat" package, force the NetBSD type to be -- cgit v1.2.3