-
Notifications
You must be signed in to change notification settings - Fork 27
/
msbuild-libhostfxr_3.1.11.bb
65 lines (51 loc) · 2.34 KB
/
msbuild-libhostfxr_3.1.11.bb
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
SUMMARY = "Build system for .NET projects - unmanaged helper library"
HOMEPAGE = "https://github.com/dotnet/core-setup"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE.TXT;md5=9fc642ff452b28d62ab19b7eea50dfb9"
COMPATIBLE_HOST ?= "(i.86|x86_64|arm|aarch64).*-linux"
SRC_URI = "git://github.com/dotnet/core-setup.git;branch=release/3.1 \
file://0001-Don-t-set-a-plethora-of-compiler-arguments-through-c.patch;patchdir=${WORKDIR}/git \
file://0002-Remove-broken-objcopy-detection-STRIP_SYMBOLS-is-uns.patch;patchdir=${WORKDIR}/git \
"
SRCREV = "f5eceb810586ea6138aadcef9e2bba115015ab99"
inherit cmake
S = "${WORKDIR}/git/src/corehost"
def get_dotnet_arch(bb, d, arch_var):
import re
a = d.getVar(arch_var)
if re.match(r'(i.86|athlon|x86.64)$', a): return 'I386'
elif re.match(r'arm$', a): return 'ARM'
elif re.match(r'armeb$', a): return 'ARM'
elif re.match(r'aarch64$', a): return 'ARM64'
elif re.match(r'aarch64_be$', a): return 'ARM64'
else:
raise bb.parse.SkipRecipe("Cannot map '%s' to a supported dotnet architecture" % a)
def get_dotnet_host_arch(bb, d):
return get_dotnet_arch(bb, d, 'HOST_ARCH')
def get_dotnet_target_arch(bb, d):
return get_dotnet_arch(bb, d, 'TARGET_ARCH')
EXTRA_OECMAKE = " \
-DCLI_CMAKE_HOST_VER:STRING=${PV} \
-DCLI_CMAKE_COMMON_HOST_VER:STRING=${PV} \
-DCLI_CMAKE_HOST_FXR_VER:STRING=${PV} \
-DCLI_CMAKE_HOST_POLICY_VER:STRING=${PV} \
-DCLI_CMAKE_PKG_RID:STRING=linux \
-DCLI_CMAKE_COMMIT_HASH:STRING=${SRCREV} \
"
EXTRA_OECMAKE_append_class-native = " \
-DCLI_CMAKE_PLATFORM_ARCH_${@get_dotnet_host_arch(bb, d)}=1 \
"
EXTRA_OECMAKE_append_class-target = " \
-DCLI_CMAKE_PLATFORM_ARCH_${@get_dotnet_target_arch(bb, d)}=1 \
"
do_install() {
install -d ${D}${libdir}/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver
install -m755 ${B}/cli/fxr/libhostfxr.so ${D}${libdir}/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.so
}
do_install_append_class-native () {
install -m755 ${B}/cli/fxr/libhostfxr.so ${D}${libdir}
}
FILES_${PN} = " \
${libdir}/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.so \
"
BBCLASSEXTEND = "native"