This commit is contained in:
2026-05-20 00:30:38 +02:00
parent 312750c61b
commit 16d81f509f
36 changed files with 13292 additions and 273 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ source = tarball_source(
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
deps = ["ncurses", "readline"]
deps = [options.libc, "ncurses", "readline"]
configure, build, install = autotools(configure_args = [
"--without-bash-malloc",
@@ -19,4 +19,4 @@ configure, build, install = autotools(configure_args = [
"--enable-readline",
"--enable-history",
"--enable-job-control",
])
], configure_env = {"CFLAGS": "-std=gnu17"})
-39
View File
@@ -1,39 +0,0 @@
version = "1.0.8"
revision = 1
metadata = meta(
description = "Block-sorting file compressor",
license = "bzip2-1.0.6",
website = "https://sourceware.org/bzip2/",
)
source = tarball_source(
url = f"https://sourceware.org/pub/bzip2/bzip2-{version}.tar.gz",
sha256 = "?",
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
# bzip2 ships only a plain Makefile, no configure script.
def build(ctx):
# Copy sources into the build dir so the in-tree Makefile can write here.
ctx.run(["cp", "-rp", ctx.source_dir / ".", ctx.build_dir])
jobs = "-j" + str(ctx.jobs)
common = [
"CC=" + options.target_triple + "-gcc",
"AR=" + options.target_triple + "-ar",
"RANLIB=" + options.target_triple + "-ranlib",
"CFLAGS=" + options.cflags + " -D_FILE_OFFSET_BITS=64",
]
ctx.run(["make", jobs, "-f", "Makefile-libbz2_so"] + common)
ctx.run(["make", jobs, "libbz2.a", "bzip2", "bzip2recover"] + common)
def install(ctx, pkg):
ctx.run(["make", "install", "PREFIX=" + pkg.dest_dir + ctx.prefix])
# Install the shared library that the auxiliary Makefile produced.
libdir = pkg.dest_dir + ctx.prefix / "lib"
bindir = pkg.dest_dir + ctx.prefix / "bin"
ctx.run(["mkdir", "-p", libdir, bindir])
ctx.run(["cp", "-a", "libbz2.so." + version, libdir])
ctx.run(["ln", "-sf", "libbz2.so." + version, libdir + "/libbz2.so.1.0"])
ctx.run(["ln", "-sf", "libbz2.so." + version, libdir + "/libbz2.so.1"])
ctx.run(["ln", "-sf", "libbz2.so." + version, libdir + "/libbz2.so"])
+1 -1
View File
@@ -7,7 +7,7 @@ metadata = meta(
)
source = tarball_source(
url = f"https://ftp.gnu.org/gnu/coreutils/coreutils-{version}.tar.xz",
sha256 = "?",
sha256 = "7a0124327b398fd9eb1a6abde583389821422c744ffa10734b24f557610d3283",
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
+6 -17
View File
@@ -16,12 +16,9 @@ deps = ["linux-headers"]
build_if = options.libc == "glibc"
def configure(ctx):
ctx.run([
ctx.source_dir / "configure",
"--host=" + options.target_triple,
autotools_configure(ctx, [
"--build=" + options.target_triple,
"--prefix=/usr",
"--with-headers=" + ctx.sysroot / "usr/include",
"--with-headers=" + ctx.sysroot / options.prefix / "include",
"--enable-kernel=5.4",
"--enable-bind-now",
"--enable-stack-protector=strong",
@@ -31,17 +28,9 @@ def configure(ctx):
"--disable-nscd",
"--without-selinux",
"--without-gd",
"libc_cv_slibdir=/lib",
"libc_cv_rtlddir=/lib",
"libc_cv_forced_unwind=yes",
"libc_cv_ssp=no",
"libc_cv_ssp_strong=yes",
], env = {
"CC": options.target_triple + "-gcc",
"CXX": options.target_triple + "-g++",
"CFLAGS": options.cflags,
})
])
def build(ctx):
ctx.run(["make", "-j" + str(ctx.jobs)])
def install(ctx, pkg):
ctx.run(["make", "install", "DESTDIR=" + pkg.dest_dir])
_, build, install = autotools()
+34 -6
View File
@@ -15,9 +15,37 @@ deps = [options.libc]
build_if = options.target_arch in ["x86_64", "aarch64", "riscv64", "loongarch64"]
configure, build, install = autotools(configure_env = {
"TOOLCHAIN_FOR_TARGET": options.target_triple + "-",
"LD_FOR_TARGET": options.target_triple + "-" + "ld",
"OBJCOPY_FOR_TARGET": options.target_triple + "-" + "objcopy",
"OBJDUMP_FOR_TARGET": options.target_triple + "-" + "objdump",
})
arch_configure_args = {
"x86_64": ["--enable-uefi-x86-64", "--enable-uefi-ia32", "--enable-bios", "--enable-bios-cd"],
"aarch64": ["--enable-uefi-aarch64"],
"riscv64": ["--enable-uefi-riscv64"],
"loongarch64": ["--enable-uefi-loongarch64"],
}
configure, build, install = autotools(
configure_args = ["--enable-uefi-cd"] + arch_configure_args.get(options.target_arch),
configure_env = {"TOOLCHAIN_FOR_TARGET": options.target_triple + "-"},
)
subpackages = [
subpackage(
"limine-uefi",
meta(description = "UEFI files"),
[
"usr/share/limine/BOOT*.EFI",
"usr/share/limine/limine-uefi-*.bin",
],
),
]
if options.target_arch == "x86_64":
subpackages += [
subpackage(
"limine-bios",
meta(description = "BIOS files"),
[
"usr/share/limine/limine-bios*",
],
)
]
+2 -2
View File
@@ -16,5 +16,5 @@ def build(ctx):
ctx.run(["find", ctx.build_dir / "usr/include", "-type", "f", "!", "-name", "*.h", "-delete"])
def install(ctx, pkg):
ctx.run(["mkdir", "-p", pkg.dest_dir + ctx.prefix])
ctx.run(["cp", "-rp", ctx.build_dir / "usr/include", pkg.dest_dir / ctx.prefix])
ctx.run(["mkdir", "-p", pkg.dest_dir / options.prefix])
ctx.run(["cp", "-rp", ctx.build_dir / "usr/include", pkg.dest_dir / options.prefix])
-1
View File
@@ -1 +0,0 @@
# TODO
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -13,7 +13,7 @@ source = tarball_source(
host_deps = ["binutils", "gcc"]
def _make_args(ctx, *args):
def make_args(ctx, *args):
# Translate arch name
if options.target_arch == "aarch64":
linux_arch = "arm64"
@@ -22,8 +22,6 @@ def _make_args(ctx, *args):
result = [
"make",
"-C", ctx.source_dir,
"O=" + ctx.build_dir,
"ARCH=" + linux_arch,
"CROSS_COMPILE=" + options.target_triple + "-",
"-j" + str(ctx.jobs),
@@ -32,10 +30,12 @@ def _make_args(ctx, *args):
return result
def configure(ctx):
ctx.run(_make_args(ctx, "defconfig"))
ctx.run(["cp", "-rp", ctx.source_dir / ".", ctx.build_dir])
ctx.run(["cp", ctx.files / "config." + options.target_arch, ctx.build_dir / ".config"])
ctx.run(make_args(ctx, "olddefconfig"))
def build(ctx):
ctx.run(_make_args(ctx, "bzImage"))
ctx.run(make_args(ctx))
def install(ctx, pkg):
ctx.install(
+2 -1
View File
@@ -7,10 +7,11 @@ metadata = meta(
)
source = tarball_source(
url = f"https://ftp.gnu.org/gnu/make/make-{version}.tar.gz",
sha256 = "?",
sha256 = "dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3",
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
deps = [options.libc]
configure, build, install = autotools(configure_args = [
"--without-guile",
+1 -1
View File
@@ -16,7 +16,7 @@ def configure(ctx):
ctx.run([
ctx.source_dir / "configure",
"--target=" + options.target_triple,
"--prefix=" + ctx.prefix,
"--prefix=" + options.prefix,
"--syslibdir=/lib",
], env = {
"CC": options.target_triple + "-gcc",
+6 -1
View File
@@ -13,7 +13,7 @@ source = tarball_source(
host_deps = ["binutils", "gcc"]
deps = [options.libc]
configure, build, install = autotools(configure_args = [
configure, build, _ = autotools(configure_args = [
"--with-shared",
"--without-debug",
"--without-ada",
@@ -31,3 +31,8 @@ configure, build, install = autotools(configure_args = [
"cf_cv_builtin_bool": "1",
"ac_cv_header_stdbool_h": "yes",
})
def install(ctx, pkg):
autotools_install(ctx, pkg, extra_args = [
"DESTDIR=" + pkg.dest_dir
])
+1 -1
View File
@@ -28,7 +28,7 @@ def configure(ctx):
ctx.run([
ctx.source_dir / "Configure",
ossl_target,
"--prefix=" + ctx.prefix,
"--prefix=" + options.prefix,
"--openssldir=/etc/ssl",
"--libdir=lib",
"shared",
+3 -2
View File
@@ -11,8 +11,9 @@ source = tarball_source(
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
deps = [options.libc]
configure, build, install = autotools(configure_args = [
"--with-system-libdir=/usr/lib",
"--with-system-includedir=/usr/include",
"--with-system-libdir=" + options.libdir,
"--with-system-includedir=" + options.includedir,
])
+8 -2
View File
@@ -11,9 +11,9 @@ source = tarball_source(
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
deps = ["ncurses"]
deps = [options.libc, "ncurses"]
configure, build, install = autotools(
configure, build, _ = autotools(
configure_args = ["--with-curses"],
configure_env = {
# Force linking against the system curses; otherwise readline's
@@ -21,3 +21,9 @@ configure, build, install = autotools(
"bash_cv_termcap_lib": "ncursesw",
},
)
# Readline overwrites DESTDIR
def install(ctx, pkg):
autotools_install(ctx, pkg, extra_args = [
"DESTDIR=" + pkg.dest_dir
])
+2 -1
View File
@@ -7,10 +7,11 @@ metadata = meta(
)
source = tarball_source(
url = f"https://github.com/tukaani-project/xz/releases/download/v{version}/xz-{version}.tar.xz",
sha256 = "?",
sha256 = "db0590629b6f0fa36e74aea5f9731dc6f8df068ce7b7bafa45301832a5eebc3a",
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
deps = [options.libc]
configure, build, install = autotools(configure_args = [
"--disable-doc",
+6 -5
View File
@@ -1,4 +1,4 @@
version = "1.3.1"
version = "1.3.2"
revision = 1
metadata = meta(
description = "Lossless data-compression library",
@@ -7,19 +7,20 @@ metadata = meta(
)
source = tarball_source(
url = f"https://zlib.net/zlib-{version}.tar.xz",
sha256 = "?",
sha256 = "d7a0654783a4da529d1bb793b7ad9c3318020af77667bcae35f95d0e42a792f3",
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
deps = [options.libc]
def configure(ctx):
# zlib ships its own ./configure that does not understand the usual
# autoconf flags (no --host, --build, etc.), so it is invoked directly.
ctx.run([
ctx.source_dir / "configure",
"--prefix=" + ctx.prefix,
"--libdir=" + ctx.prefix / "lib",
"--sharedlibdir=" + ctx.prefix / "lib",
"--prefix=" + options.prefix,
"--libdir=" + options.libdir,
"--sharedlibdir=" + options.libdir,
], env = {
"CC": options.target_triple + "-gcc",
"AR": options.target_triple + "-ar",