forked from semios/semios-packages
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b09d172ff9 | ||
|
|
89744adb38 | ||
|
|
fc753703c4 | ||
|
|
132ed2d8b3 | ||
|
|
41d0b79083 | ||
|
|
232aa0b690 | ||
|
|
65dd900ea4 | ||
|
|
ea440a2465 | ||
|
|
e7d77b63b3 | ||
|
|
2f7053488b | ||
|
|
cb9842b371 | ||
|
|
25525068bd | ||
|
|
2a7def094d | ||
|
|
91b153d21b | ||
|
|
fb5f90e0bb | ||
|
|
0238507da1 | ||
|
|
21bb0c0416 | ||
|
|
614aae909b | ||
|
|
71ae4dd1cb | ||
|
|
19d58033f0 | ||
|
|
7c61d7ca8b | ||
|
|
3b613fc446 | ||
|
|
cfb2a07fa4 | ||
|
|
a7afab336b | ||
|
|
e0af0577bf | ||
|
|
da5c4329bf | ||
|
|
aa19be566b | ||
|
|
05cb5c94c5 | ||
|
|
65a884ddd4 | ||
|
|
8c41ed811f | ||
|
|
e421add41d | ||
|
|
1b2f8a2295 | ||
|
|
2b3204cb9a | ||
|
|
02cf225a7e | ||
|
|
8d99e1d12a | ||
|
|
89f0038e99 | ||
|
|
0743d92327 | ||
|
|
7e66f0669d | ||
|
|
557aae6cb5 | ||
|
|
178f5820e7 | ||
|
|
aded8393fe | ||
|
|
ea6c4592e9 | ||
|
|
6abf94ba6c | ||
|
|
a903430180 | ||
|
|
6dd8c911a1 | ||
|
|
5c22c479bd | ||
|
|
6704ec11ea | ||
|
|
eea8869aa5 |
+38
-15
@@ -3,29 +3,52 @@ import os
|
||||
from lib import arch, common, make, pkgcomposer
|
||||
|
||||
|
||||
def is_abslink(path):
|
||||
try:
|
||||
return os.readlink(path).startswith("/")
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
def autolink_bin(composer: pkgcomposer.PkgComposer):
|
||||
if is_abslink("bin"):
|
||||
return
|
||||
for i in common.treedir("bin"):
|
||||
if i.is_file() and os.access(i.path, os.X_OK):
|
||||
make.link(f"bin/{i.name}", "/bin/" + i.name)
|
||||
|
||||
def autolink_lib(composer: pkgcomposer.PkgComposer):
|
||||
if is_abslink("lib"):
|
||||
return
|
||||
for i in common.treedir("lib"):
|
||||
if i.is_file():
|
||||
make.link(f"lib/{i.name}", "/lib/" + arch.get_target() + "/" + i.name)
|
||||
|
||||
def autolink_include(composer: pkgcomposer.PkgComposer):
|
||||
if is_abslink("include"):
|
||||
return
|
||||
for i in common.treedir("include"):
|
||||
if i.is_file():
|
||||
make.link(
|
||||
f"include/{i.name}",
|
||||
"/lib/" + arch.get_target() + "/include/" + i.name,
|
||||
)
|
||||
|
||||
|
||||
def autolink(composer: pkgcomposer.PkgComposer):
|
||||
os.chdir(composer.workdir + "/bundle/")
|
||||
|
||||
try:
|
||||
for i in common.treedir("bin"):
|
||||
if i.is_file():
|
||||
make.link(f"bin/{i.name}", "/bin/" + i.name)
|
||||
except Exception:
|
||||
autolink_bin(composer)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
for i in common.treedir("lib"):
|
||||
if i.is_file():
|
||||
make.link(f"lib/{i.name}", "/lib/" + arch.get_target() + "/" + i.name)
|
||||
except Exception:
|
||||
autolink_lib(composer)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
for i in common.treedir("include"):
|
||||
if i.is_file():
|
||||
make.link(
|
||||
f"include/{i.name}",
|
||||
"/lib/" + arch.get_target() + "/include/" + i.name,
|
||||
)
|
||||
except Exception:
|
||||
autolink_include(composer)
|
||||
except:
|
||||
pass
|
||||
|
||||
+6
-6
@@ -4,16 +4,16 @@ from . import packie
|
||||
|
||||
all: dict[str, dict[str, str]] = {
|
||||
"aarch64-semios-linux": {
|
||||
"CC": "clang -target aarch64-semios-linux-musl",
|
||||
"CXX": "clang++ -target aarch64-semios-linux-musl",
|
||||
"CC": "clang -target aarch64-unknown-linux-musl",
|
||||
"CXX": "clang++ -target aarch64-unknown-linux-musl",
|
||||
},
|
||||
"x86_64-semios-linux": {
|
||||
"CC": "clang -target x86_64-semios-linux-musl",
|
||||
"CXX": "clang++ -target x86_64-semios-linux-musl",
|
||||
"CC": "clang -target x86_64-unknown-linux-musl",
|
||||
"CXX": "clang++ -target x86_64-unknown-linux-musl",
|
||||
},
|
||||
"riscv64-semios-linux": {
|
||||
"CC": "clang -target riscv64-semios-linux-musl",
|
||||
"CXX": "clang++ -target riscv64-semios-linux-musl",
|
||||
"CC": "clang -target riscv64-unknown-linux-musl",
|
||||
"CXX": "clang++ -target riscv64-unknown-linux-musl",
|
||||
},
|
||||
}
|
||||
_target: str = packie.host_arch()
|
||||
|
||||
+16
-5
@@ -15,12 +15,14 @@ BASE_REQUIREMENTS = [
|
||||
"packie",
|
||||
"patch",
|
||||
"zstd",
|
||||
"libz-ng",
|
||||
"liblzma",
|
||||
"libbzip2",
|
||||
# Basic libraries
|
||||
"sqlite",
|
||||
"libgcc-compat",
|
||||
"libcxx",
|
||||
"semi-libc",
|
||||
"libz-ng",
|
||||
# Networking
|
||||
"ca-certificates",
|
||||
"certutil",
|
||||
@@ -30,19 +32,32 @@ BASE_REQUIREMENTS = [
|
||||
|
||||
|
||||
def _prepare_build_env_base_files(root: str):
|
||||
# Create root directory
|
||||
os.makedirs(root, exist_ok=True)
|
||||
|
||||
# Create var, run and tmp
|
||||
os.mkdir(f"{root}/var")
|
||||
os.mkdir(f"{root}/var/tmp")
|
||||
os.mkdir(f"{root}/var/run")
|
||||
os.mkdir(f"{root}/tmp")
|
||||
os.mkdir(f"{root}/run")
|
||||
|
||||
# Copy repository config files
|
||||
os.makedirs(f"{root}/var/db/packie")
|
||||
shutil.copytree("/var/config/packie/repos.d", f"{root}/var/config/packie/repos.d")
|
||||
|
||||
# Create directories for kernel pseudo filesystems
|
||||
os.mkdir(f"{root}/dev")
|
||||
os.mkdir(f"{root}/sys")
|
||||
os.mkdir(f"{root}/proc")
|
||||
|
||||
# Create home directory of root (some scripts may require it)
|
||||
os.makedirs(f"{root}/home/root")
|
||||
|
||||
# Copy DNS config
|
||||
os.makedirs(f"{root}/etc", exist_ok=True)
|
||||
shutil.copy2("/etc/resolv.conf", f"{root}/etc/resolv.conf")
|
||||
|
||||
|
||||
def prepare_build_env(root: str, extreq: list[str] = []):
|
||||
# Skip if the environment is already initialized
|
||||
@@ -63,10 +78,6 @@ def prepare_build_env(root: str, extreq: list[str] = []):
|
||||
# Refresh certificates
|
||||
enter_build_env(root, ["certutil", "refresh"])
|
||||
|
||||
# Copy DNS config
|
||||
os.makedirs(f"{root}/etc", exist_ok=True)
|
||||
shutil.copy2("/etc/resolv.conf", f"{root}/etc/resolv.conf")
|
||||
|
||||
# Create initialized tag
|
||||
with open(f"{root}/.INIT", "wt+") as file:
|
||||
file.write("OK")
|
||||
|
||||
+3
-1
@@ -78,7 +78,7 @@ def meson_compile(rem: list[str] = []):
|
||||
subprocess.run(["meson", "compile", "-C", "_meson_build"] + rem, check=True)
|
||||
|
||||
|
||||
def meson_install(rem: list[str] | None = None, chdir: bool = True):
|
||||
def meson_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
||||
default_rem = ["--destdir", f"{os.getcwd()}/../cpp_install"]
|
||||
if not rem:
|
||||
os.makedirs("../cpp_install", exist_ok=True)
|
||||
@@ -87,6 +87,8 @@ def meson_install(rem: list[str] | None = None, chdir: bool = True):
|
||||
)
|
||||
if chdir:
|
||||
os.chdir("../cpp_install")
|
||||
if chdir and move:
|
||||
_move_install()
|
||||
|
||||
|
||||
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
||||
|
||||
+10
@@ -7,6 +7,7 @@ from . import pkgcomposer, sources
|
||||
_key_global = "@global"
|
||||
_key_version = "version"
|
||||
_key_description = "description"
|
||||
_key_maintainers = "maintainers"
|
||||
_key_on_pack = "on_pack"
|
||||
_key_arch_any = "arch_any"
|
||||
_key_links = "links"
|
||||
@@ -19,6 +20,7 @@ _pkginfo: dict[str, dict[str, typing.Any]] = {
|
||||
_key_global: {
|
||||
_key_links: [],
|
||||
_key_dependencies: [],
|
||||
_key_maintainers: [],
|
||||
_key_provides: [],
|
||||
_key_recommendations: [],
|
||||
},
|
||||
@@ -44,6 +46,10 @@ def builddep(s: str):
|
||||
elif s == "shortcut/rust":
|
||||
builddep("shortcut/c")
|
||||
_builddep += ["cargo", "rustc"]
|
||||
elif s == "shortcut/cmake":
|
||||
_builddep += ["cmake", "ninja"]
|
||||
elif s == "shortcut/meson":
|
||||
_builddep += ["meson", "ninja"]
|
||||
else:
|
||||
_builddep += [s]
|
||||
|
||||
@@ -65,6 +71,10 @@ def description(s: str):
|
||||
_pkginfo[_current_pkgname][_key_description] = s
|
||||
|
||||
|
||||
def maintainer(s: str):
|
||||
_pkginfo[_current_pkgname][_key_maintainers] += [s]
|
||||
|
||||
|
||||
def arch_any():
|
||||
_pkginfo[_current_pkgname][_key_arch_any] = True
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ from lib import rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.10.9")
|
||||
description("Modern, portable and fast implementation of service supervisor and the init daemon.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/sisungo/airup/archive/refs/tags/v0.10.9.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
@@ -4,10 +4,13 @@ from lib.make import *
|
||||
upstream_version = "1.2.16.1"
|
||||
|
||||
version(upstream_version)
|
||||
description("audio and MIDI functionality for the Linux operating system")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.16.1.tar.bz2")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
version("1.2.16")
|
||||
description("audio and MIDI functionality for the Linux operating system")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.alsa-project.org/files/pub/utils/alsa-utils-1.2.16.tar.bz2")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("pkgconf")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
builddep(f"alsa-lib-dev @{arch.get_target()}")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep("gettext")
|
||||
|
||||
def build():
|
||||
cpp.configure([f"--prefix={get_prefix('alsa-utils')}", "--disable-nls"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_alsa_utils(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("sbin", "bin", merge=True)
|
||||
composer.add_dir("lib", "lib")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/alsa", "share/alsa")
|
||||
composer.add_dir("share/sounds", "share/sounds")
|
||||
|
||||
package("alsa-utils")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("alsa-lib @same-arch")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(pack_alsa_utils)
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2026.4.26")
|
||||
description("The One True Awk programming language")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -4,22 +4,32 @@ import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("5.1.0")
|
||||
description("a general-purpose cryptographic library maintained by the AWS Cryptography team")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.1.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
def _fix_pc(name, prefix):
|
||||
filepath = f"lib/pkgconfig/{name}.pc"
|
||||
with open(filepath, "r") as f:
|
||||
content = f.read()
|
||||
new_content = content.replace("prefix=/", f"prefix={prefix}").replace("libdir=${prefix}/usr/lib", "libdir=${prefix}/lib")
|
||||
with open(filepath, "w") as f:
|
||||
f.write(new_content)
|
||||
|
||||
def build():
|
||||
cpp.cmake(
|
||||
[
|
||||
"-DBUILD_SHARED_LIBS=1",
|
||||
"-DCMAKE_INSTALL_PREFIX=/",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
_fix_pc("libssl", get_prefix("aws-lc-libssl"))
|
||||
_fix_pc("libcrypto", get_prefix("aws-lc-libcrypto"))
|
||||
|
||||
on_build(build)
|
||||
|
||||
@@ -48,6 +58,7 @@ package("aws-lc-tools")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("aws-lc-libcrypto (same)")
|
||||
dep("aws-lc-libssl (same)")
|
||||
dep("libcxx @same-arch")
|
||||
|
||||
package("aws-lc-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
version("5.3")
|
||||
description("the Bourne Again SHell")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--prefix={get_prefix('bash')}",
|
||||
f"--datarootdir={get_prefix('bash-doc')}/share",
|
||||
f"--localedir={get_prefix('bash')}/share/locale",
|
||||
"--enable-alias",
|
||||
"--enable-alt-array-implementation",
|
||||
"--enable-arith-for-command",
|
||||
"--enable-array-variables",
|
||||
"--enable-bang-history",
|
||||
"--enable-brace-expansion",
|
||||
"--enable-casemod-attributes",
|
||||
"--enable-casemod-expansions",
|
||||
"--enable-command-timing",
|
||||
"--enable-cond-command",
|
||||
"--enable-cond-regexp",
|
||||
"--enable-coprocesses",
|
||||
"--enable-directory-stack",
|
||||
"--enable-dparen-arithmetic",
|
||||
"--enable-extended-glob",
|
||||
"--enable-function-import",
|
||||
"--enable-glob-asciiranges-default",
|
||||
"--enable-help-builtin",
|
||||
"--enable-history",
|
||||
"--enable-job-control",
|
||||
"--enable-multibyte",
|
||||
"--enable-net-redirections",
|
||||
"--enable-process-substitution",
|
||||
"--enable-progcomp",
|
||||
"--enable-prompt-string-decoding",
|
||||
"--enable-readline",
|
||||
"--enable-restricted",
|
||||
"--enable-select",
|
||||
"--enable-separate-helpfiles",
|
||||
"--enable-single-help-strings",
|
||||
"--enable-translatable-strings",
|
||||
"--without-bash-malloc",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_bash(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.makedir("lib")
|
||||
composer.add_dir("lib/bash", "lib/bash")
|
||||
os.remove(f"{composer.workdir}/bundle/lib/bash/loadables.h")
|
||||
os.remove(f"{composer.workdir}/bundle/lib/bash/Makefile.inc")
|
||||
os.remove(f"{composer.workdir}/bundle/lib/bash/Makefile.sample")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/locale", "share/locale")
|
||||
|
||||
def pack_doc(composer):
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/bash", "share/bash")
|
||||
composer.add_dir("share/doc", "share/doc")
|
||||
composer.add_dir("share/info", "share/info")
|
||||
composer.add_dir("share/man", "share/man")
|
||||
|
||||
package("bash")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(pack_bash)
|
||||
|
||||
package("bash-dev")
|
||||
dep("bash (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("bash-doc")
|
||||
on_pack(pack_doc)
|
||||
@@ -2,6 +2,8 @@ from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("7.0.3")
|
||||
description("An implementation of the POSIX bc calculator with GNU extensions and dc")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.7.91")
|
||||
description("a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://alpha.gnu.org/gnu/bison/bison-3.7.91.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("gnu-m4")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(["--enable-relocatable"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_bison(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("lib", "lib")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/aclocal", "share/aclocal")
|
||||
composer.add_dir("share/bison", "share/bison")
|
||||
|
||||
|
||||
package("bison")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("gnu-m4")
|
||||
on_pack(pack_bison)
|
||||
link("bin/bison", "/bin/bison")
|
||||
link("bin/yacc", "/bin/yacc", default=False)
|
||||
@@ -6,6 +6,8 @@ from lib.make import *
|
||||
VERSION = "2026.6.19"
|
||||
|
||||
version(VERSION)
|
||||
description("The BSD make utility ported to non-BSD systems")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.crufty.net/ftp/pub/sjg/bmake-20260619.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.2.0")
|
||||
description("Brotli compression format")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz")
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.0")
|
||||
description("Berkeley yacc")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.invisible-island.net/archives/byacc/byacc-2.0.tgz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -10,6 +10,8 @@ builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
version(f"{upstream_version}")
|
||||
description("a freely available, patent free, high-quality data compressor")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(f"https://sourceware.org/pub/bzip2/bzip2-{upstream_version}.tar.gz")
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.34.6")
|
||||
description("A C library for asynchronous DNS requests")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/c-ares/c-ares/releases/download/v1.34.6/c-ares-1.34.6.tar.gz"
|
||||
)
|
||||
|
||||
@@ -3,6 +3,8 @@ import os
|
||||
from lib.make import *
|
||||
|
||||
version("2026.7.4")
|
||||
description("SemiOS system-level trusted CA database")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://gitea.semilabs.org/semios/ca-certificates/releases/download/v2026.07.04/ca-certificates-2026.07.04.tar"
|
||||
)
|
||||
|
||||
@@ -2,6 +2,8 @@ from lib import rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.1.0")
|
||||
description("SemiOS certification utility")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/certutil/archive/v0.1.0.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "4.3.4"
|
||||
[upstream_major, upstream_minor, upstream_rev] = upstream_version.split(".")
|
||||
|
||||
version(upstream_version)
|
||||
description("a cross-platform, open-source build system generator")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/Kitware/CMake/releases/download/v4.3.4/cmake-4.3.4.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("shortcut/cmake")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep(f"libexpat-dev @{arch.get_target()}")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
builddep(f"libbzip2-dev @{arch.get_target()}")
|
||||
builddep(f"liblzma-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"libnghttp2-dev @{arch.get_target()}")
|
||||
builddep(f"librhash-dev @{arch.get_target()}")
|
||||
builddep(f"libarchive-dev @{arch.get_target()}")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["CMAKE_PREFIX_PATH"] = f"/lib/{arch.get_target()}"
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_PREFIX={get_prefix('cmake')}",
|
||||
"-DCMAKE_USE_SYSTEM_CURL=ON",
|
||||
"-DCMAKE_USE_SYSTEM_ZLIB=ON",
|
||||
"-DCMAKE_USE_SYSTEM_ZSTD=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBRHASH=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBARCHIVE=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBLZMA=ON",
|
||||
"-DCMAKE_USE_SYSTEM_EXPAT=ON",
|
||||
"-DCMAKE_USE_SYSTEM_BZIP2=ON",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_cmake(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.makedir("share")
|
||||
composer.add_dir(
|
||||
f"share/cmake-{upstream_major}.{upstream_minor}",
|
||||
f"share/cmake-{upstream_major}.{upstream_minor}",
|
||||
)
|
||||
|
||||
package("cmake")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
dep("libcurl @same-arch")
|
||||
dep("librhash @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libarchive @same-arch")
|
||||
dep("libexpat @same-arch")
|
||||
on_pack(pack_cmake)
|
||||
@@ -1,8 +1,10 @@
|
||||
import lib.rust as rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.9.0")
|
||||
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.9.0.tar.gz")
|
||||
version("0.10.0")
|
||||
description("system core utilities")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.10.0.tar.gz")
|
||||
block_hook("autolink")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("8.21.0")
|
||||
description("command line tool and library for transferring data with URLs")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://curl.se/download/curl-8.21.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libnghttp2-dev @{arch.get_target()}")
|
||||
builddep(f"libcares-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libbrotli-dev @{arch.get_target()}")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"libpsl-dev @{arch.get_target()}")
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('curl')}/bin",
|
||||
f"--libdir={get_prefix('libcurl')}/lib",
|
||||
f"--includedir={get_prefix('libcurl-dev')}/include",
|
||||
"--enable-optimize",
|
||||
"--disable-debug",
|
||||
"--enable-warnings",
|
||||
"--enable-symbol-hiding",
|
||||
"--enable-ares",
|
||||
"--enable-http",
|
||||
"--enable-ftp",
|
||||
"--enable-file",
|
||||
"--enable-ipfs",
|
||||
"--disable-ldap",
|
||||
"--disable-ldaps",
|
||||
"--enable-rtsp",
|
||||
"--enable-proxy",
|
||||
"--enable-dict",
|
||||
"--enable-telnet",
|
||||
"--enable-tftp",
|
||||
"--enable-pop3",
|
||||
"--enable-imap",
|
||||
"--enable-smb",
|
||||
"--enable-smtp",
|
||||
"--enable-gopher",
|
||||
"--enable-mqtt",
|
||||
"--disable-init-mem-debug",
|
||||
"--enable-manual",
|
||||
"--enable-docs",
|
||||
"--enable-libcurl-option",
|
||||
"--enable-ipv6",
|
||||
"--enable-openssl-auto-load-config",
|
||||
"--enable-ca-native",
|
||||
"--enable-versioned-symbols",
|
||||
"--enable-typecheck",
|
||||
"--enable-verbose",
|
||||
"--disable-tls-srp",
|
||||
"--enable-unix-sockets",
|
||||
"--enable-cookies",
|
||||
"--enable-socketpair",
|
||||
"--enable-http-auth",
|
||||
"--enable-doh",
|
||||
"--enable-mime",
|
||||
"--enable-bindlocal",
|
||||
"--enable-form-api",
|
||||
"--enable-dateparse",
|
||||
"--enable-netrc",
|
||||
"--enable-progress-meter",
|
||||
"--enable-get-easy-options",
|
||||
"--enable-alt-svc",
|
||||
"--enable-headers-api",
|
||||
"--enable-hsts",
|
||||
"--enable-websockets",
|
||||
"--with-openssl",
|
||||
"--with-nghttp2",
|
||||
"--without-libidn2",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libcurl")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libpsl @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libcares @same-arch")
|
||||
dep("libnghttp2 @same-arch")
|
||||
dep("libssl @same-arch")
|
||||
dep("libcrypto @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libbrotli @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("curl")
|
||||
dep("libcurl (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libcurl-dev")
|
||||
dep("libcurl (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,55 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
version("1.16.2")
|
||||
description("a message bus system, a simple way for applications to talk to one another")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("gettext")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep(f"glib-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"-Dapparmor=disabled",
|
||||
"-Dmessage_bus=false",
|
||||
"-Druntime_dir=/run",
|
||||
"-Dsystemd=disabled",
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libdbus')}/lib",
|
||||
f"--bindir={get_prefix('dbus-tools')}/bin",
|
||||
f"--includedir={get_prefix('libdbus-dev')}/include",
|
||||
"--sysconfdir=/var/config",
|
||||
"--localstatedir=/var/db/dbus",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_libdbus(composer):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if not ".so" in i:
|
||||
continue
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
os.symlink(f"{get_prefix('libdbus-dev')}/lib/dbus-1.0", f"{composer.workdir}/bundle/lib/dbus-1.0")
|
||||
|
||||
package("libdbus")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_libdbus)
|
||||
|
||||
package("dbus-tools")
|
||||
dep("libdbus (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libdbus-dev")
|
||||
dep("libdbus (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -2,6 +2,8 @@ import lib.rust as rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.5.0")
|
||||
description("utility to compute difference between text files")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/uutils/diffutils/archive/refs/tags/v0.5.0.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
@@ -4,6 +4,8 @@ import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.8.1")
|
||||
description("Fast streaming XML parser written in C99")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/libexpat/libexpat/releases/download/R_2_8_1/expat-2.8.1.tar.gz"
|
||||
)
|
||||
|
||||
@@ -6,6 +6,8 @@ from lib.make import *
|
||||
VERSION = "5.48"
|
||||
|
||||
version(VERSION)
|
||||
description("utility to infer file type and information")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_git("https://github.com/file/file.git", "FILE5_48")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import lib.rust as rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.9.0")
|
||||
source_url("https://github.com/uutils/findutils/archive/refs/tags/0.9.0.tar.gz")
|
||||
version("0.10.0")
|
||||
description("implementation of the UNIX findutils")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/uutils/findutils/archive/refs/tags/0.10.0.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.6.4")
|
||||
description("The Fast Lexical Analyzer - scanner generator for lexing in C and C++")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("0.3.3")
|
||||
description("small implementation of gettext and libintl")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/sabotage-linux/gettext-tiny/releases/download/v0.3.3/gettext-tiny-0.3.3.tar.xz"
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.55.0")
|
||||
description("a free and open source distributed version control system")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.kernel.org/pub/software/scm/git/git-2.55.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
import shutil
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
upstream_version = "2.89.2"
|
||||
|
||||
version(upstream_version)
|
||||
description("a general-purpose, portable utility library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://download.gnome.org/sources/glib/2.89/glib-2.89.2.tar.xz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/meson")
|
||||
builddep("gettext")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep("pcre2-tools")
|
||||
builddep(f"libpcre2-dev @{arch.get_target()}")
|
||||
builddep(f"libffi-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep("libexpat")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["CFLAGS"] = os.environ.get("CFLAGS", "") + " -Wno-missing-include-dirs"
|
||||
os.environ["CXXFLAGS"] = os.environ.get("CXXLAGS", "") + os.environ["CFLAGS"]
|
||||
cpp.meson_setup([
|
||||
"-Druntime_dir=/run",
|
||||
f"-Dgio_module_dir=/lib/{arch.get_target()}/gio/modules",
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('glib-tools')}/bin",
|
||||
f"--libdir={get_prefix('glib')}/lib",
|
||||
f"--includedir={get_prefix('glib-dev')}/include",
|
||||
f"--libexecdir={get_prefix('libglib')}/libexec",
|
||||
f"--datadir={get_prefix('glib')}/share",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libxxx(composer, prefix):
|
||||
composer.makedirs("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if not i.startswith(prefix):
|
||||
continue
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
|
||||
def pack_libglib(composer):
|
||||
composer.add_dir("libexec", "libexec")
|
||||
pack_libxxx(composer, "libglib")
|
||||
|
||||
|
||||
package("libglib")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libpcre2 @same-arch")
|
||||
on_pack(pack_libglib)
|
||||
|
||||
|
||||
package("libgobject")
|
||||
dep("libglib (same)")
|
||||
dep("libffi @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgobject"))
|
||||
|
||||
package("libgthread")
|
||||
dep("libglib (same)")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgthread"))
|
||||
|
||||
package("libgmodule")
|
||||
dep("libglib (same)")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgmodule"))
|
||||
|
||||
package("libgio")
|
||||
dep("libglib (same)")
|
||||
dep("libgobject (same)")
|
||||
dep("libgmodule (same)")
|
||||
dep("libz @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgio"))
|
||||
|
||||
package("libgirepository")
|
||||
dep("libglib (same)")
|
||||
dep("libgobject (same)")
|
||||
dep("libgmodule (same)")
|
||||
dep("libffi @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgirepository"))
|
||||
|
||||
|
||||
def pack_glib(composer):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if not i.endswith(".so"):
|
||||
continue
|
||||
pkgname = i.split("-")[0]
|
||||
os.symlink(f"{get_prefix(pkgname)}/lib/{i}", f"{composer.workdir}/bundle/lib/{i}")
|
||||
os.symlink(f"{get_prefix('glib-dev')}/lib/glib-2.0", f"{composer.workdir}/bundle/lib/glib-2.0")
|
||||
composer.add_dir("share", "share")
|
||||
|
||||
package("glib")
|
||||
dep("libglib (same)")
|
||||
dep("libgobject (same)")
|
||||
dep("libgthread (same)")
|
||||
dep("libgmodule (same)")
|
||||
dep("libgio (same)")
|
||||
dep("libgirepository (same)")
|
||||
on_pack(pack_glib)
|
||||
|
||||
package("glib-tools")
|
||||
dep("glib (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("glib-dev")
|
||||
dep("glib (same)")
|
||||
dep("libz-dev @same-arch")
|
||||
dep("libpcre2-dev @same-arch")
|
||||
dep("libffi-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -4,6 +4,8 @@ from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("1.4.21")
|
||||
description("an implementation of the traditional Unix macro processor")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/m4/m4-1.4.21.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -2,6 +2,8 @@ import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("4.4.1")
|
||||
description("a tool which controls the generation of executables and other non-source files of a program from the program's source files")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("4.10")
|
||||
description("a non-interactive command-line text editor")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/sed/sed-4.10.tar.gz")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
@@ -3,6 +3,8 @@ import subprocess
|
||||
from lib.make import *
|
||||
|
||||
version("15.1.2")
|
||||
description("SemiOS file pattern searcher")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/grep/archive/v15.1.2.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("3.5.2")
|
||||
description("an interactive process viewer")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/htop-dev/htop/releases/download/3.5.2/htop-3.5.2.tar.xz")
|
||||
|
||||
builddep("shortcut/autotools")
|
||||
builddep("shortcut/c")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--prefix={get_prefix('htop')}",
|
||||
"--enable-unicode",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("htop")
|
||||
dep("libncurses @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2026.4.22")
|
||||
description("code and data that represent the history of local time for many representative locations worldwide")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://data.iana.org/time-zones/releases/tzdb-2026b.tar.lz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("78.3")
|
||||
description("a mature, widely used set of C/C++ libraries providing Unicode and Globalization support for software applications")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz"
|
||||
)
|
||||
|
||||
@@ -5,6 +5,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("7.1.0")
|
||||
description("a collection of userspace utilities for controlling and monitoring various aspects of networking in the Linux kernel")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_git("https://git.kernel.org/pub/scm/network/iproute2/iproute2.git", "v7.1.0")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -1,17 +1,32 @@
|
||||
import os
|
||||
|
||||
import lib.cpp as cpp
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("1.34")
|
||||
description("a set of tools to handle common tasks with Linux kernel modules like insert, remove, list, check properties, resolve dependencies and aliases")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/kmod-project/kmod/archive/refs/tags/v34.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"liblzma-dev @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup()
|
||||
cpp.meson_setup([
|
||||
"-Dprefix=/",
|
||||
f"-Ddistconfdir={get_prefix('libkmod')}/share",
|
||||
"-Dmoduledir=/lib/lkm",
|
||||
"-Dtools=true",
|
||||
"-Ddlopen=all",
|
||||
"-Dmanpages=false",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
os.chdir("usr")
|
||||
|
||||
|
||||
on_build(build)
|
||||
@@ -19,12 +34,20 @@ on_build(build)
|
||||
package("libkmod")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libcrypto @same-arch")
|
||||
recommend("libzstd @same-arch")
|
||||
recommend("libz @same-arch")
|
||||
recommend("liblzma @same-arch")
|
||||
|
||||
package("kmod")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("libkmod (same)")
|
||||
link("bin/kmod", "/bin/depmod")
|
||||
link("bin/kmod", "/bin/insmod")
|
||||
link("bin/kmod", "/bin/lsmod")
|
||||
link("bin/kmod", "/bin/modinfo")
|
||||
link("bin/kmod", "/bin/modprobe")
|
||||
link("bin/kmod", "/bin/rmmod")
|
||||
|
||||
package("libkmod-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
@@ -6,6 +6,8 @@ builddep("shortcut/autotools")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
|
||||
version("704")
|
||||
description("a free, open-source file pager")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.greenwoodsoftware.com/less/less-704.tar.gz")
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.8.7")
|
||||
version("3.8.9")
|
||||
description("Multi-format archive and compression library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/libarchive/libarchive/releases/download/v3.8.7/libarchive-3.8.7.tar.gz"
|
||||
"https://github.com/libarchive/libarchive/releases/download/v3.8.9/libarchive-3.8.9.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.6.0")
|
||||
version("3.7.1")
|
||||
description("A portable foreign-function interface library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/libffi/libffi/releases/download/v3.6.0/libffi-3.6.0.tar.gz"
|
||||
"https://github.com/libffi/libffi/releases/download/v3.7.1/libffi-3.7.1.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
Binary file not shown.
@@ -4,8 +4,10 @@ import subprocess
|
||||
from lib import arch
|
||||
from lib.make import *
|
||||
|
||||
version("0.1.0")
|
||||
source_url(f"file://{os.getcwd()}/empty.tar")
|
||||
version("0.2.0")
|
||||
description("provides compatibility objects to gcc runtime libraries")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/libgcc-compat/archive/v0.2.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep(f"libunwind-dev @{arch.get_target()}")
|
||||
@@ -13,19 +15,7 @@ builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(
|
||||
os.environ.get("CC", "cc").split(" ")
|
||||
+ [
|
||||
"-shared",
|
||||
"-o",
|
||||
"libgcc_s.so.1",
|
||||
"-Wl,--no-as-needed",
|
||||
"-lunwind",
|
||||
"-Wl,--no-undefined",
|
||||
"-Wl,-soname,libgcc_s.so.1",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
subprocess.run(["./build.sh"], check=True)
|
||||
|
||||
|
||||
on_build(build)
|
||||
@@ -34,6 +24,7 @@ on_build(build)
|
||||
def pack(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("libgcc_s.so.1", "lib/libgcc_s.so.1")
|
||||
composer.addfile("libatomic.so.1", "lib/libatomic.so.1")
|
||||
|
||||
|
||||
package("libgcc-compat")
|
||||
|
||||
@@ -2,6 +2,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.6.1")
|
||||
description("a totally open, royalty-free, highly versatile audio codec")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://downloads.xiph.org/releases/opus/opus-1.6.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("0.23.1")
|
||||
description("C library for the Public Suffix List")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/rockdaboot/libpsl/releases/download/0.23.1/libpsl-0.23.1.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libicu4c-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libpsl')}/lib",
|
||||
f"--includedir={get_prefix('libpsl-dev')}/include",
|
||||
"--disable-nls",
|
||||
"--enable-runtime=libicu",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libpsl")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libicu4c @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libpsl-tools")
|
||||
dep("libpsl (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libpsl-dev")
|
||||
dep("libpsl (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -1,6 +1,8 @@
|
||||
from lib.make import *
|
||||
|
||||
version("2.0")
|
||||
description("A small self-contained alternative to readline and libedit")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/antirez/linenoise/archive/refs/tags/2.0.tar.gz")
|
||||
|
||||
on_build(lambda: None)
|
||||
|
||||
@@ -5,9 +5,11 @@ import lib.arch as arch
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "6.18.38"
|
||||
upstream_version = "6.18.43"
|
||||
|
||||
version(f"{upstream_version}")
|
||||
description("the Linux operating system kernel")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
f"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-{upstream_version}.tar.xz"
|
||||
)
|
||||
|
||||
+293
-355
@@ -1,395 +1,333 @@
|
||||
import glob
|
||||
import os
|
||||
import subprocess
|
||||
import shutil
|
||||
import glob
|
||||
|
||||
upstream_version = "22.1.8"
|
||||
[upstream_major, upstream_minor, upstream_rev] = upstream_version.split(".")
|
||||
|
||||
# Begin of file lists
|
||||
LLVM_TOOLS = [
|
||||
"bugpoint",
|
||||
"dsymutil",
|
||||
"llc",
|
||||
"lli",
|
||||
"llvm-addr2line",
|
||||
"llvm-ar",
|
||||
"llvm-as",
|
||||
"llvm-bcanalyzer",
|
||||
"llvm-bitcode-strip",
|
||||
"llvm-bolt",
|
||||
"llvm-bolt-binary-analysis",
|
||||
"llvm-bolt-heatmap",
|
||||
"llvm-boltdiff",
|
||||
"llvm-c-test",
|
||||
"llvm-cas",
|
||||
"llvm-cat",
|
||||
"llvm-cfi-verify",
|
||||
"llvm-cgdata",
|
||||
"llvm-config",
|
||||
"llvm-cov",
|
||||
"llvm-ctxprof-util",
|
||||
"llvm-cvtres",
|
||||
"llvm-cxxdump",
|
||||
"llvm-cxxfilt",
|
||||
"llvm-cxxmap",
|
||||
"llvm-debuginfo-analyzer",
|
||||
"llvm-debuginfod",
|
||||
"llvm-debuginfod-find",
|
||||
"llvm-diff",
|
||||
"llvm-dis",
|
||||
"llvm-dlltool",
|
||||
"llvm-dwarfdump",
|
||||
"llvm-dwarfutil",
|
||||
"llvm-dwp",
|
||||
"llvm-exegesis",
|
||||
"llvm-extract",
|
||||
"llvm-gsymutil",
|
||||
"llvm-ifs",
|
||||
"llvm-install-name-tool",
|
||||
"llvm-ir2vec",
|
||||
"llvm-jitlink",
|
||||
"llvm-lib",
|
||||
"llvm-libtool-darwin",
|
||||
"llvm-link",
|
||||
"llvm-lipo",
|
||||
"llvm-lto",
|
||||
"llvm-lto2",
|
||||
"llvm-mc",
|
||||
"llvm-mca",
|
||||
"llvm-ml",
|
||||
"llvm-ml64",
|
||||
"llvm-modextract",
|
||||
"llvm-nm",
|
||||
"llvm-objcopy",
|
||||
"llvm-objdump",
|
||||
"llvm-offload-binary",
|
||||
"llvm-offload-wrapper",
|
||||
"llvm-opt-report",
|
||||
"llvm-otool",
|
||||
"llvm-pdbutil",
|
||||
"llvm-profdata",
|
||||
"llvm-profgen",
|
||||
"llvm-ranlib",
|
||||
"llvm-rc",
|
||||
"llvm-readelf",
|
||||
"llvm-readobj",
|
||||
"llvm-readtapi",
|
||||
"llvm-reduce",
|
||||
"llvm-remarkutil",
|
||||
"llvm-rtdyld",
|
||||
"llvm-sim",
|
||||
"llvm-size",
|
||||
"llvm-split",
|
||||
"llvm-stress",
|
||||
"llvm-strings",
|
||||
"llvm-strip",
|
||||
"llvm-symbolizer",
|
||||
"llvm-tblgen",
|
||||
"llvm-tli-checker",
|
||||
"llvm-undname",
|
||||
"llvm-windres",
|
||||
"llvm-xray",
|
||||
"merge-fdata",
|
||||
"opt",
|
||||
"perf2bolt",
|
||||
"reduce-chunk-list",
|
||||
"sancov",
|
||||
"sanstats",
|
||||
"verify-uselistorder",
|
||||
]
|
||||
LLDB_BINARIES = [
|
||||
"lldb",
|
||||
"lldb-argdumper",
|
||||
"lldb-dap",
|
||||
"lldb-instr",
|
||||
"lldb-mcp",
|
||||
"lldb-server",
|
||||
"yaml2macho-core",
|
||||
]
|
||||
LLD_BINARIES = ["lld", "lld-link", "ld64.lld", "wasm-ld", "wrapper://ld.lld~ld.lld"]
|
||||
CLANG_BINARIES = [
|
||||
f"clang-{upstream_major}~llvm-clang",
|
||||
"wrapper://clang~clang",
|
||||
"wrapper://clang++~clang++",
|
||||
f"wrapper://clang~clang-{upstream_major}",
|
||||
"clang-check",
|
||||
"clang-cl",
|
||||
"clang-cpp",
|
||||
"clang-extdef-mapping",
|
||||
"clang-format",
|
||||
"clang-installapi",
|
||||
"clang-linker-wrapper",
|
||||
"clang-nvlink-wrapper",
|
||||
"clang-offload-bundler",
|
||||
"clang-offload-packager",
|
||||
"clang-refactor",
|
||||
"clang-repl",
|
||||
"clang-scan-deps",
|
||||
"clang-sycl-linker",
|
||||
"clang-tblgen",
|
||||
"diagtool",
|
||||
"git-clang-format",
|
||||
"hmaptool",
|
||||
"intercept-build",
|
||||
"amdgpu-arch",
|
||||
"c-index-test",
|
||||
"analyze-build",
|
||||
"nvptx-arch",
|
||||
"offload-arch",
|
||||
"scan-build",
|
||||
"scan-build-py",
|
||||
"scan-view",
|
||||
"libexec/analyze-c++",
|
||||
"libexec/analyze-cc",
|
||||
"libexec/c++-analyzer",
|
||||
"libexec/ccc-analyzer",
|
||||
"libexec/intercept-c++",
|
||||
"libexec/intercept-cc",
|
||||
]
|
||||
# End of file lists
|
||||
|
||||
|
||||
import lib.cpp as cpp
|
||||
from lib import arch
|
||||
import lib
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version(upstream_version)
|
||||
source_url(
|
||||
f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{upstream_version}/llvm-project-{upstream_version}.src.tar.xz"
|
||||
)
|
||||
pkgver = "22.1.8"
|
||||
[pkgver_major, pkgver_minor, pkgver_rev] = pkgver.split(".")
|
||||
|
||||
version(pkgver)
|
||||
description("a collection of modular and reusable compiler and toolchain technologies")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{pkgver}/llvm-project-{pkgver}.src.tar.xz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/cmake")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
builddep(f"libffi-dev @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libunwind-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
srcdir = None
|
||||
packname = None
|
||||
|
||||
def llvm_host_triple():
|
||||
return arch.get_target().replace("-semios-linux", "-semios-linux-musl")
|
||||
return arch.get_target().replace("-semios-linux", "-unknown-linux-musl")
|
||||
|
||||
def cmake(sourcedir, args):
|
||||
builddir = os.getcwd() + f"/../_build_{sourcedir}"
|
||||
installdir = os.getcwd() + f"/../_cpp_install/{sourcedir}"
|
||||
template_args = [
|
||||
"cmake", "-G", "Ninja", "-S", sourcedir, "-B", builddir,
|
||||
"-DCMAKE_BUILD_TYPE=Release",
|
||||
|
||||
f"-DLLVM_DEFAULT_TARGET_TRIPLE={llvm_host_triple()}",
|
||||
f"-DLLVM_HOST_TRIPLE={llvm_host_triple()}",
|
||||
|
||||
"-DLLVM_ENABLE_EH=ON",
|
||||
"-DLLVM_ENABLE_RTTI=ON",
|
||||
"-DLLVM_ENABLE_ASSERTIONS=OFF",
|
||||
"-DLLVM_BUILD_LLVM_DYLIB=ON",
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON",
|
||||
|
||||
"-DLLVM_ENABLE_LIBCXX=ON",
|
||||
"-DLLVM_ENABLE_LLD=ON",
|
||||
"-DLLVM_ENABLE_FFI=ON",
|
||||
]
|
||||
subprocess.run(template_args + args, check=True)
|
||||
subprocess.run(["cmake", "--build", builddir], check=True)
|
||||
os.environ["DESTDIR"] = installdir
|
||||
subprocess.run(["cmake", "--install", builddir], check=True)
|
||||
|
||||
def import_llvm():
|
||||
return [f"-DLLVM_ROOT={os.getcwd()}/../_cpp_install/llvm/usr/local"]
|
||||
|
||||
def import_clang():
|
||||
return [f"-DClang_DIR={os.getcwd()}/../_cpp_install/clang/usr/local"]
|
||||
|
||||
def enter_install(name):
|
||||
global packname
|
||||
packname = name
|
||||
|
||||
def auto_pack_static(composer):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if ".a" in i:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
def auto_pack_dev(composer, name, devbins=[], extdirs=["lib/cmake"]):
|
||||
composer.add_dir("include", "include")
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
prefix = None
|
||||
if os.path.isdir(f"lib/{i}") and f"lib/{i}" in extdirs:
|
||||
composer.add_dir(f"lib/{i}", f"lib/{i}")
|
||||
elif ".so" in i:
|
||||
prefix = get_prefix(f"lib{name}")
|
||||
elif ".a" in i:
|
||||
prefix = get_prefix(f"lib{name}-static")
|
||||
if prefix:
|
||||
os.symlink(f"{prefix}/lib/{i}", f"{composer.workdir}/bundle/lib/{i}")
|
||||
composer.makedir("bin")
|
||||
for i in devbins:
|
||||
composer.addfile(f"bin/{i}", f"bin/{i}")
|
||||
for i in os.listdir("bin"):
|
||||
if i in devbins:
|
||||
continue
|
||||
prefix = get_prefix(name)
|
||||
os.symlink(f"{prefix}/bin/{i}", f"{composer.workdir}/bundle/bin/{i}")
|
||||
|
||||
def auto_pack_runtime_lib(composer, name):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if name in i and ".so" in i:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
def auto_pack_glob(composer, matches):
|
||||
for matchable in matches:
|
||||
for i in glob.glob(matchable):
|
||||
composer.makedirs(f"{os.path.dirname(i)}")
|
||||
if os.path.isdir(i):
|
||||
composer.add_dir(i, i)
|
||||
else:
|
||||
composer.addfile(i, i)
|
||||
|
||||
|
||||
old_on_pack = on_pack
|
||||
def new_on_pack(f):
|
||||
current_packname = packname
|
||||
def wrap_f(composer):
|
||||
pkgdir = f"{srcdir}/../_cpp_install/{current_packname}/usr/local"
|
||||
os.chdir(pkgdir)
|
||||
f(composer)
|
||||
old_on_pack(wrap_f)
|
||||
lib.make.on_pack = new_on_pack
|
||||
on_pack = new_on_pack
|
||||
|
||||
|
||||
def build_llvm():
|
||||
cmake("llvm", [])
|
||||
|
||||
def build_bolt():
|
||||
cmake("bolt", import_llvm())
|
||||
|
||||
def build_clang():
|
||||
options = [
|
||||
"-DCLANG_DEFAULT_CXX_STDLIB=libc++",
|
||||
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
|
||||
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||
f"-DC_INCLUDE_DIRS=/lib/{arch.get_target()}/include:{get_prefix('clang')}/lib/clang/{pkgver_major}/include",
|
||||
]
|
||||
cmake("clang", import_llvm() + options)
|
||||
|
||||
def build_lldb():
|
||||
cmake("lldb", import_llvm() + import_clang())
|
||||
|
||||
def build_lld():
|
||||
cmake("lld", import_llvm())
|
||||
|
||||
def build_polly():
|
||||
cmake("polly", import_llvm())
|
||||
|
||||
def build_runtimes():
|
||||
os.makedirs("../_build_runtimes", exist_ok=True)
|
||||
shutil.rmtree("../_build_runtimes")
|
||||
options = [
|
||||
# Configure runtimes
|
||||
"-DLLVM_ENABLE_RUNTIMES=libunwind;libcxxabi;libcxx",
|
||||
|
||||
# Configure libcxx
|
||||
"-DLIBCXX_HAS_MUSL_LIBC=ON",
|
||||
]
|
||||
cmake("runtimes", options)
|
||||
shutil.rmtree("../_build_runtimes")
|
||||
options = [
|
||||
# Configure runtimes
|
||||
"-DLLVM_ENABLE_RUNTIMES=compiler-rt",
|
||||
|
||||
# Configure compiler-rt
|
||||
"-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON",
|
||||
"-DCOMPILER_RT_BUILD_GWP_ASAN=OFF",
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF",
|
||||
]
|
||||
cmake("runtimes", options)
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["CXXFLAGS"] = os.environ.get("CXXFLAGS", "") + " --rtlib=compiler-rt"
|
||||
subprocess.run(
|
||||
[
|
||||
"cmake",
|
||||
"-G",
|
||||
"Ninja",
|
||||
"-S",
|
||||
"llvm",
|
||||
"-B",
|
||||
"build",
|
||||
"-DCMAKE_BUILD_TYPE=Release",
|
||||
f"-DLLVM_DEFAULT_TARGET_TRIPLE={llvm_host_triple()}",
|
||||
f"-DLLVM_HOST_TRIPLE={llvm_host_triple()}",
|
||||
"-DLLVM_ENABLE_PROJECTS=clang;lldb;lld;bolt",
|
||||
"-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind;compiler-rt",
|
||||
"-DLLVM_ENABLE_EH=ON",
|
||||
"-DLLVM_ENABLE_RTTI=ON",
|
||||
"-DCMAKE_INSTALL_PREFIX=/",
|
||||
"-DLLVM_ENABLE_ASSERTIONS=OFF",
|
||||
"-DLLVM_BUILD_LLVM_DYLIB=ON",
|
||||
"-DLLVM_ENABLE_LIBCXX=ON",
|
||||
"-DLLVM_ENABLE_LIBEDIT=ON",
|
||||
"-DLLVM_ENABLE_LLD=ON",
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON",
|
||||
"-DLIBCXX_HAS_MUSL_LIBC=ON",
|
||||
"-DCOMPILER_RT_BUILD_GWP_ASAN=OFF",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
subprocess.run(["cmake", "--build", "build"], check=True)
|
||||
os.environ["DESTDIR"] = os.getcwd() + "/cpp_install"
|
||||
subprocess.run(["cmake", "--install", "build"], check=True)
|
||||
os.chdir("cpp_install")
|
||||
|
||||
global srcdir
|
||||
srcdir = os.getcwd()
|
||||
build_llvm()
|
||||
build_bolt()
|
||||
build_clang()
|
||||
build_lldb()
|
||||
build_lld()
|
||||
build_polly()
|
||||
build_runtimes()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
# Begin of helper functions
|
||||
package_dir = os.getcwd()
|
||||
|
||||
|
||||
def install_wrapper(composer, name: str, dst: str):
|
||||
composer.addfile(f"{package_dir}/wrapper/{name}.wrapper", dst)
|
||||
with open(f"{composer.workdir}/bundle/{dst}", "r") as f:
|
||||
s = f.read()
|
||||
s = s.replace("LLVM_VERSION=", f"LLVM_VERSION={upstream_version}").replace(
|
||||
"ARCHITECTURE=", "ARCHITECTURE=" + arch.get_target()
|
||||
)
|
||||
with open(f"{composer.workdir}/bundle/{dst}", "w") as f:
|
||||
f.write(s)
|
||||
os.chmod(f"{composer.workdir}/bundle/{dst}", 0o755)
|
||||
|
||||
|
||||
def auto_pack_llvm_runtime(composer, prefix, dev):
|
||||
composer.makedirs("lib")
|
||||
parent_dir = f"./lib/{llvm_host_triple()}"
|
||||
for i in os.listdir(parent_dir):
|
||||
fullpath = f"{parent_dir}/{i}"
|
||||
if i.split(".")[0] != prefix:
|
||||
continue
|
||||
if dev:
|
||||
if ".so" in i:
|
||||
continue
|
||||
else:
|
||||
if not ".so" in i:
|
||||
continue
|
||||
composer.addfile(fullpath, f"lib/{i}")
|
||||
if not dev:
|
||||
return
|
||||
|
||||
|
||||
def auto_pack_llvm_runtime_dev(composer, condition):
|
||||
composer.makedir("include")
|
||||
parent_include = f"./usr/include"
|
||||
for i in condition:
|
||||
if i.startswith("lib:"):
|
||||
auto_pack_llvm_runtime(composer, i.replace("lib:", ""), True)
|
||||
continue
|
||||
i = i.replace("include:", "")
|
||||
for file in glob.glob(f"{parent_include}/{i}"):
|
||||
name = file.replace(f"{parent_include}/", "")
|
||||
if "/" in name:
|
||||
composer.makedirs(f"include/{os.path.dirname(name)}")
|
||||
if os.path.isdir(file):
|
||||
composer.add_dir(file, f"include/{name}")
|
||||
else:
|
||||
composer.addfile(file, f"include/{name}")
|
||||
|
||||
|
||||
def use_llvm_runtime_auto_pack(prefix: str):
|
||||
on_pack(lambda composer: auto_pack_llvm_runtime(composer, prefix, False))
|
||||
|
||||
|
||||
def use_llvm_runtime_dev_auto_pack(des: list[str]):
|
||||
on_pack(lambda composer: auto_pack_llvm_runtime_dev(composer, des))
|
||||
|
||||
|
||||
def auto_pack_llvm_libs(composer, prefixes: list[str]):
|
||||
composer.makedirs("lib")
|
||||
parent_dir = f"./lib/"
|
||||
for i in os.listdir(parent_dir):
|
||||
fullpath = f"{parent_dir}/{i}"
|
||||
if not i.split(".")[0] in prefixes:
|
||||
continue
|
||||
if not ".so" in i:
|
||||
continue
|
||||
composer.addfile(fullpath, f"lib/{i}")
|
||||
|
||||
|
||||
def use_llvm_libs_auto_pack(prefixes: list[str]):
|
||||
on_pack(lambda composer: auto_pack_llvm_libs(composer, prefixes))
|
||||
|
||||
|
||||
def auto_pack_bin(composer, conditions: list[str]):
|
||||
for i in conditions:
|
||||
prefix = "bin"
|
||||
if i.startswith("libexec/"):
|
||||
i = i.replace("libexec/", "")
|
||||
prefix = "libexec"
|
||||
composer.makedirs(prefix)
|
||||
src = i
|
||||
dst = f"{prefix}/{i}"
|
||||
if len(i.split("~")) == 2:
|
||||
src = i.split("~")[0]
|
||||
dst = f"bin/{i.split('~')[1]}"
|
||||
if src.startswith("wrapper://"):
|
||||
src = src.replace("wrapper://", "")
|
||||
if len(i.split("~")) == 1:
|
||||
dst = f"bin/{src}.wrapper"
|
||||
install_wrapper(composer, src, dst)
|
||||
continue
|
||||
if os.path.exists(f"{prefix}/{src}"):
|
||||
src = f"{prefix}/{src}"
|
||||
elif os.path.exists(f"usr/{prefix}/{src}"):
|
||||
src = f"usr/{prefix}/{src}"
|
||||
composer.addfile(src, dst)
|
||||
|
||||
|
||||
def use_bin_auto_pack(conditions: list[str]):
|
||||
on_pack(lambda composer: auto_pack_bin(composer, conditions))
|
||||
|
||||
|
||||
# End of helper functions
|
||||
|
||||
# Begin of packages
|
||||
|
||||
package("libunwind")
|
||||
dep("semi-libc @same-arch")
|
||||
use_llvm_runtime_auto_pack("libunwind")
|
||||
|
||||
package("libunwind-dev")
|
||||
dep("libunwind (same)")
|
||||
use_llvm_runtime_dev_auto_pack(
|
||||
["lib:libunwind", "include:mach-o", "include:*unwind*.h"]
|
||||
)
|
||||
|
||||
package("libcxxabi")
|
||||
dep("libunwind (same)")
|
||||
use_llvm_runtime_auto_pack("libc++abi")
|
||||
|
||||
package("libcxxabi-dev")
|
||||
dep("libcxxabi (same)")
|
||||
use_llvm_runtime_dev_auto_pack(["lib:libc++abi"])
|
||||
|
||||
|
||||
package("libcxx")
|
||||
dep("libcxxabi (same)")
|
||||
use_llvm_runtime_auto_pack("libc++")
|
||||
|
||||
package("libcxx-dev")
|
||||
dep("libcxx (same)")
|
||||
use_llvm_runtime_dev_auto_pack(
|
||||
[
|
||||
"lib:libc++",
|
||||
"lib:libc++experimental",
|
||||
f"include:{llvm_host_triple()}/c++/v1/__config_site",
|
||||
"include:c++/v1",
|
||||
]
|
||||
)
|
||||
|
||||
enter_install("llvm")
|
||||
|
||||
package("libllvm")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libunwind @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
use_llvm_libs_auto_pack(["libLLVM", "libLTO", "libRemarks"])
|
||||
dep("libcxxabi @same-arch")
|
||||
dep("libffi @same-arch")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/*.so*"]))
|
||||
|
||||
package("libllvm-dev")
|
||||
dep("libllvm (same)")
|
||||
on_pack(lambda composer: auto_pack_dev(composer, "llvm", ["llvm-config"]))
|
||||
|
||||
package("libllvm-static")
|
||||
on_pack(auto_pack_static)
|
||||
|
||||
def pack_llvm(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
os.remove(f"{composer.workdir}/bundle/bin/llvm-config")
|
||||
composer.add_dir("share", "share")
|
||||
|
||||
package("llvm")
|
||||
dep("libllvm (same)")
|
||||
use_bin_auto_pack(LLVM_TOOLS)
|
||||
on_pack(pack_llvm)
|
||||
for i in ["strip", "ar", "ranlib", "readelf", "objcopy", "objdump", "strings", "nm"]:
|
||||
link(f"bin/llvm-{i}", f"/bin/{i}")
|
||||
|
||||
|
||||
package("lld")
|
||||
enter_install("bolt")
|
||||
|
||||
package("bolt")
|
||||
dep("libcxx @same-arch")
|
||||
use_bin_auto_pack(LLD_BINARIES)
|
||||
link("bin/ld.lld", "/bin/ld")
|
||||
|
||||
package("liblldb")
|
||||
dep("libcxx @same-arch")
|
||||
use_llvm_libs_auto_pack(["liblldb", "liblldbIntelFeatures"])
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
|
||||
package("lldb")
|
||||
dep("libcxx @same-arch")
|
||||
dep("liblldb (same)")
|
||||
use_bin_auto_pack(LLDB_BINARIES)
|
||||
|
||||
enter_install("clang")
|
||||
|
||||
package("libclang")
|
||||
dep("libcxx @same-arch")
|
||||
dep("libllvm (same)")
|
||||
use_llvm_libs_auto_pack(["libclang", "libclang-cpp"])
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libclang-static")
|
||||
on_pack(auto_pack_static)
|
||||
|
||||
package("libclang-dev")
|
||||
dep("libclang (same)")
|
||||
on_pack(lambda composer: auto_pack_dev(composer, "clang"))
|
||||
|
||||
def pack_clang(composer):
|
||||
auto_pack_bin(composer, CLANG_BINARIES)
|
||||
composer.makedirs(f"lib/clang/{upstream_major}/lib")
|
||||
composer.add_dir(
|
||||
f"lib/clang/{upstream_major}/lib/{llvm_host_triple()}",
|
||||
f"lib/clang/{upstream_major}/lib/{llvm_host_triple()}",
|
||||
)
|
||||
# Add base files
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("libexec", "libexec")
|
||||
composer.makedir("share")
|
||||
for i in ["clang", "scan-build", "scan-view"]:
|
||||
composer.add_dir(f"share/{i}", f"share/{i}")
|
||||
|
||||
# Add resource files
|
||||
composer.makedir("lib")
|
||||
composer.add_dir("lib/clang", "lib/clang")
|
||||
|
||||
# Add compiler-rt for current architecture
|
||||
linuxrtdir = "../../../runtimes/usr/local/lib/linux"
|
||||
localrtdir = f"lib/clang/{pkgver_major}/lib/{llvm_host_triple()}"
|
||||
composer.makedirs(localrtdir)
|
||||
for rtlib in os.listdir(linuxrtdir):
|
||||
larch = llvm_host_triple().split("-")[0]
|
||||
lrtlib = rtlib.replace(f"-{larch}", "")
|
||||
composer.addfile(f"{linuxrtdir}/{rtlib}", f"{localrtdir}/{lrtlib}")
|
||||
|
||||
# Add symlink to system directories, which is required for finding libc++
|
||||
os.symlink(f"/lib/{arch.get_target()}/include", f"{composer.workdir}/bundle/include")
|
||||
|
||||
# Add configuration
|
||||
clang_cfg = f"-L/lib/{arch.get_target()}\n-B/lib/{arch.get_target()}\n-rtlib=compiler-rt\n"
|
||||
clangxx_cfg = f"-stdlib=libc++\n{clang_cfg}"
|
||||
with open(f"{composer.workdir}/bundle/bin/clang.cfg", "wt+") as file:
|
||||
file.write(clang_cfg)
|
||||
with open(f"{composer.workdir}/bundle/bin/clang++.cfg", "wt+") as file:
|
||||
file.write(clangxx_cfg)
|
||||
|
||||
package("clang")
|
||||
dep("libclang (same)")
|
||||
on_pack(pack_clang)
|
||||
link("bin/clang", "/bin/cc")
|
||||
link("bin/clang++", "/bin/c++")
|
||||
|
||||
# End of packages
|
||||
|
||||
enter_install("lld")
|
||||
|
||||
package("lld")
|
||||
dep("libllvm (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
link("bin/ld.lld", "/bin/ld")
|
||||
|
||||
package("lld-dev")
|
||||
dep("lld (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
|
||||
enter_install("lldb")
|
||||
|
||||
package("liblldb")
|
||||
dep("libclang (same)")
|
||||
dep("libllvm (same)")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("liblldb-dev")
|
||||
dep("liblldb (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("lldb")
|
||||
dep("liblldb (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
|
||||
enter_install("polly")
|
||||
|
||||
package("polly")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["*"]))
|
||||
|
||||
|
||||
enter_install("runtimes")
|
||||
|
||||
package("libunwind")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: auto_pack_runtime_lib(composer, "unwind"))
|
||||
|
||||
package("libunwind-dev")
|
||||
dep("libunwind (same)")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libunwind.a", "include/*unwind*", "include/mach-o"]))
|
||||
|
||||
package("libcxxabi")
|
||||
dep("libunwind (same)")
|
||||
on_pack(lambda composer: auto_pack_runtime_lib(composer, "libc++abi"))
|
||||
|
||||
package("libcxxabi-dev")
|
||||
dep("libcxxabi (same)")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libc++abi.a"]))
|
||||
|
||||
package("libcxx")
|
||||
dep("libcxxabi (same)")
|
||||
on_pack(lambda composer: auto_pack_runtime_lib(composer, "libc++"))
|
||||
|
||||
package("libcxx-dev")
|
||||
dep("libcxx (same)")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libc++experimental.a", "lib/libc++.a", "lib/libc++.modules.json", "include/c++", "share/libc++"]))
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
LLVM_VERSION=
|
||||
ARCHITECTURE=
|
||||
|
||||
CLANG=$(packie print package.prefix."clang (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/llvm-clang
|
||||
|
||||
exec ${CLANG} \
|
||||
-Wno-unused-command-line-argument \
|
||||
-isystem /lib/${ARCHITECTURE}/include/c++/v1 \
|
||||
-isystem /lib/${ARCHITECTURE}/include \
|
||||
-stdlib=libc++ \
|
||||
-rtlib=compiler-rt \
|
||||
-B /lib/${ARCHITECTURE} \
|
||||
-lc++ \
|
||||
-Wunused-command-line-argument \
|
||||
"$@"
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
LLVM_VERSION=
|
||||
ARCHITECTURE=
|
||||
|
||||
CLANG=$(packie print package.prefix."clang (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/llvm-clang
|
||||
|
||||
exec ${CLANG} \
|
||||
-Wno-unused-command-line-argument \
|
||||
-isystem /lib/${ARCHITECTURE}/include \
|
||||
-rtlib=compiler-rt \
|
||||
-B /lib/${ARCHITECTURE} \
|
||||
-Wunused-command-line-argument \
|
||||
"$@"
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
LLVM_VERSION=
|
||||
ARCHITECTURE=
|
||||
|
||||
LLD=$(packie print package.prefix."lld (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/lld
|
||||
|
||||
exec ${LLD} -flavor gnu -L/lib/${ARCHITECTURE} "$@"
|
||||
@@ -5,6 +5,8 @@ from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.14.6")
|
||||
description("a suite of tools compiling mdoc, the roff macro language, and man")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
@@ -21,4 +23,5 @@ def build():
|
||||
on_build(build)
|
||||
|
||||
package("mandoc")
|
||||
dep("libz @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import subprocess
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("1.11.2")
|
||||
description("The Meson Build System")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/mesonbuild/meson/releases/download/1.11.2/meson-1.11.2.tar.gz")
|
||||
|
||||
builddep("python")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run([
|
||||
"python3",
|
||||
"./packaging/create_zipapp.py",
|
||||
"--outfile",
|
||||
"meson",
|
||||
"--interpreter",
|
||||
"/bin/python3"
|
||||
])
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_meson(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("meson", "bin/meson")
|
||||
|
||||
package("meson")
|
||||
dep("python @same-arch")
|
||||
recommend("ninja")
|
||||
on_pack(pack_meson)
|
||||
@@ -3,6 +3,8 @@ import subprocess
|
||||
from lib.make import *
|
||||
|
||||
version("1.59.2")
|
||||
description("the MirBSD Korn Shell, a minimal and useful implementation of the POSIX shell with extensions")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/mirabilos/mksh-cvs2git/archive/refs/tags/mksh-R59c.tar.gz"
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("6.6")
|
||||
description("the ncurses terminal library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://invisible-island.net/archives/ncurses/ncurses-6.6.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("19")
|
||||
description("A vi/ex editor for editing UTF-8 text")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/aligrudi/neatvi/archive/refs/tags/19.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -5,6 +5,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("5.3")
|
||||
description("A small vi/ex terminal text editor (neatvi rewrite)")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/kyx0r/nextvi/archive/refs/tags/5.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.69.0")
|
||||
version("1.70.0")
|
||||
description("nghttp2 - HTTP/2 C Library and tools")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/nghttp2/nghttp2/releases/download/v1.69.0/nghttp2-1.69.0.tar.gz"
|
||||
"https://github.com/nghttp2/nghttp2/releases/download/v1.70.0/nghttp2-1.70.0.tar.gz"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ import os
|
||||
from lib.make import *
|
||||
|
||||
version("1.13.2")
|
||||
description("a small build system with a focus on speed")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/ninja-build/ninja/archive/refs/tags/v1.13.2.tar.gz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
|
||||
@@ -2,6 +2,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("10.3.1")
|
||||
description("the premier connectivity tool for remote login with the SSH protocol")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.3p1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
from lib import rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.0.1-alpha.1")
|
||||
description("SemiOS package manager")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/packie/archive/0.1.0.alpha-1.tar.gz")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build(["--package", "packie-cli"])
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("packie")
|
||||
dep("semi-libc @same-arch")
|
||||
rust.use_auto_pack(["bin"])
|
||||
@@ -4,6 +4,8 @@ import subprocess
|
||||
from lib.make import *
|
||||
|
||||
version("15.1.1")
|
||||
description("the SemiOS fork of the UNIX patch utility")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/patch/archive/v15.1.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -2,6 +2,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("10.47")
|
||||
description("a set of C functions that implement regular expression pattern matching")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz"
|
||||
)
|
||||
|
||||
@@ -7,6 +7,8 @@ from lib.make import *
|
||||
upstream_version = "5.42.2"
|
||||
|
||||
version(upstream_version)
|
||||
description("Perl is a highly capable, feature-rich programming language with over 37 years of development")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.cpan.org/src/5.0/perl-5.42.2.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -3,6 +3,7 @@ from lib import arch
|
||||
from lib.make import *
|
||||
|
||||
version("2.5.1")
|
||||
description("package compiler and linker metadata toolkit")
|
||||
source_url("https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -5,11 +5,13 @@ from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
VERSION_BASE = "3.14"
|
||||
VERSION_APPEND = "6"
|
||||
VERSION_APPEND = "7"
|
||||
|
||||
VERSION_FULL = f"{VERSION_BASE}.{VERSION_APPEND}"
|
||||
|
||||
version(VERSION_FULL)
|
||||
description("the Python programming language")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
f"https://www.python.org/ftp/python/{VERSION_FULL}/Python-{VERSION_FULL}.tar.xz"
|
||||
)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
prefix=/
|
||||
exec_prefix=${prefix}
|
||||
libdir=
|
||||
includedir=
|
||||
|
||||
Name: librhash
|
||||
Description: LibRHash shared library
|
||||
Version:
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lrhash
|
||||
Libs.private:
|
||||
@@ -1,25 +1,45 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.4.6")
|
||||
import os
|
||||
|
||||
upstream_version = "1.4.6"
|
||||
|
||||
version(upstream_version)
|
||||
description("Great utility for computing hash sums")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/rhash/RHash/archive/refs/tags/v1.4.6.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
with open("files/librhash.pc") as f:
|
||||
librhash_pc = f.read()
|
||||
|
||||
def build():
|
||||
global librhash_pc
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('rhash-tools')}/bin",
|
||||
f"--libdir={get_prefix('librhash')}/lib",
|
||||
"--disable-gettext",
|
||||
"--enable-lib-static",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
os.symlink("librhash.so.1", "./lib/librhash.so")
|
||||
os.makedirs("./lib/pkgconfig", exist_ok=True)
|
||||
with open("./lib/pkgconfig/librhash.pc", "w+") as file:
|
||||
librhash_pc = (librhash_pc
|
||||
.replace("libdir=", f"libdir={get_prefix('librhash')}/lib")
|
||||
.replace("includedir=", f"includedir={get_prefix('librhash-dev')}/include")
|
||||
.replace("Version:", f"Version: {upstream_version}")
|
||||
)
|
||||
file.write(librhash_pc)
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from lib import rust
|
||||
from lib.make import *
|
||||
|
||||
version("15.1.0")
|
||||
source_url("https://github.com/BurntSushi/ripgrep/archive/refs/tags/15.1.0.tar.gz")
|
||||
version("15.2.0")
|
||||
description("ripgrep recursively searches directories for a regex pattern while respecting your gitignore")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/BurntSushi/ripgrep/archive/refs/tags/15.2.0.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ import subprocess
|
||||
from lib.make import *
|
||||
|
||||
version("15.1.1")
|
||||
description("SemiOS fork of the UNIX sed utility")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/sed/archive/v15.1.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -2,6 +2,8 @@ from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.2.6+1")
|
||||
description("the SemiOS fork of musl-libc, providing POSIX C standard library and system runtime")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6-1.tar.gz")
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import arch
|
||||
|
||||
def deplinux(s):
|
||||
if "linux" in arch.get_target():
|
||||
dep(s)
|
||||
|
||||
version("1.0.0")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(f"file://{os.getcwd()}/empty.tar")
|
||||
|
||||
on_build(lambda: print("Building virtual package `semios-assembly`..."))
|
||||
|
||||
package("SemiOS.Assembly.CoreRuntime")
|
||||
description("Assembly of the core SemiOS runtime")
|
||||
deplinux("semi-libc @same-arch")
|
||||
deplinux("libgcc-compat @same-arch")
|
||||
dep("libunwind @same-arch")
|
||||
dep("mksh @same-arch")
|
||||
dep("coreutils @same-arch")
|
||||
dep("findutils @same-arch")
|
||||
dep("diffutils @same-arch")
|
||||
dep("grep @same-arch")
|
||||
dep("packie @same-arch")
|
||||
dep("iana-timezone-db")
|
||||
on_pack(lambda _: print("Packing virtual package `SemiOS.Assembly.CoreRuntime`..."))
|
||||
|
||||
package("SemiOS.Assembly.Cli")
|
||||
description("Assembly of core SemiOS command-line experience")
|
||||
dep("less @same-arch")
|
||||
dep("ncurses-tools @same-arch")
|
||||
dep("ncurses-terminfo")
|
||||
dep("mandoc @same-arch")
|
||||
dep("neatvi @same-arch")
|
||||
on_pack(lambda _: print("Packing virtual package `SemiOS.Assembly.Cli`..."))
|
||||
|
||||
package("SemiOS.Assembly.Networking")
|
||||
description("Assembly of SemiOS core networking experience")
|
||||
dep("aws-lc-libssl @same-arch")
|
||||
dep("aws-lc-tools @same-arch")
|
||||
dep("ca-certificates")
|
||||
dep("certutil @same-arch")
|
||||
deplinux("iproute2 @same-arch")
|
||||
on_pack(lambda _: print("Packing virtual package `SemiOS.Assembly.Networking`..."))
|
||||
@@ -3,8 +3,10 @@ import os
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.53.2")
|
||||
source_url("https://sqlite.org/2026/sqlite-autoconf-3530200.tar.gz")
|
||||
version("3.53.4")
|
||||
description("a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://sqlite.org/2026/sqlite-autoconf-3530400.tar.gz")
|
||||
|
||||
builddep("shortcut/autotools")
|
||||
builddep("shortcut/c")
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("gettext")
|
||||
builddep("bash")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
|
||||
version("2.42.2")
|
||||
description("a random collection of Linux utilities")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.kernel.org/pub/linux/utils/util-linux/v2.42/util-linux-2.42.2.tar.xz")
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
"--prefix=/",
|
||||
"--enable-fs-paths-default=/bin",
|
||||
"--disable-su",
|
||||
"--disable-sulogin",
|
||||
"--disable-chfn-chsh",
|
||||
"--disable-login",
|
||||
"--without-systemd",
|
||||
"--disable-makeinstall-setuid",
|
||||
"--disable-makeinstall-chown",
|
||||
"--disable-makeinstall-tty-setgid",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def fix_pc(libname: str):
|
||||
pkgname_lib = f"lib{libname}"
|
||||
pkgname_dev = f"lib{libname}-dev"
|
||||
pc_path = f"lib/pkgconfig/{libname}.pc"
|
||||
with open(pc_path, "r") as file:
|
||||
pc_content = file.read()
|
||||
pc_content = pc_content.replace(
|
||||
"libdir=//lib", f"libdir={get_prefix(pkgname_lib)}/lib"
|
||||
).replace(
|
||||
"includedir=//include", f"includedir={get_prefix(pkgname_dev)}/include"
|
||||
)
|
||||
with open(pc_path, "wt") as file:
|
||||
file.write(pc_content)
|
||||
|
||||
|
||||
def pack_lib(composer, name):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if name in i and "so" in i:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
def pack_dev(composer, name):
|
||||
fix_pc(name)
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if name in i and "so" not in i:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
composer.makedir("lib/pkgconfig")
|
||||
composer.addfile(f"lib/pkgconfig/{name}.pc", f"lib/pkgconfig/{name}.pc")
|
||||
composer.makedir("include")
|
||||
for i in os.listdir("include"):
|
||||
if name in i:
|
||||
composer.add_dir(f"include/{i}", f"include/{i}")
|
||||
|
||||
def pack_bin(composer, list):
|
||||
composer.makedir("bin")
|
||||
for i in list:
|
||||
if i.startswith("sbin/"):
|
||||
i = i.replace("sbin/", "")
|
||||
composer.addfile(f"sbin/{i}", f"bin/{i}")
|
||||
else:
|
||||
composer.addfile(f"bin/{i}", f"bin/{i}")
|
||||
|
||||
package("libblkid")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_lib(composer, "blkid"))
|
||||
|
||||
package("libblkid-dev")
|
||||
dep("libblkid (same)")
|
||||
on_pack(lambda composer: pack_dev(composer, "blkid"))
|
||||
|
||||
package("libfdisk")
|
||||
dep("libuuid (same)")
|
||||
dep("libblkid (same)")
|
||||
on_pack(lambda composer: pack_lib(composer, "fdisk"))
|
||||
|
||||
package("libfdisk-dev")
|
||||
dep("libfdisk (same)")
|
||||
on_pack(lambda composer: pack_dev(composer, "fdisk"))
|
||||
|
||||
package("libmount")
|
||||
dep("libblkid (same)")
|
||||
on_pack(lambda composer: pack_lib(composer, "mount"))
|
||||
|
||||
package("libmount-dev")
|
||||
dep("libmount (same)")
|
||||
on_pack(lambda composer: pack_dev(composer, "mount"))
|
||||
|
||||
package("libsmartcols")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_lib(composer, "smartcols"))
|
||||
|
||||
package("libsmartcols-dev")
|
||||
dep("libsmartcols (same)")
|
||||
on_pack(lambda composer: pack_dev(composer, "smartcols"))
|
||||
|
||||
package("libuuid")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_lib(composer, "uuid"))
|
||||
|
||||
package("libuuid-dev")
|
||||
dep("libuuid (same)")
|
||||
on_pack(lambda composer: pack_dev(composer, "uuid"))
|
||||
|
||||
package("util-linux-swap")
|
||||
dep("libblkid (same)")
|
||||
dep("libmount (same)")
|
||||
dep("libsmartcols (same)")
|
||||
on_pack(lambda composer: pack_bin(composer, ["sbin/swaplabel", "sbin/swapoff", "sbin/swapon", "sbin/mkswap"]))
|
||||
|
||||
package("util-linux-mount")
|
||||
provide("mount")
|
||||
dep("libmount (same)")
|
||||
on_pack(lambda composer: pack_bin(composer, ["mount", "umount"]))
|
||||
|
||||
package("util-linux-fdisk")
|
||||
provide("fdisk")
|
||||
dep("libfdisk (same)")
|
||||
dep("libsmartcols (same)")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, ["sbin/fdisk"]))
|
||||
|
||||
package("util-linux-sfdisk")
|
||||
provide("sfdisk")
|
||||
dep("libfdisk (same)")
|
||||
dep("libsmartcols (same)")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, ["sbin/sfdisk"]))
|
||||
|
||||
package("util-linux-cfdisk")
|
||||
provide("cfdisk")
|
||||
dep("libfdisk (same)")
|
||||
dep("libsmartcols (same)")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, ["sbin/cfdisk"]))
|
||||
|
||||
package("util-linux-mkfs")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libz @same-arch")
|
||||
provide("mkfs")
|
||||
on_pack(lambda composer: pack_bin(composer, ["sbin/mkfs", "sbin/mkfs.bfs", "sbin/mkfs.cramfs", "sbin/mkfs.minix"]))
|
||||
|
||||
package("util-linux-fsck")
|
||||
dep("libmount (same)")
|
||||
dep("libblkid (same)")
|
||||
dep("libz @same-arch")
|
||||
provide("fsck")
|
||||
on_pack(lambda composer: pack_bin(composer, ["sbin/fsck", "sbin/fsck.cramfs", "sbin/fsck.minix"]))
|
||||
|
||||
package("util-linux-fs")
|
||||
dep("libblkid (same)")
|
||||
dep("libsmartcols (same)")
|
||||
dep("libmount (same)")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"sbin/addpart",
|
||||
"sbin/resizepart",
|
||||
"sbin/delpart",
|
||||
"sbin/partx",
|
||||
"sbin/losetup",
|
||||
"sbin/blkdiscard",
|
||||
"sbin/blkid",
|
||||
"sbin/blkpr",
|
||||
"sbin/blkzone",
|
||||
"sbin/blockdev",
|
||||
"sbin/findfs",
|
||||
"sbin/fsfreeze",
|
||||
"sbin/fstrim",
|
||||
"copyfilerange",
|
||||
"exch",
|
||||
"fadvise",
|
||||
"fallocate",
|
||||
"fincore",
|
||||
"flock",
|
||||
"getino",
|
||||
"hardlink",
|
||||
"mountpoint",
|
||||
"namei",
|
||||
"rename",
|
||||
"whereis",
|
||||
"sbin/pivot_root",
|
||||
"sbin/switch_root",
|
||||
"sbin/wipefs",
|
||||
"sbin/zramctl",
|
||||
"findmnt",
|
||||
]))
|
||||
|
||||
package("util-linux-security")
|
||||
dep("libsmartcols (same)")
|
||||
dep("libmount (same)")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"utmpdump",
|
||||
"unshare",
|
||||
"last",
|
||||
"lastb",
|
||||
"nsenter",
|
||||
"lsns",
|
||||
"sbin/nologin",
|
||||
]))
|
||||
|
||||
package("util-linux-proc")
|
||||
dep("libsmartcols (same)")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"uclampset",
|
||||
"waitpid",
|
||||
"setsid",
|
||||
"setpgid",
|
||||
"taskset",
|
||||
"chrt",
|
||||
"coresched",
|
||||
"prlimit",
|
||||
"renice",
|
||||
"ionice",
|
||||
]))
|
||||
|
||||
package("util-linux-text")
|
||||
dep("libncurses @same-arch")
|
||||
dep("libsmartcols (same)")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"bits",
|
||||
"cal",
|
||||
"colcrt",
|
||||
"colrm",
|
||||
"column",
|
||||
"getopt",
|
||||
"hexdump",
|
||||
"look",
|
||||
"mcookie",
|
||||
"rev",
|
||||
"ul",
|
||||
]))
|
||||
|
||||
package("util-linux-term")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"setterm",
|
||||
"mesg",
|
||||
"script",
|
||||
"scriptlive",
|
||||
"scriptreplay",
|
||||
"wall",
|
||||
"sbin/agetty",
|
||||
"sbin/ldattach",
|
||||
]))
|
||||
|
||||
package("util-linux-ipc")
|
||||
dep("libmount (same)")
|
||||
dep("libsmartcols (same)")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"ipcmk",
|
||||
"ipcrm",
|
||||
"ipcs",
|
||||
"lslocks",
|
||||
"pipesz",
|
||||
"dmesg",
|
||||
]))
|
||||
|
||||
package("util-linux-hardware")
|
||||
dep("libsmartcols (same)")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"irqtop",
|
||||
"lsirq",
|
||||
"lsmem",
|
||||
"wdctl",
|
||||
"sbin/hwclock",
|
||||
"sbin/readprofile",
|
||||
"sbin/rfkill",
|
||||
"sbin/rtcwake",
|
||||
]))
|
||||
|
||||
package("isosize")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, ["isosize"]))
|
||||
|
||||
package("util-linux-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_bin(composer, ["setarch", "uname26", "linux32", "linux64"]))
|
||||
|
||||
package("util-linux-uuid")
|
||||
dep("libuuid (same)")
|
||||
dep("libsmartcols (same)")
|
||||
on_pack(lambda composer: pack_bin(composer, [
|
||||
"uuidgen",
|
||||
"uuidparse",
|
||||
"sbin/uuidd",
|
||||
]))
|
||||
|
||||
package("util-linux")
|
||||
dep("util-linux-swap (same)")
|
||||
dep("util-linux-mount (same)")
|
||||
dep("util-linux-fdisk (same)")
|
||||
dep("util-linux-sfdisk (same)")
|
||||
dep("util-linux-cfdisk (same)")
|
||||
dep("util-linux-mkfs (same)")
|
||||
dep("util-linux-fsck (same)")
|
||||
dep("util-linux-fs (same)")
|
||||
dep("util-linux-security (same)")
|
||||
dep("util-linux-proc (same)")
|
||||
dep("util-linux-text (same)")
|
||||
dep("util-linux-term (same)")
|
||||
dep("util-linux-ipc (same)")
|
||||
dep("util-linux-hardware (same)")
|
||||
dep("isosize (same)")
|
||||
dep("util-linux-arch (same)")
|
||||
dep("util-linux-uuid (same)")
|
||||
on_pack(lambda _composer: None)
|
||||
@@ -4,6 +4,8 @@ from lib.make import *
|
||||
upstream_version = "9.2.782"
|
||||
|
||||
version(upstream_version)
|
||||
description("vim, a greatly improved version of the good old UNIX editor Vi")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/vim/vim/archive/refs/tags/v9.2.0782.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
@@ -45,3 +47,4 @@ dep("semi-libc @same-arch")
|
||||
dep("libncurses @same-arch")
|
||||
dep(f"vim-data (={upstream_version}) @any")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
link("bin/vim", "/bin/vi")
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("5.8.3")
|
||||
description("a general-purpose LZMA data-compression library plus command-line tools")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz"
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.3.3")
|
||||
description("zlib replacement with optimizations for next generation systems")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.3.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import os
|
||||
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.5.7")
|
||||
description("Zstandard - Fast real-time compression algorithm")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user