1 # $NetBSD: linux.mk,v 1.18 2012/06/16 14:21:25 obache Exp $
3 # Linux binary emulation framework
6 .if
${OPSYS} == "Linux"
7 . if
${EMUL_ARCH} == ${MACHINE_ARCH}
8 EMUL_TYPE.linux?
= native
10 EMUL_TYPE.linux?
= none
14 # NetBSD 6 or later default to 12.1, otherwise 10.0
15 .if
${OPSYS} == "NetBSD" && ${EMUL_ARCH} != "powerpc"
16 . if empty
(OS_VERSION
:M
[0-5].
*)
22 .for _version_ in
${EMUL_REQD
:Msuse
>=*:S
/suse
>=//}
23 SUSE_VERSION_REQD?
= ${_version_}
25 .if
!defined
(SUSE_VERSION_REQD
) ||
${SUSE_PREFER} > ${SUSE_VERSION_REQD}
26 SUSE_VERSION_REQD
= ${SUSE_PREFER}
29 EMUL_TYPE.linux?
= suse-
${SUSE_VERSION_REQD}
31 EMUL_MODULES.linux?
= # empty
33 .if
((${EMUL_ARCH} == "i386") && (${MACHINE_ARCH} == "x86_64")) || \
34 ((${EMUL_ARCH} == "sparc") && (${MACHINE_ARCH} == "sparc64"))
36 EMULSUBDIR
= emul
/linux32
39 EMULSUBDIR
= emul
/linux
42 EMULDIR
= ${PREFIX}/${EMULSUBDIR}
43 OPSYS_EMULDIR
= ${_OPSYS_EMULDIR.
${_LINUX_BASE}}
46 # List of recognized Linux types that a user may request.
49 # List of recognized Linux "modules" that packages may request.
55 .if
!empty
(EMUL_TYPE.linux
:Msuse-
*)
58 _EMUL_TYPE?
= ${EMUL_TYPE.linux
}
61 _EMUL_MODULES
+= aspell
63 _EMUL_MODULES
+= compat
68 _EMUL_MODULES
+= fontconfig
69 _EMUL_MODULES
+= freetype2
74 _EMUL_MODULES
+= libsigc
++2
75 _EMUL_MODULES
+= locale
77 _EMUL_MODULES
+= openssl
80 _EMUL_MODULES
+= resmgr
86 .if
${_EMUL_TYPE} == "builtin"
87 EMUL_DISTRO
= builtin-linux
# managed outside pkgsrc
88 .elif
${_EMUL_TYPE} == "none"
90 NOT_FOR_PLATFORM
= Linux-
*-${MACHINE_ARCH}
91 .elif
${_EMUL_TYPE} == "native"
92 EMUL_DISTRO
= native-linux
# native Linux installation
96 .
include "linux-${_EMUL_TYPE}.mk"
99 .if
(${_EMUL_TYPE} == "builtin") ||
(${_EMUL_TYPE} == "native") || \
100 (${_EMUL_TYPE} == "none")
101 . for _mod_ in
${_EMUL_MODULES}
102 DEPENDS_
${EMUL_DISTRO}.
${_mod_}= # empty
106 .if
!defined
(EMUL_IS_NATIVE
)
107 LDCONFIG_ADD_CMD?
= ${EMULDIR}/sbin
/ldconfig
-r
${EMULDIR}
108 LDCONFIG_REMOVE_CMD?
= ${EMULDIR}/sbin
/ldconfig
-r
${EMULDIR}