summaryrefslogtreecommitdiff
path: root/mk/emulator
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-08-23 18:20:30 +0000
committerjlam <jlam@pkgsrc.org>2007-08-23 18:20:30 +0000
commit081c0f895704db5ee92950c14036f96033fb55fd (patch)
treec6706bd84a98810ed13e7d11701dcd7444995ccb /mk/emulator
parent4fd552cb21dfeb2898d90d53d46868981644b7c9 (diff)
downloadpkgsrc-081c0f895704db5ee92950c14036f96033fb55fd.tar.gz
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.
Diffstat (limited to 'mk/emulator')
-rw-r--r--mk/emulator/emulator.mk6
-rw-r--r--mk/emulator/linux-suse.mk5
-rw-r--r--mk/emulator/netbsd-compat.mk6
3 files changed, 14 insertions, 3 deletions
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