bash: Fix build

This commit is contained in:
2026-05-26 23:55:28 +02:00
parent 3253dfe87b
commit fc97bc4bb2
4 changed files with 75 additions and 13 deletions
+50
View File
@@ -0,0 +1,50 @@
version = "2.5.1"
revision = 1
description = "Lightweight pkg-config implementation (cross host build)"
license = "ISC"
url = "http://pkgconf.org/"
source = tarball(
url=f"https://distfiles.ariadne.space/pkgconf/pkgconf-{version}.tar.xz",
sha256="cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a50c243",
)
host_deps = ["autoconf", "automake", "binutils", "gcc"]
def configure(self):
self.run(
self.source_dir / "configure",
f"--prefix={self.prefix}",
"--with-system-libdir=/usr/lib",
"--with-system-includedir=/usr/include",
env={
"CFLAGS": self.profile["host_cflags"],
"LDFLAGS": self.profile["host_ldflags"],
},
)
def build(self):
autotools_build(self)
def install(self):
autotools_install(self)
triple = self.triple
bindir = f"{self.dest_dir}{self.prefix}/bin"
persdir = f"{self.dest_dir}{self.prefix}/share/pkgconfig/personality.d"
personality = f"""Triplet: {triple}
SysrootDir: /sysroot
DefaultSearchPaths: /sysroot/usr/lib/pkgconfig:/sysroot/usr/share/pkgconfig
SystemIncludePaths: /sysroot/usr/include
SystemLibraryPaths: /sysroot/usr/lib
"""
self.run(
"sh",
"-c",
f"set -e; "
f"mkdir -p {persdir}; "
f"cat > {persdir}/{triple}.personality <<'__EOF__'\n{personality}__EOF__\n"
f"ln -sf pkgconf {bindir}/{triple}-pkgconf; "
f"ln -sf pkgconf {bindir}/{triple}-pkg-config",
)
+10 -7
View File
@@ -1,28 +1,31 @@
version = "5.2.32"
version = "5.3"
revision = 1
description = "GNU Bourne-Again SHell"
license = "GPL-3.0-or-later"
url = "https://www.gnu.org/software/bash/"
source = tarball(
url=f"https://ftp.gnu.org/gnu/bash/bash-{version}.tar.gz",
sha256="d3ef80d2b67d8cbbe4d3265c63a72c46f9b278ead6e0e06d61801b58f23f50b5",
sha256="0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba",
)
host_deps = ["autoconf", "automake", "binutils", "gcc"]
deps = [profile["libc"], "ncurses", "readline"]
build_if = False # TODO: Doesn't build yet
configure, build, install = autotools(
configure_args=[
"--without-bash-malloc",
"--disable-nls",
"--with-installed-readline",
"--with-curses",
"--enable-readline",
"--with-installed-readline=/sysroot/usr", # TODO: get /sysroot from context
"--with-installed-readline",
],
configure_env={
"bash_cv_termcap_lib": "libtinfo",
"CFLAGS": profile["cflags"] + " -std=gnu17",
"CFLAGS_FOR_BUILD": profile["cflags"] + " -std=gnu17",
"CFLAGS_FOR_BUILD": profile["host_cflags"] + " -std=gnu17",
},
# HACK: Fixes cross-compile issues
build_args=[
"READLINE_LDFLAGS=-L=/usr/lib",
"HISTORY_LDFLAGS=-L=/usr/lib",
],
)
+10 -1
View File
@@ -1,5 +1,5 @@
version = "6.5"
revision = 1
revision = 2
description = "Terminal control library with wide-character support"
license = "MIT"
url = "https://invisible-island.net/ncurses/"
@@ -37,3 +37,12 @@ configure, build, _ = autotools(
def install(self):
autotools_install(self, [f"DESTDIR={self.dest_dir}"])
libdir = self.dest_dir / "usr/lib"
pcdir = libdir / "pkgconfig"
for name in ("ncurses", "curses"):
self.run("ln", "-sf", "libncursesw.so", libdir / f"lib{name}.so")
self.run("ln", "-sf", "libncursesw.a", libdir / f"lib{name}.a")
self.run("ln", "-sf", "libtinfow.so", libdir / "libtinfo.so")
self.run("ln", "-sf", "libtinfow.a", libdir / "libtinfo.a")
self.run("ln", "-sf", "ncursesw.pc", pcdir / "ncurses.pc")
self.run("ln", "-sf", "tinfow.pc", pcdir / "tinfo.pc")
+5 -5
View File
@@ -1,19 +1,19 @@
version = "8.2"
version = "8.3"
revision = 1
description = "Library for command-line editing"
license = "GPL-3.0-or-later"
url = "https://tiswww.case.edu/php/chet/readline/rltop.html"
source = tarball(
url=f"https://ftp.gnu.org/gnu/readline/readline-{version}.tar.gz",
sha256="3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35",
sha256="fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc",
)
host_deps = ["autoconf", "automake", "binutils", "gcc"]
deps = [profile["libc"], "ncurses"]
configure, build, _ = autotools(
configure_args=["--with-curses"],
# Force linking against system ncurses, not readline's internal termcap stub.
configure_env={"bash_cv_termcap_lib": "ncursesw"},
configure_args=["--with-curses", "--with-shared-termcap-library"],
# Force linking against system terminfo, not readline's internal termcap stub.
configure_env={"bash_cv_termcap_lib": "libtinfo"},
)