Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / emulator / linux.mk
blob5bc40d8e6bc4fc491c98091c118eb0b431e9c15d
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
9 . else
10 EMUL_TYPE.linux?= none
11 . endif
12 .else
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].*)
17 SUSE_PREFER?= 12.1
18 . endif
19 .endif
20 SUSE_PREFER?= 10.0
22 .for _version_ in ${EMUL_REQD:Msuse>=*:S/suse>=//}
23 SUSE_VERSION_REQD?= ${_version_}
24 .endfor
25 .if !defined(SUSE_VERSION_REQD) || ${SUSE_PREFER} > ${SUSE_VERSION_REQD}
26 SUSE_VERSION_REQD= ${SUSE_PREFER}
27 .endif
29 EMUL_TYPE.linux?= suse-${SUSE_VERSION_REQD}
30 .endif
31 EMUL_MODULES.linux?= # empty
33 .if ((${EMUL_ARCH} == "i386") && (${MACHINE_ARCH} == "x86_64")) || \
34 ((${EMUL_ARCH} == "sparc") && (${MACHINE_ARCH} == "sparc64"))
35 _LINUX_BASE= linux32
36 EMULSUBDIR= emul/linux32
37 .else
38 _LINUX_BASE= linux
39 EMULSUBDIR= emul/linux
40 .endif
42 EMULDIR= ${PREFIX}/${EMULSUBDIR}
43 OPSYS_EMULDIR= ${_OPSYS_EMULDIR.${_LINUX_BASE}}
45 # _EMUL_TYPES
46 # List of recognized Linux types that a user may request.
48 # _EMUL_MODULES
49 # List of recognized Linux "modules" that packages may request.
51 _EMUL_TYPES= builtin
52 _EMUL_TYPES+= native
53 _EMUL_TYPES+= suse
55 .if !empty(EMUL_TYPE.linux:Msuse-*)
56 _EMUL_TYPE?= suse
57 .endif
58 _EMUL_TYPE?= ${EMUL_TYPE.linux}
60 _EMUL_MODULES= alsa
61 _EMUL_MODULES+= aspell
62 _EMUL_MODULES+= base
63 _EMUL_MODULES+= compat
64 _EMUL_MODULES+= cups
65 _EMUL_MODULES+= curl
66 _EMUL_MODULES+= drm
67 _EMUL_MODULES+= expat
68 _EMUL_MODULES+= fontconfig
69 _EMUL_MODULES+= freetype2
70 _EMUL_MODULES+= glx
71 _EMUL_MODULES+= gtk2
72 _EMUL_MODULES+= jpeg
73 _EMUL_MODULES+= krb5
74 _EMUL_MODULES+= libsigc++2
75 _EMUL_MODULES+= locale
76 _EMUL_MODULES+= motif
77 _EMUL_MODULES+= openssl
78 _EMUL_MODULES+= png
79 _EMUL_MODULES+= qt4
80 _EMUL_MODULES+= resmgr
81 _EMUL_MODULES+= slang
82 _EMUL_MODULES+= tiff
83 _EMUL_MODULES+= x11
84 _EMUL_MODULES+= xml2
86 .if ${_EMUL_TYPE} == "builtin"
87 EMUL_DISTRO= builtin-linux # managed outside pkgsrc
88 .elif ${_EMUL_TYPE} == "none"
89 EMUL_DISTRO= none
90 NOT_FOR_PLATFORM= Linux-*-${MACHINE_ARCH}
91 .elif ${_EMUL_TYPE} == "native"
92 EMUL_DISTRO= native-linux # native Linux installation
93 EMULDIR= ${PREFIX}
94 EMULSUBDIR= # empty
95 .else
96 . include "linux-${_EMUL_TYPE}.mk"
97 .endif
99 .if (${_EMUL_TYPE} == "builtin") || (${_EMUL_TYPE} == "native") || \
100 (${_EMUL_TYPE} == "none")
101 . for _mod_ in ${_EMUL_MODULES}
102 DEPENDS_${EMUL_DISTRO}.${_mod_}= # empty
103 . endfor
104 .endif
106 .if !defined(EMUL_IS_NATIVE)
107 LDCONFIG_ADD_CMD?= ${EMULDIR}/sbin/ldconfig -r ${EMULDIR}
108 LDCONFIG_REMOVE_CMD?= ${EMULDIR}/sbin/ldconfig -r ${EMULDIR}
109 .endif