mirror of https://github.com/aminya/setup-cpp
fix: install ncurses for LLVM on Arch/Fedora
This commit is contained in:
parent
dcadbb8407
commit
e714af79eb
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
|
@ -1,7 +1,7 @@
|
|||
import { parseArgs } from "../cli-options.js"
|
||||
import { getCompilerInfo } from "../compilers.js"
|
||||
import type { Inputs } from "../tool.js"
|
||||
import { DefaultUbuntuVersion } from "../versions/default_versions.js"
|
||||
import { DefaultUbuntuVersion, DefaultVersions } from "../versions/default_versions.js"
|
||||
import { getVersion, syncVersions } from "../versions/versions.js"
|
||||
|
||||
jest.setTimeout(300000)
|
||||
|
@ -64,9 +64,9 @@ describe("getVersion", () => {
|
|||
it("llvm", () => {
|
||||
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
|
||||
if (process.platform === "linux") {
|
||||
expect(getVersion("llvm", "true", [20, 4])).toBe(DefaultUbuntuVersion.llvm![20])
|
||||
expect(getVersion("llvm", "true", [18, 4])).toBe(DefaultUbuntuVersion.llvm![18])
|
||||
expect(getVersion("llvm", "true", [16, 4])).toBe(DefaultUbuntuVersion.llvm![16])
|
||||
expect(getVersion("llvm", "true", [20, 4])).toBe(DefaultVersions.llvm)
|
||||
expect(getVersion("llvm", "true", [18, 4])).toBe(DefaultVersions.llvm)
|
||||
expect(getVersion("llvm", "true", [16, 4])).toBe(DefaultVersions.llvm)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -10,9 +10,13 @@ import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"
|
|||
import { rcOptions } from "../cli-options.js"
|
||||
import { setupGcc } from "../gcc/gcc.js"
|
||||
import { setupMacOSSDK } from "../macos-sdk/macos-sdk.js"
|
||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||
import { isArch } from "../utils/env/isArch.js"
|
||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||
import { ubuntuVersion } from "../utils/env/ubuntu_version.js"
|
||||
import { type InstallationInfo, setupBin } from "../utils/setup/setupBin.js"
|
||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack.js"
|
||||
import { semverCoerceIfInvalid } from "../utils/setup/version.js"
|
||||
import { getVersion } from "../versions/versions.js"
|
||||
import { LLVMPackages, setupLLVMApt } from "./llvm_installer.js"
|
||||
|
@ -82,6 +86,14 @@ async function llvmBinaryDeps_raw(majorVersion: number) {
|
|||
} else {
|
||||
await installAptPack([{ name: "libtinfo-dev" }])
|
||||
}
|
||||
} else if (isArch()) {
|
||||
// https://aur.archlinux.org/packages/ncurses5-compat-libs
|
||||
await setupPacmanPack("ncurses5-compat-libs")
|
||||
} else if (hasDnf()) {
|
||||
// https://packages.fedoraproject.org/pkgs/ncurses/ncurses-compat-libs/index.html
|
||||
await setupDnfPack([
|
||||
{ name: "ncurses-compat-libs" },
|
||||
])
|
||||
}
|
||||
}
|
||||
const llvmBinaryDeps = memoize(llvmBinaryDeps_raw, { promise: true })
|
||||
|
|
Loading…
Reference in New Issue