More stuff, didn't test
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
version = "5.2.32"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "GNU Bourne-Again SHell",
|
||||
license = "GPL-3.0-or-later",
|
||||
website = "https://www.gnu.org/software/bash/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://ftp.gnu.org/gnu/bash/bash-{version}.tar.gz",
|
||||
sha256 = "d3ef80d2b67d8cbbe4d3265c63a72c46f9b278ead6e0e06d61801b58f23f50b5",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
deps = ["ncurses", "readline"]
|
||||
|
||||
configure, build, install = autotools(configure_args = [
|
||||
"--without-bash-malloc",
|
||||
"--with-installed-readline",
|
||||
"--enable-readline",
|
||||
"--enable-history",
|
||||
"--enable-job-control",
|
||||
])
|
||||
@@ -0,0 +1,39 @@
|
||||
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"])
|
||||
@@ -0,0 +1,25 @@
|
||||
version = "9.6"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "GNU core utilities (file, shell, and text manipulation)",
|
||||
license = "GPL-3.0-or-later",
|
||||
website = "https://www.gnu.org/software/coreutils/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://ftp.gnu.org/gnu/coreutils/coreutils-{version}.tar.xz",
|
||||
sha256 = "?",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
deps = [options.libc]
|
||||
|
||||
configure, build, install = autotools(
|
||||
configure_args = [
|
||||
"--enable-no-install-program=kill,uptime",
|
||||
"--without-selinux",
|
||||
"--without-openssl",
|
||||
],
|
||||
# coreutils' configure runs link tests that require a working executable;
|
||||
# cross builds need this hint to skip a known false positive.
|
||||
configure_env = {"FORCE_UNSAFE_CONFIGURE": "1"},
|
||||
)
|
||||
@@ -0,0 +1,47 @@
|
||||
version = "2.41"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "GNU C library",
|
||||
license = "LGPL-2.1-or-later",
|
||||
website = "https://www.gnu.org/software/libc/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://ftp.gnu.org/gnu/glibc/glibc-{version}.tar.xz",
|
||||
sha256 = "a5a26b22f545d6b7d7b3dd828e11e428f24f4fac43c934fb071b6a7d0828e901",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc-bootstrap"]
|
||||
deps = ["linux-headers"]
|
||||
|
||||
build_if = options.libc == "glibc"
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run([
|
||||
ctx.source_dir / "configure",
|
||||
"--host=" + options.target_triple,
|
||||
"--build=" + options.target_triple,
|
||||
"--prefix=/usr",
|
||||
"--with-headers=" + ctx.sysroot / "usr/include",
|
||||
"--enable-kernel=5.4",
|
||||
"--enable-bind-now",
|
||||
"--enable-stack-protector=strong",
|
||||
"--enable-cet",
|
||||
"--disable-werror",
|
||||
"--disable-profile",
|
||||
"--disable-nscd",
|
||||
"--without-selinux",
|
||||
"--without-gd",
|
||||
"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])
|
||||
+3
-5
@@ -3,6 +3,7 @@ revision = 1
|
||||
metadata = meta(
|
||||
description = "Modern, secure, portable, multiprotocol bootloader and boot manager",
|
||||
license = "BSD-2-Clause",
|
||||
website = "https://limine-bootloader.org"
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://github.com/Limine-Bootloader/Limine/releases/download/v{version}/limine-{version}.tar.gz",
|
||||
@@ -11,11 +12,8 @@ source = tarball_source(
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
deps = [options.libc]
|
||||
subpackages = [
|
||||
subpackage(
|
||||
name = "limine-bios",
|
||||
),
|
||||
]
|
||||
|
||||
build_if = options.target_arch in ["x86_64", "aarch64", "riscv64", "loongarch64"]
|
||||
|
||||
configure, build, install = autotools(configure_env = {
|
||||
"TOOLCHAIN_FOR_TARGET": options.target_triple + "-",
|
||||
|
||||
@@ -11,10 +11,10 @@ source = tarball_source(
|
||||
)
|
||||
|
||||
def build(ctx):
|
||||
ctx.run(["cp", "-rp", ctx.source_dir + "/.", ctx.build_dir])
|
||||
ctx.run(["cp", "-rp", ctx.source_dir / ".", ctx.build_dir])
|
||||
ctx.run(["make", "headers_install", "ARCH=" + options.target_arch])
|
||||
ctx.run(["find", ctx.build_dir + "/usr/include", "-type", "f", "!", "-name", "*.h", "-delete"])
|
||||
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(["cp", "-rp", ctx.build_dir / "usr/include", pkg.dest_dir / ctx.prefix])
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
name = "linux"
|
||||
version = "7.0.9"
|
||||
revision = 1
|
||||
description = "Linux kernel"
|
||||
license = "GPL-2.0-only"
|
||||
|
||||
source = {
|
||||
"url": f"https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-{version}.tar.xz",
|
||||
"sha256": "ac07acdf76cf4621cc5187a2670270a1a699533c8a6b225e4878c416ad83f1c4",
|
||||
"strip_components": 1,
|
||||
}
|
||||
|
||||
host_deps = ["binutils", "gcc"]
|
||||
|
||||
def _make_args(ctx, *args):
|
||||
result = [
|
||||
"make",
|
||||
"-C", ctx.source_dir,
|
||||
"O=" + ctx.build_dir,
|
||||
"ARCH=x86_64",
|
||||
"CROSS_COMPILE=" + OPTIONS.target_triple + "-",
|
||||
"-j" + str(ctx.jobs),
|
||||
]
|
||||
result.extend(args)
|
||||
return result
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run(_make_args(ctx, "defconfig"))
|
||||
|
||||
def build(ctx):
|
||||
ctx.run(_make_args(ctx, "bzImage"))
|
||||
|
||||
def install(ctx, pkg):
|
||||
ctx.install(
|
||||
ctx.build_dir + "/arch/x86/boot/bzImage",
|
||||
pkg.destdir + "/boot/vmlinuz-" + version,
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
# TODO
|
||||
@@ -0,0 +1,44 @@
|
||||
version = "7.0.9"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "Linux kernel",
|
||||
license = "GPL-2.0-only",
|
||||
)
|
||||
|
||||
source = tarball_source(
|
||||
url = f"https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-{version}.tar.xz",
|
||||
sha256 = "ac07acdf76cf4621cc5187a2670270a1a699533c8a6b225e4878c416ad83f1c4",
|
||||
strip_components = 1,
|
||||
)
|
||||
|
||||
host_deps = ["binutils", "gcc"]
|
||||
|
||||
def _make_args(ctx, *args):
|
||||
# Translate arch name
|
||||
if options.target_arch == "aarch64":
|
||||
linux_arch = "arm64"
|
||||
else:
|
||||
linux_arch = options.target_arch
|
||||
|
||||
result = [
|
||||
"make",
|
||||
"-C", ctx.source_dir,
|
||||
"O=" + ctx.build_dir,
|
||||
"ARCH=" + linux_arch,
|
||||
"CROSS_COMPILE=" + options.target_triple + "-",
|
||||
"-j" + str(ctx.jobs),
|
||||
]
|
||||
result.extend(args)
|
||||
return result
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run(_make_args(ctx, "defconfig"))
|
||||
|
||||
def build(ctx):
|
||||
ctx.run(_make_args(ctx, "bzImage"))
|
||||
|
||||
def install(ctx, pkg):
|
||||
ctx.install(
|
||||
ctx.build_dir + "/arch/x86/boot/bzImage",
|
||||
pkg.destdir + "/boot/vmlinuz-" + version,
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
version = "4.4.1"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "GNU make build automation tool",
|
||||
license = "GPL-3.0-or-later",
|
||||
website = "https://www.gnu.org/software/make/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://ftp.gnu.org/gnu/make/make-{version}.tar.gz",
|
||||
sha256 = "?",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
|
||||
configure, build, install = autotools(configure_args = [
|
||||
"--without-guile",
|
||||
])
|
||||
+2
-1
@@ -10,10 +10,11 @@ source = tarball_source(
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc-bootstrap"]
|
||||
build_if = options.libc == "musl"
|
||||
|
||||
def configure(ctx):
|
||||
ctx.run([
|
||||
ctx.source_dir + "/configure",
|
||||
ctx.source_dir / "configure",
|
||||
"--target=" + options.target_triple,
|
||||
"--prefix=" + ctx.prefix,
|
||||
"--syslibdir=/lib",
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
version = "6.5"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "Terminal control library with wide-character support",
|
||||
license = "MIT",
|
||||
website = "https://invisible-island.net/ncurses/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://invisible-mirror.net/archives/ncurses/ncurses-{version}.tar.gz",
|
||||
sha256 = "136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
deps = [options.libc]
|
||||
|
||||
configure, build, install = autotools(configure_args = [
|
||||
"--with-shared",
|
||||
"--without-debug",
|
||||
"--without-ada",
|
||||
"--enable-pc-files",
|
||||
"--enable-widec",
|
||||
"--with-termlib",
|
||||
"--with-cxx-binding",
|
||||
"--with-cxx-shared",
|
||||
"--with-pkg-config-libdir=/usr/lib/pkgconfig",
|
||||
"--mandir=/usr/share/man",
|
||||
], configure_env = {
|
||||
# Conflicts with GCC 16 headers
|
||||
"cf_cv_type_of_bool": "bool",
|
||||
"cf_cv_cc_bool_type": "1",
|
||||
"cf_cv_builtin_bool": "1",
|
||||
"ac_cv_header_stdbool_h": "yes",
|
||||
})
|
||||
@@ -0,0 +1,51 @@
|
||||
version = "3.4.1"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "Cryptography and TLS library (OpenSSL)",
|
||||
license = "Apache-2.0",
|
||||
website = "https://www.openssl.org/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://github.com/openssl/openssl/releases/download/openssl-{version}/openssl-{version}.tar.gz",
|
||||
sha256 = "?",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
deps = ["zlib"]
|
||||
|
||||
def configure(ctx):
|
||||
# OpenSSL uses its own perl-based Configure script. The first argument is
|
||||
# the OpenSSL "target" — pick the one matching our triple.
|
||||
if options.target_arch == "x86_64":
|
||||
ossl_target = "linux-x86_64"
|
||||
elif options.target_arch == "aarch64":
|
||||
ossl_target = "linux-aarch64"
|
||||
elif options.target_arch == "riscv64":
|
||||
ossl_target = "linux64-riscv64"
|
||||
else:
|
||||
fail("openssl: unsupported target_arch " + options.target_arch)
|
||||
|
||||
ctx.run([
|
||||
ctx.source_dir / "Configure",
|
||||
ossl_target,
|
||||
"--prefix=" + ctx.prefix,
|
||||
"--openssldir=/etc/ssl",
|
||||
"--libdir=lib",
|
||||
"shared",
|
||||
"zlib",
|
||||
"no-tests",
|
||||
"no-static-engine",
|
||||
"enable-ktls",
|
||||
], env = {
|
||||
"CC": options.target_triple + "-gcc",
|
||||
"AR": options.target_triple + "-ar",
|
||||
"RANLIB": options.target_triple + "-ranlib",
|
||||
"CFLAGS": options.cflags,
|
||||
"LDFLAGS": options.ldflags,
|
||||
})
|
||||
|
||||
def build(ctx):
|
||||
ctx.run(["make", "-j" + str(ctx.jobs)])
|
||||
|
||||
def install(ctx, pkg):
|
||||
ctx.run(["make", "install_sw", "install_ssldirs"], env = {"DESTDIR": pkg.dest_dir})
|
||||
@@ -0,0 +1,18 @@
|
||||
version = "3.3.3"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "Lightweight pkg-config implementation",
|
||||
license = "ISC",
|
||||
website = "http://pkgconf.org/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://distfiles.ariadne.space/pkgconf/pkgconf-{version}.tar.xz",
|
||||
sha256 = "?",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
|
||||
configure, build, install = autotools(configure_args = [
|
||||
"--with-system-libdir=/usr/lib",
|
||||
"--with-system-includedir=/usr/include",
|
||||
])
|
||||
@@ -0,0 +1,23 @@
|
||||
version = "8.2"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "Library for command-line editing",
|
||||
license = "GPL-3.0-or-later",
|
||||
website = "https://tiswww.case.edu/php/chet/readline/rltop.html",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://ftp.gnu.org/gnu/readline/readline-{version}.tar.gz",
|
||||
sha256 = "3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
deps = ["ncurses"]
|
||||
|
||||
configure, build, install = autotools(
|
||||
configure_args = ["--with-curses"],
|
||||
configure_env = {
|
||||
# Force linking against the system curses; otherwise readline's
|
||||
# configure may pick a static libtermcap stub it ships internally.
|
||||
"bash_cv_termcap_lib": "ncursesw",
|
||||
},
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
version = "5.6.3"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "XZ Utils — LZMA/XZ compression tools and library",
|
||||
license = "0BSD AND GPL-2.0-or-later AND LGPL-2.1-or-later",
|
||||
website = "https://tukaani.org/xz/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://github.com/tukaani-project/xz/releases/download/v{version}/xz-{version}.tar.xz",
|
||||
sha256 = "?",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
|
||||
configure, build, install = autotools(configure_args = [
|
||||
"--disable-doc",
|
||||
])
|
||||
@@ -0,0 +1,35 @@
|
||||
version = "1.3.1"
|
||||
revision = 1
|
||||
metadata = meta(
|
||||
description = "Lossless data-compression library",
|
||||
license = "Zlib",
|
||||
website = "https://zlib.net/",
|
||||
)
|
||||
source = tarball_source(
|
||||
url = f"https://zlib.net/zlib-{version}.tar.xz",
|
||||
sha256 = "?",
|
||||
strip_components = 1,
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
|
||||
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",
|
||||
], env = {
|
||||
"CC": options.target_triple + "-gcc",
|
||||
"AR": options.target_triple + "-ar",
|
||||
"RANLIB": options.target_triple + "-ranlib",
|
||||
"CFLAGS": options.cflags,
|
||||
"LDFLAGS": options.ldflags,
|
||||
})
|
||||
|
||||
def build(ctx):
|
||||
ctx.run(["make", "-j" + str(ctx.jobs)])
|
||||
|
||||
def install(ctx, pkg):
|
||||
ctx.run(["make", "install"], env = {"DESTDIR": pkg.dest_dir})
|
||||
Reference in New Issue
Block a user