internal/rosa/package: migrate many libraries
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / ShareFS (push) Successful in 3m44s
Test / Hakurei (push) Successful in 3m58s
Test / Sandbox (race detector) (push) Successful in 5m30s
Test / Hakurei (race detector) (push) Successful in 6m34s
Test / Flake checks (push) Successful in 1m23s
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / ShareFS (push) Successful in 3m44s
Test / Hakurei (push) Successful in 3m58s
Test / Sandbox (race detector) (push) Successful in 5m30s
Test / Hakurei (race detector) (push) Successful in 6m34s
Test / Flake checks (push) Successful in 1m23s
This also adds more string helpers. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibmd() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.2.0"
|
||||
checksum = "1rJ6joAO0wwMZvSfnRNkc1MOhywyAq7SM8VmF92NvDtv7Qdl1LRbjm5fg_DFFtGj"
|
||||
)
|
||||
return t.NewPackage("libmd", version, t.newTagRemote(
|
||||
"https://git.hadrons.org/git/libmd.git",
|
||||
version, checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "echo '" + version + "' > .dist-version && ./autogen",
|
||||
ScriptMakeEarly: `
|
||||
install -D /usr/src/libmd/src/helper.c src/helper.c
|
||||
`,
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibmd, &Metadata{
|
||||
Name: "libmd",
|
||||
Description: "Message Digest functions from BSD systems",
|
||||
Website: "https://www.hadrons.org/software/libmd/",
|
||||
|
||||
ID: 15525,
|
||||
})
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibbsd() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.12.2"
|
||||
checksum = "NVS0xFLTwSP8JiElEftsZ-e1_C-IgJhHrHE77RwKt5178M7r087waO-zYx2_dfGX"
|
||||
)
|
||||
return t.NewPackage("libbsd", version, t.newTagRemote(
|
||||
"https://gitlab.freedesktop.org/libbsd/libbsd.git",
|
||||
version, checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "echo '" + version + "' > .dist-version && ./autogen",
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
|
||||
Libmd,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibbsd, &Metadata{
|
||||
Name: "libbsd",
|
||||
Description: "provides useful functions commonly found on BSD systems",
|
||||
Website: "https://libbsd.freedesktop.org/",
|
||||
|
||||
ID: 1567,
|
||||
})
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibcap() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.78"
|
||||
checksum = "wFdUkBhFMD9InPnrBZyegWrlPSAg_9JiTBC-eSFyWWlmbzL2qjh2mKxr9Kx2a8ut"
|
||||
)
|
||||
return t.NewPackage("libcap", version, newTar(
|
||||
"https://git.kernel.org/pub/scm/libs/libcap/libcap.git/"+
|
||||
"snapshot/libcap-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), &PackageAttr{
|
||||
// uses source tree as scratch space
|
||||
Writable: true,
|
||||
Chmod: true,
|
||||
|
||||
Env: []string{
|
||||
"prefix=/system",
|
||||
"lib=lib",
|
||||
},
|
||||
ScriptEarly: `
|
||||
ln -s ../system/bin/bash /bin/
|
||||
`,
|
||||
}, &MakeHelper{
|
||||
SkipConfigure: true,
|
||||
InPlace: true,
|
||||
|
||||
Make: []string{
|
||||
"CC=cc",
|
||||
"all",
|
||||
},
|
||||
Check: []string{
|
||||
"CC=cc",
|
||||
"test",
|
||||
},
|
||||
},
|
||||
Bash,
|
||||
Diffutils,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
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/",
|
||||
|
||||
ID: 1569,
|
||||
})
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibdisplayInfo() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.3.0"
|
||||
checksum = "yjOqPUHHYgRtpqGw5RI1n2Q1_hO5j0LiFNMbjcRWV4Nf71XwwoC9fZMlKBDeLchT"
|
||||
)
|
||||
return t.NewPackage("libdisplay-info", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"emersion/libdisplay-info",
|
||||
version, checksum,
|
||||
), nil, (*MesonHelper)(nil),
|
||||
Diffutils,
|
||||
|
||||
Hwdata,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibdisplayInfo, &Metadata{
|
||||
Name: "libdisplay-info",
|
||||
Description: "EDID and DisplayID library",
|
||||
Website: "https://gitlab.freedesktop.org/emersion/libdisplay-info",
|
||||
|
||||
ID: 326668,
|
||||
})
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibepoxy() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.5.10"
|
||||
checksum = "OHI8wshrlGw6BMGrmSyejJtwzM2gPhyFJrTsKxULyKMmYrfgcOe7Iw2ibVoUND_Q"
|
||||
)
|
||||
return t.NewPackage("libepoxy", version, newFromGitHub(
|
||||
"anholt/libepoxy",
|
||||
version,
|
||||
checksum,
|
||||
), nil, &MesonHelper{
|
||||
Setup: []KV{
|
||||
{"Dglx", "no"},
|
||||
{"Degl", "no"},
|
||||
},
|
||||
},
|
||||
LibX11,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibepoxy, &Metadata{
|
||||
Name: "libepoxy",
|
||||
Description: "a library for handling OpenGL function pointer management",
|
||||
Website: "https://github.com/anholt/libepoxy",
|
||||
|
||||
ID: 6090,
|
||||
})
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibev() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "4.33"
|
||||
checksum = "774eSXV_4k8PySRprUDChbEwsw-kzjIFnJ3MpNOl5zDpamBRvC3BqPyRxvkwcL6_"
|
||||
)
|
||||
return t.NewPackage("libev", version, newTar(
|
||||
"https://dist.schmorp.de/libev/Attic/libev-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibev, &Metadata{
|
||||
Name: "libev",
|
||||
Description: "a full-featured and high-performance event loop",
|
||||
Website: "http://libev.schmorp.de/",
|
||||
|
||||
ID: 1605,
|
||||
})
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newLibexpat() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.8.1"
|
||||
checksum = "iMEtbOJhQfGof2GxSlxffQSI1va_NDDQ9VIuqcPbNZ0291Dr8wttD5QecYyjIQap"
|
||||
)
|
||||
return t.NewPackage("libexpat", version, newFromGitHubRelease(
|
||||
"libexpat/libexpat",
|
||||
"R_"+strings.ReplaceAll(version, ".", "_"),
|
||||
"expat-"+version+".tar.bz2",
|
||||
checksum,
|
||||
pkg.TarBzip2,
|
||||
), nil, (*MakeHelper)(nil),
|
||||
Bash,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibexpat, &Metadata{
|
||||
Name: "libexpat",
|
||||
Description: "a stream-oriented XML parser library",
|
||||
Website: "https://libexpat.github.io/",
|
||||
|
||||
ID: 770,
|
||||
})
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibffi() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "3.5.2"
|
||||
checksum = "2_Q-ZNBBbVhltfL5zEr0wljxPegUimTK4VeMSiwJEGksls3n4gj3lV0Ly3vviSFH"
|
||||
)
|
||||
return t.NewPackage("libffi", version, newFromGitHubRelease(
|
||||
"libffi/libffi",
|
||||
"v"+version,
|
||||
"libffi-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil),
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibffi, &Metadata{
|
||||
Name: "libffi",
|
||||
Description: "a portable, high level programming interface to various calling conventions",
|
||||
Website: "https://sourceware.org/libffi/",
|
||||
|
||||
ID: 1611,
|
||||
})
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibgd() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.3.3"
|
||||
checksum = "8T-sh1_FJT9K9aajgxzh8ot6vWIF-xxjcKAHvTak9MgGUcsFfzP8cAvvv44u2r36"
|
||||
)
|
||||
return t.NewPackage("libgd", version, newFromGitHubRelease(
|
||||
"libgd/libgd",
|
||||
"gd-"+version,
|
||||
"libgd-"+version+".tar.gz", checksum,
|
||||
pkg.TarGzip,
|
||||
), &PackageAttr{
|
||||
Env: []string{
|
||||
"TMPDIR=/dev/shm/gd",
|
||||
},
|
||||
ScriptEarly: `
|
||||
mkdir /dev/shm/gd
|
||||
`,
|
||||
}, (*MakeHelper)(nil),
|
||||
Zlib,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibgd, &Metadata{
|
||||
Name: "libgd",
|
||||
Description: "an open source code library for the dynamic creation of images",
|
||||
Website: "https://libgd.github.io/",
|
||||
|
||||
Dependencies: P{
|
||||
Zlib,
|
||||
},
|
||||
|
||||
ID: 880,
|
||||
})
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newLibpng() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.6.58"
|
||||
checksum = "m_a5lROJH7vmF3cMjqwTUqURuQLhV1JQx2ySPzcN3VPdgDB9pG3UINsIx_mtkr-t"
|
||||
)
|
||||
return t.NewPackage("libpng", version, newTar(
|
||||
"https://downloads.sourceforge.net/project/libpng/libpng"+
|
||||
strings.Join(strings.SplitN(version, ".", 3)[:2], "")+
|
||||
"/"+version+"/libpng-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil),
|
||||
Zlib,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibpng, &Metadata{
|
||||
Name: "libpng",
|
||||
Description: "the official PNG reference library",
|
||||
Website: "https://www.libpng.org/pub/png/libpng.html",
|
||||
|
||||
Dependencies: P{
|
||||
Zlib,
|
||||
},
|
||||
|
||||
ID: 1705,
|
||||
})
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibpsl() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.21.5"
|
||||
checksum = "XjfxSzh7peG2Vg4vJlL8z4JZJLcXqbuP6pLWkrGCmRxlnYUFTKNBqWGHCxEOlCad"
|
||||
)
|
||||
return t.NewPackage("libpsl", version, newFromGitHubRelease(
|
||||
"rockdaboot/libpsl",
|
||||
version,
|
||||
"libpsl-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), &PackageAttr{
|
||||
Writable: true,
|
||||
ScriptEarly: `
|
||||
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
|
||||
|
||||
test_disable 'int main(){return 0;}' tests/test-is-public-builtin.c
|
||||
`,
|
||||
}, (*MakeHelper)(nil),
|
||||
Python,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibpsl, &Metadata{
|
||||
Name: "libpsl",
|
||||
Description: "provides functions to work with the Mozilla Public Suffix List",
|
||||
Website: "https://rockdaboot.github.io/libpsl/",
|
||||
|
||||
ID: 7305,
|
||||
})
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibseccomp() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.6.0"
|
||||
checksum = "mMu-iR71guPjFbb31u-YexBaanKE_nYPjPux-vuBiPfS_0kbwJdfCGlkofaUm-EY"
|
||||
)
|
||||
return t.NewPackage("libseccomp", version, newFromGitHubRelease(
|
||||
"seccomp/libseccomp",
|
||||
"v"+version,
|
||||
"libseccomp-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), &PackageAttr{
|
||||
ScriptEarly: `
|
||||
ln -s ../system/bin/bash /bin/
|
||||
`,
|
||||
|
||||
Patches: []KV{
|
||||
{"fix-export-oob-read", `diff --git a/src/api.c b/src/api.c
|
||||
index adccef3..65a277a 100644
|
||||
--- a/src/api.c
|
||||
+++ b/src/api.c
|
||||
@@ -786,7 +786,7 @@ API int seccomp_export_bpf_mem(const scmp_filter_ctx ctx, void *buf,
|
||||
if (BPF_PGM_SIZE(program) > *len)
|
||||
rc = _rc_filter(-ERANGE);
|
||||
else
|
||||
- memcpy(buf, program->blks, *len);
|
||||
+ memcpy(buf, program->blks, BPF_PGM_SIZE(program));
|
||||
}
|
||||
*len = BPF_PGM_SIZE(program);
|
||||
|
||||
`},
|
||||
},
|
||||
}, (*MakeHelper)(nil),
|
||||
Bash,
|
||||
Diffutils,
|
||||
Gperf,
|
||||
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibseccomp, &Metadata{
|
||||
Name: "libseccomp",
|
||||
Description: "an interface to the Linux Kernel's syscall filtering mechanism",
|
||||
Website: "https://github.com/seccomp/libseccomp/",
|
||||
|
||||
ID: 13823,
|
||||
})
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newLibtirpc() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.3.7"
|
||||
checksum = "nzFfu7LNvnSNiNAryD1vtnNWnU-Xqee8KqfXUKoBf5yjb5-dkeRkYuRijdCoYLof"
|
||||
)
|
||||
return t.NewPackage("libtirpc", version, t.newTagRemote(
|
||||
"git://linux-nfs.org/~steved/libtirpc",
|
||||
"libtirpc-"+
|
||||
strings.Join(strings.SplitN(version, ".", 3), "-"),
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "sh -e ./bootstrap",
|
||||
Configure: []KV{
|
||||
{"CFLAGS", `"$(pkg-config --cflags libbsd-overlay) ${CFLAGS:-}"`},
|
||||
{"disable-gssapi"},
|
||||
},
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
|
||||
Libbsd,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibtirpc, &Metadata{
|
||||
Name: "libtirpc",
|
||||
Description: "a port of Suns Transport-Independent RPC library to Linux",
|
||||
Website: "https://sourceforge.net/projects/libtirpc/",
|
||||
|
||||
ID: 1740,
|
||||
})
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibucontext() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.5.1"
|
||||
checksum = "mUgeyJknjMxT-5fORzz-rqhZfP3Y7EZGBhOwvhuX7MsF4Pk9wkuwtrLf5IML-jWu"
|
||||
)
|
||||
return t.NewPackage("libucontext", version, newFromGitHub(
|
||||
"kaniini/libucontext",
|
||||
"libucontext-"+version,
|
||||
checksum,
|
||||
), &PackageAttr{
|
||||
// uses source tree as scratch space
|
||||
Writable: true,
|
||||
Chmod: true,
|
||||
EnterSource: true,
|
||||
}, &MakeHelper{
|
||||
OmitDefaults: true,
|
||||
SkipConfigure: true,
|
||||
InPlace: true,
|
||||
Make: []string{
|
||||
"ARCH=" + t.linuxArch(),
|
||||
},
|
||||
Install: "make prefix=/system DESTDIR=/work install",
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibucontext, &Metadata{
|
||||
Name: "libucontext",
|
||||
Description: "ucontext implementation featuring glibc-compatible ABI",
|
||||
Website: "https://github.com/kaniini/libucontext/",
|
||||
|
||||
ID: 17085,
|
||||
})
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibxml2() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.15.3"
|
||||
checksum = "oJy74htGlEpf70KPvpW18fYJo0RQQkCXZRwqUz6NoXborS3HCq3Nm4gsyaSeNmUH"
|
||||
)
|
||||
return t.NewPackage("libxml2", version, newFromGitLab(
|
||||
"gitlab.gnome.org",
|
||||
"GNOME/libxml2",
|
||||
"v"+version, checksum,
|
||||
), &PackageAttr{
|
||||
// can't create shell.out: Read-only file system
|
||||
Writable: true,
|
||||
}, (*MesonHelper)(nil),
|
||||
Git,
|
||||
Diffutils,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibxml2, &Metadata{
|
||||
Name: "libxml2",
|
||||
Description: "an XML toolkit implemented in C",
|
||||
Website: "https://gitlab.gnome.org/GNOME/libxml2/",
|
||||
|
||||
ID: 1783,
|
||||
})
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibxslt() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.1.45"
|
||||
checksum = "67ks7v8od2oWaEGf23Sst_Xbn_8brQyolQjqxPoO-lK35k_WJhi2Px5JJgbk-nfn"
|
||||
)
|
||||
return t.NewPackage("libxslt", version, newFromGitLab(
|
||||
"gitlab.gnome.org",
|
||||
"GNOME/libxslt",
|
||||
"v"+version, checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "NOCONFIGURE=1 ./autogen.sh",
|
||||
|
||||
// python libxml2 cyclic dependency
|
||||
SkipCheck: true,
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
Python,
|
||||
PkgConfig,
|
||||
|
||||
Libxml2,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibxslt, &Metadata{
|
||||
Name: "libxslt",
|
||||
Description: "an XSLT processor based on libxml2",
|
||||
Website: "https://gitlab.gnome.org/GNOME/libxslt/",
|
||||
|
||||
Dependencies: P{
|
||||
Libxml2,
|
||||
},
|
||||
|
||||
ID: 13301,
|
||||
})
|
||||
}
|
||||
23
internal/rosa/package/libbsd.az
Normal file
23
internal/rosa/package/libbsd.az
Normal file
@@ -0,0 +1,23 @@
|
||||
package libbsd {
|
||||
description = "provides useful functions commonly found on BSD systems";
|
||||
website = "https://libbsd.freedesktop.org";
|
||||
anitya = 1567;
|
||||
|
||||
version* = "0.12.2";
|
||||
source = remoteGit {
|
||||
url = "https://gitlab.freedesktop.org/libbsd/libbsd.git";
|
||||
tag = version;
|
||||
checksum = "NVS0xFLTwSP8JiElEftsZ-e1_C-IgJhHrHE77RwKt5178M7r087waO-zYx2_dfGX";
|
||||
};
|
||||
|
||||
exec = make {
|
||||
generate = "echo '" + version + "' > .dist-version && ./autogen";
|
||||
};
|
||||
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
|
||||
libmd,
|
||||
];
|
||||
}
|
||||
44
internal/rosa/package/libcap.az
Normal file
44
internal/rosa/package/libcap.az
Normal file
@@ -0,0 +1,44 @@
|
||||
package libcap {
|
||||
description = "a library for getting and setting POSIX.1e draft 15 capabilities";
|
||||
website = "https://sites.google.com/site/fullycapable";
|
||||
anitya = 1569;
|
||||
|
||||
version* = "2.78";
|
||||
source = remoteTar {
|
||||
url = "https://git.kernel.org/pub/scm/libs/libcap/libcap.git/"+
|
||||
"snapshot/libcap-"+version+".tar.gz";
|
||||
checksum = "wFdUkBhFMD9InPnrBZyegWrlPSAg_9JiTBC-eSFyWWlmbzL2qjh2mKxr9Kx2a8ut";
|
||||
compress = gzip;
|
||||
};
|
||||
|
||||
// uses source tree as scratch space
|
||||
writable = true;
|
||||
chmod = true;
|
||||
|
||||
env = [
|
||||
"prefix=/system",
|
||||
"lib=lib",
|
||||
];
|
||||
|
||||
early = "\nln -s ../system/bin/bash /bin/\n";
|
||||
|
||||
exec = make {
|
||||
skipConfigure = true;
|
||||
inPlace = true;
|
||||
|
||||
make = [
|
||||
"CC=cc",
|
||||
"all",
|
||||
];
|
||||
|
||||
check = [
|
||||
"CC=cc",
|
||||
"test",
|
||||
];
|
||||
};
|
||||
|
||||
inputs = [
|
||||
bash,
|
||||
diffutils,
|
||||
];
|
||||
}
|
||||
@@ -1,19 +1,4 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibconfig() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.8.2"
|
||||
checksum = "fD32hjeAZuTz98g6WYHRwsxphrgrEFqxi5Z1jlJemPckPBfxpS3i5HgshAuA6vmT"
|
||||
)
|
||||
return t.NewPackage("libconfig", version, newFromGitHub(
|
||||
"hyperrealm/libconfig",
|
||||
"v"+version,
|
||||
checksum,
|
||||
), &PackageAttr{
|
||||
Patches: []KV{
|
||||
{"disable-broken-tests", `diff --git a/tests/tests.c b/tests/tests.c
|
||||
diff --git a/tests/tests.c b/tests/tests.c
|
||||
index eba7eae..f916d2e 100644
|
||||
--- a/tests/tests.c
|
||||
+++ b/tests/tests.c
|
||||
@@ -33,16 +18,3 @@ index eba7eae..f916d2e 100644
|
||||
TT_SUITE_RUN(LibConfigTests);
|
||||
failures = TT_SUITE_NUM_FAILURES(LibConfigTests);
|
||||
TT_SUITE_END(LibConfigTests);
|
||||
`},
|
||||
},
|
||||
}, (*CMakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
native.mustRegister(Toolchain.newLibconfig, &Metadata{
|
||||
Name: "libconfig",
|
||||
Description: "a simple library for processing structured configuration files",
|
||||
Website: "https://hyperrealm.github.io/libconfig/",
|
||||
|
||||
ID: 1580,
|
||||
})
|
||||
}
|
||||
15
internal/rosa/package/libconfig/package.az
Normal file
15
internal/rosa/package/libconfig/package.az
Normal file
@@ -0,0 +1,15 @@
|
||||
package libconfig {
|
||||
description = "a simple library for processing structured configuration files";
|
||||
website = "https://hyperrealm.github.io/libconfig";
|
||||
anitya = 1580;
|
||||
|
||||
version* = "1.8.2";
|
||||
source = remoteGitHub {
|
||||
suffix = "hyperrealm/libconfig";
|
||||
tag = "v"+version;
|
||||
checksum = "fD32hjeAZuTz98g6WYHRwsxphrgrEFqxi5Z1jlJemPckPBfxpS3i5HgshAuA6vmT";
|
||||
};
|
||||
patches = [ "disable-broken-tests.patch" ];
|
||||
|
||||
exec = cmake {};
|
||||
}
|
||||
21
internal/rosa/package/libdisplay-info.az
Normal file
21
internal/rosa/package/libdisplay-info.az
Normal file
@@ -0,0 +1,21 @@
|
||||
package libdisplay-info {
|
||||
description = "EDID and DisplayID library";
|
||||
website = "https://gitlab.freedesktop.org/emersion/libdisplay-info";
|
||||
anitya = 326668;
|
||||
|
||||
version* = "0.3.0";
|
||||
source = remoteGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
suffix = "emersion/libdisplay-info";
|
||||
ref = version;
|
||||
checksum = "yjOqPUHHYgRtpqGw5RI1n2Q1_hO5j0LiFNMbjcRWV4Nf71XwwoC9fZMlKBDeLchT";
|
||||
};
|
||||
|
||||
exec = meson {};
|
||||
|
||||
inputs = [
|
||||
diffutils,
|
||||
|
||||
hwdata,
|
||||
];
|
||||
}
|
||||
21
internal/rosa/package/libepoxy.az
Normal file
21
internal/rosa/package/libepoxy.az
Normal file
@@ -0,0 +1,21 @@
|
||||
package libepoxy {
|
||||
description = "a library for handling OpenGL function pointer management";
|
||||
website = "https://github.com/anholt/libepoxy";
|
||||
anitya = 6090;
|
||||
|
||||
version* = "1.5.10";
|
||||
source = remoteGitHub {
|
||||
suffix = "anholt/libepoxy";
|
||||
tag = version;
|
||||
checksum = "OHI8wshrlGw6BMGrmSyejJtwzM2gPhyFJrTsKxULyKMmYrfgcOe7Iw2ibVoUND_Q";
|
||||
};
|
||||
|
||||
exec = meson {
|
||||
setup = {
|
||||
"Dglx": "no";
|
||||
"Degl": "no";
|
||||
};
|
||||
};
|
||||
|
||||
inputs = [ libX11 ];
|
||||
}
|
||||
14
internal/rosa/package/libev.az
Normal file
14
internal/rosa/package/libev.az
Normal file
@@ -0,0 +1,14 @@
|
||||
package libev {
|
||||
description = "a full-featured and high-performance event loop";
|
||||
website = "http://libev.schmorp.de";
|
||||
anitya = 1605;
|
||||
|
||||
version* = "4.33";
|
||||
source = remoteTar {
|
||||
url = "https://dist.schmorp.de/libev/Attic/libev-"+version+".tar.gz";
|
||||
checksum = "774eSXV_4k8PySRprUDChbEwsw-kzjIFnJ3MpNOl5zDpamBRvC3BqPyRxvkwcL6_";
|
||||
compress = gzip;
|
||||
};
|
||||
|
||||
exec = make {};
|
||||
}
|
||||
22
internal/rosa/package/libexpat.az
Normal file
22
internal/rosa/package/libexpat.az
Normal file
@@ -0,0 +1,22 @@
|
||||
package libexpat {
|
||||
description = "a stream-oriented XML parser library";
|
||||
website = "https://libexpat.github.io";
|
||||
anitya = 770;
|
||||
|
||||
version* = "2.8.1";
|
||||
source = remoteGitHubRelease {
|
||||
suffix = "libexpat/libexpat";
|
||||
tag = "R_"+replace {
|
||||
s = version;
|
||||
old = ".";
|
||||
new = "_";
|
||||
};
|
||||
name = "expat-"+version+".tar.bz2";
|
||||
checksum = "iMEtbOJhQfGof2GxSlxffQSI1va_NDDQ9VIuqcPbNZ0291Dr8wttD5QecYyjIQap";
|
||||
compress = bzip2;
|
||||
};
|
||||
|
||||
exec = make {};
|
||||
|
||||
inputs = [ bash ];
|
||||
}
|
||||
18
internal/rosa/package/libffi.az
Normal file
18
internal/rosa/package/libffi.az
Normal file
@@ -0,0 +1,18 @@
|
||||
package libffi {
|
||||
description = "a portable, high level programming interface to various calling conventions";
|
||||
website = "https://sourceware.org/libffi";
|
||||
anitya = 1611;
|
||||
|
||||
version* = "3.5.2";
|
||||
source = remoteGitHubRelease {
|
||||
suffix = "libffi/libffi";
|
||||
tag = "v"+version;
|
||||
name = "libffi-"+version+".tar.gz";
|
||||
checksum = "2_Q-ZNBBbVhltfL5zEr0wljxPegUimTK4VeMSiwJEGksls3n4gj3lV0Ly3vviSFH";
|
||||
compress = gzip;
|
||||
};
|
||||
|
||||
exec = make {};
|
||||
|
||||
inputs = [ kernel-headers ];
|
||||
}
|
||||
25
internal/rosa/package/libgd.az
Normal file
25
internal/rosa/package/libgd.az
Normal file
@@ -0,0 +1,25 @@
|
||||
package libgd {
|
||||
description = "an open source code library for the dynamic creation of images";
|
||||
website = "https://libgd.github.io";
|
||||
anitya = 880;
|
||||
|
||||
version* = "2.3.3";
|
||||
source = remoteGitHubRelease {
|
||||
suffix = "libgd/libgd";
|
||||
tag = "gd-"+version;
|
||||
name = "libgd-"+version+".tar.gz";
|
||||
checksum = "8T-sh1_FJT9K9aajgxzh8ot6vWIF-xxjcKAHvTak9MgGUcsFfzP8cAvvv44u2r36";
|
||||
compress = gzip;
|
||||
};
|
||||
|
||||
env = [
|
||||
"TMPDIR=/dev/shm/gd",
|
||||
];
|
||||
|
||||
early = "\nmkdir /dev/shm/gd\n";
|
||||
|
||||
exec = make {};
|
||||
|
||||
inputs = [ zlib ];
|
||||
runtime = [ zlib ];
|
||||
}
|
||||
22
internal/rosa/package/libmd.az
Normal file
22
internal/rosa/package/libmd.az
Normal file
@@ -0,0 +1,22 @@
|
||||
package libmd {
|
||||
description = "Message Digest functions from BSD systems";
|
||||
website = "https://www.hadrons.org/software/libmd";
|
||||
anitya = 15525;
|
||||
|
||||
version* = "1.2.0";
|
||||
source = remoteGit {
|
||||
url = "https://git.hadrons.org/git/libmd.git";
|
||||
tag = version;
|
||||
checksum = "1rJ6joAO0wwMZvSfnRNkc1MOhywyAq7SM8VmF92NvDtv7Qdl1LRbjm5fg_DFFtGj";
|
||||
};
|
||||
|
||||
exec = make {
|
||||
generate = "echo '" + version + "' > .dist-version && ./autogen";
|
||||
preMake = "\ninstall -D /usr/src/libmd/src/helper.c src/helper.c\n";
|
||||
};
|
||||
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
];
|
||||
}
|
||||
27
internal/rosa/package/libpng.az
Normal file
27
internal/rosa/package/libpng.az
Normal file
@@ -0,0 +1,27 @@
|
||||
package libpng {
|
||||
description = "the official PNG reference library";
|
||||
website = "https://www.libpng.org/pub/png/libpng.html";
|
||||
anitya = 1705;
|
||||
|
||||
version* = "1.6.58";
|
||||
source = remoteTar {
|
||||
url = "https://downloads.sourceforge.net/project/libpng/libpng"+
|
||||
join {
|
||||
elems = slice {
|
||||
elems = split {
|
||||
s = version;
|
||||
sep = ".";
|
||||
n = 3;
|
||||
};
|
||||
end = 2;
|
||||
};
|
||||
}+"/"+version+"/libpng-"+version+".tar.gz";
|
||||
checksum = "m_a5lROJH7vmF3cMjqwTUqURuQLhV1JQx2ySPzcN3VPdgDB9pG3UINsIx_mtkr-t";
|
||||
compress = gzip;
|
||||
};
|
||||
|
||||
exec = make {};
|
||||
|
||||
inputs = [ zlib ];
|
||||
runtime = [ zlib ];
|
||||
}
|
||||
25
internal/rosa/package/libpsl.az
Normal file
25
internal/rosa/package/libpsl.az
Normal file
@@ -0,0 +1,25 @@
|
||||
package libpsl {
|
||||
description = "provides functions to work with the Mozilla Public Suffix List";
|
||||
website = "https://rockdaboot.github.io/libpsl";
|
||||
anitya = 7305;
|
||||
|
||||
version* = "0.21.5";
|
||||
source = remoteGitHubRelease {
|
||||
suffix = "rockdaboot/libpsl";
|
||||
tag = version;
|
||||
name = "libpsl-"+version+".tar.gz";
|
||||
checksum = "XjfxSzh7peG2Vg4vJlL8z4JZJLcXqbuP6pLWkrGCmRxlnYUFTKNBqWGHCxEOlCad";
|
||||
compress = gzip;
|
||||
};
|
||||
|
||||
writable = true;
|
||||
early = `
|
||||
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
|
||||
|
||||
test_disable 'int main(){return 0;}' tests/test-is-public-builtin.c
|
||||
`;
|
||||
|
||||
exec = make {};
|
||||
|
||||
inputs = [ python ];
|
||||
}
|
||||
13
internal/rosa/package/libseccomp/fix-export-oob-read.patch
Normal file
13
internal/rosa/package/libseccomp/fix-export-oob-read.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/api.c b/src/api.c
|
||||
index adccef3..65a277a 100644
|
||||
--- a/src/api.c
|
||||
+++ b/src/api.c
|
||||
@@ -786,7 +786,7 @@ API int seccomp_export_bpf_mem(const scmp_filter_ctx ctx, void *buf,
|
||||
if (BPF_PGM_SIZE(program) > *len)
|
||||
rc = _rc_filter(-ERANGE);
|
||||
else
|
||||
- memcpy(buf, program->blks, *len);
|
||||
+ memcpy(buf, program->blks, BPF_PGM_SIZE(program));
|
||||
}
|
||||
*len = BPF_PGM_SIZE(program);
|
||||
|
||||
27
internal/rosa/package/libseccomp/package.az
Normal file
27
internal/rosa/package/libseccomp/package.az
Normal file
@@ -0,0 +1,27 @@
|
||||
package libseccomp {
|
||||
description = "an interface to the Linux Kernel's syscall filtering mechanism";
|
||||
website = "https://github.com/seccomp/libseccomp";
|
||||
anitya = 13823;
|
||||
|
||||
version* = "2.6.0";
|
||||
source = remoteGitHubRelease {
|
||||
suffix = "seccomp/libseccomp";
|
||||
tag = "v"+version;
|
||||
name = "libseccomp-"+version+".tar.gz";
|
||||
checksum = "mMu-iR71guPjFbb31u-YexBaanKE_nYPjPux-vuBiPfS_0kbwJdfCGlkofaUm-EY";
|
||||
compress = gzip;
|
||||
};
|
||||
patches = [ "fix-export-oob-read.patch" ];
|
||||
|
||||
early = "\nln -s ../system/bin/bash /bin/\n";
|
||||
|
||||
exec = make {};
|
||||
|
||||
inputs = [
|
||||
bash,
|
||||
diffutils,
|
||||
gperf,
|
||||
|
||||
kernel-headers,
|
||||
];
|
||||
}
|
||||
36
internal/rosa/package/libtirpc.az
Normal file
36
internal/rosa/package/libtirpc.az
Normal file
@@ -0,0 +1,36 @@
|
||||
package libtirpc {
|
||||
description = "a port of Suns Transport-Independent RPC library to Linux";
|
||||
website = "https://sourceforge.net/projects/libtirpc";
|
||||
anitya = 1740;
|
||||
|
||||
version* = "1.3.7";
|
||||
source = remoteGit {
|
||||
url = "git://linux-nfs.org/~steved/libtirpc";
|
||||
tag = "libtirpc-"+join {
|
||||
elems = split {
|
||||
s = version;
|
||||
sep = ".";
|
||||
n = 3;
|
||||
};
|
||||
sep = "-";
|
||||
};
|
||||
checksum = "nzFfu7LNvnSNiNAryD1vtnNWnU-Xqee8KqfXUKoBf5yjb5-dkeRkYuRijdCoYLof";
|
||||
};
|
||||
|
||||
exec = make {
|
||||
generate = "sh -e ./bootstrap";
|
||||
configure = {
|
||||
"CFLAGS": `"$(pkg-config --cflags libbsd-overlay) ${CFLAGS:-}"`;
|
||||
"disable-gssapi";
|
||||
};
|
||||
};
|
||||
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
|
||||
libbsd,
|
||||
kernel-headers,
|
||||
];
|
||||
}
|
||||
28
internal/rosa/package/libucontext.az
Normal file
28
internal/rosa/package/libucontext.az
Normal file
@@ -0,0 +1,28 @@
|
||||
package libucontext {
|
||||
description = "ucontext implementation featuring glibc-compatible ABI";
|
||||
website = "https://github.com/kaniini/libucontext";
|
||||
anitya = 17085;
|
||||
|
||||
version* = "1.5.1";
|
||||
source = remoteGitHub {
|
||||
suffix = "kaniini/libucontext";
|
||||
tag = "libucontext-"+version;
|
||||
checksum = "mUgeyJknjMxT-5fORzz-rqhZfP3Y7EZGBhOwvhuX7MsF4Pk9wkuwtrLf5IML-jWu";
|
||||
};
|
||||
|
||||
// uses source tree as scratch space
|
||||
writable = true;
|
||||
chmod = true;
|
||||
enterSource = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipConfigure = true;
|
||||
inPlace = true;
|
||||
|
||||
make = [
|
||||
"ARCH=" + linuxArch,
|
||||
];
|
||||
install = "make prefix=/system DESTDIR=/work install";
|
||||
};
|
||||
}
|
||||
23
internal/rosa/package/libxml2.az
Normal file
23
internal/rosa/package/libxml2.az
Normal file
@@ -0,0 +1,23 @@
|
||||
package libxml2 {
|
||||
description = "an XML toolkit implemented in C";
|
||||
website = "https://gitlab.gnome.org/GNOME/libxml2";
|
||||
anitya = 1783;
|
||||
|
||||
version* = "2.15.3";
|
||||
source = remoteGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
suffix = "GNOME/libxml2";
|
||||
ref = "v"+version;
|
||||
checksum = "oJy74htGlEpf70KPvpW18fYJo0RQQkCXZRwqUz6NoXborS3HCq3Nm4gsyaSeNmUH";
|
||||
};
|
||||
|
||||
// can't create shell.out: Read-only file system
|
||||
writable = true;
|
||||
|
||||
exec = meson {};
|
||||
|
||||
inputs = [
|
||||
git,
|
||||
diffutils,
|
||||
];
|
||||
}
|
||||
31
internal/rosa/package/libxslt.az
Normal file
31
internal/rosa/package/libxslt.az
Normal file
@@ -0,0 +1,31 @@
|
||||
package libxslt {
|
||||
description = "an XSLT processor based on libxml2";
|
||||
website = "https://gitlab.gnome.org/GNOME/libxslt";
|
||||
anitya = 13301;
|
||||
|
||||
version* = "1.1.45";
|
||||
source = remoteGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
suffix = "GNOME/libxslt";
|
||||
ref = "v"+version;
|
||||
checksum = "67ks7v8od2oWaEGf23Sst_Xbn_8brQyolQjqxPoO-lK35k_WJhi2Px5JJgbk-nfn";
|
||||
};
|
||||
|
||||
exec = make {
|
||||
generate = "NOCONFIGURE=1 ./autogen.sh";
|
||||
|
||||
// python libxml2 cyclic dependency
|
||||
skipCheck = true;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
python,
|
||||
pkg-config,
|
||||
|
||||
libxml2,
|
||||
];
|
||||
|
||||
runtime = [ libxml2 ];
|
||||
}
|
||||
@@ -477,6 +477,49 @@ func (s *S) getFrame() azalea.Frame {
|
||||
|
||||
// library functions
|
||||
|
||||
k("replace"): {F: func(
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var _s, _old, _new string
|
||||
var n int
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("s"): &_s,
|
||||
k("old"): &_old,
|
||||
k("new"): &_new,
|
||||
k("n"): &n,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if n < 0 {
|
||||
n = 0
|
||||
} else if n == 0 {
|
||||
n = -1
|
||||
}
|
||||
|
||||
v = strings.Replace(_s, _old, _new, n)
|
||||
set = true
|
||||
return
|
||||
}},
|
||||
|
||||
k("slice"): {F: func(
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var elems []string
|
||||
var start, end int64
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("elems"): &elems,
|
||||
k("start"): &start,
|
||||
k("end"): &end,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
v = elems[start:end]
|
||||
set = true
|
||||
return
|
||||
}},
|
||||
|
||||
k("join"): {F: func(
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
|
||||
@@ -29,11 +29,9 @@ var (
|
||||
Gettext = H("gettext")
|
||||
Glslang = H("glslang")
|
||||
Go = H("go")
|
||||
Gperf = H("gperf")
|
||||
Gzip = H("gzip")
|
||||
Hakurei = H("hakurei")
|
||||
HakureiDist = H("hakurei-dist")
|
||||
Hwdata = H("hwdata")
|
||||
Kmod = H("kmod")
|
||||
LibX11 = H("libX11")
|
||||
LibXau = H("libXau")
|
||||
|
||||
Reference in New Issue
Block a user