blob: f2c39b23b6b3723e862977a8eb27750e13f2bd39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# $NetBSD: netbsd-compat.mk,v 1.9 2021/12/18 00:53:33 he Exp $
#
# COMPAT_* for NetBSD -- see options(4).
#
# Variables defined by this file:
#
# EMUL_EXEC_FMT
# The executable format of the emulated operating system.
#
# NATIVE_EXEC_FMT
# The executable format of the native operating system.
#
NATIVE_EXEC_FMT= ${SHLIB_TYPE}
# 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
# the specific version of NetBSD compatibility that is being built.
#
.if defined(NETBSD_PKG) && defined(NETBSD_VERSION)
EMUL_TYPE.netbsd= compat-${NETBSD_VERSION}
.endif
# The _EMUL_PKG.* table maps ${EMUL_TYPE.netbsd} to the NetBSD shared libs
# package that provides that compatibility version.
#
_EMUL_PKG.compat-1.2= compat12
_EMUL_PKG.compat-1.3= compat13
_EMUL_PKG.compat-1.4= compat14
_EMUL_PKG.compat-1.5= compat15
_EMUL_PKG.compat-1.6= compat16
_EMUL_PKG.compat-2.0= compat20
_EMUL_PKG.compat-3.0= compat30
_EMUL_PKG.compat-4.0= compat40
_EMUL_PKG.compat-5.0= compat50
_EMUL_PKG.compat-5.1= compat51
_EMUL_PKG.compat-6.0= compat60
_EMUL_PKG.compat-6.1= compat61
_EMUL_PKG.compat-8.0= compat80
_EMUL_PKG.compat-9.0= compat90
_EMUL_PKG.compat= # defined, but empty
# EMUL_TYPE.netbsd can be "compat" or "compat-[0-9]*". If a particular
# EMUL_TYPE.netbsd is requested, then always use it, regardless of the
# value of NETBSD_VERSION_REQD.
#
.if defined(_EMUL_PKG.${EMUL_TYPE.netbsd})
. if !empty(_EMUL_PKG.${EMUL_TYPE.netbsd})
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.${EMUL_TYPE.netbsd}}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M1.2*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-1.2}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M1.3*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-1.3}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M1.4*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-1.4}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M1.5*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-1.5}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M1.6*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-1.6}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M2.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-2.0}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M3.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-3.0}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M4.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-4.0}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M5.0)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-5.0}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M5.[1-9]*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-5.1}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M6.0.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-6.0}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M6.1.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-6.1}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M8.0.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-8.0}/emulator.mk"
. elif !empty(NETBSD_VERSION_REQD:M9.*)
. include "${PKGSRCDIR}/emulators/${_EMUL_PKG.compat-9.0}/emulator.mk"
. endif
.else
EMUL_DISTRO= netbsd-0
PKG_FAIL_REASON+= "[netbsd-compat.mk] ${EMUL_TYPE.netbsd} is not a supported EMUL_TYPE.netbsd"
.endif
|