Compare commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
fa5d25b3f2 | ||
|
|
7ae32e99e0 | ||
|
|
d6c8742c93 | ||
|
|
8a010f1043 | ||
|
|
1ecee11772 | ||
|
|
ceb9f7f13f | ||
|
|
05f922716a | ||
|
|
d27f5433b3 | ||
|
|
120d0167ca | ||
|
|
591c01ac09 | ||
|
|
7745a33e23 | ||
|
|
0e340874c1 | ||
|
|
9098b94a26 | ||
|
|
85dcd09cba | ||
|
|
83777af4af | ||
|
|
ea07b8b123 | ||
|
|
dcae4be7a2 | ||
|
|
8abbcfeb3a | ||
|
|
34a784e0c4 | ||
|
|
394d98ef39 | ||
|
|
a9f0e7d1f2 | ||
|
|
91fbbe42de | ||
|
|
8ded967628 | ||
|
|
da332b823f | ||
|
|
3e3c35409e | ||
|
|
041673751a | ||
|
|
57accf89df | ||
|
|
32b14d41b0 | ||
|
|
56c057359b | ||
|
|
534b3dc415 | ||
|
|
ffe2f975f0 | ||
|
|
1a062e245f | ||
|
|
4460615a19 | ||
|
|
c156ff8420 | ||
|
|
b70b9aeb6d | ||
|
|
2159ca1516 | ||
|
|
f2ce5fb8a7 | ||
|
|
25c42c180a | ||
|
|
65bda86968 | ||
|
|
fe5d495a0f | ||
|
|
660b39d4a7 | ||
|
|
0257d801aa | ||
|
|
b72f8acd4a | ||
|
|
bc253ce53d | ||
|
|
63a9bda552 | ||
|
|
5b117d731d | ||
|
|
25428dc52c |
No files matched your search
+1
-1
@@ -1 +1 @@
|
|||||||
from . import arch, atombuild, make, packie, pkgcomposer, sources, managed_source
|
from . import arch, atombuild, make, packie, pkgcomposer, sources, managed_source, logging
|
||||||
+4
-3
@@ -102,7 +102,7 @@ def prepare_build_env(root: str, extreq: list[str] = []):
|
|||||||
|
|
||||||
|
|
||||||
def enter_build_env(root: str, cmd: list[str], chdir: str = "/"):
|
def enter_build_env(root: str, cmd: list[str], chdir: str = "/"):
|
||||||
reserve_env = ["https_proxy", "http_proxy", "all_proxy", "SEMIOS_SOURCE_REPO"]
|
reserve_env = ["https_proxy", "http_proxy", "all_proxy", "SEMIOS_SOURCE_REPO", "TERM"]
|
||||||
reserve_env_args = []
|
reserve_env_args = []
|
||||||
for i in reserve_env:
|
for i in reserve_env:
|
||||||
if os.environ.get(i):
|
if os.environ.get(i):
|
||||||
@@ -124,8 +124,9 @@ def enter_build_env(root: str, cmd: list[str], chdir: str = "/"):
|
|||||||
"--setenv", "SEMIOS_PKGBUILD_IN_ATOMIC", "1",
|
"--setenv", "SEMIOS_PKGBUILD_IN_ATOMIC", "1",
|
||||||
"--setenv", "USER", "root",
|
"--setenv", "USER", "root",
|
||||||
"--setenv", "LOGNAME", "root",
|
"--setenv", "LOGNAME", "root",
|
||||||
"--chdir",
|
"--setenv", "LANG", "C.UTF-8",
|
||||||
chdir,
|
"--setenv", "LC_ALL", "C.UTF-8",
|
||||||
|
"--chdir", chdir,
|
||||||
]
|
]
|
||||||
+ reserve_env_args
|
+ reserve_env_args
|
||||||
+ cmd,
|
+ cmd,
|
||||||
|
|||||||
+61
-29
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
@@ -6,28 +7,22 @@ from lib.common import treedir
|
|||||||
|
|
||||||
from . import make as libmake
|
from . import make as libmake
|
||||||
from . import pkgcomposer
|
from . import pkgcomposer
|
||||||
|
from . import logging
|
||||||
|
|
||||||
|
|
||||||
def configure(rem: list[str] = []):
|
# Common helpers
|
||||||
subprocess.run(["./configure"] + rem, check=True)
|
|
||||||
|
def write_prev_configure(args: list[str]):
|
||||||
|
with open("_cpp_configure", "w", encoding="utf-8") as file:
|
||||||
|
file.write(shlex.join(args) + "\n")
|
||||||
|
|
||||||
|
|
||||||
def cmake(rem: list[str] = []):
|
def read_prev_configure() -> list[str] | None:
|
||||||
source_dir = os.getcwd()
|
try:
|
||||||
os.makedirs("../cmake_build", exist_ok=True)
|
with open("_cpp_configure", "r", encoding="utf-8") as file:
|
||||||
os.chdir("../cmake_build")
|
return shlex.split(file.read())
|
||||||
subprocess.run(
|
except FileNotFoundError:
|
||||||
[
|
return None
|
||||||
"cmake",
|
|
||||||
"-GNinja",
|
|
||||||
"-DCMAKE_BUILD_TYPE=Release",
|
|
||||||
"-DCMAKE_INSTALL_PREFIX=/",
|
|
||||||
source_dir,
|
|
||||||
]
|
|
||||||
+ rem,
|
|
||||||
check=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def _move_install():
|
def _move_install():
|
||||||
subprocess.run(["sh", "-c", "cp -r ./pkg/*/* . 2>/dev/null || true"], check=False)
|
subprocess.run(["sh", "-c", "cp -r ./pkg/*/* . 2>/dev/null || true"], check=False)
|
||||||
@@ -35,55 +30,92 @@ def _move_install():
|
|||||||
["sh", "-c", "cp -r ./usr/local/* . 2>/dev/null || true"], check=False
|
["sh", "-c", "cp -r ./usr/local/* . 2>/dev/null || true"], check=False
|
||||||
)
|
)
|
||||||
subprocess.run(["sh", "-c", "cp -r ./usr/* . 2>/dev/null || true"], check=False)
|
subprocess.run(["sh", "-c", "cp -r ./usr/* . 2>/dev/null || true"], check=False)
|
||||||
subprocess.run(["rm", "-rf", "./pkg", "./usr"], check=False)
|
subprocess.run(["rm", "-rf", "./pkg", "./usr", "./local"], check=False)
|
||||||
|
|
||||||
|
# AutoTools & GNU Make
|
||||||
|
|
||||||
|
def configure(rem: list[str] = []):
|
||||||
|
if read_prev_configure() == rem:
|
||||||
|
logging.step("Skipping previously completed configuration.")
|
||||||
|
else:
|
||||||
|
logging.step("Configuring project via AutoTools...")
|
||||||
|
logging.run_volatile(["./configure"] + rem, check=True)
|
||||||
|
write_prev_configure(rem)
|
||||||
|
|
||||||
def make(rem: list[str] = []):
|
def make(rem: list[str] = []):
|
||||||
subprocess.run(["make", f"-j{os.cpu_count()}"] + rem, check=True)
|
logging.step("Building project via Unix Makefile...")
|
||||||
|
logging.run_volatile(["make", f"-j{os.cpu_count()}"] + rem, check=True)
|
||||||
|
|
||||||
def make_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
def make_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
||||||
|
logging.step("Installing project to temporary directory via Unix Makefile...")
|
||||||
default_rem = ["DESTDIR=" + os.getcwd() + "/../cpp_install"]
|
default_rem = ["DESTDIR=" + os.getcwd() + "/../cpp_install"]
|
||||||
if rem is None:
|
if rem is None:
|
||||||
try:
|
try:
|
||||||
shutil.rmtree("../cpp_install")
|
shutil.rmtree("../cpp_install")
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
subprocess.run(["make", "install"] + (rem or default_rem), check=True)
|
logging.run_volatile(["make", "install"] + (rem or default_rem), check=True)
|
||||||
if chdir:
|
if chdir:
|
||||||
os.chdir("../cpp_install")
|
os.chdir("../cpp_install")
|
||||||
if chdir and move:
|
if chdir and move:
|
||||||
_move_install()
|
_move_install()
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
|
||||||
|
def cmake(rem: list[str] = []):
|
||||||
|
source_dir = os.getcwd()
|
||||||
|
os.makedirs("../cmake_build", exist_ok=True)
|
||||||
|
os.chdir("../cmake_build")
|
||||||
|
if read_prev_configure() == rem:
|
||||||
|
logging.step("Skipping previously completed configuration.")
|
||||||
|
else:
|
||||||
|
logging.step("Configuring project via CMake...")
|
||||||
|
logging.run_volatile(
|
||||||
|
["cmake", "-GNinja", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=/", source_dir] + rem,
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
write_prev_configure(rem)
|
||||||
|
|
||||||
|
# Ninja
|
||||||
|
|
||||||
def ninja(rem: list[str] = []):
|
def ninja(rem: list[str] = []):
|
||||||
subprocess.run(["ninja"] + rem, check=True)
|
logging.step("Building project via Ninja...")
|
||||||
|
logging.run_volatile(["ninja"] + rem, check=True)
|
||||||
|
|
||||||
def ninja_install(rem: list[str] = [], chdir: bool = True, move: bool = True):
|
def ninja_install(rem: list[str] = [], chdir: bool = True, move: bool = True):
|
||||||
|
logging.step("Installing project to temporary directory via Ninja...")
|
||||||
if chdir:
|
if chdir:
|
||||||
os.environ["DESTDIR"] = os.getcwd() + "/../cpp_install"
|
os.environ["DESTDIR"] = os.getcwd() + "/../cpp_install"
|
||||||
subprocess.run(["ninja", "install"] + rem, check=True)
|
logging.run_volatile(["ninja", "install"] + rem, check=True)
|
||||||
if chdir:
|
if chdir:
|
||||||
os.chdir(os.environ["DESTDIR"])
|
os.chdir(os.environ["DESTDIR"])
|
||||||
if chdir and move:
|
if chdir and move:
|
||||||
_move_install()
|
_move_install()
|
||||||
|
|
||||||
|
# Meson
|
||||||
|
|
||||||
def meson_setup(rem: list[str] = []):
|
def meson_setup(rem: list[str] = []):
|
||||||
subprocess.run(["meson", "setup", "_meson_build"] + rem + ["--buildtype=release"], check=True)
|
if read_prev_configure() == rem:
|
||||||
|
logging.step("Skipping previously completed configuration.")
|
||||||
|
else:
|
||||||
|
logging.step("Configuring project via Meson...")
|
||||||
|
logging.run_volatile(["meson", "setup", "../_meson_build"] + rem + ["--buildtype=release"], check=True)
|
||||||
|
write_prev_configure(rem)
|
||||||
|
os.chdir("../_meson_build")
|
||||||
|
|
||||||
|
|
||||||
def meson_compile(rem: list[str] = []):
|
def meson_compile(rem: list[str] = []):
|
||||||
subprocess.run(["meson", "compile", "-C", "_meson_build"] + rem, check=True)
|
logging.step("Building project via Meson...")
|
||||||
|
logging.run_volatile(["meson", "compile"] + rem, check=True)
|
||||||
|
|
||||||
|
|
||||||
def meson_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
def meson_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
||||||
|
logging.step("Install project to temporary directory via Meson...")
|
||||||
default_rem = ["--destdir", f"{os.getcwd()}/../cpp_install"]
|
default_rem = ["--destdir", f"{os.getcwd()}/../cpp_install"]
|
||||||
if not rem:
|
if not rem:
|
||||||
os.makedirs("../cpp_install", exist_ok=True)
|
os.makedirs("../cpp_install", exist_ok=True)
|
||||||
subprocess.run(
|
logging.run_volatile(
|
||||||
["meson", "install", "-C", "_meson_build"] + (rem or default_rem), check=True
|
["meson", "install"] + (rem or default_rem), check=True
|
||||||
)
|
)
|
||||||
if chdir:
|
if chdir:
|
||||||
os.chdir("../cpp_install")
|
os.chdir("../cpp_install")
|
||||||
|
|||||||
+114
@@ -0,0 +1,114 @@
|
|||||||
|
import os
|
||||||
|
import re
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
|
_ANSI_RE = re.compile(r"\033\[[0-9;?]*[ -/]*[@-~]")
|
||||||
|
|
||||||
|
_volatile_pending = False
|
||||||
|
|
||||||
|
|
||||||
|
def _char_width(ch: str) -> int:
|
||||||
|
if unicodedata.combining(ch) or unicodedata.category(ch) in ("Mn", "Me", "Cf"):
|
||||||
|
return 0
|
||||||
|
return 2 if unicodedata.east_asian_width(ch) in ("W", "F") else 1
|
||||||
|
|
||||||
|
|
||||||
|
def _display_width(s: str) -> int:
|
||||||
|
return sum(_char_width(ch) for ch in _ANSI_RE.sub("", s))
|
||||||
|
|
||||||
|
|
||||||
|
def _truncate(s: str, cols: int, ellipsis: str = "…") -> str:
|
||||||
|
if cols <= 0 or _display_width(s) <= cols:
|
||||||
|
return s
|
||||||
|
budget = max(0, cols - _display_width(ellipsis))
|
||||||
|
out = []
|
||||||
|
width = 0
|
||||||
|
i = 0
|
||||||
|
while i < len(s):
|
||||||
|
m = _ANSI_RE.match(s, i)
|
||||||
|
if m:
|
||||||
|
out.append(m.group())
|
||||||
|
i = m.end()
|
||||||
|
continue
|
||||||
|
ch = s[i]
|
||||||
|
i += 1
|
||||||
|
w = _char_width(ch)
|
||||||
|
if width + w > budget:
|
||||||
|
break
|
||||||
|
out.append(ch)
|
||||||
|
width += w
|
||||||
|
return "".join(out) + ellipsis + "\033[0m"
|
||||||
|
|
||||||
|
|
||||||
|
def _terminal_columns() -> int:
|
||||||
|
try:
|
||||||
|
return os.get_terminal_size(sys.stderr.fileno()).columns or 80
|
||||||
|
except (OSError, ValueError, AttributeError):
|
||||||
|
return shutil.get_terminal_size((80, 24)).columns or 80
|
||||||
|
|
||||||
|
|
||||||
|
def _fit_single_line(s: str) -> str:
|
||||||
|
if not sys.stderr.isatty():
|
||||||
|
return s
|
||||||
|
return _truncate(s, max(1, _terminal_columns() - 1))
|
||||||
|
|
||||||
|
|
||||||
|
def _finish_volatile():
|
||||||
|
global _volatile_pending
|
||||||
|
if _volatile_pending:
|
||||||
|
sys.stderr.write("\n")
|
||||||
|
sys.stderr.flush()
|
||||||
|
_volatile_pending = False
|
||||||
|
|
||||||
|
|
||||||
|
def step(s: str):
|
||||||
|
_finish_volatile()
|
||||||
|
print(f"=> \033[34m{s}\033[0m", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
def volatile(s: str):
|
||||||
|
global _volatile_pending
|
||||||
|
sys.stderr.write(f"\r\033[K{s}")
|
||||||
|
sys.stderr.flush()
|
||||||
|
_volatile_pending = True
|
||||||
|
|
||||||
|
|
||||||
|
def warning(s: str):
|
||||||
|
_finish_volatile()
|
||||||
|
print(f"\033[33mwarning: {s}\033[0m", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
def error(s: str):
|
||||||
|
_finish_volatile()
|
||||||
|
print(f"\033[31merror: {s}\033[0m", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
def run_volatile(cmd, *, check=False, **kwargs):
|
||||||
|
kwargs.setdefault("stdout", subprocess.PIPE)
|
||||||
|
kwargs.setdefault("stderr", subprocess.STDOUT)
|
||||||
|
kwargs.setdefault("text", True)
|
||||||
|
kwargs.setdefault("bufsize", 1)
|
||||||
|
|
||||||
|
lines = []
|
||||||
|
|
||||||
|
proc = subprocess.Popen(cmd, **kwargs)
|
||||||
|
try:
|
||||||
|
if proc.stdout is not None:
|
||||||
|
for line in proc.stdout:
|
||||||
|
line = line.rstrip("\r\n")
|
||||||
|
lines.append(line)
|
||||||
|
volatile(_fit_single_line(f"\033[2m ~ {line}\033[0m"))
|
||||||
|
returncode = proc.wait()
|
||||||
|
finally:
|
||||||
|
_finish_volatile()
|
||||||
|
|
||||||
|
if check and returncode != 0:
|
||||||
|
error(f"process exited with code {returncode}")
|
||||||
|
if lines:
|
||||||
|
sys.stderr.write("\n".join(lines) + "\n")
|
||||||
|
sys.stderr.flush()
|
||||||
|
raise subprocess.CalledProcessError(returncode, cmd)
|
||||||
|
return returncode
|
||||||
+5
-4
@@ -2,9 +2,7 @@ import typing
|
|||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from lib import arch
|
from . import pkgcomposer, sources, managed_source, logging, arch
|
||||||
|
|
||||||
from . import pkgcomposer, sources, managed_source
|
|
||||||
|
|
||||||
_key_global = "@global"
|
_key_global = "@global"
|
||||||
_key_version = "version"
|
_key_version = "version"
|
||||||
@@ -49,7 +47,7 @@ def builddep(s: str):
|
|||||||
builddep("shortcut/c")
|
builddep("shortcut/c")
|
||||||
_builddep += ["libcxx-dev"]
|
_builddep += ["libcxx-dev"]
|
||||||
elif s == "shortcut/autotools":
|
elif s == "shortcut/autotools":
|
||||||
_builddep += ["gnu-make", "gnu-sed", "awk", "grep"]
|
_builddep += ["gnu-make", "gnu-sed", "awk", "grep", "pkgconf"]
|
||||||
elif s == "shortcut/rust":
|
elif s == "shortcut/rust":
|
||||||
builddep("shortcut/c")
|
builddep("shortcut/c")
|
||||||
_builddep += ["cargo", "rust"]
|
_builddep += ["cargo", "rust"]
|
||||||
@@ -164,11 +162,13 @@ def block_hook(hook: str):
|
|||||||
|
|
||||||
def source_url(url: str):
|
def source_url(url: str):
|
||||||
if not _dry_run:
|
if not _dry_run:
|
||||||
|
logging.step(f"Downloading project source code from \"{url}\"...")
|
||||||
sources.source_url(url)
|
sources.source_url(url)
|
||||||
|
|
||||||
|
|
||||||
def source_git(url: str, branch: str | None = None):
|
def source_git(url: str, branch: str | None = None):
|
||||||
if not _dry_run:
|
if not _dry_run:
|
||||||
|
logging.step(f"Cloning project source code from \"{url}\" (branch \"{branch}\")...")
|
||||||
sources.source_git(url, branch)
|
sources.source_git(url, branch)
|
||||||
|
|
||||||
|
|
||||||
@@ -177,6 +177,7 @@ def source_managed(s: str, postprocess: str = ""):
|
|||||||
_managed_source_url = s
|
_managed_source_url = s
|
||||||
_managed_source_postprocess = postprocess
|
_managed_source_postprocess = postprocess
|
||||||
if not _dry_run:
|
if not _dry_run:
|
||||||
|
logging.step(f"Downloading project source code from \"{s}\"...")
|
||||||
sources.source_url(managed_source.get_repo_url(s))
|
sources.source_url(managed_source.get_repo_url(s))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -2,7 +2,6 @@ import json
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
class PkgComposer:
|
class PkgComposer:
|
||||||
@@ -44,7 +43,7 @@ class PkgComposer:
|
|||||||
],
|
],
|
||||||
check=True,
|
check=True,
|
||||||
)
|
)
|
||||||
subprocess.run(["zstd", "--rm", "-f", f"{self.pkgfile}.tar", "-o", self.pkgfile], check=True)
|
subprocess.run(["zstd", "--rm", "-fq", f"{self.pkgfile}.tar", "-o", self.pkgfile], check=True)
|
||||||
|
|
||||||
def makedir(self, name: str):
|
def makedir(self, name: str):
|
||||||
os.mkdir(f"{self.workdir}/bundle/{name}")
|
os.mkdir(f"{self.workdir}/bundle/{name}")
|
||||||
|
|||||||
+5
-11
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from . import arch, make, pkgcomposer
|
from . import arch, make, pkgcomposer, logging
|
||||||
|
|
||||||
|
|
||||||
def _rust_triple(semios: str) -> str:
|
def _rust_triple(semios: str) -> str:
|
||||||
@@ -9,6 +9,7 @@ def _rust_triple(semios: str) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def build(rem: list[str] = []):
|
def build(rem: list[str] = []):
|
||||||
|
logging.step("Building project via Cargo...")
|
||||||
cmdline = [
|
cmdline = [
|
||||||
"cargo",
|
"cargo",
|
||||||
"build",
|
"build",
|
||||||
@@ -19,7 +20,7 @@ def build(rem: list[str] = []):
|
|||||||
os.environ["RUSTFLAGS"] = (
|
os.environ["RUSTFLAGS"] = (
|
||||||
os.environ.get("RUSTFLAGS", "") + " -C target-feature=-crt-static"
|
os.environ.get("RUSTFLAGS", "") + " -C target-feature=-crt-static"
|
||||||
)
|
)
|
||||||
subprocess.run(cmdline)
|
logging.run_volatile(cmdline, check=True)
|
||||||
|
|
||||||
|
|
||||||
def artifacts_dir():
|
def artifacts_dir():
|
||||||
@@ -33,19 +34,12 @@ def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter)
|
|||||||
if filter(ent):
|
if filter(ent):
|
||||||
if ent.is_dir(follow_symlinks=False):
|
if ent.is_dir(follow_symlinks=False):
|
||||||
pc.makedir(f"{dstdir}/{ent.name}")
|
pc.makedir(f"{dstdir}/{ent.name}")
|
||||||
elif ent.is_file(follow_symlinks=False):
|
elif ent.is_file(follow_symlinks=False) or (ent.is_symlink() and not os.path.isabs(os.readlink(ent.path))):
|
||||||
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
|
||||||
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
|
|
||||||
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
||||||
|
|
||||||
|
|
||||||
def _autopack_filter_lib(ent) -> bool:
|
def _autopack_filter_lib(ent) -> bool:
|
||||||
if ent.is_dir(follow_symlinks=False):
|
return ent.name.endswith(".so") and ent.is_file(follow_symlinks=False)
|
||||||
return False
|
|
||||||
if ent.name.endswith(".so"):
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def _autopack_filter_bin(ent) -> bool:
|
def _autopack_filter_bin(ent) -> bool:
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
|
||||||
import tarfile
|
import tarfile
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("0.13.1")
|
||||||
|
description("Low-level unprivileged sandboxing tool used by Flatpak and similar projects")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://containers/bubblewrap#v0.13.1")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/meson")
|
||||||
|
builddep("libcap-dev @target")
|
||||||
|
builddep("linux-dev @target")
|
||||||
|
builddep("bash")
|
||||||
|
|
||||||
|
supported_arch(lambda arch: "linux" in arch)
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.meson_setup([f"--prefix={get_prefix('bubblewrap')}"])
|
||||||
|
cpp.meson_compile()
|
||||||
|
cpp.meson_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("bubblewrap")
|
||||||
|
provide("bwrap")
|
||||||
|
dep("libcap @same-arch")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
+86
-70
@@ -1,94 +1,100 @@
|
|||||||
from lib import cpp, arch
|
from lib import cpp, arch
|
||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
version("8.21.0")
|
|
||||||
|
version("8.23.0")
|
||||||
description("command line tool and library for transferring data with URLs")
|
description("command line tool and library for transferring data with URLs")
|
||||||
maintainer("sisungo <[email protected]>")
|
maintainer("sisungo <[email protected]>")
|
||||||
source_url("https://curl.se/download/curl-8.21.0.tar.gz")
|
source_url("https://curl.se/download/curl-8.23.0.tar.gz")
|
||||||
|
|
||||||
builddep("shortcut/c")
|
builddep("shortcut/c")
|
||||||
builddep("shortcut/autotools")
|
builddep("shortcut/autotools")
|
||||||
builddep(f"libnghttp2-dev @{arch.get_target()}")
|
builddep("libnghttp2-dev @target")
|
||||||
builddep(f"libcares-dev @{arch.get_target()}")
|
builddep("libcares-dev @target")
|
||||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
builddep("aws-lc-dev @target")
|
||||||
builddep(f"libbrotli-dev @{arch.get_target()}")
|
builddep("libbrotli-dev @target")
|
||||||
builddep(f"libz-dev @{arch.get_target()}")
|
builddep("libz-dev @target")
|
||||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
builddep("libzstd-dev @target")
|
||||||
builddep(f"libpsl-dev @{arch.get_target()}")
|
builddep("libpsl-dev @target")
|
||||||
|
builddep("libngtcp2-dev @target")
|
||||||
|
builddep("libnghttp3-dev @target")
|
||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
cpp.configure(
|
cpp.configure([
|
||||||
[
|
"--prefix=/",
|
||||||
"--prefix=/",
|
f"--bindir={get_prefix('curl')}/bin",
|
||||||
f"--bindir={get_prefix('curl')}/bin",
|
f"--libdir={get_prefix('libcurl')}/lib",
|
||||||
f"--libdir={get_prefix('libcurl')}/lib",
|
f"--includedir={get_prefix('libcurl-dev')}/include",
|
||||||
f"--includedir={get_prefix('libcurl-dev')}/include",
|
"--enable-optimize",
|
||||||
"--enable-optimize",
|
"--disable-debug",
|
||||||
"--disable-debug",
|
"--enable-warnings",
|
||||||
"--enable-warnings",
|
"--enable-symbol-hiding",
|
||||||
"--enable-symbol-hiding",
|
"--enable-ares",
|
||||||
"--enable-ares",
|
"--enable-http",
|
||||||
"--enable-http",
|
"--enable-ftp",
|
||||||
"--enable-ftp",
|
"--enable-file",
|
||||||
"--enable-file",
|
"--enable-ipfs",
|
||||||
"--enable-ipfs",
|
"--disable-ldap",
|
||||||
"--disable-ldap",
|
"--disable-ldaps",
|
||||||
"--disable-ldaps",
|
"--enable-rtsp",
|
||||||
"--enable-rtsp",
|
"--enable-proxy",
|
||||||
"--enable-proxy",
|
"--enable-dict",
|
||||||
"--enable-dict",
|
"--enable-telnet",
|
||||||
"--enable-telnet",
|
"--enable-tftp",
|
||||||
"--enable-tftp",
|
"--enable-pop3",
|
||||||
"--enable-pop3",
|
"--enable-imap",
|
||||||
"--enable-imap",
|
"--enable-smb",
|
||||||
"--enable-smb",
|
"--enable-smtp",
|
||||||
"--enable-smtp",
|
"--enable-gopher",
|
||||||
"--enable-gopher",
|
"--enable-mqtt",
|
||||||
"--enable-mqtt",
|
"--disable-init-mem-debug",
|
||||||
"--disable-init-mem-debug",
|
"--enable-manual",
|
||||||
"--enable-manual",
|
"--enable-docs",
|
||||||
"--enable-docs",
|
"--enable-libcurl-option",
|
||||||
"--enable-libcurl-option",
|
"--enable-ipv6",
|
||||||
"--enable-ipv6",
|
"--enable-openssl-auto-load-config",
|
||||||
"--enable-openssl-auto-load-config",
|
"--with-ca-path=/var/config/ssl/certs",
|
||||||
"--with-ca-path=/var/config/ssl/certs",
|
"--enable-versioned-symbols",
|
||||||
"--enable-versioned-symbols",
|
"--enable-typecheck",
|
||||||
"--enable-typecheck",
|
"--enable-verbose",
|
||||||
"--enable-verbose",
|
"--disable-tls-srp",
|
||||||
"--disable-tls-srp",
|
"--enable-unix-sockets",
|
||||||
"--enable-unix-sockets",
|
"--enable-cookies",
|
||||||
"--enable-cookies",
|
"--enable-socketpair",
|
||||||
"--enable-socketpair",
|
"--enable-http-auth",
|
||||||
"--enable-http-auth",
|
"--enable-doh",
|
||||||
"--enable-doh",
|
"--enable-mime",
|
||||||
"--enable-mime",
|
"--enable-bindlocal",
|
||||||
"--enable-bindlocal",
|
"--enable-form-api",
|
||||||
"--enable-form-api",
|
"--enable-dateparse",
|
||||||
"--enable-dateparse",
|
"--enable-netrc",
|
||||||
"--enable-netrc",
|
"--enable-progress-meter",
|
||||||
"--enable-progress-meter",
|
"--enable-get-easy-options",
|
||||||
"--enable-get-easy-options",
|
"--enable-alt-svc",
|
||||||
"--enable-alt-svc",
|
"--enable-headers-api",
|
||||||
"--enable-headers-api",
|
"--enable-hsts",
|
||||||
"--enable-hsts",
|
"--enable-websockets",
|
||||||
"--enable-websockets",
|
"--with-openssl",
|
||||||
"--with-openssl",
|
"--with-nghttp2",
|
||||||
"--with-nghttp2",
|
"--with-nghttp3",
|
||||||
"--without-libidn2",
|
"--with-ngtcp2",
|
||||||
]
|
"--without-libidn2",
|
||||||
)
|
])
|
||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
package("libcurl")
|
package("libcurl")
|
||||||
dep("semi-libc @same-arch")
|
dep("semi-libc @same-arch")
|
||||||
dep("libpsl @same-arch")
|
dep("libpsl @same-arch")
|
||||||
dep("libz @same-arch")
|
dep("libz @same-arch")
|
||||||
dep("libcares @same-arch")
|
dep("libcares @same-arch")
|
||||||
dep("libnghttp2 @same-arch")
|
dep("libnghttp2 @same-arch")
|
||||||
|
dep("libnghttp3 @same-arch")
|
||||||
|
dep("libngtcp2 @same-arch")
|
||||||
dep("libssl @same-arch")
|
dep("libssl @same-arch")
|
||||||
dep("libcrypto @same-arch")
|
dep("libcrypto @same-arch")
|
||||||
dep("libzstd @same-arch")
|
dep("libzstd @same-arch")
|
||||||
@@ -101,4 +107,14 @@ cpp.use_auto_pack(["bin"])
|
|||||||
|
|
||||||
package("libcurl-dev")
|
package("libcurl-dev")
|
||||||
dep("libcurl (same)")
|
dep("libcurl (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libpsl-dev @same-arch")
|
||||||
|
dep("libz-dev @same-arch")
|
||||||
|
dep("libcares-dev @same-arch")
|
||||||
|
dep("libnghttp2-dev @same-arch")
|
||||||
|
dep("libnghttp3-dev @same-arch")
|
||||||
|
dep("libngtcp2-dev @same-arch")
|
||||||
|
dep("aws-lc-dev @same-arch")
|
||||||
|
dep("libzstd-dev @same-arch")
|
||||||
|
dep("libbrotli-dev @same-arch")
|
||||||
cpp.use_auto_pack(["dev"])
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("2.70.0")
|
||||||
|
description("A maintained, feature-rich and performance oriented, neofetch like system information tool.")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://fastfetch-cli/fastfetch#2.70.0")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/cmake")
|
||||||
|
builddep("libwayland-dev @target")
|
||||||
|
builddep("libvulkan-dev @target")
|
||||||
|
builddep("libdrm-dev @target")
|
||||||
|
builddep("glib-dev @target")
|
||||||
|
builddep("libsqlite-dev @target")
|
||||||
|
builddep("libegl-dev @target")
|
||||||
|
builddep("libdbus-dev @target")
|
||||||
|
builddep("libfreetype-dev @target")
|
||||||
|
builddep("libz-dev @target")
|
||||||
|
builddep("linux-dev @target")
|
||||||
|
builddep("vulkan-headers @target")
|
||||||
|
builddep("libopengl-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.cmake([
|
||||||
|
f"-DCMAKE_INSTALL_PREFIX={get_prefix('fastfetch')}",
|
||||||
|
"-DENABLE_VULKAN=ON",
|
||||||
|
"-DENABLE_WAYLAND=ON",
|
||||||
|
"-DENABLE_DRM=ON",
|
||||||
|
"-DENABLE_GIO=ON",
|
||||||
|
"-DENABLE_DBUS=ON",
|
||||||
|
"-DENABLE_SQLITE3=ON",
|
||||||
|
"-DENABLE_EGL=ON",
|
||||||
|
"-DENABLE_FREETYPE=ON",
|
||||||
|
"-DBINARY_LINK_TYPE=dlopen",
|
||||||
|
])
|
||||||
|
cpp.ninja()
|
||||||
|
cpp.ninja_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack(composer):
|
||||||
|
composer.add("bin")
|
||||||
|
composer.makedir("share")
|
||||||
|
composer.add("share/fastfetch")
|
||||||
|
|
||||||
|
package("fastfetch")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
on_pack(pack)
|
||||||
@@ -0,0 +1,271 @@
|
|||||||
|
import glob
|
||||||
|
import os
|
||||||
|
|
||||||
|
from lib.make import *
|
||||||
|
from lib import cpp, packie
|
||||||
|
|
||||||
|
|
||||||
|
# FIXME: AWS-LC does not yet support some DTLS functions required by FFMpeg.
|
||||||
|
|
||||||
|
|
||||||
|
version("9.0.2")
|
||||||
|
description("FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://ffmpeg.org/releases/ffmpeg-9.0.2.tar.xz")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
builddep("pkgconf @target")
|
||||||
|
builddep("alsa-lib-dev @target")
|
||||||
|
#builddep("aws-lc-dev @target")
|
||||||
|
builddep("liblcms-dev @target")
|
||||||
|
builddep("libopus-dev @target")
|
||||||
|
builddep("libvorbis-dev @target")
|
||||||
|
builddep("liblzma-dev @target")
|
||||||
|
builddep("libxml2-dev @target")
|
||||||
|
builddep("libogg-dev @target")
|
||||||
|
builddep("libdav1d-dev @target")
|
||||||
|
builddep("libplacebo-dev @target")
|
||||||
|
builddep("libass-dev @target")
|
||||||
|
builddep("libsvtav1-dev @target")
|
||||||
|
builddep("libfontconfig-dev @target")
|
||||||
|
builddep("libfreetype-dev @target")
|
||||||
|
builddep("libfribidi-dev @target")
|
||||||
|
builddep("libharfbuzz-dev @target")
|
||||||
|
builddep("libmp3lame-dev @target")
|
||||||
|
builddep("libwebp-dev @target")
|
||||||
|
builddep("libopenh264-dev @target")
|
||||||
|
builddep("libva-dev @target")
|
||||||
|
builddep("libkvazaar-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure([
|
||||||
|
"--prefix=/",
|
||||||
|
f"--datadir={get_prefix('ffmpeg-common')}/share/ffmpeg",
|
||||||
|
|
||||||
|
f"--cc={packie.prefix_of('clang')}/bin/clang",
|
||||||
|
|
||||||
|
"--disable-static",
|
||||||
|
"--enable-shared",
|
||||||
|
"--enable-gray",
|
||||||
|
|
||||||
|
"--enable-lcms2",
|
||||||
|
"--enable-libass",
|
||||||
|
"--enable-libdav1d",
|
||||||
|
"--enable-libfontconfig",
|
||||||
|
"--enable-libfreetype",
|
||||||
|
"--enable-libfribidi",
|
||||||
|
"--enable-libharfbuzz",
|
||||||
|
"--enable-libkvazaar",
|
||||||
|
"--enable-libmp3lame",
|
||||||
|
"--enable-libopenh264",
|
||||||
|
"--enable-libopus",
|
||||||
|
"--enable-libplacebo",
|
||||||
|
"--enable-libsvtav1",
|
||||||
|
"--enable-libvorbis",
|
||||||
|
"--enable-libwebp",
|
||||||
|
"--enable-libxml2",
|
||||||
|
#"--enable-openssl",
|
||||||
|
])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_lib(composer, name):
|
||||||
|
composer.makedir("lib")
|
||||||
|
for i in glob.glob(f"lib/{name}*"):
|
||||||
|
composer.addfile(i)
|
||||||
|
|
||||||
|
def pack_dev(composer, name):
|
||||||
|
devname = f"{name}-dev"
|
||||||
|
composer.makedir("include")
|
||||||
|
composer.add_dir(f"include/{name}")
|
||||||
|
composer.makedirs("lib/pkgconfig")
|
||||||
|
with open(f"lib/pkgconfig/{name}.pc") as fd:
|
||||||
|
pc = fd.read()
|
||||||
|
pc = pc.replace("libdir=//lib", f"libdir={get_prefix(name)}/lib")
|
||||||
|
pc = pc.replace("includedir=//include", f"includedir={get_prefix(devname)}/include")
|
||||||
|
os.remove(f"lib/pkgconfig/{name}.pc")
|
||||||
|
with open(f"lib/pkgconfig/{name}.pc", "wt+") as fd:
|
||||||
|
fd.write(pc)
|
||||||
|
composer.addfile(f"lib/pkgconfig/{name}.pc")
|
||||||
|
|
||||||
|
def pack_data(composer):
|
||||||
|
composer.makedir("share")
|
||||||
|
composer.add("share/ffmpeg")
|
||||||
|
|
||||||
|
package("ffmpeg-common")
|
||||||
|
arch_any()
|
||||||
|
on_pack(pack_data)
|
||||||
|
|
||||||
|
package("libavutil")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
dep("libva @same-arch")
|
||||||
|
on_pack(lambda c: pack_lib(c, "libavutil"))
|
||||||
|
|
||||||
|
package("libavutil-dev")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
dep("libva-dev @same-arch")
|
||||||
|
on_pack(lambda c: pack_dev(c, "libavutil"))
|
||||||
|
|
||||||
|
package("libswresample")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_lib(c, "libswresample"))
|
||||||
|
|
||||||
|
package("libswresample-dev")
|
||||||
|
dep("libswresample (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libavutil-dev (same)")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_dev(c, "libswresample"))
|
||||||
|
|
||||||
|
package("libswscale")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_lib(c, "libswscale"))
|
||||||
|
|
||||||
|
package("libswscale-dev")
|
||||||
|
dep("libswscale (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libavutil-dev (same)")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_dev(c, "libswscale"))
|
||||||
|
|
||||||
|
package("libavcodec")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libswresample (same)")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("liblcms @same-arch")
|
||||||
|
dep("liblzma @same-arch")
|
||||||
|
dep("libdav1d @same-arch")
|
||||||
|
dep("libopus @same-arch")
|
||||||
|
dep("libvorbis @same-arch")
|
||||||
|
dep("libsvtav1 @same-arch")
|
||||||
|
dep("libmp3lame @same-arch")
|
||||||
|
dep("libopenh264 @same-arch")
|
||||||
|
dep("libwebp @same-arch")
|
||||||
|
dep("libkvazaar @same-arch")
|
||||||
|
dep("libva @same-arch")
|
||||||
|
dep("libz @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_lib(c, "libavcodec"))
|
||||||
|
|
||||||
|
package("libavcodec-dev")
|
||||||
|
dep("libavcodec (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libswresample-dev (same)")
|
||||||
|
dep("libavutil-dev (same)")
|
||||||
|
dep("liblcms-dev @same-arch")
|
||||||
|
dep("liblzma-dev @same-arch")
|
||||||
|
dep("libdav1d-dev @same-arch")
|
||||||
|
dep("libopus-dev @same-arch")
|
||||||
|
dep("libvorbis-dev @same-arch")
|
||||||
|
dep("libsvtav1-dev @same-arch")
|
||||||
|
dep("libmp3lame-dev @same-arch")
|
||||||
|
dep("libwebp-dev @same-arch")
|
||||||
|
dep("libkvazaar-dev @same-arch")
|
||||||
|
dep("libopenh264-dev @same-arch")
|
||||||
|
dep("libva-dev @same-arch")
|
||||||
|
dep("libz-dev @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_dev(c, "libavcodec"))
|
||||||
|
|
||||||
|
package("libavformat")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libavcodec (same)")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("libxml2 @same-arch")
|
||||||
|
dep("libbzip2 @same-arch")
|
||||||
|
dep("libz @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_lib(c, "libavformat"))
|
||||||
|
|
||||||
|
package("libavformat-dev")
|
||||||
|
dep("libavformat (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libavcodec-dev (same)")
|
||||||
|
dep("libavutil-dev (same)")
|
||||||
|
dep("libxml2-dev @same-arch")
|
||||||
|
dep("libbzip2-dev @same-arch")
|
||||||
|
dep("libz-dev @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_dev(c, "libavformat"))
|
||||||
|
|
||||||
|
package("libavfilter")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libswscale (same)")
|
||||||
|
dep("libavformat (same)")
|
||||||
|
dep("libavcodec (same)")
|
||||||
|
dep("libswresample (same)")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("liblcms @same-arch")
|
||||||
|
dep("libplacebo @same-arch")
|
||||||
|
dep("libass @same-arch")
|
||||||
|
dep("libharfbuzz @same-arch")
|
||||||
|
dep("libfribidi @same-arch")
|
||||||
|
dep("libfontconfig @same-arch")
|
||||||
|
dep("libfreetype @same-arch")
|
||||||
|
dep("libva @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_lib(c, "libavfilter"))
|
||||||
|
|
||||||
|
package("libavfilter-dev")
|
||||||
|
dep("libavfilter (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libswscale-dev (same)")
|
||||||
|
dep("libavformat-dev (same)")
|
||||||
|
dep("libavcodec-dev (same)")
|
||||||
|
dep("libswresample-dev (same)")
|
||||||
|
dep("libavutil-dev (same)")
|
||||||
|
dep("liblcms-dev @same-arch")
|
||||||
|
dep("libplacebo-dev @same-arch")
|
||||||
|
dep("libass-dev @same-arch")
|
||||||
|
dep("libharfbuzz-dev @same-arch")
|
||||||
|
dep("libfribidi-dev @same-arch")
|
||||||
|
dep("libfontconfig-dev @same-arch")
|
||||||
|
dep("libfreetype-dev @same-arch")
|
||||||
|
dep("libva-dev @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_dev(c, "libavfilter"))
|
||||||
|
|
||||||
|
package("libavdevice")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libavfilter (same)")
|
||||||
|
dep("libavformat (same)")
|
||||||
|
dep("libavcodec (same)")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("alsa-lib @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_lib(c, "libavdevice"))
|
||||||
|
|
||||||
|
package("libavdevice-dev")
|
||||||
|
dep("libavdevice (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libavfilter-dev (same)")
|
||||||
|
dep("libavformat-dev (same)")
|
||||||
|
dep("libavcodec-dev (same)")
|
||||||
|
dep("libavutil-dev (same)")
|
||||||
|
dep("alsa-lib-dev @same-arch")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
on_pack(lambda c: pack_dev(c, "libavdevice"))
|
||||||
|
|
||||||
|
package("ffmpeg")
|
||||||
|
dep("libavdevice (same)")
|
||||||
|
dep("libavfilter (same)")
|
||||||
|
dep("libavformat (same)")
|
||||||
|
dep("libavcodec (same)")
|
||||||
|
dep("libswresample (same)")
|
||||||
|
dep("libswscale (same)")
|
||||||
|
dep("libavutil (same)")
|
||||||
|
dep("ffmpeg-common (same-version) @any")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
from lib.make import *
|
||||||
|
from lib import cpp
|
||||||
|
|
||||||
|
|
||||||
|
version("2.3.2")
|
||||||
|
description("An open-source HEVC encoder")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://ultravideo/kvazaar#v2.3.2")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/cmake")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.cmake([
|
||||||
|
"-DUSE_RANGE_EXTENSION=ON",
|
||||||
|
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libkvazaar')}/lib",
|
||||||
|
f"-DCMAKE_INSTALL_BINDIR={get_prefix('kvazaar')}/bin",
|
||||||
|
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libkvazaar-dev')}/include",
|
||||||
|
])
|
||||||
|
cpp.ninja()
|
||||||
|
cpp.ninja_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libkvazaar")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("kvazaar")
|
||||||
|
dep("libkvazaar (same)")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libkvazaar-dev")
|
||||||
|
dep("libkvazaar (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
from lib.make import *
|
||||||
|
from lib import cpp
|
||||||
|
|
||||||
|
|
||||||
|
version("2.1.13")
|
||||||
|
description("Event notification library")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://libevent/libevent#release-2.1.13-stable")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/cmake")
|
||||||
|
builddep("aws-lc-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def fix_pc(path):
|
||||||
|
with open(path) as fd:
|
||||||
|
pc = fd.read()
|
||||||
|
pc = pc.replace("libdir=/usr/local/lib", f"libdir={get_prefix('libevent')}/lib")
|
||||||
|
pc = pc.replace("includedir=/usr/local/include", f"includedir={get_prefix('libevent-dev')}/include")
|
||||||
|
pc = pc.replace("/usr/local", "/")
|
||||||
|
with open(path, 'wt+') as fd:
|
||||||
|
fd.write(pc)
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.cmake([
|
||||||
|
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
|
||||||
|
"-DCMAKE_INSTALL_PREFIX=/usr/local",
|
||||||
|
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libevent')}/lib",
|
||||||
|
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libevent-dev')}/include",
|
||||||
|
])
|
||||||
|
cpp.ninja()
|
||||||
|
cpp.ninja_install()
|
||||||
|
fix_pc("lib/pkgconfig/libevent.pc")
|
||||||
|
fix_pc("lib/pkgconfig/libevent_core.pc")
|
||||||
|
fix_pc("lib/pkgconfig/libevent_extra.pc")
|
||||||
|
fix_pc("lib/pkgconfig/libevent_openssl.pc")
|
||||||
|
fix_pc("lib/pkgconfig/libevent_pthreads.pc")
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libevent")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libcrypto @same-arch")
|
||||||
|
dep("libssl @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libevent-dev")
|
||||||
|
dep("libevent (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("aws-lc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
from lib import arch, cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("1.9.7")
|
||||||
|
description("A cross-platform, linkable library implementation of Git that you can use in your application.")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://libgit2/libgit2#v1.9.7")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/cmake")
|
||||||
|
builddep("aws-lc-dev @target")
|
||||||
|
builddep("libz-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.cmake([
|
||||||
|
"-DCMAKE_C_STANDARD=99",
|
||||||
|
"-DCMAKE_INSTALL_PREFIX=/",
|
||||||
|
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libgit2')}/lib",
|
||||||
|
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libgit2-dev')}/include",
|
||||||
|
"-DUSE_HTTPS=OpenSSL",
|
||||||
|
"-DUSE_SHA256=OpenSSL",
|
||||||
|
"-DUSE_BUNDLED_ZLIB=OFF",
|
||||||
|
"-DUSE_NTLMCLIENT=OFF",
|
||||||
|
])
|
||||||
|
cpp.ninja()
|
||||||
|
cpp.ninja_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libgit2")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libssl @same-arch")
|
||||||
|
dep("libcrypto @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("git2")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libgit2 (same)")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libgit2-dev")
|
||||||
|
dep("libgit2 (same)")
|
||||||
|
dep("aws-lc-dev @same-arch")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
--- a/configure 2026-08-20 19:06:35.000000000 +0000
|
||||||
|
+++ b/configure 2026-10-30 08:14:15.195189154 +0000
|
||||||
|
@@ -195,10 +195,6 @@
|
||||||
|
[ -f "${source_path}/${t}.mk" ] && enable_feature ${t}
|
||||||
|
done
|
||||||
|
|
||||||
|
-if ! diff --version >/dev/null; then
|
||||||
|
- die "diff missing: Try installing diffutils via your package manager."
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
if ! perl --version >/dev/null; then
|
||||||
|
die "Perl is required to build"
|
||||||
|
fi
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
from lib.make import *
|
||||||
|
from lib import cpp, arch
|
||||||
|
|
||||||
|
|
||||||
|
version("1.17.0")
|
||||||
|
description("the WebM VP8/VP9 Codec SDK")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://webmproject/libvpx#v1.17.0")
|
||||||
|
|
||||||
|
builddep("shortcut/c++")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
builddep("perl")
|
||||||
|
|
||||||
|
|
||||||
|
def fix_pc():
|
||||||
|
with open('lib/pkgconfig/vpx.pc') as fd:
|
||||||
|
pc = fd.read()
|
||||||
|
pc = pc.replace("prefix=/usr/local", "prefix=/")
|
||||||
|
pc = pc.replace("libdir=${prefix}/lib", f"libdir={get_prefix('libvpx')}/lib")
|
||||||
|
pc = pc.replace("includedir=${prefix}/include", f"includedir={get_prefix('libvpx-dev')}/include")
|
||||||
|
with open('lib/pkgconfig/vpx.pc', 'wt+') as fd:
|
||||||
|
fd.write(pc)
|
||||||
|
|
||||||
|
def build():
|
||||||
|
libvpx_target = arch.get_target().replace("-semios-linux", "-linux-gcc")
|
||||||
|
libvpx_target = libvpx_target.replace("aarch64", "arm64")
|
||||||
|
cpp.configure([
|
||||||
|
f"--target={libvpx_target}",
|
||||||
|
"--enable-shared",
|
||||||
|
])
|
||||||
|
cpp.make(["HAVE_GNU_STRIP=no"])
|
||||||
|
cpp.make_install()
|
||||||
|
fix_pc()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libvpx")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libvpx-tools")
|
||||||
|
dep("libvpx (same)")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libvpx-dev")
|
||||||
|
dep("libvpx (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from lib.make import *
|
||||||
|
from lib import cpp, python, arch
|
||||||
|
|
||||||
|
|
||||||
|
upstream_version = "1.1.45"
|
||||||
|
|
||||||
|
version(upstream_version)
|
||||||
|
description("an XSLT processor based on libxml2")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.45.tar.xz")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
builddep("pkgconf @target")
|
||||||
|
builddep("libxml2-dev @target")
|
||||||
|
builddep("libpython-dev @target")
|
||||||
|
builddep("libexpat")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure([
|
||||||
|
"--prefix=/",
|
||||||
|
f"--libdir={get_prefix('libxslt')}/lib",
|
||||||
|
f"--bindir={get_prefix('libxslt-tools')}/bin",
|
||||||
|
f"--includedir={get_prefix('libxslt-dev')}/include",
|
||||||
|
"--without-debug",
|
||||||
|
])
|
||||||
|
cpp.make()
|
||||||
|
if os.path.exists("../cpp_install"):
|
||||||
|
shutil.rmtree("../cpp_install")
|
||||||
|
cpp.make_install()
|
||||||
|
os.mkdir("py")
|
||||||
|
os.rename(f"lib/{arch.get_target()}/python{python.PY3_VERSION}", "py/arch")
|
||||||
|
os.rename(f"lib/python{python.PY3_VERSION}", "py/nonarch")
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libxslt")
|
||||||
|
dep("libxml2 @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libxslt-tools")
|
||||||
|
dep("libxslt (same)")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libxslt-dev")
|
||||||
|
dep("libxslt (same)")
|
||||||
|
dep("libxml2-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|
||||||
|
def pack_py(composer):
|
||||||
|
composer.makedir("lib")
|
||||||
|
composer.add_dir("py/arch", f"lib/python{python.PY3_VERSION}", merge=True)
|
||||||
|
composer.add_dir("py/nonarch", f"lib/python{python.PY3_VERSION}", merge=True)
|
||||||
|
|
||||||
|
package("libxslt.py")
|
||||||
|
python.version(upstream_version)
|
||||||
|
dep(f"libxslt (={upstream_version}) @same-arch")
|
||||||
|
on_pack(pack_py)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# SemiOS PAM service config for un-as operations,
|
||||||
|
# like sudo.
|
||||||
|
|
||||||
|
auth required pam_semios.so
|
||||||
|
account required pam_semios.so
|
||||||
|
password required pam_permit.so
|
||||||
|
session required pam_permit.so
|
||||||
@@ -5,7 +5,7 @@ from lib import arch, cpp
|
|||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
version("1.7.2")
|
version("1.7.2+1")
|
||||||
description("Linux PAM (Pluggable Authentication Modules for Linux) project")
|
description("Linux PAM (Pluggable Authentication Modules for Linux) project")
|
||||||
maintainer("sisungo <[email protected]>")
|
maintainer("sisungo <[email protected]>")
|
||||||
source_url("https://github.com/linux-pam/linux-pam/releases/download/v1.7.2/Linux-PAM-1.7.2.tar.xz")
|
source_url("https://github.com/linux-pam/linux-pam/releases/download/v1.7.2/Linux-PAM-1.7.2.tar.xz")
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-L/lib/aarch64-semios-linux
|
||||||
|
-B/lib/aarch64-semios-linux
|
||||||
|
-rtlib=compiler-rt
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
-stdlib=libc++
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-L/lib/riscv64-semios-linux
|
||||||
|
-B/lib/riscv64-semios-linux
|
||||||
|
-rtlib=compiler-rt
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-L/lib/wasm32-semios-wasip3
|
||||||
|
-B/lib/wasm32-semios-wasip3
|
||||||
|
-rtlib=compiler-rt
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-L/lib/x86_64-semios-linux
|
||||||
|
-B/lib/x86_64-semios-linux
|
||||||
|
-rtlib=compiler-rt
|
||||||
@@ -4,16 +4,17 @@ import shutil
|
|||||||
import glob
|
import glob
|
||||||
|
|
||||||
import lib
|
import lib
|
||||||
from lib import arch, cpp
|
from lib import arch, cpp, packie
|
||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
pkgver = "23.1.3"
|
|
||||||
|
pkgver = "23.1.4"
|
||||||
[pkgver_major, pkgver_minor, pkgver_rev] = pkgver.split(".")
|
[pkgver_major, pkgver_minor, pkgver_rev] = pkgver.split(".")
|
||||||
|
|
||||||
version(pkgver)
|
version(pkgver)
|
||||||
description("a collection of modular and reusable compiler and toolchain technologies")
|
description("a collection of modular and reusable compiler and toolchain technologies")
|
||||||
maintainer("sisungo <[email protected]>")
|
maintainer("sisungo <[email protected]>")
|
||||||
source_managed("github://llvm/llvm-project#llvmorg-23.1.3")
|
source_managed("github://llvm/llvm-project#llvmorg-23.1.4")
|
||||||
|
|
||||||
builddep("shortcut/c++")
|
builddep("shortcut/c++")
|
||||||
builddep("shortcut/cmake")
|
builddep("shortcut/cmake")
|
||||||
@@ -42,6 +43,7 @@ def cmake(sourcedir, args):
|
|||||||
|
|
||||||
"-DLLVM_ENABLE_EH=ON",
|
"-DLLVM_ENABLE_EH=ON",
|
||||||
"-DLLVM_ENABLE_RTTI=ON",
|
"-DLLVM_ENABLE_RTTI=ON",
|
||||||
|
"-DLLVM_ENABLE_ZLIB=FORCE_ON",
|
||||||
"-DLLVM_ENABLE_ASSERTIONS=OFF",
|
"-DLLVM_ENABLE_ASSERTIONS=OFF",
|
||||||
"-DLLVM_BUILD_LLVM_DYLIB=ON",
|
"-DLLVM_BUILD_LLVM_DYLIB=ON",
|
||||||
"-DLLVM_LINK_LLVM_DYLIB=ON",
|
"-DLLVM_LINK_LLVM_DYLIB=ON",
|
||||||
@@ -49,6 +51,9 @@ def cmake(sourcedir, args):
|
|||||||
"-DLLVM_ENABLE_LIBCXX=ON",
|
"-DLLVM_ENABLE_LIBCXX=ON",
|
||||||
"-DLLVM_ENABLE_LLD=ON",
|
"-DLLVM_ENABLE_LLD=ON",
|
||||||
"-DLLVM_ENABLE_FFI=ON",
|
"-DLLVM_ENABLE_FFI=ON",
|
||||||
|
|
||||||
|
f"-DZLIB_LIBRARY={packie.prefix_of('libz-ng')}/lib/libz.so",
|
||||||
|
f"-DZLIB_INCLUDE_DIR={packie.prefix_of('libz-ng-dev')}/include",
|
||||||
]
|
]
|
||||||
subprocess.run(template_args + args, check=True)
|
subprocess.run(template_args + args, check=True)
|
||||||
subprocess.run(["cmake", "--build", builddir], check=True)
|
subprocess.run(["cmake", "--build", builddir], check=True)
|
||||||
@@ -132,6 +137,7 @@ def build_clang():
|
|||||||
"-DCLANG_DEFAULT_CXX_STDLIB=libc++",
|
"-DCLANG_DEFAULT_CXX_STDLIB=libc++",
|
||||||
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
|
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
|
||||||
"-DLLVM_INCLUDE_TESTS=OFF",
|
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||||
|
f"-DCLANG_CONFIG_FILE_SYSTEM_DIR={get_prefix('clang')}/share/cfg",
|
||||||
f"-DC_INCLUDE_DIRS=/lib/{arch.get_target()}/include:{get_prefix('clang')}/lib/clang/{pkgver_major}/include",
|
f"-DC_INCLUDE_DIRS=/lib/{arch.get_target()}/include:{get_prefix('clang')}/lib/clang/{pkgver_major}/include",
|
||||||
]
|
]
|
||||||
cmake("clang", import_llvm() + options)
|
cmake("clang", import_llvm() + options)
|
||||||
@@ -191,10 +197,15 @@ dep("libunwind @same-arch")
|
|||||||
dep("libcxx @same-arch")
|
dep("libcxx @same-arch")
|
||||||
dep("libcxxabi @same-arch")
|
dep("libcxxabi @same-arch")
|
||||||
dep("libffi @same-arch")
|
dep("libffi @same-arch")
|
||||||
|
dep("libz @same-arch")
|
||||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/*.so*"]))
|
on_pack(lambda composer: auto_pack_glob(composer, ["lib/*.so*"]))
|
||||||
|
|
||||||
package("libllvm-dev")
|
package("libllvm-dev")
|
||||||
dep("libllvm (same)")
|
dep("libllvm (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libcxx-dev @same-arch")
|
||||||
|
dep("libffi-dev @same-arch")
|
||||||
|
dep("libz-dev @same-arch")
|
||||||
on_pack(lambda composer: auto_pack_dev(composer, "llvm", ["llvm-config"]))
|
on_pack(lambda composer: auto_pack_dev(composer, "llvm", ["llvm-config"]))
|
||||||
|
|
||||||
package("libllvm-static")
|
package("libllvm-static")
|
||||||
@@ -210,6 +221,7 @@ dep("libllvm (same)")
|
|||||||
on_pack(pack_llvm)
|
on_pack(pack_llvm)
|
||||||
for i in ["strip", "ar", "ranlib", "readelf", "objcopy", "objdump", "strings", "nm"]:
|
for i in ["strip", "ar", "ranlib", "readelf", "objcopy", "objdump", "strings", "nm"]:
|
||||||
link(f"bin/llvm-{i}", f"/bin/{i}")
|
link(f"bin/llvm-{i}", f"/bin/{i}")
|
||||||
|
link("bin/llvm-cxxfilt", "/bin/c++filt")
|
||||||
|
|
||||||
|
|
||||||
enter_install("bolt")
|
enter_install("bolt")
|
||||||
@@ -232,6 +244,7 @@ package("libclang-dev")
|
|||||||
dep("libclang (same)")
|
dep("libclang (same)")
|
||||||
on_pack(lambda composer: auto_pack_dev(composer, "clang"))
|
on_pack(lambda composer: auto_pack_dev(composer, "clang"))
|
||||||
|
|
||||||
|
clang_cfgdir = os.getcwd() + "/clang-cfg"
|
||||||
def pack_clang(composer):
|
def pack_clang(composer):
|
||||||
# Add base files
|
# Add base files
|
||||||
composer.add_dir("bin", "bin")
|
composer.add_dir("bin", "bin")
|
||||||
@@ -257,12 +270,7 @@ def pack_clang(composer):
|
|||||||
os.symlink(f"/lib/{arch.get_target()}/include", f"{composer.workdir}/bundle/include")
|
os.symlink(f"/lib/{arch.get_target()}/include", f"{composer.workdir}/bundle/include")
|
||||||
|
|
||||||
# Add configuration
|
# Add configuration
|
||||||
clang_cfg = f"-L/lib/{arch.get_target()}\n-B/lib/{arch.get_target()}\n-rtlib=compiler-rt\n"
|
composer.add_dir(clang_cfgdir, "share/cfg")
|
||||||
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")
|
package("clang")
|
||||||
dep("libclang (same)")
|
dep("libclang (same)")
|
||||||
|
|||||||
@@ -0,0 +1,130 @@
|
|||||||
|
from lib.make import *
|
||||||
|
from lib import cpp
|
||||||
|
|
||||||
|
|
||||||
|
version("0.41.0")
|
||||||
|
description("Command line media player")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://mpv-player/mpv#v0.41.0")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/meson")
|
||||||
|
builddep("libwayland-dev @target")
|
||||||
|
builddep("wayland-protocols @target")
|
||||||
|
builddep("libxkbcommon-dev @target")
|
||||||
|
builddep("xkeyboard-config")
|
||||||
|
builddep("libplacebo-dev @target")
|
||||||
|
builddep("libass-dev @target")
|
||||||
|
builddep("libavcodec-dev @target")
|
||||||
|
builddep("libavdevice-dev @target")
|
||||||
|
builddep("libavfilter-dev @target")
|
||||||
|
builddep("libavutil-dev @target")
|
||||||
|
builddep("libswresample-dev @target")
|
||||||
|
builddep("libswscale-dev @target")
|
||||||
|
builddep("libjpeg-turbo-dev @target")
|
||||||
|
builddep("libcurl-dev @target")
|
||||||
|
builddep("libarchive-dev @target")
|
||||||
|
builddep("liblcms-dev @target")
|
||||||
|
builddep("libz-dev @target")
|
||||||
|
builddep("alsa-lib-dev @target")
|
||||||
|
builddep("linux-dev @target")
|
||||||
|
builddep("libva-dev @target")
|
||||||
|
builddep("libegl-dev @target")
|
||||||
|
builddep("libdrm-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.meson_setup([
|
||||||
|
"-Dgpl=true",
|
||||||
|
"-Dcplayer=true",
|
||||||
|
"-Dlibmpv=true",
|
||||||
|
"-Dbuild-date=true",
|
||||||
|
"-Dtests=false",
|
||||||
|
"-Dfuzzers=false",
|
||||||
|
|
||||||
|
"-Dcdda=disabled",
|
||||||
|
"-Dcplugins=disabled",
|
||||||
|
"-Ddvbin=disabled",
|
||||||
|
"-Ddvdnav=disabled",
|
||||||
|
"-Diconv=enabled",
|
||||||
|
"-Djavascript=disabled",
|
||||||
|
"-Djpeg=enabled",
|
||||||
|
"-Dlcms2=enabled",
|
||||||
|
"-Dlibarchive=enabled",
|
||||||
|
"-Dlibavdevice=enabled",
|
||||||
|
"-Dlibbluray=disabled",
|
||||||
|
"-Dlua=disabled",
|
||||||
|
"-Dpthread-debug=disabled",
|
||||||
|
"-Drubberband=disabled",
|
||||||
|
"-Dsdl2-gamepad=disabled",
|
||||||
|
"-Duchardet=disabled",
|
||||||
|
"-Dvapoursynth=disabled",
|
||||||
|
"-Dx11-clipboard=disabled",
|
||||||
|
"-Dzimg=disabled",
|
||||||
|
"-Dzlib=enabled",
|
||||||
|
|
||||||
|
"-Dalsa=enabled",
|
||||||
|
|
||||||
|
"-Degl=enabled",
|
||||||
|
"-Degl-wayland=enabled",
|
||||||
|
"-Dvaapi=enabled",
|
||||||
|
"-Dvaapi-wayland=enabled",
|
||||||
|
"-Dwayland=enabled",
|
||||||
|
|
||||||
|
])
|
||||||
|
cpp.meson_compile()
|
||||||
|
cpp.meson_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libmpv")
|
||||||
|
dep("libass @same-arch")
|
||||||
|
dep("libavcodec @same-arch")
|
||||||
|
dep("libavfilter @same-arch")
|
||||||
|
dep("libavformat @same-arch")
|
||||||
|
dep("libavutil @same-arch")
|
||||||
|
dep("libplacebo @same-arch")
|
||||||
|
dep("libswresample @same-arch")
|
||||||
|
dep("libswscale @same-arch")
|
||||||
|
dep("liblcms @same-arch")
|
||||||
|
dep("libarchive @same-arch")
|
||||||
|
dep("libavdevice @same-arch")
|
||||||
|
dep("libz @same-arch")
|
||||||
|
dep("alsa-lib @same-arch")
|
||||||
|
dep("libjpeg-turbo @same-arch")
|
||||||
|
dep("libwayland @same-arch")
|
||||||
|
dep("libxkbcommon @same-arch")
|
||||||
|
dep("libvulkan @same-arch")
|
||||||
|
dep("libegl @same-arch")
|
||||||
|
dep("libva @same-arch")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libmpv-dev")
|
||||||
|
dep("libmpv (same)")
|
||||||
|
dep("libass-dev @same-arch")
|
||||||
|
dep("libavcodec-dev @same-arch")
|
||||||
|
dep("libavfilter-dev @same-arch")
|
||||||
|
dep("libavformat-dev @same-arch")
|
||||||
|
dep("libavutil-dev @same-arch")
|
||||||
|
dep("libplacebo-dev @same-arch")
|
||||||
|
dep("libswresample-dev @same-arch")
|
||||||
|
dep("libswscale-dev @same-arch")
|
||||||
|
dep("liblcms-dev @same-arch")
|
||||||
|
dep("libarchive-dev @same-arch")
|
||||||
|
dep("libavdevice-dev @same-arch")
|
||||||
|
dep("libz-dev @same-arch")
|
||||||
|
dep("alsa-lib-dev @same-arch")
|
||||||
|
dep("libjpeg-turbo-dev @same-arch")
|
||||||
|
dep("libwayland-dev @same-arch")
|
||||||
|
dep("libxkbcommon-dev @same-arch")
|
||||||
|
dep("libvulkan-dev @same-arch")
|
||||||
|
dep("libegl-dev @same-arch")
|
||||||
|
dep("libva-dev @same-arch")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|
||||||
|
package("mpv")
|
||||||
|
dep("libmpv (same)")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from lib.make import *
|
||||||
|
from lib import cpp
|
||||||
|
|
||||||
|
version("2.7.0")
|
||||||
|
description("a small build system with a focus on speed")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://cisco/openh264#v2.7.0")
|
||||||
|
|
||||||
|
builddep("shortcut/c++")
|
||||||
|
builddep("shortcut/meson")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.meson_setup([
|
||||||
|
"--prefix=/",
|
||||||
|
"-Dtests=disabled",
|
||||||
|
])
|
||||||
|
cpp.meson_compile()
|
||||||
|
cpp.meson_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libopenh264")
|
||||||
|
dep("libcxxabi @same-arch")
|
||||||
|
dep("libunwind @same-arch")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libopenh264-dev")
|
||||||
|
dep("libopenh264 (same)")
|
||||||
|
dep("libcxx-dev @same-arch")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
--- a/src/hotspot/os/posix/forbiddenFunctions_posix.hpp 2026-10-30 05:15:11.792623724 +0000
|
||||||
|
+++ b/src/hotspot/os/posix/forbiddenFunctions_posix.hpp 2026-10-30 05:16:01.186833948 +0000
|
||||||
|
@@ -37,25 +37,25 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// POSIX puts _exit in <unistd.h>.
|
||||||
|
-FORBID_IMPORTED_NORETURN_C_FUNCTION(void _exit(int), /* not noexcept */, "use os::exit")
|
||||||
|
+//FORBID_IMPORTED_NORETURN_C_FUNCTION(void _exit(int), /* not noexcept */, "use os::exit")
|
||||||
|
|
||||||
|
// If needed, add os::strndup and use that instead.
|
||||||
|
-FORBID_C_FUNCTION(char* strndup(const char*, size_t), noexcept, "don't use");
|
||||||
|
+//FORBID_C_FUNCTION(char* strndup(const char*, size_t), noexcept, "don't use");
|
||||||
|
|
||||||
|
// realpath with a null second argument mallocs a string for the result.
|
||||||
|
// With a non-null second argument, there is a risk of buffer overrun.
|
||||||
|
-PRAGMA_DIAG_PUSH
|
||||||
|
-FORBIDDEN_FUNCTION_IGNORE_CLANG_FORTIFY_WARNING
|
||||||
|
-FORBID_C_FUNCTION(char* realpath(const char*, char*), noexcept, "use os::realpath");
|
||||||
|
-PRAGMA_DIAG_POP
|
||||||
|
+//PRAGMA_DIAG_PUSH
|
||||||
|
+//FORBIDDEN_FUNCTION_IGNORE_CLANG_FORTIFY_WARNING
|
||||||
|
+//FORBID_C_FUNCTION(char* realpath(const char*, char*), noexcept, "use os::realpath");
|
||||||
|
+//PRAGMA_DIAG_POP
|
||||||
|
|
||||||
|
// Returns a malloc'ed string.
|
||||||
|
-FORBID_C_FUNCTION(char* get_current_dir_name(), noexcept, "use os::get_current_directory");
|
||||||
|
+//FORBID_C_FUNCTION(char* get_current_dir_name(), noexcept, "use os::get_current_directory");
|
||||||
|
|
||||||
|
// Problematic API that should never be used.
|
||||||
|
-FORBID_C_FUNCTION(char* getwd(char*), noexcept, "use os::get_current_directory");
|
||||||
|
+//FORBID_C_FUNCTION(char* getwd(char*), noexcept, "use os::get_current_directory");
|
||||||
|
|
||||||
|
// BSD utility that is subtly different from realloc.
|
||||||
|
-FORBID_C_FUNCTION(void* reallocf(void*, size_t), /* not noexcept */, "use os::realloc");
|
||||||
|
+//FORBID_C_FUNCTION(void* reallocf(void*, size_t), /* not noexcept */, "use os::realloc");
|
||||||
|
|
||||||
|
#endif // OS_POSIX_FORBIDDENFUNCTIONS_POSIX_HPP
|
||||||
|
|
||||||
|
|
||||||
|
--- a/src/hotspot/share/cppstdlib/cstdlib.hpp 2026-08-19 14:06:10.000000000 +0000
|
||||||
|
+++ b/src/hotspot/share/cppstdlib/cstdlib.hpp 2026-10-30 05:19:23.272251678 +0000
|
||||||
|
@@ -76,30 +76,30 @@
|
||||||
|
#endif // AIX altivec allocator support
|
||||||
|
|
||||||
|
// Prefer os:: variants of these.
|
||||||
|
-FORBID_IMPORTED_NORETURN_C_FUNCTION(void exit(int), noexcept, "use os::exit")
|
||||||
|
-FORBID_IMPORTED_NORETURN_C_FUNCTION(void _Exit(int), noexcept, "use os::exit")
|
||||||
|
+//FORBID_IMPORTED_NORETURN_C_FUNCTION(void exit(int), noexcept, "use os::exit")
|
||||||
|
+//FORBID_IMPORTED_NORETURN_C_FUNCTION(void _Exit(int), noexcept, "use os::exit")
|
||||||
|
|
||||||
|
// Windows puts _exit in <stdlib.h>. POSIX puts it in <unistd.h>.
|
||||||
|
// We can't forbid it here when using clang if it's not in <stdlib.h> - see
|
||||||
|
// the clang definition for FORBIDDEN_FUNCTION_NORETURN_ATTRIBUTE.
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
-FORBID_IMPORTED_NORETURN_C_FUNCTION(void _exit(int), /* not noexcept */, "use os::exit")
|
||||||
|
+//FORBID_IMPORTED_NORETURN_C_FUNCTION(void _exit(int), /* not noexcept */, "use os::exit")
|
||||||
|
#endif // _WINDOWS
|
||||||
|
|
||||||
|
// These functions return raw C-heap pointers or, in case of free(), take raw
|
||||||
|
// C-heap pointers. We generally want allocation to be done through NMT, using
|
||||||
|
// os::malloc and friends.
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(void* malloc(size_t), noexcept, "use os::malloc");
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(void free(void*), noexcept, "use os::free");
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(void* calloc(size_t, size_t), noexcept, "use os::malloc and zero out manually");
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(void* realloc(void*, size_t), noexcept, "use os::realloc");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(void* malloc(size_t), noexcept, "use os::malloc");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(void free(void*), noexcept, "use os::free");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(void* calloc(size_t, size_t), noexcept, "use os::malloc and zero out manually");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(void* realloc(void*, size_t), noexcept, "use os::realloc");
|
||||||
|
|
||||||
|
// These are not provided (and are unimplementable?) by Windows.
|
||||||
|
// https://stackoverflow.com/questions/62962839/stdaligned-alloc-missing-from-visual-studio-2019
|
||||||
|
// They also aren't useful for a POSIX implementation of NMT.
|
||||||
|
#ifndef _WINDOWS
|
||||||
|
-FORBID_C_FUNCTION(void* aligned_alloc(size_t, size_t), noexcept, "don't use");
|
||||||
|
-FORBID_C_FUNCTION(int posix_memalign(void**, size_t, size_t), noexcept, "don't use");
|
||||||
|
+//FORBID_C_FUNCTION(void* aligned_alloc(size_t, size_t), noexcept, "don't use");
|
||||||
|
+//FORBID_C_FUNCTION(int posix_memalign(void**, size_t, size_t), noexcept, "don't use");
|
||||||
|
#endif // !_WINDOWS
|
||||||
|
|
||||||
|
#endif // SHARE_CPPSTDLIB_CSTDLIB_HPP
|
||||||
|
|
||||||
|
|
||||||
|
--- a/src/hotspot/share/utilities/forbiddenFunctions.hpp 2026-08-19 14:06:10.000000000 +0000
|
||||||
|
+++ b/src/hotspot/share/utilities/forbiddenFunctions.hpp 2026-10-30 05:21:27.402739421 +0000
|
||||||
|
@@ -43,28 +43,28 @@
|
||||||
|
// or have security concerns, either with preferred alternatives, or to be
|
||||||
|
// avoided entirely.
|
||||||
|
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(char* strerror(int), noexcept, "use os::strerror");
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(char* strtok(char*, const char*), noexcept, "use strtok_r");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(char* strerror(int), noexcept, "use os::strerror");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(char* strtok(char*, const char*), noexcept, "use strtok_r");
|
||||||
|
|
||||||
|
// AIX declarations for sprintf and snprintf are not noexcept, which is
|
||||||
|
// inconsistent with most other system header declarations, including being
|
||||||
|
// inconsistent with vsprintf and fsnprintf.
|
||||||
|
-FORBID_C_FUNCTION(int sprintf(char*, const char*, ...), NOT_AIX(noexcept), "use os::snprintf");
|
||||||
|
-FORBID_C_FUNCTION(int snprintf(char*, size_t, const char*, ...), NOT_AIX(noexcept), "use os::snprintf");
|
||||||
|
+//FORBID_C_FUNCTION(int sprintf(char*, const char*, ...), NOT_AIX(noexcept), "use os::snprintf");
|
||||||
|
+//FORBID_C_FUNCTION(int snprintf(char*, size_t, const char*, ...), NOT_AIX(noexcept), "use os::snprintf");
|
||||||
|
|
||||||
|
PRAGMA_DIAG_PUSH
|
||||||
|
FORBIDDEN_FUNCTION_IGNORE_CLANG_FORTIFY_WARNING
|
||||||
|
-FORBID_C_FUNCTION(int vsprintf(char*, const char*, va_list), noexcept, "use os::vsnprintf");
|
||||||
|
-FORBID_C_FUNCTION(int vsnprintf(char*, size_t, const char*, va_list), noexcept, "use os::vsnprintf");
|
||||||
|
+//FORBID_C_FUNCTION(int vsprintf(char*, const char*, va_list), noexcept, "use os::vsnprintf");
|
||||||
|
+//FORBID_C_FUNCTION(int vsnprintf(char*, size_t, const char*, va_list), noexcept, "use os::vsnprintf");
|
||||||
|
PRAGMA_DIAG_POP
|
||||||
|
|
||||||
|
// All of the following functions return raw C-heap pointers. We generally
|
||||||
|
// want allocation to be done through NMT.
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(char* strdup(const char *s), noexcept, "use os::strdup");
|
||||||
|
-FORBID_IMPORTED_C_FUNCTION(wchar_t* wcsdup(const wchar_t *s), noexcept, "don't use");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(char* strdup(const char *s), noexcept, "use os::strdup");
|
||||||
|
+//FORBID_IMPORTED_C_FUNCTION(wchar_t* wcsdup(const wchar_t *s), noexcept, "don't use");
|
||||||
|
|
||||||
|
// Disallow non-wrapped raw library function.
|
||||||
|
-MACOS_AARCH64_ONLY(FORBID_C_FUNCTION(void pthread_jit_write_protect_np(int enabled), noexcept, \
|
||||||
|
- "use os::current_thread_enable_wx");)
|
||||||
|
+//MACOS_AARCH64_ONLY(FORBID_C_FUNCTION(void pthread_jit_write_protect_np(int enabled), noexcept, \
|
||||||
|
+// "use os::current_thread_enable_wx");)
|
||||||
|
|
||||||
|
#endif // SHARE_UTILITIES_FORBIDDENFUNCTIONS_HPP
|
||||||
|
|
||||||
|
--- a/src/jdk.jpackage/share/native/common/SysInfo.h 2026-08-19 14:06:10.000000000 +0000
|
||||||
|
+++ b/src/jdk.jpackage/share/native/common/SysInfo.h 2026-11-01 05:19:38.503721391 +0000
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#define SYSINFO_H
|
||||||
|
|
||||||
|
#include "tstrings.h"
|
||||||
|
+#include <new>
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
--- a/src/jdk.jpackage/linux/native/libapplauncher/Package.cpp 2026-08-19 14:06:10.000000000 +0000
|
||||||
|
+++ b/src/jdk.jpackage/linux/native/libapplauncher/Package.cpp 2026-11-01 05:21:02.547026922 +0000
|
||||||
|
@@ -28,6 +28,8 @@
|
||||||
|
#include "AppLauncher.h"
|
||||||
|
#include "ErrorHandling.h"
|
||||||
|
|
||||||
|
+#include <new>
|
||||||
|
+
|
||||||
|
|
||||||
|
Package::Package(): type(Unknown) {
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
import subprocess
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
|
||||||
|
from lib import cpp, packie
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("27.0.0")
|
||||||
|
description("JDK implementation of the OpenJDK project.")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://openjdk/jdk#v27ga")
|
||||||
|
|
||||||
|
builddep("shortcut/c++")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
builddep("pkgconf @target")
|
||||||
|
builddep("libjpeg-turbo-dev @target")
|
||||||
|
builddep("liblcms-dev @target")
|
||||||
|
builddep("libpng-dev @target")
|
||||||
|
builddep("libharfbuzz-dev @target")
|
||||||
|
builddep("libfreetype-dev @target")
|
||||||
|
builddep("libffi-dev @target")
|
||||||
|
builddep("alsa-lib-dev @target")
|
||||||
|
builddep("cups-dev @target")
|
||||||
|
builddep("linux-dev @target")
|
||||||
|
builddep("bash")
|
||||||
|
builddep("file")
|
||||||
|
builddep("zip")
|
||||||
|
builddep("openjdk @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
os.environ["CC"] = "clang"
|
||||||
|
os.environ["CXX"] = "clang++"
|
||||||
|
cpp.configure([
|
||||||
|
"--enable-headless-only",
|
||||||
|
"--enable-jvm-feature-cds",
|
||||||
|
"--enable-jvm-feature-compiler1",
|
||||||
|
"--enable-jvm-feature-compiler2",
|
||||||
|
"--enable-jvm-feature-epsilongc",
|
||||||
|
"--enable-jvm-feature-g1gc",
|
||||||
|
"--enable-jvm-feature-jfr",
|
||||||
|
"--enable-jvm-feature-jni-check",
|
||||||
|
"--enable-jvm-feature-jvmti",
|
||||||
|
#"--enable-jvm-feature-link-time-opt",
|
||||||
|
"--enable-jvm-feature-management",
|
||||||
|
"--enable-jvm-feature-parallelgc",
|
||||||
|
"--enable-jvm-feature-serialgc",
|
||||||
|
"--enable-jvm-feature-services",
|
||||||
|
"--enable-jvm-feature-shenandoahgc",
|
||||||
|
"--enable-jvm-feature-vm-structs",
|
||||||
|
"--enable-jvm-feature-zgc",
|
||||||
|
"--with-build-user=root",
|
||||||
|
"--with-vendor-name=SemiOS",
|
||||||
|
"--with-vendor-url=https://os.semilabs.org",
|
||||||
|
"--with-vendor-bug-url=https://gitea.semilabs.org/semios/ports/issues/new",
|
||||||
|
"--with-vendor-vm-bug-url=https://gitea.semilabs.org/semios/ports/issues/new",
|
||||||
|
"--with-toolchain-type=clang",
|
||||||
|
"--with-stdc++lib=dynamic",
|
||||||
|
f"--with-freetype-include={packie.prefix_of('libfreetype-dev')}/include",
|
||||||
|
f"--with-freetype-lib={packie.prefix_of('libfreetype')}/lib",
|
||||||
|
"--with-lcms=system",
|
||||||
|
"--with-libpng=system",
|
||||||
|
"--with-harfbuzz=system",
|
||||||
|
"--with-libjpeg=system",
|
||||||
|
"--with-copyright-year=2026",
|
||||||
|
"--disable-warnings-as-errors",
|
||||||
|
])
|
||||||
|
subprocess.run(
|
||||||
|
["make", "images", "SOURCE_DATE_ISO_8601=2026-11-01T00:00:00Z"],
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
os.chdir(glob.glob("./build/*-release/images/jdk")[0])
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack(composer):
|
||||||
|
composer.add("bin")
|
||||||
|
composer.add("conf")
|
||||||
|
composer.add("demo")
|
||||||
|
composer.add("include")
|
||||||
|
composer.add("jmods")
|
||||||
|
composer.add("legal")
|
||||||
|
composer.add("lib")
|
||||||
|
composer.add("release")
|
||||||
|
|
||||||
|
package("openjdk")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
on_pack(pack)
|
||||||
@@ -5,14 +5,14 @@ from lib import arch, cpp
|
|||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
full_version = "3.15.1"
|
full_version = "3.15.2"
|
||||||
[major_version, minor_version, rev_version] = full_version.split('.')
|
[major_version, minor_version, rev_version] = full_version.split('.')
|
||||||
base_version = f"{major_version}.{minor_version}"
|
base_version = f"{major_version}.{minor_version}"
|
||||||
|
|
||||||
version(full_version)
|
version(full_version)
|
||||||
description("the Python programming language")
|
description("the Python programming language")
|
||||||
maintainer("sisungo <[email protected]>")
|
maintainer("sisungo <[email protected]>")
|
||||||
source_managed("github://python/cpython#v3.15.1")
|
source_managed("github://python/cpython#v3.15.2")
|
||||||
|
|
||||||
builddep("shortcut/c")
|
builddep("shortcut/c")
|
||||||
builddep("shortcut/autotools")
|
builddep("shortcut/autotools")
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
from lib.make import *
|
||||||
|
from lib import cpp, arch
|
||||||
|
|
||||||
|
|
||||||
|
version("4.0.9")
|
||||||
|
description("an open-source, object-oriented programming language")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.9.tar.gz")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure([
|
||||||
|
"--enable-rpath",
|
||||||
|
"--enable-shared",
|
||||||
|
"--disable-yjit",
|
||||||
|
"--disable-zjit",
|
||||||
|
"--without-git",
|
||||||
|
"--without-gcc",
|
||||||
|
"--without-gmp",
|
||||||
|
"--without-jemalloc",
|
||||||
|
])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
import lib.cpp as cpp, packie
|
import lib.cpp as cpp, packie
|
||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
version("3.53.4")
|
|
||||||
|
version("3.54.1")
|
||||||
description("a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine")
|
description("a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine")
|
||||||
maintainer("sisungo <[email protected]>")
|
maintainer("sisungo <[email protected]>")
|
||||||
source_url("https://sqlite.org/2026/sqlite-autoconf-3530400.tar.gz")
|
source_url("https://sqlite.org/2026/sqlite-autoconf-3540100.tar.gz")
|
||||||
|
|
||||||
builddep("shortcut/autotools")
|
builddep("shortcut/autotools")
|
||||||
builddep("shortcut/c")
|
builddep("shortcut/c")
|
||||||
@@ -26,17 +25,19 @@ def build():
|
|||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
package("libsqlite")
|
package("libsqlite")
|
||||||
cpp.use_auto_pack(["lib"])
|
|
||||||
dep("semi-libc @same-arch")
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
package("sqlite")
|
package("sqlite")
|
||||||
cpp.use_auto_pack(["bin"])
|
dep("semi-libc @same-arch")
|
||||||
dep("libsqlite (same)")
|
dep("libsqlite (same)")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
package("libsqlite-dev")
|
package("libsqlite-dev")
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
dep("libsqlite (same)")
|
dep("libsqlite (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
from lib import rust
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("2.44.1")
|
||||||
|
description("A cross-platform, high-performance and asynchronous web server for static files-serving.")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://static-web-server/static-web-server#v2.44.1", "rust")
|
||||||
|
|
||||||
|
builddep("shortcut/rust")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
rust.build()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("static-web-server")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
rust.use_auto_pack(["bin"])
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
## sudoers file.
|
||||||
|
##
|
||||||
|
## This file SHOULD be edited with the 'visudo' command as root.
|
||||||
|
## Failure to use 'visudo' may result in syntax or file permission errors
|
||||||
|
## that prevent sudo from running.
|
||||||
|
##
|
||||||
|
## See the sudoers man page for the details on how to write a sudoers file.
|
||||||
|
|
||||||
|
## Defaults specification
|
||||||
|
##
|
||||||
|
## Preserve editor environment variables for visudo.
|
||||||
|
## To preserve these for all commands, remove the "!visudo" qualifier.
|
||||||
|
Defaults!/bin/visudo env_keep += "SUDO_EDITOR EDITOR VISUAL"
|
||||||
|
##
|
||||||
|
## Use a hard-coded PATH instead of the user's to find commands.
|
||||||
|
## This also helps prevent poorly written scripts from running
|
||||||
|
## arbitrary commands under sudo.
|
||||||
|
Defaults secure_path="/bin"
|
||||||
|
##
|
||||||
|
## Uncomment this to allow commands run by sudo to see the
|
||||||
|
## environment variables set by sshd(8).
|
||||||
|
# Defaults env_keep += "SSH_*"
|
||||||
|
##
|
||||||
|
## Uncomment to disable "use_pty" when running commands as root.
|
||||||
|
## Commands run as non-root users will run in a pseudo-terminal,
|
||||||
|
## not the user's own terminal, to prevent command injection.
|
||||||
|
# Defaults>root !use_pty
|
||||||
|
##
|
||||||
|
## Uncomment if the historical silent password prompt is desired
|
||||||
|
# Defaults !pwfeedback
|
||||||
|
|
||||||
|
### User privilege specifications
|
||||||
|
|
||||||
|
## Allow root to execute any command
|
||||||
|
root ALL=(ALL:ALL) ALL
|
||||||
|
|
||||||
|
## Allow members of group wheel to execute any command
|
||||||
|
%wheel ALL=(ALL:ALL) ALL
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
--- a/src/sudo/mod.rs
|
||||||
|
+++ b/src/sudo/mod.rs
|
||||||
|
50,61c50,59
|
||||||
|
< let mut path = if cfg!(target_os = "freebsd") {
|
||||||
|
< option_env!("LOCALBASE").unwrap_or("/usr/local").into()
|
||||||
|
< } else {
|
||||||
|
< PathBuf::from("/")
|
||||||
|
< };
|
||||||
|
< path.push("etc/sudoers-rs");
|
||||||
|
< if !path.exists() {
|
||||||
|
< path.set_file_name("sudoers");
|
||||||
|
< };
|
||||||
|
<
|
||||||
|
< dev_info!("Running with {} file", path.display());
|
||||||
|
< path
|
||||||
|
---
|
||||||
|
> let user = PathBuf::from("/var/config/sudo/sudoers");
|
||||||
|
> if !user.exists() {
|
||||||
|
> if let Ok(mut path) = std::env::current_exe() {
|
||||||
|
> path.pop();
|
||||||
|
> path.pop();
|
||||||
|
> path.push("share/config/sudoers");
|
||||||
|
> return path;
|
||||||
|
> }
|
||||||
|
> }
|
||||||
|
> user
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
--- a/src/sudo/pam.rs
|
||||||
|
+++ b/src/sudo/pam.rs
|
||||||
|
42,43c42,43
|
||||||
|
< LaunchType::Login if cfg!(feature = "pam-login") => "sudo-i",
|
||||||
|
< LaunchType::Login | LaunchType::Shell | LaunchType::Direct => "sudo",
|
||||||
|
---
|
||||||
|
> LaunchType::Login if cfg!(feature = "pam-login") => "run-as",
|
||||||
|
> LaunchType::Login | LaunchType::Shell | LaunchType::Direct => "run-as",
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/common/resolve.rs
|
||||||
|
+++ b/src/common/resolve.rs
|
||||||
|
@@ -144,7 +144,7 @@
|
||||||
|
// when no -u or -g is specified, default to root:root
|
||||||
|
(None, None) => {
|
||||||
|
target_user = User::from_name(c"root")?;
|
||||||
|
- target_group = Group::from_name(if cfg!(target_os = "linux") {
|
||||||
|
+ target_group = Group::from_name(if false {
|
||||||
|
c"root"
|
||||||
|
} else {
|
||||||
|
c"wheel"
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import lib.rust as rust
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("0.2.15")
|
||||||
|
description("A memory safe implementation of sudo.")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://trifectatechfoundation/sudo-rs#v0.2.15", "rust")
|
||||||
|
|
||||||
|
builddep("shortcut/rust")
|
||||||
|
builddep("libpam-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
rust.build()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
configdir = os.getcwd() + "/config"
|
||||||
|
|
||||||
|
def pack(composer):
|
||||||
|
os.chdir(rust.artifacts_dir())
|
||||||
|
composer.makedir("bin")
|
||||||
|
composer.add("sudo", "bin/sudo")
|
||||||
|
composer.add("visudo", "bin/visudo")
|
||||||
|
composer.makedir("share")
|
||||||
|
composer.add(configdir, "share/config")
|
||||||
|
|
||||||
|
package("sudo")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libpam @same-arch")
|
||||||
|
on_pack(pack)
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("1.2.0")
|
||||||
|
description("theora video codec reference implementation")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://downloads.xiph.org/releases/theora/libtheora-1.2.0.tar.gz")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
builddep("libogg-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure([
|
||||||
|
"--prefix=/",
|
||||||
|
f"--libdir={get_prefix('libtheora')}/lib",
|
||||||
|
f"--includedir={get_prefix('libtheora-dev')}/include",
|
||||||
|
"--disable-oggtest",
|
||||||
|
"--disable-vorbistest",
|
||||||
|
"--disable-examples",
|
||||||
|
])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libtheora")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libogg @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libtheora-dev")
|
||||||
|
dep("libtheora (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libogg-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from lib import arch, cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("3.8")
|
||||||
|
description("the terminal multiplexer that keeps your work running")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://tmux/tmux#3.8", "autotools")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
builddep("libevent-dev @target")
|
||||||
|
builddep("libncurses-dev @target")
|
||||||
|
builddep("byacc")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
os.environ["ac_cv_search_forkpty"] = "none required"
|
||||||
|
os.environ["ac_cv_func_forkpty"] = "yes"
|
||||||
|
cpp.configure([
|
||||||
|
f"--prefix={get_prefix('tmux')}",
|
||||||
|
"--enable-optimizations",
|
||||||
|
"--enable-sixel",
|
||||||
|
])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("tmux")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libevent @same-arch")
|
||||||
|
dep("libncurses @same-arch")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
@@ -12,7 +12,7 @@ builddep("libintl-dev @target")
|
|||||||
builddep("libz-ng-dev @target")
|
builddep("libz-ng-dev @target")
|
||||||
builddep("libncurses-dev @target")
|
builddep("libncurses-dev @target")
|
||||||
|
|
||||||
version("2.42.2")
|
version("2.42.4")
|
||||||
description("a random collection of Linux utilities")
|
description("a random collection of Linux utilities")
|
||||||
maintainer("sisungo <[email protected]>")
|
maintainer("sisungo <[email protected]>")
|
||||||
source_managed("github://util-linux/util-linux#v2.42.4", "autotools")
|
source_managed("github://util-linux/util-linux#v2.42.4", "autotools")
|
||||||
@@ -124,6 +124,7 @@ package("util-linux-swap")
|
|||||||
dep("libblkid (same)")
|
dep("libblkid (same)")
|
||||||
dep("libmount (same)")
|
dep("libmount (same)")
|
||||||
dep("libsmartcols (same)")
|
dep("libsmartcols (same)")
|
||||||
|
dep("libuuid (same)")
|
||||||
on_pack(lambda composer: pack_bin(composer, ["sbin/swaplabel", "sbin/swapoff", "sbin/swapon", "sbin/mkswap"]))
|
on_pack(lambda composer: pack_bin(composer, ["sbin/swaplabel", "sbin/swapoff", "sbin/swapon", "sbin/mkswap"]))
|
||||||
|
|
||||||
package("util-linux-mount")
|
package("util-linux-mount")
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
from lib import rust
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("50.0.1")
|
||||||
|
description("A lightweight WebAssembly runtime that is fast, secure, and standards-compliant")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_managed("github://bytecodealliance/wasmtime#v50.0.1", "rust")
|
||||||
|
|
||||||
|
builddep("shortcut/rust")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
rust.build([])
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("wasmtime")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libunwind @same-arch")
|
||||||
|
rust.use_auto_pack(["bin"])
|
||||||
@@ -60,7 +60,7 @@ def load_pkgbuild(pkgname):
|
|||||||
|
|
||||||
def run_hooks(map, arg: typing.Any = None):
|
def run_hooks(map, arg: typing.Any = None):
|
||||||
current_dir = os.getcwd()
|
current_dir = os.getcwd()
|
||||||
for n in map.keys():
|
for n in map:
|
||||||
if n in lib.make._blocked_hooks:
|
if n in lib.make._blocked_hooks:
|
||||||
continue
|
continue
|
||||||
if arg:
|
if arg:
|
||||||
@@ -84,7 +84,7 @@ def cmd_build_package(package: str):
|
|||||||
|
|
||||||
# Check architecture support
|
# Check architecture support
|
||||||
if not lib.make._supported_arch(lib.arch.get_target()):
|
if not lib.make._supported_arch(lib.arch.get_target()):
|
||||||
print(f"Architecture {lib.arch.get_target()} is not supported for this package")
|
lib.logging.error(f"Architecture {lib.arch.get_target()} is not supported for this package.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Run `pre_build` hooks
|
# Run `pre_build` hooks
|
||||||
@@ -95,17 +95,20 @@ def cmd_build_package(package: str):
|
|||||||
os.chdir(lib.sources.sources_dir_name())
|
os.chdir(lib.sources.sources_dir_name())
|
||||||
lib.make._on_build()
|
lib.make._on_build()
|
||||||
else:
|
else:
|
||||||
print("on_build(): Not defined")
|
lib.logging.error("The pkgbuild file has specified no build function.")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
# Run `post_build` hooks
|
# Run `post_build` hooks
|
||||||
run_hooks(hooks.post_build)
|
run_hooks(hooks.post_build)
|
||||||
|
|
||||||
# Pack packages
|
# Pack packages
|
||||||
for pkgname in lib.make._pkginfo.keys():
|
for pkgname in lib.make._pkginfo:
|
||||||
lib.make._current_pkgname = pkgname
|
lib.make._current_pkgname = pkgname
|
||||||
|
|
||||||
if pkgname == lib.make._key_global:
|
if pkgname == lib.make._key_global:
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
|
lib.logging.step(f"Packing package \"{pkgname}\"...")
|
||||||
|
|
||||||
pkginfo = lib.make._pkginfo[pkgname]
|
pkginfo = lib.make._pkginfo[pkgname]
|
||||||
pkgver = pkginfo[lib.make._key_version]
|
pkgver = pkginfo[lib.make._key_version]
|
||||||
@@ -209,13 +212,17 @@ def cmd_build_atom(pkgname: str):
|
|||||||
load_pkgbuild(pkgname)
|
load_pkgbuild(pkgname)
|
||||||
|
|
||||||
# Initialize build environment
|
# Initialize build environment
|
||||||
|
lib.logging.step("Preparing environment for Atom Build...")
|
||||||
lib.atombuild.prepare_build_env(build_env_root, lib.make._builddep)
|
lib.atombuild.prepare_build_env(build_env_root, lib.make._builddep)
|
||||||
lib.atombuild.copy_pkgbuild_tree(repo_root, pkgname, build_env_root)
|
lib.atombuild.copy_pkgbuild_tree(repo_root, pkgname, build_env_root)
|
||||||
lib.atombuild.enter_build_env(
|
try:
|
||||||
build_env_root,
|
lib.atombuild.enter_build_env(
|
||||||
["./x", "--target", lib.arch.get_target(), "build", pkgname],
|
build_env_root,
|
||||||
chdir="/Atom",
|
["./x", "--target", lib.arch.get_target(), "build", pkgname],
|
||||||
)
|
chdir="/Atom",
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
exit(1)
|
||||||
|
|
||||||
# Copy artifacts
|
# Copy artifacts
|
||||||
atom_target_dir = f"{build_env_root}/Atom/packages/{pkgname}/target"
|
atom_target_dir = f"{build_env_root}/Atom/packages/{pkgname}/target"
|
||||||
@@ -223,7 +230,7 @@ def cmd_build_atom(pkgname: str):
|
|||||||
for i in os.listdir(atom_target_dir):
|
for i in os.listdir(atom_target_dir):
|
||||||
if i.endswith(".pkg"):
|
if i.endswith(".pkg"):
|
||||||
shutil.copy2(f"{atom_target_dir}/{i}", f"{target_dir}/{i}")
|
shutil.copy2(f"{atom_target_dir}/{i}", f"{target_dir}/{i}")
|
||||||
except Exception:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Build success
|
# Build success
|
||||||
@@ -272,27 +279,33 @@ def cmd_check_updates(pkgname):
|
|||||||
exit(1)
|
exit(1)
|
||||||
print(lib.managed_source.get_updates(lib.make._managed_source_url))
|
print(lib.managed_source.get_updates(lib.make._managed_source_url))
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if args.subcommand == "build":
|
||||||
|
if args.atombuild:
|
||||||
|
cmd_build_atom(args.BUILD_PKGNAME)
|
||||||
|
else:
|
||||||
|
cmd_build_package(args.BUILD_PKGNAME)
|
||||||
|
elif args.subcommand == "clean":
|
||||||
|
if args.all:
|
||||||
|
pkgs = os.listdir("packages")
|
||||||
|
else:
|
||||||
|
pkgs = args.CLEAN_PKGNAME
|
||||||
|
cmd_clean_package(pkgs)
|
||||||
|
elif args.subcommand == "list":
|
||||||
|
cmd_list(args.ITEM)
|
||||||
|
elif args.subcommand == "repo-push":
|
||||||
|
cmd_repo_push(args.REPO_DIR, args.REPO_PUSH_PKGNAME)
|
||||||
|
elif args.subcommand == "source":
|
||||||
|
if args.vendor:
|
||||||
|
cmd_vendor_src(args.vendor, args.PKGNAME)
|
||||||
|
if args.check_updates:
|
||||||
|
cmd_check_updates(args.PKGNAME)
|
||||||
|
else:
|
||||||
|
print("error: no action specified", file=sys.stderr)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
if args.subcommand == "build":
|
if __name__ == "__main__":
|
||||||
if args.atombuild:
|
try:
|
||||||
cmd_build_atom(args.BUILD_PKGNAME)
|
main()
|
||||||
else:
|
except KeyboardInterrupt:
|
||||||
cmd_build_package(args.BUILD_PKGNAME)
|
exit(1)
|
||||||
elif args.subcommand == "clean":
|
|
||||||
if args.all:
|
|
||||||
pkgs = os.listdir("packages")
|
|
||||||
else:
|
|
||||||
pkgs = args.CLEAN_PKGNAME
|
|
||||||
cmd_clean_package(pkgs)
|
|
||||||
elif args.subcommand == "list":
|
|
||||||
cmd_list(args.ITEM)
|
|
||||||
elif args.subcommand == "repo-push":
|
|
||||||
cmd_repo_push(args.REPO_DIR, args.REPO_PUSH_PKGNAME)
|
|
||||||
elif args.subcommand == "source":
|
|
||||||
if args.vendor:
|
|
||||||
cmd_vendor_src(args.vendor, args.PKGNAME)
|
|
||||||
if args.check_updates:
|
|
||||||
cmd_check_updates(args.PKGNAME)
|
|
||||||
else:
|
|
||||||
print("error: no action specified", file=sys.stderr)
|
|
||||||
exit(1)
|
|
||||||
Reference in new issue
Block a user