mirror of https://github.com/aminya/setup-cpp
Merge pull request #150 from aminya/libtinfo [skip ci]
This commit is contained in:
commit
e41547fef1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -28,7 +28,7 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
|
||||||
|
|
||||||
let depsPromise: Promise<void>
|
let depsPromise: Promise<void>
|
||||||
if (!installedDeps) {
|
if (!installedDeps) {
|
||||||
depsPromise = setupLLVMDeps(arch)
|
depsPromise = setupLLVMDeps(arch, version)
|
||||||
// eslint-disable-next-line require-atomic-updates
|
// eslint-disable-next-line require-atomic-updates
|
||||||
installedDeps = true
|
installedDeps = true
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,15 +42,20 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
|
||||||
return installationInfo
|
return installationInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setupLLVMDeps(arch: string) {
|
async function setupLLVMDeps(arch: string, version: string) {
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
// install llvm build dependencies
|
// install llvm build dependencies
|
||||||
const osVersion = await ubuntuVersion()
|
const osVersion = await ubuntuVersion()
|
||||||
await setupGcc(getVersion("gcc", undefined, osVersion), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
|
await setupGcc(getVersion("gcc", undefined, osVersion), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
|
||||||
|
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
|
const majorVersion = parseInt(version.split(".")[0], 10)
|
||||||
|
if (majorVersion <= 10) {
|
||||||
|
await setupAptPack("libtinfo5")
|
||||||
|
} else {
|
||||||
await setupAptPack("libtinfo-dev")
|
await setupAptPack("libtinfo-dev")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// TODO: install libtinfo on other distros
|
// TODO: install libtinfo on other distros
|
||||||
// setupPacmanPack("ncurses")
|
// setupPacmanPack("ncurses")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue