internal/rosa/package: migrate nss

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-21 15:35:48 +09:00
parent 1acb5b0105
commit cbf18b302d
18 changed files with 196 additions and 209 deletions

View File

@@ -9,21 +9,21 @@ import (
)
var (
llvmSource = H("llvm-project")
muslHeaders = H("musl-headers")
earlyCompilerRT = H("early-compiler-rt")
earlyRuntimes = H("early-runtimes")
musl = H("musl")
_llvmSource = H("llvm-project")
_muslHeaders = H("musl-headers")
_earlyCompilerRT = H("early-compiler-rt")
_earlyRuntimes = H("early-runtimes")
_musl = H("musl")
bash = H("bash")
gawk = H("gawk")
coreutils = H("coreutils")
diffutils = H("diffutils")
findutils = H("findutils")
_bash = H("bash")
_gawk = H("gawk")
_coreutils = H("coreutils")
_diffutils = H("diffutils")
_findutils = H("findutils")
zlib = H("zlib")
zstd = H("zstd")
kernelHeaders = H("kernel-headers")
_zlib = H("zlib")
_zstd = H("zstd")
_kernelHeaders = H("kernel-headers")
)
// litArgs returns LIT arguments for optional verbosity and check skipping.
@@ -53,11 +53,9 @@ func init() {
Name: "early-compiler-rt",
Description: "early LLVM runtime: compiler-rt",
Dependencies: P{
musl,
},
Dependencies: P{_musl},
}
_meta, source := t.MustLoad(llvmSource)
_meta, source := t.MustLoad(_llvmSource)
meta.Version = _meta.Version
major, _, _ := strings.Cut(meta.Version, ".")
return &meta, t.NewPackage("early-compiler-rt", meta.Version, source, &PackageAttr{
@@ -106,10 +104,10 @@ ln -s \
"/work/system/lib/${ROSA_TRIPLE}/crtendS.o"
`,
},
Python,
_python,
muslHeaders,
kernelHeaders,
_muslHeaders,
_kernelHeaders,
)
})
@@ -119,10 +117,10 @@ ln -s \
Description: "early LLVM runtimes: libunwind, libcxx, libcxxabi",
Dependencies: P{
earlyCompilerRT,
_earlyCompilerRT,
},
}
_meta, source := t.MustLoad(llvmSource)
_meta, source := t.MustLoad(_llvmSource)
meta.Version = _meta.Version
return &meta, t.NewPackage("early-runtimes", meta.Version, source, &PackageAttr{
@@ -162,12 +160,12 @@ ln -s \
},
SkipTest: true,
},
Python,
_python,
zlib,
zstd,
earlyCompilerRT,
kernelHeaders,
_zlib,
_zstd,
_earlyCompilerRT,
_kernelHeaders,
)
})
@@ -184,7 +182,7 @@ ln -s \
ID: 1830,
}
return &meta, t.NewPatchedSource("llvm", version, newFromGitHub(
return &meta, t.NewPatchedSource("llvm-"+version, newFromGitHub(
"llvm/llvm-project",
"llvmorg-"+version,
checksum,
@@ -198,22 +196,22 @@ ln -s \
Website: "https://llvm.org",
Dependencies: P{
zlib,
zstd,
musl,
_zlib,
_zstd,
_musl,
},
}
_meta, source := t.MustLoad(llvmSource)
_meta, source := t.MustLoad(_llvmSource)
meta.Version = _meta.Version
early := muslHeaders
early := _muslHeaders
if t.stage.isStage0() {
// The LLVM build system uses the system installation when building with
// LLVM_LINK_LLVM_DYLIB, since it builds runtimes after the fact, using
// the just-built toolchain. This is unacceptable in stage0 due to the
// potential version difference. Later stages bootstrap off of runtimes
// of its previous stage via 3-stage determinism.
early = earlyRuntimes
early = _earlyRuntimes
}
cache := []KV{
@@ -351,18 +349,18 @@ chmod +w /bin && ln -s \
ninja ` + jobsFlagE + ` check-all
`,
},
Python,
Perl,
diffutils,
bash,
gawk,
coreutils,
findutils,
_python,
_perl,
_diffutils,
_bash,
_gawk,
_coreutils,
_findutils,
zlib,
zstd,
_zlib,
_zstd,
early,
kernelHeaders,
_kernelHeaders,
)
})