internal/rosa: create metadata alongside artifact
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m45s
Test / ShareFS (push) Successful in 3m47s
Test / Hakurei (push) Successful in 4m0s
Test / Sandbox (race detector) (push) Successful in 5m28s
Test / Hakurei (race detector) (push) Successful in 6m32s
Test / Flake checks (push) Successful in 1m21s
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m45s
Test / ShareFS (push) Successful in 3m47s
Test / Hakurei (push) Successful in 4m0s
Test / Sandbox (race detector) (push) Successful in 5m28s
Test / Hakurei (race detector) (push) Successful in 6m32s
Test / Flake checks (push) Successful in 1m21s
This enables deferring evaluation of azalea-based packages and fixes the longstanding quirk of version being disjoint from other metadata. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -26,9 +26,7 @@ install -D -m755 libargp.a /work/system/lib/libargp.a
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newArgpStandalone,
|
||||
|
||||
native.mustRegister(Toolchain.newArgpStandalone, &Metadata{
|
||||
Name: "argp-standalone",
|
||||
Description: "hierarchical argument parsing library broken out from glibc",
|
||||
Website: "http://www.lysator.liu.se/~nisse/misc/",
|
||||
|
||||
@@ -66,9 +66,7 @@ func (t Toolchain) newBison() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newBison,
|
||||
|
||||
native.mustRegister(Toolchain.newBison, &Metadata{
|
||||
Name: "bison",
|
||||
Description: "a general-purpose parser generator",
|
||||
Website: "https://www.gnu.org/software/bison/",
|
||||
|
||||
@@ -26,9 +26,7 @@ func (t Toolchain) newBzip2() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newBzip2,
|
||||
|
||||
native.mustRegister(Toolchain.newBzip2, &Metadata{
|
||||
Name: "bzip2",
|
||||
Description: "a freely available, patent free, high-quality data compressor",
|
||||
Website: "https://sourceware.org/bzip2/",
|
||||
|
||||
@@ -106,9 +106,7 @@ index 2ead810437..f85cbb8b1c 100644
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newCMake,
|
||||
|
||||
native.mustRegister(Toolchain.newCMake, &Metadata{
|
||||
Name: "cmake",
|
||||
Description: "cross-platform, open-source build system",
|
||||
Website: "https://cmake.org/",
|
||||
|
||||
@@ -90,9 +90,7 @@ func (t Toolchain) newConnman() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newConnman,
|
||||
|
||||
native.mustRegister(Toolchain.newConnman, &Metadata{
|
||||
Name: "connman",
|
||||
Description: "a daemon for managing Internet connections",
|
||||
Website: "https://git.kernel.org/pub/scm/network/connman/connman.git/",
|
||||
|
||||
@@ -39,9 +39,7 @@ chmod +w tests/data && rm -f tests/data/test459
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newCurl,
|
||||
|
||||
native.mustRegister(Toolchain.newCurl, &Metadata{
|
||||
Name: "curl",
|
||||
Description: "command line tool and library for transferring data with URLs",
|
||||
Website: "https://curl.se/",
|
||||
|
||||
@@ -29,9 +29,7 @@ func (t Toolchain) newDBus() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newDBus,
|
||||
|
||||
native.mustRegister(Toolchain.newDBus, &Metadata{
|
||||
Name: "dbus",
|
||||
Description: "a message bus system",
|
||||
Website: "https://www.freedesktop.org/wiki/Software/dbus/",
|
||||
@@ -65,9 +63,7 @@ func (t Toolchain) newXDGDBusProxy() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXDGDBusProxy,
|
||||
|
||||
native.mustRegister(Toolchain.newXDGDBusProxy, &Metadata{
|
||||
Name: "xdg-dbus-proxy",
|
||||
Description: "a filtering proxy for D-Bus connections",
|
||||
Website: "https://github.com/flatpak/xdg-dbus-proxy",
|
||||
|
||||
@@ -31,9 +31,7 @@ func (t Toolchain) newDTC() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newDTC,
|
||||
|
||||
native.mustRegister(Toolchain.newDTC, &Metadata{
|
||||
Name: "dtc",
|
||||
Description: "The Device Tree Compiler",
|
||||
Website: "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/",
|
||||
|
||||
@@ -39,9 +39,7 @@ func (t Toolchain) newElfutils() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newElfutils,
|
||||
|
||||
native.mustRegister(Toolchain.newElfutils, &Metadata{
|
||||
Name: "elfutils",
|
||||
Description: "utilities and libraries to handle ELF files and DWARF data",
|
||||
Website: "https://sourceware.org/elfutils/",
|
||||
|
||||
@@ -46,9 +46,7 @@ index f135ad9..85c784c 100644
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newFakeroot,
|
||||
|
||||
native.mustRegister(Toolchain.newFakeroot, &Metadata{
|
||||
Name: "fakeroot",
|
||||
Description: "tool for simulating superuser privileges",
|
||||
Website: "https://salsa.debian.org/clint/fakeroot",
|
||||
|
||||
@@ -20,9 +20,7 @@ func (t Toolchain) newFlex() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newFlex,
|
||||
|
||||
native.mustRegister(Toolchain.newFlex, &Metadata{
|
||||
Name: "flex",
|
||||
Description: "scanner generator for lexing in C and C++",
|
||||
Website: "https://github.com/westes/flex/",
|
||||
|
||||
@@ -15,9 +15,7 @@ func (t Toolchain) newFreetype() (pkg.Artifact, string) {
|
||||
), nil, (*MakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newFreetype,
|
||||
|
||||
native.mustRegister(Toolchain.newFreetype, &Metadata{
|
||||
Name: "freetype",
|
||||
Description: "a freely available software library to render fonts",
|
||||
Website: "http://www.freetype.org/",
|
||||
|
||||
@@ -31,9 +31,7 @@ func (t Toolchain) newFuse() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newFuse,
|
||||
|
||||
native.mustRegister(Toolchain.newFuse, &Metadata{
|
||||
Name: "fuse",
|
||||
Description: "the reference implementation of the Linux FUSE interface",
|
||||
Website: "https://github.com/libfuse/libfuse/",
|
||||
|
||||
@@ -88,9 +88,7 @@ disable_test t5515-fetch-merge-logic
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newGit,
|
||||
|
||||
native.mustRegister(Toolchain.newGit, &Metadata{
|
||||
Name: "git",
|
||||
Description: "distributed version control system",
|
||||
Website: "https://www.git-scm.com/",
|
||||
|
||||
@@ -22,9 +22,7 @@ func (t Toolchain) newSPIRVHeaders() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newSPIRVHeaders,
|
||||
|
||||
native.mustRegister(Toolchain.newSPIRVHeaders, &Metadata{
|
||||
Name: "spirv-headers",
|
||||
Description: "machine-readable files for the SPIR-V Registry",
|
||||
Website: "https://github.com/KhronosGroup/SPIRV-Headers",
|
||||
@@ -72,9 +70,7 @@ func (t Toolchain) newSPIRVTools() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newSPIRVTools,
|
||||
|
||||
native.mustRegister(Toolchain.newSPIRVTools, &Metadata{
|
||||
Name: "spirv-tools",
|
||||
Description: "an API and commands for processing SPIR-V modules",
|
||||
Website: "https://github.com/KhronosGroup/SPIRV-Tools",
|
||||
@@ -116,9 +112,7 @@ func (t Toolchain) newGlslang() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newGlslang,
|
||||
|
||||
native.mustRegister(Toolchain.newGlslang, &Metadata{
|
||||
Name: "glslang",
|
||||
Description: "reference front end for GLSL/ESSL",
|
||||
Website: "https://github.com/KhronosGroup/glslang",
|
||||
@@ -232,9 +226,7 @@ export LIT_OPTS=` + litArgs(true, skipChecks...) + `
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newSPIRVLLVMTranslator,
|
||||
|
||||
native.mustRegister(Toolchain.newSPIRVLLVMTranslator, &Metadata{
|
||||
Name: "spirv-llvm-translator",
|
||||
Description: "bi-directional translation between SPIR-V and LLVM IR",
|
||||
Website: "https://github.com/KhronosGroup/SPIRV-LLVM-Translator",
|
||||
|
||||
@@ -166,9 +166,7 @@ rm \
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newGoLatest,
|
||||
|
||||
native.mustRegister(Toolchain.newGoLatest, &Metadata{
|
||||
Name: "go",
|
||||
Description: "the Go programming language toolchain",
|
||||
Website: "https://go.dev/",
|
||||
|
||||
@@ -42,9 +42,7 @@ func (t Toolchain) newGLib() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newGLib,
|
||||
|
||||
native.mustRegister(Toolchain.newGLib, &Metadata{
|
||||
Name: "glib",
|
||||
Description: "the GNU library of miscellaneous stuff",
|
||||
Website: "https://developer.gnome.org/glib/",
|
||||
|
||||
@@ -58,9 +58,8 @@ func main() {
|
||||
)))
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newHakurei("", `
|
||||
native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newHakurei("", `
|
||||
mkdir -p /work/system/libexec/hakurei/
|
||||
|
||||
echo "Building hakurei for $(go env GOOS)/$(go env GOARCH)."
|
||||
@@ -86,26 +85,23 @@ mkdir -p /work/system/bin/
|
||||
sharefs \
|
||||
../../bin/)
|
||||
`, true), hakureiVersion
|
||||
},
|
||||
|
||||
}, &Metadata{
|
||||
Name: "hakurei",
|
||||
Description: "low-level userspace tooling for Rosa OS",
|
||||
Website: "https://hakurei.app/",
|
||||
|
||||
ID: 388834,
|
||||
})
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
name := "all"
|
||||
if t.opts&OptSkipCheck != 0 {
|
||||
name = "make"
|
||||
}
|
||||
return t.newHakurei("-dist", `
|
||||
native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
name := "all"
|
||||
if t.opts&OptSkipCheck != 0 {
|
||||
name = "make"
|
||||
}
|
||||
return t.newHakurei("-dist", `
|
||||
export HAKUREI_VERSION
|
||||
DESTDIR=/work /usr/src/hakurei/`+name+`.sh
|
||||
`, true), hakureiVersion
|
||||
},
|
||||
|
||||
}, &Metadata{
|
||||
Name: "hakurei-dist",
|
||||
Description: "low-level userspace tooling for Rosa OS (distribution tarball)",
|
||||
Website: "https://hakurei.app/",
|
||||
|
||||
@@ -22,9 +22,7 @@ func (t Toolchain) newHwdata() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newHwdata,
|
||||
|
||||
native.mustRegister(Toolchain.newHwdata, &Metadata{
|
||||
Name: "hwdata",
|
||||
Description: "contains various hardware identification and configuration data",
|
||||
Website: "https://github.com/vcrhonek/hwdata",
|
||||
|
||||
@@ -6,12 +6,13 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
meta := Metadata{
|
||||
Name: "earlyinit",
|
||||
Description: "Rosa OS initramfs init program",
|
||||
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newHakurei("-early-init", `
|
||||
Version: Unversioned,
|
||||
}
|
||||
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
return &meta, t.newHakurei("-early-init", `
|
||||
mkdir -p /work/system/libexec/hakurei/
|
||||
|
||||
echo '# Building earlyinit.'
|
||||
@@ -22,52 +23,51 @@ go build -trimpath -v -o /work/system/libexec/hakurei -ldflags="-s -w
|
||||
-X hakurei.app/internal/info.buildVersion=${HAKUREI_VERSION}
|
||||
" ./cmd/earlyinit
|
||||
echo
|
||||
`, false), Unversioned
|
||||
},
|
||||
`, false)
|
||||
})
|
||||
}
|
||||
func (t Toolchain) newImageSystem() (pkg.Artifact, string) {
|
||||
return t.New("system.img", TNoToolchain, t.Append(nil,
|
||||
SquashfsTools,
|
||||
), nil, nil, `
|
||||
mksquashfs /mnt/system /work/system.img
|
||||
`, pkg.Path(fhs.AbsRoot.Append("mnt"), false, t.Append(nil,
|
||||
Musl,
|
||||
Mksh,
|
||||
Toybox,
|
||||
|
||||
Kmod,
|
||||
Kernel,
|
||||
Firmware,
|
||||
)...)), Unversioned
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
meta := Metadata{
|
||||
Name: "system-image",
|
||||
Description: "Rosa OS system image",
|
||||
Version: Unversioned,
|
||||
}
|
||||
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
return &meta, t.New("system.img", TNoToolchain, t.Append(nil,
|
||||
SquashfsTools,
|
||||
), nil, nil, `
|
||||
mksquashfs /mnt/system /work/system.img
|
||||
`, pkg.Path(fhs.AbsRoot.Append("mnt"), false, t.Append(nil,
|
||||
Musl,
|
||||
Mksh,
|
||||
Toybox,
|
||||
|
||||
f: Toolchain.newImageSystem,
|
||||
Kmod,
|
||||
Kernel,
|
||||
Firmware,
|
||||
)...))
|
||||
})
|
||||
}
|
||||
func (t Toolchain) newImageInitramfs() (pkg.Artifact, string) {
|
||||
return t.New("initramfs", TNoToolchain, t.Append(nil,
|
||||
Zstd,
|
||||
EarlyInit,
|
||||
GenInitCPIO,
|
||||
), nil, nil, `
|
||||
|
||||
func init() {
|
||||
meta := Metadata{
|
||||
Name: "initramfs-image",
|
||||
Description: "Rosa OS initramfs image",
|
||||
Version: Unversioned,
|
||||
}
|
||||
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
return &meta, t.New("initramfs", TNoToolchain, t.Append(nil,
|
||||
Zstd,
|
||||
EarlyInit,
|
||||
GenInitCPIO,
|
||||
), nil, nil, `
|
||||
gen_init_cpio -t 4294967295 -c /usr/src/initramfs | zstd > /work/initramfs.zst
|
||||
`, pkg.Path(AbsUsrSrc.Append("initramfs"), false, pkg.NewFile("initramfs", []byte(`
|
||||
dir /dev 0755 0 0
|
||||
nod /dev/null 0666 0 0 c 1 3
|
||||
nod /dev/console 0600 0 0 c 5 1
|
||||
file /init /system/libexec/hakurei/earlyinit 0555 0 0
|
||||
`)))), Unversioned
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
Name: "initramfs-image",
|
||||
Description: "Rosa OS initramfs image",
|
||||
|
||||
f: Toolchain.newImageInitramfs,
|
||||
`))))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -19,9 +19,7 @@ chmod -R +w /work/usr/src/linux/
|
||||
`, pkg.Path(AbsUsrSrc.Append("linux"), false, kernelSource)), kernelVersion
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newKernelSource,
|
||||
|
||||
native.mustRegister(Toolchain.newKernelSource, &Metadata{
|
||||
Name: "kernel-source",
|
||||
Description: "a writable kernel source tree installed to /usr/src/linux",
|
||||
Website: "https://kernel.org/",
|
||||
@@ -70,9 +68,7 @@ cat \
|
||||
), kernelVersion
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newKernelHeaders,
|
||||
|
||||
native.mustRegister(Toolchain.newKernelHeaders, &Metadata{
|
||||
Name: "kernel-headers",
|
||||
Description: "an installation of kernel headers",
|
||||
Website: "https://kernel.org/",
|
||||
@@ -1275,9 +1271,7 @@ rm -v /work/system/lib/modules/` + kernelVersion + `/build
|
||||
), kernelVersion
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newKernel,
|
||||
|
||||
native.mustRegister(Toolchain.newKernel, &Metadata{
|
||||
Name: "kernel",
|
||||
Description: "the generic Rosa OS linux kernel",
|
||||
Website: "https://kernel.org/",
|
||||
@@ -1293,9 +1287,7 @@ cc -o /work/system/bin/gen_init_cpio /usr/src/linux/usr/gen_init_cpio.c
|
||||
`, pkg.Path(AbsUsrSrc.Append("linux"), false, kernelSource)), kernelVersion
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newGenInitCPIO,
|
||||
|
||||
native.mustRegister(Toolchain.newGenInitCPIO, &Metadata{
|
||||
Name: "gen_init_cpio",
|
||||
Description: "a program in the kernel source tree for creating initramfs archive",
|
||||
})
|
||||
@@ -1340,9 +1332,7 @@ func (t Toolchain) newFirmware() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newFirmware,
|
||||
|
||||
native.mustRegister(Toolchain.newFirmware, &Metadata{
|
||||
Name: "firmware",
|
||||
Description: "firmware blobs for use with the Linux kernel",
|
||||
Website: "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/",
|
||||
|
||||
@@ -32,9 +32,7 @@ func (t Toolchain) newKmod() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newKmod,
|
||||
|
||||
native.mustRegister(Toolchain.newKmod, &Metadata{
|
||||
Name: "kmod",
|
||||
Description: "a set of tools to handle common tasks with Linux kernel modules",
|
||||
Website: "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git",
|
||||
|
||||
@@ -88,9 +88,7 @@ install -Dv /usr/src/CTestCustom.cmake /cure/
|
||||
}, (*CMakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibarchive,
|
||||
|
||||
native.mustRegister(Toolchain.newLibarchive, &Metadata{
|
||||
Name: "libarchive",
|
||||
Description: "multi-format archive and compression library",
|
||||
Website: "https://www.libarchive.org/",
|
||||
|
||||
@@ -21,9 +21,7 @@ install -D /usr/src/libmd/src/helper.c src/helper.c
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibmd,
|
||||
|
||||
native.mustRegister(Toolchain.newLibmd, &Metadata{
|
||||
Name: "libmd",
|
||||
Description: "Message Digest functions from BSD systems",
|
||||
Website: "https://www.hadrons.org/software/libmd/",
|
||||
@@ -50,9 +48,7 @@ func (t Toolchain) newLibbsd() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibbsd,
|
||||
|
||||
native.mustRegister(Toolchain.newLibbsd, &Metadata{
|
||||
Name: "libbsd",
|
||||
Description: "provides useful functions commonly found on BSD systems",
|
||||
Website: "https://libbsd.freedesktop.org/",
|
||||
|
||||
@@ -42,9 +42,7 @@ ln -s ../system/bin/bash /bin/
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibcap,
|
||||
|
||||
native.mustRegister(Toolchain.newLibcap, &Metadata{
|
||||
Name: "libcap",
|
||||
Description: "a library for getting and setting POSIX.1e draft 15 capabilities",
|
||||
Website: "https://sites.google.com/site/fullycapable/",
|
||||
|
||||
@@ -38,9 +38,7 @@ index eba7eae..f916d2e 100644
|
||||
}, (*CMakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibconfig,
|
||||
|
||||
native.mustRegister(Toolchain.newLibconfig, &Metadata{
|
||||
Name: "libconfig",
|
||||
Description: "a simple library for processing structured configuration files",
|
||||
Website: "https://hyperrealm.github.io/libconfig/",
|
||||
|
||||
@@ -18,9 +18,7 @@ func (t Toolchain) newLibdisplayInfo() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibdisplayInfo,
|
||||
|
||||
native.mustRegister(Toolchain.newLibdisplayInfo, &Metadata{
|
||||
Name: "libdisplay-info",
|
||||
Description: "EDID and DisplayID library",
|
||||
Website: "https://gitlab.freedesktop.org/emersion/libdisplay-info",
|
||||
|
||||
@@ -21,9 +21,7 @@ func (t Toolchain) newLibepoxy() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibepoxy,
|
||||
|
||||
native.mustRegister(Toolchain.newLibepoxy, &Metadata{
|
||||
Name: "libepoxy",
|
||||
Description: "a library for handling OpenGL function pointer management",
|
||||
Website: "https://github.com/anholt/libepoxy",
|
||||
|
||||
@@ -14,9 +14,7 @@ func (t Toolchain) newLibev() (pkg.Artifact, string) {
|
||||
), nil, (*MakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibev,
|
||||
|
||||
native.mustRegister(Toolchain.newLibev, &Metadata{
|
||||
Name: "libev",
|
||||
Description: "a full-featured and high-performance event loop",
|
||||
Website: "http://libev.schmorp.de/",
|
||||
|
||||
@@ -22,9 +22,7 @@ func (t Toolchain) newLibexpat() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibexpat,
|
||||
|
||||
native.mustRegister(Toolchain.newLibexpat, &Metadata{
|
||||
Name: "libexpat",
|
||||
Description: "a stream-oriented XML parser library",
|
||||
Website: "https://libexpat.github.io/",
|
||||
|
||||
@@ -18,9 +18,7 @@ func (t Toolchain) newLibffi() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibffi,
|
||||
|
||||
native.mustRegister(Toolchain.newLibffi, &Metadata{
|
||||
Name: "libffi",
|
||||
Description: "a portable, high level programming interface to various calling conventions",
|
||||
Website: "https://sourceware.org/libffi/",
|
||||
|
||||
@@ -24,9 +24,7 @@ mkdir /dev/shm/gd
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibgd,
|
||||
|
||||
native.mustRegister(Toolchain.newLibgd, &Metadata{
|
||||
Name: "libgd",
|
||||
Description: "an open source code library for the dynamic creation of images",
|
||||
Website: "https://libgd.github.io/",
|
||||
|
||||
@@ -22,9 +22,7 @@ func (t Toolchain) newLibpng() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibpng,
|
||||
|
||||
native.mustRegister(Toolchain.newLibpng, &Metadata{
|
||||
Name: "libpng",
|
||||
Description: "the official PNG reference library",
|
||||
Website: "https://www.libpng.org/pub/png/libpng.html",
|
||||
|
||||
@@ -25,9 +25,7 @@ test_disable 'int main(){return 0;}' tests/test-is-public-builtin.c
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibpsl,
|
||||
|
||||
native.mustRegister(Toolchain.newLibpsl, &Metadata{
|
||||
Name: "libpsl",
|
||||
Description: "provides functions to work with the Mozilla Public Suffix List",
|
||||
Website: "https://rockdaboot.github.io/libpsl/",
|
||||
|
||||
@@ -43,9 +43,7 @@ index adccef3..65a277a 100644
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibseccomp,
|
||||
|
||||
native.mustRegister(Toolchain.newLibseccomp, &Metadata{
|
||||
Name: "libseccomp",
|
||||
Description: "an interface to the Linux Kernel's syscall filtering mechanism",
|
||||
Website: "https://github.com/seccomp/libseccomp/",
|
||||
|
||||
@@ -32,9 +32,7 @@ func (t Toolchain) newLibtirpc() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibtirpc,
|
||||
|
||||
native.mustRegister(Toolchain.newLibtirpc, &Metadata{
|
||||
Name: "libtirpc",
|
||||
Description: "a port of Suns Transport-Independent RPC library to Linux",
|
||||
Website: "https://sourceforge.net/projects/libtirpc/",
|
||||
|
||||
@@ -27,9 +27,7 @@ func (t Toolchain) newLibucontext() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibucontext,
|
||||
|
||||
native.mustRegister(Toolchain.newLibucontext, &Metadata{
|
||||
Name: "libucontext",
|
||||
Description: "ucontext implementation featuring glibc-compatible ABI",
|
||||
Website: "https://github.com/kaniini/libucontext/",
|
||||
|
||||
@@ -20,9 +20,7 @@ func (t Toolchain) newLibxml2() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxml2,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxml2, &Metadata{
|
||||
Name: "libxml2",
|
||||
Description: "an XML toolkit implemented in C",
|
||||
Website: "https://gitlab.gnome.org/GNOME/libxml2/",
|
||||
|
||||
@@ -26,9 +26,7 @@ func (t Toolchain) newLibxslt() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxslt,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxslt, &Metadata{
|
||||
Name: "libxslt",
|
||||
Description: "an XSLT processor based on libxml2",
|
||||
Website: "https://gitlab.gnome.org/GNOME/libxslt/",
|
||||
|
||||
@@ -29,42 +29,52 @@ func litArgs(verbose bool, skipChecks ...string) string {
|
||||
return "'" + strings.Join(args, " ") + "'"
|
||||
}
|
||||
|
||||
func (t Toolchain) newEarlyCompilerRT() (pkg.Artifact, string) {
|
||||
source, version := t.Load(llvmSource)
|
||||
major, _, _ := strings.Cut(version, ".")
|
||||
return t.NewPackage("early-compiler-rt", version, source, &PackageAttr{
|
||||
Flag: TExclusive,
|
||||
}, &CMakeHelper{
|
||||
Append: []string{"compiler-rt"},
|
||||
func init() {
|
||||
native.MustRegister("early-compiler-rt", func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
meta := Metadata{
|
||||
Name: "early-compiler-rt",
|
||||
Description: "early LLVM runtime: compiler-rt",
|
||||
|
||||
Cache: []KV{
|
||||
{"ENABLE_LINKER_BUILD_ID", "ON"},
|
||||
Dependencies: P{
|
||||
Musl,
|
||||
},
|
||||
}
|
||||
_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{
|
||||
Flag: TExclusive,
|
||||
}, &CMakeHelper{
|
||||
Append: []string{"compiler-rt"},
|
||||
|
||||
// libc++ not yet available
|
||||
{"CMAKE_CXX_COMPILER_TARGET", ""},
|
||||
Cache: []KV{
|
||||
{"ENABLE_LINKER_BUILD_ID", "ON"},
|
||||
|
||||
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_ENABLE_RTTI", "ON"},
|
||||
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_LINK_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"},
|
||||
// libc++ not yet available
|
||||
{"CMAKE_CXX_COMPILER_TARGET", ""},
|
||||
|
||||
{"COMPILER_RT_BUILD_BUILTINS", "ON"},
|
||||
{"COMPILER_RT_DEFAULT_TARGET_ONLY", "ON"},
|
||||
{"COMPILER_RT_USE_BUILTINS_LIBRARY", "ON"},
|
||||
{"COMPILER_RT_SANITIZERS_TO_BUILD", "asan"},
|
||||
{"COMPILER_RT_BUILD_GWP_ASAN", "OFF"},
|
||||
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_ENABLE_RTTI", "ON"},
|
||||
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_LINK_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"},
|
||||
|
||||
// does not work without libunwind
|
||||
{"COMPILER_RT_BUILD_CTX_PROFILE", "OFF"},
|
||||
{"COMPILER_RT_BUILD_LIBFUZZER", "OFF"},
|
||||
{"COMPILER_RT_BUILD_MEMPROF", "OFF"},
|
||||
{"COMPILER_RT_BUILD_PROFILE", "OFF"},
|
||||
{"COMPILER_RT_BUILD_XRAY", "OFF"},
|
||||
},
|
||||
SkipTest: true,
|
||||
Script: `
|
||||
{"COMPILER_RT_BUILD_BUILTINS", "ON"},
|
||||
{"COMPILER_RT_DEFAULT_TARGET_ONLY", "ON"},
|
||||
{"COMPILER_RT_USE_BUILTINS_LIBRARY", "ON"},
|
||||
{"COMPILER_RT_SANITIZERS_TO_BUILD", "asan"},
|
||||
{"COMPILER_RT_BUILD_GWP_ASAN", "OFF"},
|
||||
|
||||
// does not work without libunwind
|
||||
{"COMPILER_RT_BUILD_CTX_PROFILE", "OFF"},
|
||||
{"COMPILER_RT_BUILD_LIBFUZZER", "OFF"},
|
||||
{"COMPILER_RT_BUILD_MEMPROF", "OFF"},
|
||||
{"COMPILER_RT_BUILD_PROFILE", "OFF"},
|
||||
{"COMPILER_RT_BUILD_XRAY", "OFF"},
|
||||
},
|
||||
SkipTest: true,
|
||||
Script: `
|
||||
mkdir -p "/work/system/lib/clang/` + major + `/lib/"
|
||||
ln -s \
|
||||
"../../../${ROSA_TRIPLE}" \
|
||||
@@ -77,223 +87,242 @@ ln -s \
|
||||
"clang_rt.crtend-` + t.linuxArch() + `.o" \
|
||||
"/work/system/lib/${ROSA_TRIPLE}/crtendS.o"
|
||||
`,
|
||||
},
|
||||
Python,
|
||||
|
||||
muslHeaders,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newEarlyCompilerRT,
|
||||
|
||||
Name: "early-compiler-rt",
|
||||
Description: "early LLVM runtime: compiler-rt",
|
||||
|
||||
Dependencies: P{
|
||||
Musl,
|
||||
},
|
||||
Python,
|
||||
|
||||
muslHeaders,
|
||||
KernelHeaders,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
func (t Toolchain) newEarlyRuntimes() (pkg.Artifact, string) {
|
||||
source, version := t.Load(llvmSource)
|
||||
return t.NewPackage("early-runtimes", version, source, &PackageAttr{
|
||||
Flag: TExclusive,
|
||||
}, &CMakeHelper{
|
||||
Append: []string{"runtimes"},
|
||||
native.MustRegister("early-runtimes", func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
meta := Metadata{
|
||||
Name: "early-runtimes",
|
||||
Description: "early LLVM runtimes: libunwind, libcxx, libcxxabi",
|
||||
|
||||
Cache: []KV{
|
||||
Dependencies: P{
|
||||
earlyCompilerRT,
|
||||
},
|
||||
}
|
||||
_meta, source := t.MustLoad(llvmSource)
|
||||
meta.Version = _meta.Version
|
||||
|
||||
return &meta, t.NewPackage("early-runtimes", meta.Version, source, &PackageAttr{
|
||||
Flag: TExclusive,
|
||||
}, &CMakeHelper{
|
||||
Append: []string{"runtimes"},
|
||||
|
||||
Cache: []KV{
|
||||
{"ENABLE_LINKER_BUILD_ID", "ON"},
|
||||
|
||||
// libc++ not yet available
|
||||
{"CMAKE_CXX_COMPILER_WORKS", "ON"},
|
||||
|
||||
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_ENABLE_RTTI", "ON"},
|
||||
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_LINK_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_ENABLE_RUNTIMES", "'libunwind;libcxx;libcxxabi'"},
|
||||
|
||||
{"LIBUNWIND_ENABLE_ASSERTIONS", "OFF"},
|
||||
{"LIBUNWIND_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXX_HAS_MUSL_LIBC", "ON"},
|
||||
{"LIBCXX_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXX_CXX_ABI", "libcxxabi"},
|
||||
{"LIBCXX_ENABLE_STATIC_ABI_LIBRARY", "OFF"},
|
||||
{"LIBCXX_HARDENING_MODE", "fast"},
|
||||
{"LIBCXX_HAS_ATOMIC_LIB", "OFF"},
|
||||
{"LIBCXXABI_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
|
||||
{"LIBCXXABI_ENABLE_STATIC_UNWINDER", "OFF"},
|
||||
{"LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL", "OFF"},
|
||||
|
||||
{"LLVM_ENABLE_ZLIB", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_ZSTD", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_LIBXML2", "OFF"},
|
||||
},
|
||||
SkipTest: true,
|
||||
},
|
||||
Python,
|
||||
|
||||
Zlib,
|
||||
Zstd,
|
||||
earlyCompilerRT,
|
||||
KernelHeaders,
|
||||
)
|
||||
})
|
||||
|
||||
const (
|
||||
version = "22.1.5"
|
||||
checksum = "32gOaLPHcUlo3hkdk5RbFumTE01XKeCAYZcpvn8IDHF95egXVfDFSl6eZL3ChMen"
|
||||
)
|
||||
|
||||
native.MustRegister("llvm-project", func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
meta := Metadata{
|
||||
Name: "llvm-project",
|
||||
Description: "LLVM monorepo with Rosa OS patches",
|
||||
Version: version,
|
||||
|
||||
ID: 1830,
|
||||
}
|
||||
return &meta, t.NewPatchedSource("llvm", version, newFromGitHub(
|
||||
"llvm/llvm-project",
|
||||
"llvmorg-"+version,
|
||||
checksum,
|
||||
), true, llvmPatches...)
|
||||
})
|
||||
|
||||
native.MustRegister("llvm", func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
meta := Metadata{
|
||||
Name: "llvm",
|
||||
Description: "a collection of modular and reusable compiler and toolchain technologies",
|
||||
Website: "https://llvm.org",
|
||||
|
||||
Dependencies: P{
|
||||
Zlib,
|
||||
Zstd,
|
||||
Musl,
|
||||
},
|
||||
}
|
||||
_meta, source := t.MustLoad(llvmSource)
|
||||
meta.Version = _meta.Version
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
cache := []KV{
|
||||
{"ENABLE_LINKER_BUILD_ID", "ON"},
|
||||
|
||||
// libc++ not yet available
|
||||
{"CMAKE_CXX_COMPILER_WORKS", "ON"},
|
||||
{"COMPILER_RT_USE_BUILTINS_LIBRARY", "ON"},
|
||||
{"COMPILER_RT_DEFAULT_TARGET_ONLY", "ON"},
|
||||
{"COMPILER_RT_BUILD_GWP_ASAN", "OFF"},
|
||||
{"LIBCXX_CXX_ABI", "libcxxabi"},
|
||||
{"LIBCXX_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXX_ENABLE_STATIC_ABI_LIBRARY", "OFF"},
|
||||
{"LIBCXX_HAS_MUSL_LIBC", "ON"},
|
||||
{"LIBCXX_HARDENING_MODE", "fast"},
|
||||
{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
|
||||
{"LIBCXXABI_ENABLE_STATIC_UNWINDER", "OFF"},
|
||||
{"LIBCXXABI_USE_COMPILER_RT", "ON"},
|
||||
{"LLVM_INSTALL_BINUTILS_SYMLINKS", "ON"},
|
||||
{"LLVM_INSTALL_UTILS", "ON"},
|
||||
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_LINK_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_APPEND_VC_REV", "OFF"},
|
||||
{"LLVM_ENABLE_RTTI", "ON"},
|
||||
{"LLVM_ENABLE_ZLIB", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_ZSTD", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"},
|
||||
{"LLVM_INCLUDE_BENCHMARKS", "OFF"},
|
||||
{"CLANG_DEFAULT_RTLIB", "compiler-rt"},
|
||||
{"CLANG_DEFAULT_UNWINDLIB", "libunwind"},
|
||||
{"CLANG_DEFAULT_CXX_STDLIB", "libc++"},
|
||||
{"CLANG_CONFIG_FILE_SYSTEM_DIR", "/system/etc/clang"},
|
||||
{"LLVM_ENABLE_FFI", "OFF"},
|
||||
{"LLVM_ENABLE_LIBXML2", "OFF"},
|
||||
{"LLVM_ENABLE_LIBCXX", "ON"},
|
||||
{"LLVM_ENABLE_LLD", "ON"},
|
||||
{"LIBUNWIND_ENABLE_ASSERTIONS", "OFF"},
|
||||
{"LIBUNWIND_USE_COMPILER_RT", "ON"},
|
||||
|
||||
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_ENABLE_RTTI", "ON"},
|
||||
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_LINK_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_ENABLE_RUNTIMES", "'libunwind;libcxx;libcxxabi'"},
|
||||
|
||||
{"LIBUNWIND_ENABLE_ASSERTIONS", "OFF"},
|
||||
{"LIBUNWIND_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXX_HAS_MUSL_LIBC", "ON"},
|
||||
{"LIBCXX_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXX_CXX_ABI", "libcxxabi"},
|
||||
{"LIBCXX_ENABLE_STATIC_ABI_LIBRARY", "OFF"},
|
||||
{"LIBCXX_HARDENING_MODE", "fast"},
|
||||
{"LIBCXX_HAS_ATOMIC_LIB", "OFF"},
|
||||
{"LIBCXXABI_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
|
||||
{"LIBCXXABI_ENABLE_STATIC_UNWINDER", "OFF"},
|
||||
{"LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL", "OFF"},
|
||||
|
||||
{"LLVM_ENABLE_ZLIB", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_ZSTD", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_LIBXML2", "OFF"},
|
||||
},
|
||||
SkipTest: true,
|
||||
},
|
||||
Python,
|
||||
|
||||
Zlib,
|
||||
Zstd,
|
||||
earlyCompilerRT,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newEarlyRuntimes,
|
||||
|
||||
Name: "early-runtimes",
|
||||
Description: "early LLVM runtimes: libunwind, libcxx, libcxxabi",
|
||||
|
||||
Dependencies: P{
|
||||
earlyCompilerRT,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (t Toolchain) newLLVM() (pkg.Artifact, string) {
|
||||
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
|
||||
}
|
||||
|
||||
cache := []KV{
|
||||
{"ENABLE_LINKER_BUILD_ID", "ON"},
|
||||
{"COMPILER_RT_USE_BUILTINS_LIBRARY", "ON"},
|
||||
{"COMPILER_RT_DEFAULT_TARGET_ONLY", "ON"},
|
||||
{"COMPILER_RT_BUILD_GWP_ASAN", "OFF"},
|
||||
{"LIBCXX_CXX_ABI", "libcxxabi"},
|
||||
{"LIBCXX_USE_COMPILER_RT", "ON"},
|
||||
{"LIBCXX_ENABLE_STATIC_ABI_LIBRARY", "OFF"},
|
||||
{"LIBCXX_HAS_MUSL_LIBC", "ON"},
|
||||
{"LIBCXX_HARDENING_MODE", "fast"},
|
||||
{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
|
||||
{"LIBCXXABI_ENABLE_STATIC_UNWINDER", "OFF"},
|
||||
{"LIBCXXABI_USE_COMPILER_RT", "ON"},
|
||||
{"LLVM_INSTALL_BINUTILS_SYMLINKS", "ON"},
|
||||
{"LLVM_INSTALL_UTILS", "ON"},
|
||||
{"LLVM_BUILD_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_LINK_LLVM_DYLIB", "ON"},
|
||||
{"LLVM_APPEND_VC_REV", "OFF"},
|
||||
{"LLVM_ENABLE_RTTI", "ON"},
|
||||
{"LLVM_ENABLE_ZLIB", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_ZSTD", "FORCE_ON"},
|
||||
{"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"},
|
||||
{"LLVM_INCLUDE_BENCHMARKS", "OFF"},
|
||||
{"CLANG_DEFAULT_RTLIB", "compiler-rt"},
|
||||
{"CLANG_DEFAULT_UNWINDLIB", "libunwind"},
|
||||
{"CLANG_DEFAULT_CXX_STDLIB", "libc++"},
|
||||
{"CLANG_CONFIG_FILE_SYSTEM_DIR", "/system/etc/clang"},
|
||||
{"LLVM_ENABLE_FFI", "OFF"},
|
||||
{"LLVM_ENABLE_LIBXML2", "OFF"},
|
||||
{"LLVM_ENABLE_LIBCXX", "ON"},
|
||||
{"LLVM_ENABLE_LLD", "ON"},
|
||||
{"LIBUNWIND_ENABLE_ASSERTIONS", "OFF"},
|
||||
{"LIBUNWIND_USE_COMPILER_RT", "ON"},
|
||||
|
||||
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
|
||||
{"LLVM_ENABLE_PROJECTS", "'" + strings.Join([]string{
|
||||
"clang",
|
||||
"lld",
|
||||
}, ";") + "'"},
|
||||
{"LLVM_ENABLE_RUNTIMES", "'" + strings.Join([]string{
|
||||
"compiler-rt",
|
||||
"libcxx",
|
||||
"libcxxabi",
|
||||
"libunwind",
|
||||
"libclc",
|
||||
}, ";") + "'"},
|
||||
}
|
||||
|
||||
if !t.stage.isStage0() {
|
||||
skipChecks := []string{
|
||||
// expensive, pointless to run here
|
||||
"benchmarks",
|
||||
// LLVM ERROR: Tried to execute an unknown external function: roundevenf
|
||||
"ExecutionEngine/Interpreter/intrinsics.ll",
|
||||
// clang: deadlocks with LLVM_BUILD_LLVM_DYLIB
|
||||
"crash-recovery-modules",
|
||||
// clang: fatal error: '__config_site' file not found
|
||||
"CodeGen/PowerPC/ppc-xmmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-mmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-emmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-pmmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-tmmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-smmintrin.c",
|
||||
"CodeGenCUDA/amdgpu-alias-undef-symbols.cu",
|
||||
// cxx: fails on musl
|
||||
"close.dont-get-rid-of-buffer",
|
||||
"re/re.traits",
|
||||
"std/time",
|
||||
"localization/locales",
|
||||
"localization/locale.categories",
|
||||
"selftest/dsl/dsl.sh.py",
|
||||
"input.output/iostream.format",
|
||||
"locale-specific_form",
|
||||
// cxx: deadlocks
|
||||
"std/thread/thread.jthread",
|
||||
// unwind: fails on musl
|
||||
"eh_frame_fde_pc_range",
|
||||
}
|
||||
switch t.arch {
|
||||
case "arm64":
|
||||
skipChecks = append(skipChecks,
|
||||
// LLVM: intermittently crashes
|
||||
"ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll",
|
||||
// unwind: unexpectedly passes
|
||||
"unwind_leaffunction",
|
||||
)
|
||||
{"LLVM_ENABLE_PROJECTS", "'" + strings.Join([]string{
|
||||
"clang",
|
||||
"lld",
|
||||
}, ";") + "'"},
|
||||
{"LLVM_ENABLE_RUNTIMES", "'" + strings.Join([]string{
|
||||
"compiler-rt",
|
||||
"libcxx",
|
||||
"libcxxabi",
|
||||
"libunwind",
|
||||
"libclc",
|
||||
}, ";") + "'"},
|
||||
}
|
||||
|
||||
if t.opts&OptLLVMNoLTO == 0 {
|
||||
if !t.stage.isStage0() {
|
||||
skipChecks := []string{
|
||||
// expensive, pointless to run here
|
||||
"benchmarks",
|
||||
// LLVM ERROR: Tried to execute an unknown external function: roundevenf
|
||||
"ExecutionEngine/Interpreter/intrinsics.ll",
|
||||
// clang: deadlocks with LLVM_BUILD_LLVM_DYLIB
|
||||
"crash-recovery-modules",
|
||||
// clang: fatal error: '__config_site' file not found
|
||||
"CodeGen/PowerPC/ppc-xmmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-mmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-emmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-pmmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-tmmintrin.c",
|
||||
"CodeGen/PowerPC/ppc-smmintrin.c",
|
||||
"CodeGenCUDA/amdgpu-alias-undef-symbols.cu",
|
||||
// cxx: fails on musl
|
||||
"close.dont-get-rid-of-buffer",
|
||||
"re/re.traits",
|
||||
"std/time",
|
||||
"localization/locales",
|
||||
"localization/locale.categories",
|
||||
"selftest/dsl/dsl.sh.py",
|
||||
"input.output/iostream.format",
|
||||
"locale-specific_form",
|
||||
// cxx: deadlocks
|
||||
"std/thread/thread.jthread",
|
||||
// unwind: fails on musl
|
||||
"eh_frame_fde_pc_range",
|
||||
}
|
||||
switch t.arch {
|
||||
case "arm64":
|
||||
skipChecks = append(skipChecks,
|
||||
// LLVM: intermittently crashes
|
||||
"ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll",
|
||||
// unwind: unexpectedly passes
|
||||
"unwind_leaffunction",
|
||||
)
|
||||
}
|
||||
|
||||
if t.opts&OptLLVMNoLTO == 0 {
|
||||
cache = append(cache, []KV{
|
||||
// very expensive
|
||||
{"LLVM_ENABLE_LTO", "Thin"},
|
||||
}...)
|
||||
}
|
||||
|
||||
cache = append(cache, []KV{
|
||||
// very expensive
|
||||
{"LLVM_ENABLE_LTO", "Thin"},
|
||||
// symbols: clock_gettime, mallopt
|
||||
{"COMPILER_RT_INCLUDE_TESTS", "OFF"},
|
||||
|
||||
{"LLVM_BUILD_TESTS", "ON"},
|
||||
{"LLVM_LIT_ARGS", litArgs(true, skipChecks...)},
|
||||
}...)
|
||||
}
|
||||
|
||||
cache = append(cache, []KV{
|
||||
// symbols: clock_gettime, mallopt
|
||||
{"COMPILER_RT_INCLUDE_TESTS", "OFF"},
|
||||
return &meta, t.NewPackage("llvm", meta.Version, source, &PackageAttr{
|
||||
Flag: TExclusive,
|
||||
}, &CMakeHelper{
|
||||
Append: []string{"llvm"},
|
||||
|
||||
{"LLVM_BUILD_TESTS", "ON"},
|
||||
{"LLVM_LIT_ARGS", litArgs(true, skipChecks...)},
|
||||
}...)
|
||||
}
|
||||
|
||||
source, version := t.Load(llvmSource)
|
||||
return t.NewPackage("llvm", version, source, &PackageAttr{
|
||||
Flag: TExclusive,
|
||||
}, &CMakeHelper{
|
||||
Append: []string{"llvm"},
|
||||
|
||||
Cache: cache,
|
||||
Script: `
|
||||
Cache: cache,
|
||||
Script: `
|
||||
ln -s ld.lld /work/system/bin/ld
|
||||
ln -s clang /work/system/bin/cc
|
||||
ln -s clang /work/system/bin/cpp
|
||||
ln -s clang++ /work/system/bin/c++
|
||||
`,
|
||||
|
||||
// LLVM_LINK_LLVM_DYLIB causes llvm test suite to leak system
|
||||
// installation into test environment, and the tests end up testing the
|
||||
// system installation instead. Tests are disabled on stage0 and relies
|
||||
// on 3-stage determinism to test later stages.
|
||||
SkipTest: t.stage.isStage0(),
|
||||
// LLVM_LINK_LLVM_DYLIB causes llvm test suite to leak system
|
||||
// installation into test environment, and the tests end up testing the
|
||||
// system installation instead. Tests are disabled on stage0 and relies
|
||||
// on 3-stage determinism to test later stages.
|
||||
SkipTest: t.stage.isStage0(),
|
||||
|
||||
Test: `
|
||||
Test: `
|
||||
chmod +w /bin && ln -s \
|
||||
../system/bin/chmod \
|
||||
../system/bin/mkdir \
|
||||
@@ -303,53 +332,20 @@ chmod +w /bin && ln -s \
|
||||
/bin
|
||||
ninja ` + jobsFlagE + ` check-all
|
||||
`,
|
||||
},
|
||||
Python,
|
||||
Perl,
|
||||
Diffutils,
|
||||
Bash,
|
||||
Gawk,
|
||||
Coreutils,
|
||||
Findutils,
|
||||
|
||||
Zlib,
|
||||
Zstd,
|
||||
early,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
const (
|
||||
version = "22.1.5"
|
||||
checksum = "32gOaLPHcUlo3hkdk5RbFumTE01XKeCAYZcpvn8IDHF95egXVfDFSl6eZL3ChMen"
|
||||
)
|
||||
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.NewPatchedSource("llvm", version, newFromGitHub(
|
||||
"llvm/llvm-project",
|
||||
"llvmorg-"+version,
|
||||
checksum,
|
||||
), true, llvmPatches...), version
|
||||
},
|
||||
Python,
|
||||
Perl,
|
||||
Diffutils,
|
||||
Bash,
|
||||
Gawk,
|
||||
Coreutils,
|
||||
Findutils,
|
||||
|
||||
Name: "llvm-project",
|
||||
Description: "LLVM monorepo with Rosa OS patches",
|
||||
|
||||
ID: 1830,
|
||||
})
|
||||
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLLVM,
|
||||
|
||||
Name: "llvm",
|
||||
Description: "a collection of modular and reusable compiler and toolchain technologies",
|
||||
Website: "https://llvm.org",
|
||||
|
||||
Dependencies: P{
|
||||
Zlib,
|
||||
Zstd,
|
||||
Musl,
|
||||
},
|
||||
early,
|
||||
KernelHeaders,
|
||||
)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -47,9 +47,7 @@ ln -s \
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLMSensors,
|
||||
|
||||
native.mustRegister(Toolchain.newLMSensors, &Metadata{
|
||||
Name: "lm_sensors",
|
||||
Description: "user-space support for hardware monitoring drivers",
|
||||
Website: "https://hwmon.wiki.kernel.org/lm_sensors",
|
||||
|
||||
@@ -27,9 +27,7 @@ cd "$(mktemp -d)"
|
||||
))), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newMake,
|
||||
|
||||
native.mustRegister(Toolchain.newMake, &Metadata{
|
||||
Name: "make",
|
||||
Description: "a tool which controls the generation of executables and other non-source files",
|
||||
Website: "https://www.gnu.org/software/make/",
|
||||
|
||||
@@ -35,9 +35,7 @@ trap 'kill $XVFB_PID && wait $XVFB_PID' EXIT
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibglvnd,
|
||||
|
||||
native.mustRegister(Toolchain.newLibglvnd, &Metadata{
|
||||
Name: "libglvnd",
|
||||
Description: "The GL Vendor-Neutral Dispatch library",
|
||||
Website: "https://gitlab.freedesktop.org/glvnd/libglvnd",
|
||||
@@ -72,9 +70,7 @@ func (t Toolchain) newLibdrm() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibdrm,
|
||||
|
||||
native.mustRegister(Toolchain.newLibdrm, &Metadata{
|
||||
Name: "libdrm",
|
||||
Description: "a userspace library for accessing the DRM",
|
||||
Website: "https://dri.freedesktop.org/",
|
||||
@@ -111,9 +107,7 @@ func (t Toolchain) newLibva() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibva,
|
||||
|
||||
native.mustRegister(Toolchain.newLibva, &Metadata{
|
||||
Name: "libva",
|
||||
Description: "an implementation for VA-API (Video Acceleration API)",
|
||||
Website: "https://01.org/vaapi",
|
||||
@@ -238,9 +232,7 @@ func (t Toolchain) newMesa() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newMesa,
|
||||
|
||||
native.mustRegister(Toolchain.newMesa, &Metadata{
|
||||
Name: "mesa",
|
||||
Description: "open source implementations of OpenGL, OpenGL ES, Vulkan, OpenCL, and more",
|
||||
Website: "https://mesa3d.org",
|
||||
|
||||
@@ -52,9 +52,7 @@ python3 ./run_project_tests.py \
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newMeson,
|
||||
|
||||
native.mustRegister(Toolchain.newMeson, &Metadata{
|
||||
Name: "meson",
|
||||
Description: "an open source build system",
|
||||
Website: "https://mesonbuild.com/",
|
||||
|
||||
@@ -36,9 +36,7 @@ ln -vs ../system/bin/sh /work/bin/
|
||||
))), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newMksh,
|
||||
|
||||
native.mustRegister(Toolchain.newMksh, &Metadata{
|
||||
Name: "mksh",
|
||||
Description: "MirBSD Korn Shell",
|
||||
Website: "https://www.mirbsd.org/mksh",
|
||||
|
||||
@@ -24,9 +24,7 @@ func (t Toolchain) newMuslFts() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newMuslFts,
|
||||
|
||||
native.mustRegister(Toolchain.newMuslFts, &Metadata{
|
||||
Name: "musl-fts",
|
||||
Description: "implementation of fts(3) functions which are missing in musl libc",
|
||||
Website: "https://github.com/void-linux/musl-fts",
|
||||
|
||||
@@ -24,9 +24,7 @@ func (t Toolchain) newMuslObstack() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newMuslObstack,
|
||||
|
||||
native.mustRegister(Toolchain.newMuslObstack, &Metadata{
|
||||
Name: "musl-obstack",
|
||||
Description: "obstack functions and macros separated from glibc",
|
||||
Website: "https://github.com/void-linux/musl-obstack",
|
||||
|
||||
@@ -75,11 +75,9 @@ index 715948f4..c2fece68 100644
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newMusl(false)
|
||||
},
|
||||
|
||||
native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newMusl(false)
|
||||
}, &Metadata{
|
||||
Name: "musl",
|
||||
Description: "an implementation of the C standard library",
|
||||
Website: "https://musl.libc.org/",
|
||||
@@ -87,11 +85,9 @@ func init() {
|
||||
ID: 11688,
|
||||
})
|
||||
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newMusl(true)
|
||||
},
|
||||
|
||||
native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newMusl(true)
|
||||
}, &Metadata{
|
||||
Name: "musl-headers",
|
||||
Description: "system installation of musl headers",
|
||||
})
|
||||
|
||||
@@ -26,9 +26,7 @@ func (t Toolchain) newNcurses() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newNcurses,
|
||||
|
||||
native.mustRegister(Toolchain.newNcurses, &Metadata{
|
||||
Name: "ncurses",
|
||||
Description: "a free software emulation of curses in System V Release 4.0 (SVr4)",
|
||||
Website: "https://invisible-island.net/ncurses/",
|
||||
|
||||
@@ -39,9 +39,7 @@ index d223ac2..a7878d0 100644
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibmnl,
|
||||
|
||||
native.mustRegister(Toolchain.newLibmnl, &Metadata{
|
||||
Name: "libmnl",
|
||||
Description: "a minimalistic user-space library oriented to Netlink developers",
|
||||
Website: "https://www.netfilter.org/projects/libmnl/",
|
||||
@@ -77,9 +75,7 @@ func (t Toolchain) newLibnftnl() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibnftnl,
|
||||
|
||||
native.mustRegister(Toolchain.newLibnftnl, &Metadata{
|
||||
Name: "libnftnl",
|
||||
Description: "a userspace library providing a low-level netlink API to the in-kernel nf_tables subsystem",
|
||||
Website: "https://www.netfilter.org/projects/libnftnl/",
|
||||
@@ -131,9 +127,7 @@ chmod +w /etc/ && ln -s ../usr/src/iptables/etc/ethertypes /etc/
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newIPTables,
|
||||
|
||||
native.mustRegister(Toolchain.newIPTables, &Metadata{
|
||||
Name: "iptables",
|
||||
Description: "the userspace command line program used to configure the Linux 2.4.x and later packet filtering ruleset",
|
||||
Website: "https://www.netfilter.org/projects/iptables/",
|
||||
|
||||
@@ -19,9 +19,7 @@ func (t Toolchain) newNettle() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newNettle,
|
||||
|
||||
native.mustRegister(Toolchain.newNettle, &Metadata{
|
||||
Name: "nettle",
|
||||
Description: "a low-level cryptographic library",
|
||||
Website: "https://www.lysator.liu.se/~nisse/nettle/",
|
||||
|
||||
@@ -19,9 +19,7 @@ func (t Toolchain) newNettle3() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newNettle3,
|
||||
|
||||
native.mustRegister(Toolchain.newNettle3, &Metadata{
|
||||
Name: "nettle3",
|
||||
Description: "a low-level cryptographic library",
|
||||
Website: "https://www.lysator.liu.se/~nisse/nettle/",
|
||||
|
||||
@@ -7,8 +7,8 @@ func (t Toolchain) newNinja() (pkg.Artifact, string) {
|
||||
version = "1.13.2"
|
||||
checksum = "ygKWMa0YV2lWKiFro5hnL-vcKbc_-RACZuPu0Io8qDvgQlZ0dxv7hPNSFkt4214v"
|
||||
)
|
||||
python, _ := t.Load(Python)
|
||||
bash, _ := t.Load(Bash)
|
||||
_, python := t.Load(Python)
|
||||
_, bash := t.Load(Bash)
|
||||
return t.New("ninja-"+version, 0, []pkg.Artifact{
|
||||
python,
|
||||
bash,
|
||||
@@ -39,9 +39,7 @@ cp ninja /work/system/bin/
|
||||
))), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newNinja,
|
||||
|
||||
native.mustRegister(Toolchain.newNinja, &Metadata{
|
||||
Name: "ninja",
|
||||
Description: "a small build system with a focus on speed",
|
||||
Website: "https://ninja-build.org/",
|
||||
|
||||
@@ -67,9 +67,7 @@ cp -r \
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newNSS,
|
||||
|
||||
native.mustRegister(Toolchain.newNSS, &Metadata{
|
||||
Name: "nss",
|
||||
Description: "Network Security Services",
|
||||
Website: "https://firefox-source-docs.mozilla.org/security/nss/index.html",
|
||||
@@ -120,9 +118,7 @@ buildcatrust \
|
||||
`), Unversioned
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newNSSCACert,
|
||||
|
||||
native.mustRegister(Toolchain.newNSSCACert, &Metadata{
|
||||
Name: "nss-cacert",
|
||||
Description: "bundle of X.509 certificates of public Certificate Authorities",
|
||||
Website: "https://curl.se/docs/caextract.html",
|
||||
|
||||
@@ -40,9 +40,7 @@ func (t Toolchain) newOpenSSL() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newOpenSSL,
|
||||
|
||||
native.mustRegister(Toolchain.newOpenSSL, &Metadata{
|
||||
Name: "openssl",
|
||||
Description: "TLS/SSL and crypto library",
|
||||
Website: "https://www.openssl.org/",
|
||||
|
||||
@@ -23,9 +23,7 @@ func (t Toolchain) newP11Kit() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newP11Kit,
|
||||
|
||||
native.mustRegister(Toolchain.newP11Kit, &Metadata{
|
||||
Name: "p11-kit",
|
||||
Description: "provides a way to load and enumerate PKCS#11 modules",
|
||||
Website: "https://p11-glue.freedesktop.org/p11-kit.html",
|
||||
|
||||
@@ -32,9 +32,7 @@ ln -s ../system/bin/toybox /bin/echo
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPCRE2,
|
||||
|
||||
native.mustRegister(Toolchain.newPCRE2, &Metadata{
|
||||
Name: "pcre2",
|
||||
Description: "a set of C functions that implement regular expression pattern matching",
|
||||
Website: "https://pcre2project.github.io/pcre2/",
|
||||
|
||||
@@ -50,9 +50,7 @@ chmod +w /system/bin && rm -f /system/bin/ps # perl does not like toybox ps
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerl,
|
||||
|
||||
native.mustRegister(Toolchain.newPerl, &Metadata{
|
||||
Name: "perl",
|
||||
Description: "The Perl Programming language",
|
||||
Website: "https://www.perl.org/",
|
||||
@@ -100,9 +98,7 @@ func (t Toolchain) newPerlModuleBuild() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlModuleBuild,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlModuleBuild, &Metadata{
|
||||
Name: "perl-Module::Build",
|
||||
Description: "build and install Perl modules",
|
||||
Website: "https://metacpan.org/release/Module-Build",
|
||||
@@ -154,9 +150,7 @@ func (t Toolchain) newPerlLocaleGettext() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlLocaleGettext,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlLocaleGettext, &Metadata{
|
||||
Name: "perl-Locale::gettext",
|
||||
Description: "message handling functions",
|
||||
Website: "https://metacpan.org/release/Locale-gettext",
|
||||
@@ -178,9 +172,7 @@ func (t Toolchain) newPerlPodParser() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlPodParser,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlPodParser, &Metadata{
|
||||
Name: "perl-Pod::Parser",
|
||||
Description: "base class for creating POD filters and translators",
|
||||
Website: "https://metacpan.org/release/Pod-Parser",
|
||||
@@ -202,9 +194,7 @@ func (t Toolchain) newPerlSGMLS() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlSGMLS,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlSGMLS, &Metadata{
|
||||
Name: "perl-SGMLS",
|
||||
Description: "class for postprocessing the output from the sgmls and nsgmls parsers",
|
||||
Website: "https://metacpan.org/release/RAAB/SGMLSpm-1.1",
|
||||
@@ -240,9 +230,7 @@ func (t Toolchain) newPerlTermReadKey() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlTermReadKey,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlTermReadKey, &Metadata{
|
||||
Name: "perl-Term::ReadKey",
|
||||
Description: "a perl module for simple terminal control",
|
||||
Website: "https://metacpan.org/release/TermReadKey",
|
||||
@@ -264,9 +252,7 @@ func (t Toolchain) newPerlTextCharWidth() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlTextCharWidth,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlTextCharWidth, &Metadata{
|
||||
Name: "perl-Text::CharWidth",
|
||||
Description: "get number of occupied columns of a string on terminal",
|
||||
Website: "https://metacpan.org/release/Text-CharWidth",
|
||||
@@ -290,9 +276,7 @@ func (t Toolchain) newPerlTextWrapI18N() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlTextWrapI18N,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlTextWrapI18N, &Metadata{
|
||||
Name: "perl-Text::WrapI18N",
|
||||
Description: "line wrapping module",
|
||||
Website: "https://metacpan.org/release/Text-WrapI18N",
|
||||
@@ -318,9 +302,7 @@ func (t Toolchain) newPerlMIMECharset() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlMIMECharset,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlMIMECharset, &Metadata{
|
||||
Name: "perl-MIME::Charset",
|
||||
Description: "Charset Information for MIME",
|
||||
Website: "https://metacpan.org/release/MIME-Charset",
|
||||
@@ -344,9 +326,7 @@ func (t Toolchain) newPerlUnicodeLineBreak() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlUnicodeLineBreak,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlUnicodeLineBreak, &Metadata{
|
||||
Name: "perl-Unicode::LineBreak",
|
||||
Description: "String as Sequence of UAX #29 Grapheme Clusters",
|
||||
Website: "https://metacpan.org/release/Unicode-LineBreak",
|
||||
@@ -372,9 +352,7 @@ func (t Toolchain) newPerlYAMLTiny() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlYAMLTiny,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlYAMLTiny, &Metadata{
|
||||
Name: "perl-YAML::Tiny",
|
||||
Description: "read/write YAML files with as little code as possible",
|
||||
Website: "https://metacpan.org/release/YAML-Tiny",
|
||||
@@ -396,9 +374,7 @@ func (t Toolchain) newPerlTestCmd() (pkg.Artifact, string) {
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPerlTestCmd,
|
||||
|
||||
native.mustRegister(Toolchain.newPerlTestCmd, &Metadata{
|
||||
Name: "perl-Test::Cmd",
|
||||
Description: "portable testing of commands and scripts",
|
||||
Website: "https://metacpan.org/release/Test-Cmd",
|
||||
|
||||
@@ -19,9 +19,7 @@ func (t Toolchain) newPixman() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPixman,
|
||||
|
||||
native.mustRegister(Toolchain.newPixman, &Metadata{
|
||||
Name: "pixman",
|
||||
Description: "a low-level software library for pixel manipulation",
|
||||
Website: "https://pixman.org/",
|
||||
|
||||
@@ -24,9 +24,7 @@ func (t Toolchain) newPkgConfig() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPkgConfig,
|
||||
|
||||
native.mustRegister(Toolchain.newPkgConfig, &Metadata{
|
||||
Name: "pkg-config",
|
||||
Description: "a helper tool used when compiling applications and libraries",
|
||||
Website: "https://pkgconfig.freedesktop.org/",
|
||||
|
||||
@@ -27,9 +27,7 @@ func (t Toolchain) newProcps() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newProcps,
|
||||
|
||||
native.mustRegister(Toolchain.newProcps, &Metadata{
|
||||
Name: "procps",
|
||||
Description: "command line and full screen utilities for browsing procfs",
|
||||
Website: "https://gitlab.com/procps-ng/procps",
|
||||
|
||||
@@ -88,9 +88,7 @@ index 19aea290b58..51603ba9510 100644
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newPython,
|
||||
|
||||
native.mustRegister(Toolchain.newPython, &Metadata{
|
||||
Name: "python",
|
||||
Description: "the Python programming language interpreter",
|
||||
Website: "https://www.python.org/",
|
||||
@@ -200,15 +198,13 @@ func (s *S) newPythonPackage(
|
||||
build P, extra ...ArtifactH,
|
||||
) {
|
||||
name = "python-" + name
|
||||
s.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.NewPackage(name, version, source, attrP, attr, slices.Concat(
|
||||
P{Python},
|
||||
extra,
|
||||
build,
|
||||
)...), version
|
||||
},
|
||||
|
||||
s.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.NewPackage(name, version, source, attrP, attr, slices.Concat(
|
||||
P{Python},
|
||||
extra,
|
||||
build,
|
||||
)...), version
|
||||
}, &Metadata{
|
||||
Name: name,
|
||||
Description: description,
|
||||
Website: website,
|
||||
@@ -352,18 +348,16 @@ func init() {
|
||||
}
|
||||
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
source, version := t.Load(llvmSource)
|
||||
return t.NewPackage("lit", version, source, nil, &PipHelper{
|
||||
Append: []string{"llvm", "utils", "lit"},
|
||||
// already checked during llvm
|
||||
SkipCheck: true,
|
||||
},
|
||||
PythonSetuptools,
|
||||
), version
|
||||
native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
meta, source := t.Load(llvmSource)
|
||||
return t.NewPackage("lit", meta.Version, source, nil, &PipHelper{
|
||||
Append: []string{"llvm", "utils", "lit"},
|
||||
// already checked during llvm
|
||||
SkipCheck: true,
|
||||
},
|
||||
|
||||
PythonSetuptools,
|
||||
), meta.Version
|
||||
}, &Metadata{
|
||||
Name: "lit",
|
||||
Description: "a portable tool for executing LLVM and Clang style test suites",
|
||||
Website: "https://llvm.org/docs/CommandGuide/lit.html",
|
||||
|
||||
@@ -94,9 +94,7 @@ EOF
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newQEMU,
|
||||
|
||||
native.mustRegister(Toolchain.newQEMU, &Metadata{
|
||||
Name: "qemu",
|
||||
Description: "a generic and open source machine emulator and virtualizer",
|
||||
Website: "https://www.qemu.org/",
|
||||
|
||||
@@ -21,9 +21,7 @@ ln -s ../system/bin/toybox /bin/echo
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newRdfind,
|
||||
|
||||
native.mustRegister(Toolchain.newRdfind, &Metadata{
|
||||
Name: "rdfind",
|
||||
Description: "a program that finds duplicate files",
|
||||
Website: "https://rdfind.pauldreik.se/",
|
||||
|
||||
@@ -34,11 +34,10 @@ func WriteReport(msg message.Msg, w io.Writer, c *pkg.Cache) error {
|
||||
)
|
||||
t := native.Std()
|
||||
for _, p := range native.Collect() {
|
||||
meta := native.Get(p)
|
||||
meta, a := t.MustLoad(p)
|
||||
if meta == nil {
|
||||
return errors.New("artifact " + p.String() + " in inconsistent state")
|
||||
}
|
||||
a, _ := t.MustLoad(p)
|
||||
if _, ok := a.(pkg.FileArtifact); ok {
|
||||
msg.Verbosef("skipping file artifact %s", meta.Name)
|
||||
continue
|
||||
|
||||
@@ -249,7 +249,7 @@ func (t Toolchain) New(
|
||||
support = append(support, extra...)
|
||||
support = append(support, cureEtc{})
|
||||
if t.stage == stageEarly {
|
||||
a, _ := t.Load(stage0Dist)
|
||||
_, a := t.MustLoad(stage0Dist)
|
||||
support = append(support, a)
|
||||
} else {
|
||||
support = append(support, t.S.New(_stageBusybox).New("gentoo", 0, nil, nil, nil, `
|
||||
@@ -438,10 +438,11 @@ func (t Toolchain) appendHandle(a []pkg.Artifact, pv pa, p ArtifactH) []pkg.Arti
|
||||
}
|
||||
pv[p] = struct{}{}
|
||||
|
||||
for _, d := range t.MustGet(p).Dependencies {
|
||||
meta, _ := t.MustLoad(p)
|
||||
for _, d := range meta.Dependencies {
|
||||
a = t.appendHandle(a, pv, d)
|
||||
}
|
||||
d, _ := t.Load(p)
|
||||
_, d := t.MustLoad(p)
|
||||
return append(a, d)
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +78,8 @@ func TestCureAll(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, p := range rosa.Native().Collect() {
|
||||
a, _ := rosa.Native().Std().MustLoad(p)
|
||||
meta := rosa.Native().MustGet(p)
|
||||
t.Run(meta.Name, func(t *testing.T) {
|
||||
_, a := rosa.Native().Std().MustLoad(p)
|
||||
t.Run(p.String(), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if pathname, _, err := cache.Cure(a); err != nil {
|
||||
|
||||
@@ -27,9 +27,7 @@ func (t Toolchain) newRsync() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newRsync,
|
||||
|
||||
native.mustRegister(Toolchain.newRsync, &Metadata{
|
||||
Name: "rsync",
|
||||
Description: "an open source utility that provides fast incremental file transfer",
|
||||
Website: "https://rsync.samba.org/",
|
||||
|
||||
@@ -42,9 +42,7 @@ func (t Toolchain) newSquashfsTools() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newSquashfsTools,
|
||||
|
||||
native.mustRegister(Toolchain.newSquashfsTools, &Metadata{
|
||||
Name: "squashfs-tools",
|
||||
Description: "tools to create and extract Squashfs filesystems",
|
||||
Website: "https://github.com/plougher/squashfs-tools",
|
||||
|
||||
@@ -5,10 +5,16 @@ import (
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newStage0() (pkg.Artifact, string) {
|
||||
return t.New("rosa-stage0", 0, t.Append(nil,
|
||||
Bzip2,
|
||||
), nil, nil, `
|
||||
func init() {
|
||||
meta := Metadata{
|
||||
Name: "rosa-stage0",
|
||||
Description: "Rosa OS stage0 toolchain tarball for bootstrap",
|
||||
Version: Unversioned,
|
||||
}
|
||||
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
return &meta, t.New("rosa-stage0", 0, t.Append(nil,
|
||||
Bzip2,
|
||||
), nil, nil, `
|
||||
umask 377
|
||||
tar \
|
||||
-vjc \
|
||||
@@ -16,38 +22,30 @@ tar \
|
||||
-f /work/stage0-`+t.triple()+`.tar.bz2 \
|
||||
.
|
||||
`, pkg.Path(fhs.AbsRoot.Append("stage0"), false, t.Append(nil,
|
||||
LLVM,
|
||||
Mksh,
|
||||
toyboxEarly,
|
||||
)...)), Unversioned
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newStage0,
|
||||
|
||||
Name: "rosa-stage0",
|
||||
Description: "Rosa OS stage0 toolchain tarball for bootstrap",
|
||||
LLVM,
|
||||
Mksh,
|
||||
toyboxEarly,
|
||||
)...))
|
||||
})
|
||||
}
|
||||
|
||||
func init() {
|
||||
const version = "20260504"
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return newTar(
|
||||
"https://hakurei.app/seed/"+version+"/"+
|
||||
"stage0-"+t.triple()+".tar.bz2",
|
||||
perArch[string]{
|
||||
"amd64": "IQjFDkiAVLo1XzflgMMiLP3gnVY2hhDMTzl-QqJDCQhcLQ3lLtRzjI5WCxGyW_lk",
|
||||
"arm64": "6fmwl2Umx2QssKQvxxb1JOGkAjzfA_MXKku0jVdGjYGb35OvwEVA5NYtd0HIy3yH",
|
||||
"riscv64": "Z2ODV0rIoo9iQRUIu35bsaOBeXc_9qQfGcyb2aGneatzNUJlXh5emSpEV2bOklUL",
|
||||
}.unwrap(t.S),
|
||||
pkg.TarBzip2,
|
||||
), version
|
||||
},
|
||||
|
||||
meta := Metadata{
|
||||
Name: "stage0-dist",
|
||||
Description: "Rosa OS stage0 bootstrap seed",
|
||||
Version: "20260504",
|
||||
}
|
||||
native.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
return &meta, newTar(
|
||||
"https://hakurei.app/seed/"+meta.Version+"/"+
|
||||
"stage0-"+t.triple()+".tar.bz2",
|
||||
perArch[string]{
|
||||
"amd64": "IQjFDkiAVLo1XzflgMMiLP3gnVY2hhDMTzl-QqJDCQhcLQ3lLtRzjI5WCxGyW_lk",
|
||||
"arm64": "6fmwl2Umx2QssKQvxxb1JOGkAjzfA_MXKku0jVdGjYGb35OvwEVA5NYtd0HIy3yH",
|
||||
"riscv64": "Z2ODV0rIoo9iQRUIu35bsaOBeXc_9qQfGcyb2aGneatzNUJlXh5emSpEV2bOklUL",
|
||||
}.unwrap(t.S),
|
||||
pkg.TarBzip2,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -70,11 +70,9 @@ type (
|
||||
// P represents multiple [ArtifactH].
|
||||
type P []ArtifactH
|
||||
|
||||
// Artifact is stage-agnostic immutable data with a deterministic resulting
|
||||
// [pkg.Artifact]. It can be created natively or through evaluation.
|
||||
type Artifact struct {
|
||||
f func(t Toolchain) (a pkg.Artifact, version string)
|
||||
|
||||
// Metadata is stage-agnostic immutable data around [Artifact] not directly
|
||||
// representable in the resulting [pkg.Artifact].
|
||||
type Metadata struct {
|
||||
// Unique package name.
|
||||
Name string `json:"name"`
|
||||
// Short user-facing description.
|
||||
@@ -85,6 +83,8 @@ type Artifact struct {
|
||||
// Runtime dependencies.
|
||||
Dependencies P `json:"dependencies"`
|
||||
|
||||
// Package version.
|
||||
Version string `json:"version"`
|
||||
// Project identifier on [Anitya].
|
||||
//
|
||||
// [Anitya]: https://release-monitoring.org/
|
||||
@@ -98,7 +98,7 @@ type Artifact struct {
|
||||
}
|
||||
|
||||
// GetLatest returns the latest version described by v.
|
||||
func (meta *Artifact) GetLatest(v *Versions) string {
|
||||
func (meta *Metadata) GetLatest(v *Versions) string {
|
||||
if meta.latest != nil {
|
||||
return meta.latest(v)
|
||||
}
|
||||
@@ -134,7 +134,7 @@ func (v *Versions) getStable() string {
|
||||
}
|
||||
|
||||
// GetVersions returns versions fetched from Anitya.
|
||||
func (meta *Artifact) GetVersions(ctx context.Context) (*Versions, error) {
|
||||
func (meta *Metadata) GetVersions(ctx context.Context) (*Versions, error) {
|
||||
if meta.ID == 0 {
|
||||
return nil, UnpopulatedIDError{}
|
||||
}
|
||||
@@ -160,10 +160,13 @@ func (meta *Artifact) GetVersions(ctx context.Context) (*Versions, error) {
|
||||
return &v, errors.Join(err, resp.Body.Close())
|
||||
}
|
||||
|
||||
// A cachedArtifact holds [pkg.Artifact] and its corresponding version string.
|
||||
// Artifact is a lazily initialised [pkg.Artifact] with associated [Metadata].
|
||||
type Artifact func(t Toolchain) (meta *Metadata, a pkg.Artifact)
|
||||
|
||||
// A cachedArtifact caches satisfied [Artifact].
|
||||
type cachedArtifact struct {
|
||||
a pkg.Artifact
|
||||
v string
|
||||
meta *Metadata
|
||||
a pkg.Artifact
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -242,20 +245,20 @@ func (s *S) DropCaches(targetArch string, flags int) {
|
||||
}
|
||||
}
|
||||
|
||||
// Get returns the address of the named [Artifact].
|
||||
func (s *S) Get(handle ArtifactH) (meta *Artifact) {
|
||||
// get returns the named [Artifact].
|
||||
func (s *S) get(handle ArtifactH) (f Artifact) {
|
||||
s.wantsArch()
|
||||
v, ok := s.artifacts.Load(handle)
|
||||
if ok {
|
||||
meta = v.(*Artifact)
|
||||
f = v.(Artifact)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// MustGet is like Get, but panics if the named [Artifact] is not registered.
|
||||
func (s *S) MustGet(handle ArtifactH) (meta *Artifact) {
|
||||
meta = s.Get(handle)
|
||||
if meta == nil {
|
||||
// mustGet is like get, but panics if the named [Artifact] is not registered.
|
||||
func (s *S) mustGet(handle ArtifactH) (f Artifact) {
|
||||
f = s.get(handle)
|
||||
if f == nil {
|
||||
panic(HandleError(handle))
|
||||
}
|
||||
return
|
||||
@@ -282,8 +285,8 @@ func (e LoadError) Error() string {
|
||||
return "cannot load " + strconv.Quote(e.Handle.String()) + ": " + e.Err.Error()
|
||||
}
|
||||
|
||||
// Load returns the resulting [pkg.Artifact] of [ArtifactH].
|
||||
func (t Toolchain) Load(handle ArtifactH) (pkg.Artifact, string) {
|
||||
// Load satisfies an [Artifact] referred to by an [ArtifactH].
|
||||
func (t Toolchain) Load(handle ArtifactH) (*Metadata, pkg.Artifact) {
|
||||
defer func() {
|
||||
r := recover()
|
||||
if r == nil {
|
||||
@@ -305,36 +308,36 @@ func (t Toolchain) Load(handle ArtifactH) (pkg.Artifact, string) {
|
||||
e, ok := t.c[t.stage].Load(handle)
|
||||
if ok {
|
||||
r := e.(cachedArtifact)
|
||||
return r.a, r.v
|
||||
return r.meta, r.a
|
||||
}
|
||||
|
||||
meta := t.Get(handle)
|
||||
if meta == nil {
|
||||
return nil, ""
|
||||
f := t.get(handle)
|
||||
if f == nil {
|
||||
return nil, nil
|
||||
}
|
||||
var r cachedArtifact
|
||||
r.a, r.v = meta.f(t)
|
||||
r.meta, r.a = f(t)
|
||||
t.c[t.stage].Store(handle, r)
|
||||
return r.a, r.v
|
||||
return r.meta, r.a
|
||||
}
|
||||
|
||||
// MustLoad is like Load, but panics if the named [Artifact] is not registered.
|
||||
func (t Toolchain) MustLoad(handle ArtifactH) (pkg.Artifact, string) {
|
||||
a, version := t.Load(handle)
|
||||
if a == nil {
|
||||
func (t Toolchain) MustLoad(handle ArtifactH) (*Metadata, pkg.Artifact) {
|
||||
meta, a := t.Load(handle)
|
||||
if meta == nil {
|
||||
panic(HandleError(handle))
|
||||
}
|
||||
return a, version
|
||||
return meta, a
|
||||
}
|
||||
|
||||
// Register arranges for a new [Artifact] to be cured under s. It returns false
|
||||
// if another [Artifact] is already registered under the same name.
|
||||
func (s *S) Register(meta *Artifact) bool {
|
||||
if meta.Name == "" {
|
||||
func (s *S) Register(name string, f Artifact) bool {
|
||||
if name == "" {
|
||||
return false
|
||||
}
|
||||
p := ArtifactH(unique.Make(meta.Name))
|
||||
_, ok := s.artifacts.LoadOrStore(p, meta)
|
||||
p := ArtifactH(unique.Make(name))
|
||||
_, ok := s.artifacts.LoadOrStore(p, f)
|
||||
if !ok {
|
||||
s.artifactCount.Add(1)
|
||||
}
|
||||
@@ -346,16 +349,34 @@ func (s *S) Register(meta *Artifact) bool {
|
||||
type RegisterError ArtifactH
|
||||
|
||||
func (e RegisterError) Error() string {
|
||||
if ArtifactH(e).String() == "" {
|
||||
return "attempting to register invalid name"
|
||||
}
|
||||
return "attempting to register " + strconv.Quote(ArtifactH(e).String()) + " twice"
|
||||
}
|
||||
|
||||
// MustRegister is like Register, but panics if registration fails.
|
||||
func (s *S) MustRegister(meta *Artifact) {
|
||||
if !s.Register(meta) {
|
||||
panic(RegisterError(H(meta.Name)))
|
||||
func (s *S) MustRegister(name string, f Artifact) {
|
||||
if !s.Register(name, f) {
|
||||
panic(RegisterError(H(name)))
|
||||
}
|
||||
}
|
||||
|
||||
// mustRegister registers an [Artifact] with the old function signature.
|
||||
//
|
||||
// Deprecated: Artifacts should be migrated to Register.
|
||||
func (s *S) mustRegister(
|
||||
f func(t Toolchain) (pkg.Artifact, string),
|
||||
meta *Metadata,
|
||||
) {
|
||||
s.MustRegister(meta.Name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
v := *meta
|
||||
a, version := f(t)
|
||||
v.Version = version
|
||||
return &v, a
|
||||
})
|
||||
}
|
||||
|
||||
// Count returns the number of [Artifact] registered to s.
|
||||
func (s *S) Count() int {
|
||||
return int(s.artifactCount.Load())
|
||||
@@ -567,7 +588,7 @@ func (ctx *evalContext) f(
|
||||
return unique.Make(azalea.Ident(name))
|
||||
}
|
||||
|
||||
meta := Artifact{Name: string(name)}
|
||||
meta := Metadata{Name: string(name)}
|
||||
var (
|
||||
attr PackageAttr
|
||||
patches []string
|
||||
@@ -575,7 +596,6 @@ func (ctx *evalContext) f(
|
||||
early bool
|
||||
|
||||
anitya int64
|
||||
version string
|
||||
sourceA any
|
||||
helper Helper
|
||||
|
||||
@@ -584,11 +604,9 @@ func (ctx *evalContext) f(
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("description"): &meta.Description,
|
||||
k("website"): &meta.Website,
|
||||
k("version"): &meta.Version,
|
||||
k("anitya"): &anitya,
|
||||
|
||||
k("version"): &version,
|
||||
k("source"): &sourceA,
|
||||
|
||||
k("writable"): &attr.Writable,
|
||||
k("chmod"): &attr.Chmod,
|
||||
k("enterSource"): &attr.EnterSource,
|
||||
@@ -598,6 +616,7 @@ func (ctx *evalContext) f(
|
||||
k("exclusive"): &excl,
|
||||
k("toyboxEarly"): &early,
|
||||
|
||||
k("source"): &sourceA,
|
||||
k("exec"): &helper,
|
||||
k("inputs"): &inputs,
|
||||
k("runtime"): &runtimes,
|
||||
@@ -630,7 +649,7 @@ func (ctx *evalContext) f(
|
||||
}
|
||||
|
||||
meta.ID = int(anitya)
|
||||
meta.f = func(t Toolchain) (pkg.Artifact, string) {
|
||||
v = Artifact(func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
var source pkg.Artifact
|
||||
switch p := sourceA.(type) {
|
||||
case pkg.Artifact:
|
||||
@@ -646,17 +665,15 @@ func (ctx *evalContext) f(
|
||||
})
|
||||
}
|
||||
|
||||
return t.NewPackage(
|
||||
return &meta, t.NewPackage(
|
||||
meta.Name,
|
||||
version,
|
||||
meta.Version,
|
||||
source,
|
||||
&attr,
|
||||
helper,
|
||||
inputsH...,
|
||||
), version
|
||||
}
|
||||
|
||||
v = meta
|
||||
)
|
||||
})
|
||||
set = true
|
||||
return
|
||||
}
|
||||
@@ -686,13 +703,13 @@ func (s *S) Evaluate(r io.Reader, b fs.FS) error {
|
||||
|
||||
ctx := evalContext{b}
|
||||
for _, f := range pending {
|
||||
meta, set, err := azalea.Evaluate[Artifact](ctx.f, s.getS(), *f)
|
||||
lf, set, err := azalea.Evaluate[Artifact](ctx.f, s.getS(), *f)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if !set {
|
||||
return errors.New("unexpected unset")
|
||||
}
|
||||
if !s.Register(&meta) {
|
||||
if !s.Register(string(f.Ident), lf) {
|
||||
return RegisterError(H(string(f.Ident)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ func TestLoad(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, p := range rosa.Native().Collect() {
|
||||
t.Run(rosa.Native().MustGet(p).Name, func(t *testing.T) {
|
||||
t.Run(p.String(), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
rosa.Native().Std().MustLoad(p)
|
||||
|
||||
@@ -37,9 +37,7 @@ sed -i 's/unsigned int msg_len;$/uint32_t msg_len;/g' \
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newStrace,
|
||||
|
||||
native.mustRegister(Toolchain.newStrace, &Metadata{
|
||||
Name: "strace",
|
||||
Description: "a diagnostic, debugging and instructional userspace utility",
|
||||
Website: "https://strace.io/",
|
||||
|
||||
@@ -40,9 +40,7 @@ rm \
|
||||
))), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newTamaGo,
|
||||
|
||||
native.mustRegister(Toolchain.newTamaGo, &Metadata{
|
||||
Name: "tamago",
|
||||
Description: "a Go toolchain extended with support for bare metal execution",
|
||||
Website: "https://github.com/usbarmory/tamago-go",
|
||||
|
||||
@@ -59,11 +59,9 @@ ln -s ../../system/bin/env /work/usr/bin
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newToybox("", "")
|
||||
},
|
||||
|
||||
native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newToybox("", "")
|
||||
}, &Metadata{
|
||||
Name: "toybox",
|
||||
Description: "many common Linux command line utilities",
|
||||
Website: "https://landley.net/toybox/",
|
||||
@@ -71,9 +69,8 @@ func init() {
|
||||
ID: 13818,
|
||||
})
|
||||
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newToybox("-early", `
|
||||
native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newToybox("-early", `
|
||||
echo '
|
||||
CONFIG_EXPR=y
|
||||
CONFIG_TR=y
|
||||
@@ -81,8 +78,7 @@ CONFIG_AWK=y
|
||||
CONFIG_DIFF=y
|
||||
' >> .config
|
||||
`)
|
||||
},
|
||||
|
||||
}, &Metadata{
|
||||
Name: "toybox-early",
|
||||
Description: "a build of toybox with unfinished tools enabled to break dependency loops",
|
||||
Website: "https://landley.net/toybox/",
|
||||
|
||||
@@ -32,9 +32,7 @@ mv unzip /work/system/bin/
|
||||
))), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newUnzip,
|
||||
|
||||
native.mustRegister(Toolchain.newUnzip, &Metadata{
|
||||
Name: "unzip",
|
||||
Description: "portable compression/archiver utilities",
|
||||
Website: "https://infozip.sourceforge.net/",
|
||||
|
||||
@@ -47,9 +47,7 @@ ln -s ../system/bin/bash /bin/
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newUtilLinux,
|
||||
|
||||
native.mustRegister(Toolchain.newUtilLinux, &Metadata{
|
||||
Name: "util-linux",
|
||||
Description: "a random collection of Linux utilities",
|
||||
Website: "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git",
|
||||
|
||||
@@ -29,9 +29,7 @@ func (t Toolchain) newVIM() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newVIM,
|
||||
|
||||
native.mustRegister(Toolchain.newVIM, &Metadata{
|
||||
Name: "vim",
|
||||
Description: "a greatly improved version of the good old UNIX editor Vi",
|
||||
Website: "https://www.vim.org",
|
||||
|
||||
@@ -35,9 +35,7 @@ echo 'int main(){}' > tests/sanity-test.c
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newWayland,
|
||||
|
||||
native.mustRegister(Toolchain.newWayland, &Metadata{
|
||||
Name: "wayland",
|
||||
Description: "core Wayland window system code and protocol",
|
||||
Website: "https://wayland.freedesktop.org/",
|
||||
@@ -121,9 +119,7 @@ GitLab
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newWaylandProtocols,
|
||||
|
||||
native.mustRegister(Toolchain.newWaylandProtocols, &Metadata{
|
||||
Name: "wayland-protocols",
|
||||
Description: "Additional standard Wayland protocols",
|
||||
Website: "https://wayland.freedesktop.org/",
|
||||
|
||||
@@ -15,9 +15,7 @@ func (t Toolchain) newUtilMacros() (pkg.Artifact, string) {
|
||||
), nil, (*MakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newUtilMacros,
|
||||
|
||||
native.mustRegister(Toolchain.newUtilMacros, &Metadata{
|
||||
Name: "util-macros",
|
||||
Description: "X.Org Autotools macros",
|
||||
Website: "https://xorg.freedesktop.org/",
|
||||
@@ -47,9 +45,7 @@ func (t Toolchain) newLibxtrans() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxtrans,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxtrans, &Metadata{
|
||||
Name: "libxtrans",
|
||||
Description: "X Window System Protocols Transport layer shared code",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxtrans",
|
||||
@@ -78,9 +74,7 @@ func (t Toolchain) newXorgProto() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXorgProto,
|
||||
|
||||
native.mustRegister(Toolchain.newXorgProto, &Metadata{
|
||||
Name: "xorgproto",
|
||||
Description: "X Window System unified protocol definitions",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/proto/xorgproto",
|
||||
@@ -112,9 +106,7 @@ func (t Toolchain) newLibXau() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXau,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXau, &Metadata{
|
||||
Name: "libXau",
|
||||
Description: "functions for handling Xauthority files and entries",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxau",
|
||||
@@ -141,9 +133,7 @@ func (t Toolchain) newXCBProto() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXCBProto,
|
||||
|
||||
native.mustRegister(Toolchain.newXCBProto, &Metadata{
|
||||
Name: "xcb-proto",
|
||||
Description: "XML-XCB protocol descriptions used by libxcb for the X11 protocol & extensions",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/proto/xcbproto",
|
||||
@@ -170,9 +160,7 @@ func (t Toolchain) newXCB() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXCB,
|
||||
|
||||
native.mustRegister(Toolchain.newXCB, &Metadata{
|
||||
Name: "xcb",
|
||||
Description: "The X protocol C-language Binding",
|
||||
Website: "https://xcb.freedesktop.org/",
|
||||
@@ -202,9 +190,7 @@ func (t Toolchain) newLibxcbUtilKeysyms() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxcbUtilKeysyms,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxcbUtilKeysyms, &Metadata{
|
||||
Name: "libxcb-util-keysyms",
|
||||
Description: "standard X key constants and conversion to/from keycodes",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms",
|
||||
@@ -233,9 +219,7 @@ func (t Toolchain) newLibxcbUtilImage() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxcbUtilImage,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxcbUtilImage, &Metadata{
|
||||
Name: "libxcb-util-image",
|
||||
Description: "XCB port of Xlib's XImage and XShmImage functions",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-image",
|
||||
@@ -265,9 +249,7 @@ func (t Toolchain) newLibxcbUtilWM() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxcbUtilWM,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxcbUtilWM, &Metadata{
|
||||
Name: "libxcb-util-wm",
|
||||
Description: "XCB client and window-manager helpers for ICCCM & EWMH",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-wm",
|
||||
@@ -298,9 +280,7 @@ func (t Toolchain) newLibxcbUtil() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxcbUtil,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxcbUtil, &Metadata{
|
||||
Name: "libxcb-util",
|
||||
Description: "XCB utility libraries",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-util",
|
||||
@@ -331,9 +311,7 @@ func (t Toolchain) newLibxcbRenderUtil() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxcbRenderUtil,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxcbRenderUtil, &Metadata{
|
||||
Name: "libxcb-render-util",
|
||||
Description: "XCB convenience functions for the Render extension",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-render-util",
|
||||
@@ -375,9 +353,7 @@ func (t Toolchain) newLibX11() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibX11,
|
||||
|
||||
native.mustRegister(Toolchain.newLibX11, &Metadata{
|
||||
Name: "libX11",
|
||||
Description: `Core X11 protocol client library (aka "Xlib")`,
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libx11",
|
||||
@@ -412,9 +388,7 @@ func (t Toolchain) newLibXext() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXext,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXext, &Metadata{
|
||||
Name: "libXext",
|
||||
Description: "Xlib-based library for common extensions to the X11 protocol",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxext",
|
||||
@@ -450,9 +424,7 @@ func (t Toolchain) newLibXfixes() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXfixes,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXfixes, &Metadata{
|
||||
Name: "libXfixes",
|
||||
Description: "Xlib-based library for the XFIXES Extension",
|
||||
Website: "https://www.freedesktop.org/wiki/Software/FixesExt/",
|
||||
@@ -487,9 +459,7 @@ func (t Toolchain) newLibXrender() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXrender,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXrender, &Metadata{
|
||||
Name: "libXrender",
|
||||
Description: "Xlib library for the Render Extension to the X11 protocol",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxrender",
|
||||
@@ -524,9 +494,7 @@ func (t Toolchain) newLibxshmfence() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxshmfence,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxshmfence, &Metadata{
|
||||
Name: "libxshmfence",
|
||||
Description: "shared memory 'SyncFence' synchronization primitive",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxshmfence",
|
||||
@@ -558,9 +526,7 @@ func (t Toolchain) newLibXxf86vm() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXxf86vm,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXxf86vm, &Metadata{
|
||||
Name: "libXxf86vm",
|
||||
Description: "Xlib-based library for the XFree86-VidMode X extension",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxxf86vm",
|
||||
@@ -597,9 +563,7 @@ func (t Toolchain) newLibXrandr() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXrandr,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXrandr, &Metadata{
|
||||
Name: "libXrandr",
|
||||
Description: "Xlib Resize, Rotate and Reflection (RandR) extension library",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxrandr",
|
||||
@@ -634,9 +598,7 @@ func (t Toolchain) newFontUtil() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newFontUtil,
|
||||
|
||||
native.mustRegister(Toolchain.newFontUtil, &Metadata{
|
||||
Name: "font-util",
|
||||
Description: "X.Org font package creation/installation utilities",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/font/util",
|
||||
@@ -668,9 +630,7 @@ func (t Toolchain) newLibfontenc() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibfontenc,
|
||||
|
||||
native.mustRegister(Toolchain.newLibfontenc, &Metadata{
|
||||
Name: "libfontenc",
|
||||
Description: "X font encoding library",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libfontenc",
|
||||
@@ -694,9 +654,7 @@ func (t Toolchain) newLibxkbfile() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxkbfile,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxkbfile, &Metadata{
|
||||
Name: "libxkbfile",
|
||||
Description: "XKB file handling routines",
|
||||
Website: "http://www.x.org/wiki/XKB",
|
||||
@@ -732,9 +690,7 @@ func (t Toolchain) newXkbcomp() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXkbcomp,
|
||||
|
||||
native.mustRegister(Toolchain.newXkbcomp, &Metadata{
|
||||
Name: "xkbcomp",
|
||||
Description: "XKB keyboard description compiler",
|
||||
Website: "http://www.x.org/wiki/XKB",
|
||||
@@ -772,9 +728,7 @@ func (t Toolchain) newLibXfont2() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXfont2,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXfont2, &Metadata{
|
||||
Name: "libXfont2",
|
||||
Description: "X font handling library for server & utilities",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxfont",
|
||||
@@ -801,9 +755,7 @@ func (t Toolchain) newLibxcvt() (pkg.Artifact, string) {
|
||||
), nil, (*MesonHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibxcvt,
|
||||
|
||||
native.mustRegister(Toolchain.newLibxcvt, &Metadata{
|
||||
Name: "libxcvt",
|
||||
Description: "VESA CVT standard timing modeline generation library & utility",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcvt",
|
||||
@@ -834,9 +786,7 @@ func (t Toolchain) newLibXdmcp() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibXdmcp,
|
||||
|
||||
native.mustRegister(Toolchain.newLibXdmcp, &Metadata{
|
||||
Name: "libXdmcp",
|
||||
Description: "X Display Manager Control Protocol library",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxdmcp",
|
||||
@@ -860,9 +810,7 @@ func (t Toolchain) newXkeyboardConfig() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXkeyboardConfig,
|
||||
|
||||
native.mustRegister(Toolchain.newXkeyboardConfig, &Metadata{
|
||||
Name: "xkeyboard-config",
|
||||
Description: "the non-arch keyboard configuration database for X Window",
|
||||
Website: "https://www.freedesktop.org/wiki/Software/XKeyboardConfig/",
|
||||
@@ -888,9 +836,7 @@ func (t Toolchain) newLibpciaccess() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newLibpciaccess,
|
||||
|
||||
native.mustRegister(Toolchain.newLibpciaccess, &Metadata{
|
||||
Name: "libpciaccess",
|
||||
Description: "generic PCI access library",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libpciaccess",
|
||||
@@ -955,9 +901,7 @@ func (t Toolchain) newXserver() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXserver,
|
||||
|
||||
native.mustRegister(Toolchain.newXserver, &Metadata{
|
||||
Name: "xserver",
|
||||
Description: "X server",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/xserver",
|
||||
|
||||
@@ -18,9 +18,7 @@ func (t Toolchain) newXZ() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newXZ,
|
||||
|
||||
native.mustRegister(Toolchain.newXZ, &Metadata{
|
||||
Name: "xz",
|
||||
Description: "XZ Utils",
|
||||
Website: "https://tukaani.org/xz/",
|
||||
|
||||
@@ -28,9 +28,7 @@ func (t Toolchain) newZlib() (pkg.Artifact, string) {
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newZlib,
|
||||
|
||||
native.mustRegister(Toolchain.newZlib, &Metadata{
|
||||
Name: "zlib",
|
||||
Description: "lossless data-compression library",
|
||||
Website: "https://zlib.net/",
|
||||
|
||||
@@ -29,9 +29,7 @@ ZSTD_BIN=/cure/programs/zstd /usr/src/zstd/tests/playTests.sh
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.MustRegister(&Artifact{
|
||||
f: Toolchain.newZstd,
|
||||
|
||||
native.mustRegister(Toolchain.newZstd, &Metadata{
|
||||
Name: "zstd",
|
||||
Description: "a fast compression algorithm",
|
||||
Website: "https://facebook.github.io/zstd/",
|
||||
|
||||
Reference in New Issue
Block a user