forked from semios/ports
@@ -0,0 +1,5 @@
|
||||
/packages/*/target
|
||||
__pycache__
|
||||
/.vscode
|
||||
/.idea
|
||||
/.zed
|
||||
@@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <https://unlicense.org/>
|
||||
@@ -0,0 +1,47 @@
|
||||
# SemiOS Packages
|
||||
|
||||
This is the SemiOS source package collection.
|
||||
|
||||
## Usage
|
||||
|
||||
To build a package for your native target, run:
|
||||
|
||||
```shell
|
||||
./x build <package name>
|
||||
```
|
||||
|
||||
To cross-build a package for another target, run:
|
||||
|
||||
```shell
|
||||
./x --target <target triple> build <package name>
|
||||
```
|
||||
|
||||
After a package is successfully built, you can find the build artifacts
|
||||
at `./packages/<package name>/target/*.pkg`.
|
||||
|
||||
To clean building files for a package, run:
|
||||
|
||||
```shell
|
||||
./x clean <package name> # Clean a package
|
||||
./x clean --all # Clean all packages
|
||||
```
|
||||
|
||||
## Targets
|
||||
|
||||
This repository is for SemiOS targets only. Other targets are not guaranteed to work.
|
||||
Currently, we support:
|
||||
|
||||
- aarch64-semios-linux
|
||||
- riscv64-semios-linux
|
||||
- x86_64-semios-linux
|
||||
|
||||
## Atom Builds
|
||||
|
||||
*Atom Build* is a technology to make reproducible building environments. To build a
|
||||
package in its atom environment, run:
|
||||
|
||||
```shell
|
||||
./x --atombuild build <package name>
|
||||
```
|
||||
|
||||
You can use the `--atombuild` flag with other flags described above.
|
||||
@@ -0,0 +1,20 @@
|
||||
from typing import Callable, TypeAlias
|
||||
|
||||
from lib import pkgcomposer
|
||||
|
||||
from . import autolink, autopatch, autostrip
|
||||
|
||||
PreBuild: TypeAlias = Callable[[], None]
|
||||
PostBuild: TypeAlias = Callable[[], None]
|
||||
PostPack: TypeAlias = Callable[[pkgcomposer.PkgComposer], None]
|
||||
|
||||
pre_build: dict[str, PreBuild] = {
|
||||
"autopatch": autopatch.autopatch,
|
||||
}
|
||||
|
||||
post_build: dict[str, PostBuild] = {}
|
||||
|
||||
post_pack: dict[str, PostPack] = {
|
||||
"autolink": autolink.autolink,
|
||||
"autostrip": autostrip.autostrip,
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import os
|
||||
|
||||
from lib import arch, common, make, pkgcomposer
|
||||
|
||||
|
||||
def is_abslink(path):
|
||||
try:
|
||||
return os.readlink(path).startswith("/")
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
def autolink_bin(composer: pkgcomposer.PkgComposer):
|
||||
if is_abslink("bin"):
|
||||
return
|
||||
for i in common.treedir("bin"):
|
||||
if i.is_file() and os.access(i.path, os.X_OK):
|
||||
make.link(f"bin/{i.name}", "/bin/" + i.name)
|
||||
|
||||
def autolink_lib(composer: pkgcomposer.PkgComposer):
|
||||
if is_abslink("lib"):
|
||||
return
|
||||
for i in common.treedir("lib"):
|
||||
if i.is_file():
|
||||
make.link(f"lib/{i.name}", "/lib/" + arch.get_target() + "/" + i.name)
|
||||
|
||||
def autolink_include(composer: pkgcomposer.PkgComposer):
|
||||
if is_abslink("include"):
|
||||
return
|
||||
for i in common.treedir("include"):
|
||||
if i.is_file():
|
||||
make.link(
|
||||
f"include/{i.name}",
|
||||
"/lib/" + arch.get_target() + "/include/" + i.name,
|
||||
)
|
||||
|
||||
|
||||
def autolink(composer: pkgcomposer.PkgComposer):
|
||||
os.chdir(composer.workdir + "/bundle/")
|
||||
|
||||
try:
|
||||
autolink_bin(composer)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
autolink_lib(composer)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
autolink_include(composer)
|
||||
except:
|
||||
pass
|
||||
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
import lib.sources as sources
|
||||
|
||||
|
||||
def autopatch():
|
||||
if not os.path.exists("patches"):
|
||||
return
|
||||
|
||||
target_dir = os.getcwd() + "/target"
|
||||
source_dir = sources.sources_dir_name()
|
||||
patches_tag_file = f"{target_dir}/patches.tag"
|
||||
|
||||
patches_dir = os.getcwd() + "/patches"
|
||||
patches = os.listdir(patches_dir)
|
||||
patches.sort()
|
||||
|
||||
os.chdir(source_dir)
|
||||
if not os.path.exists(patches_tag_file):
|
||||
open(patches_tag_file, "+w").close()
|
||||
for i in patches:
|
||||
with open(patches_tag_file, "r") as file:
|
||||
if i + "\n" in file.readlines():
|
||||
continue
|
||||
with open(f"{patches_dir}/{i}", "r") as file:
|
||||
subprocess.run(["patch", "-p1"], stdin=file)
|
||||
with open(patches_tag_file, "+a") as file:
|
||||
file.write(i + "\n")
|
||||
@@ -0,0 +1,61 @@
|
||||
import os
|
||||
import stat
|
||||
import subprocess
|
||||
import tempfile
|
||||
import shutil
|
||||
|
||||
from lib import common
|
||||
|
||||
strip = os.environ.get("STRIP", "strip")
|
||||
|
||||
|
||||
def _is_elf(filepath):
|
||||
with open(filepath, "rb") as f:
|
||||
return f.read(4) == b"\x7fELF"
|
||||
|
||||
|
||||
def autostrip(composer):
|
||||
processed_inodes = {}
|
||||
|
||||
for ent in common.treedir(composer.workdir):
|
||||
if not ent.is_file(follow_symlinks=False):
|
||||
continue
|
||||
if not (os.access(ent.path, os.X_OK) or ".so" in ent.name):
|
||||
continue
|
||||
if not _is_elf(ent.path):
|
||||
continue
|
||||
|
||||
stat_info = os.stat(ent.path)
|
||||
inode_key = (stat_info.st_dev, stat_info.st_ino)
|
||||
if inode_key in processed_inodes:
|
||||
continue
|
||||
processed_inodes[inode_key] = True
|
||||
|
||||
oldperm = stat.S_IMODE(stat_info.st_mode)
|
||||
|
||||
try:
|
||||
with tempfile.NamedTemporaryFile(mode='wb', delete=False) as tmp_file:
|
||||
tmp_path = tmp_file.name
|
||||
shutil.copy2(ent.path, tmp_path)
|
||||
os.chmod(tmp_path, 0o777)
|
||||
|
||||
subprocess.run([strip, tmp_path], check=True)
|
||||
|
||||
with open(tmp_path, 'rb') as tmp_file:
|
||||
stripped_data = tmp_file.read()
|
||||
|
||||
os.chmod(ent.path, 0o777)
|
||||
|
||||
with open(ent.path, 'r+b') as original_file:
|
||||
original_file.truncate(0)
|
||||
original_file.write(stripped_data)
|
||||
original_file.flush()
|
||||
os.fsync(original_file.fileno())
|
||||
|
||||
os.chmod(ent.path, oldperm)
|
||||
os.unlink(tmp_path)
|
||||
|
||||
except Exception as e:
|
||||
if 'tmp_path' in locals() and os.path.exists(tmp_path):
|
||||
os.unlink(tmp_path)
|
||||
raise RuntimeError(f"Failed to strip {ent.path}: {e}") from e
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
import os
|
||||
|
||||
from . import packie
|
||||
|
||||
all: dict[str, dict[str, str]] = {
|
||||
"aarch64-semios-linux": {
|
||||
"CC": "clang -target aarch64-unknown-linux-musl",
|
||||
"CXX": "clang++ -target aarch64-unknown-linux-musl",
|
||||
},
|
||||
"x86_64-semios-linux": {
|
||||
"CC": "clang -target x86_64-unknown-linux-musl",
|
||||
"CXX": "clang++ -target x86_64-unknown-linux-musl",
|
||||
},
|
||||
"riscv64-semios-linux": {
|
||||
"CC": "clang -target riscv64-unknown-linux-musl",
|
||||
"CXX": "clang++ -target riscv64-unknown-linux-musl",
|
||||
},
|
||||
}
|
||||
_target: str = packie.host_arch()
|
||||
|
||||
|
||||
def get_target():
|
||||
return _target
|
||||
|
||||
|
||||
def set_target(arch: str):
|
||||
global _target
|
||||
_target = arch
|
||||
for key in all[_target].keys():
|
||||
if not os.environ.get(key):
|
||||
os.environ[key] = all[_target][key]
|
||||
@@ -0,0 +1,144 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from . import packie
|
||||
|
||||
BASE_REQUIREMENTS = [
|
||||
# Basic packages for running shell scripts
|
||||
"mksh",
|
||||
"coreutils",
|
||||
"findutils",
|
||||
"diffutils",
|
||||
# Packages for running `semios-packages` scripts
|
||||
"python",
|
||||
"packie",
|
||||
"zstd",
|
||||
"libarchive-tools",
|
||||
# Packages for building packages that require patching
|
||||
"patch",
|
||||
# Packages for downloading various formats of tarballs
|
||||
"curl",
|
||||
"libz-ng",
|
||||
"liblzma",
|
||||
"libbzip2",
|
||||
# Basic libraries
|
||||
"sqlite",
|
||||
"libgcc-compat",
|
||||
"libcxx",
|
||||
"semi-libc",
|
||||
# Networking
|
||||
"ca-certificates",
|
||||
"certutil",
|
||||
"aws-lc-libssl",
|
||||
"aws-lc-tools",
|
||||
]
|
||||
|
||||
|
||||
def _prepare_build_env_base_files(root: str):
|
||||
# Create root directory
|
||||
os.makedirs(root, exist_ok=True)
|
||||
|
||||
# Create var, run and tmp
|
||||
os.mkdir(f"{root}/var")
|
||||
os.mkdir(f"{root}/var/tmp")
|
||||
os.mkdir(f"{root}/var/run")
|
||||
os.mkdir(f"{root}/tmp")
|
||||
os.mkdir(f"{root}/run")
|
||||
|
||||
# Copy repository config files
|
||||
os.makedirs(f"{root}/var/db/packie")
|
||||
shutil.copytree("/var/config/packie/repos.d", f"{root}/var/config/packie/repos.d")
|
||||
|
||||
# Create directories for kernel pseudo filesystems
|
||||
os.mkdir(f"{root}/dev")
|
||||
os.mkdir(f"{root}/sys")
|
||||
os.mkdir(f"{root}/proc")
|
||||
|
||||
# Create home directory of root (some scripts may require it)
|
||||
os.makedirs(f"{root}/home/root")
|
||||
|
||||
# Copy DNS config
|
||||
os.makedirs(f"{root}/etc", exist_ok=True)
|
||||
shutil.copy2("/etc/resolv.conf", f"{root}/etc/resolv.conf")
|
||||
|
||||
# For atom build environments, we simply use a link to be usr-shebang-compatible to avoid problems
|
||||
os.mkdir(f"{root}/usr")
|
||||
os.symlink("/bin", f"{root}/usr/bin")
|
||||
|
||||
|
||||
def prepare_build_env(root: str, extreq: list[str] = []):
|
||||
# Skip if the environment is already initialized
|
||||
if os.path.exists(f"{root}/.INIT"):
|
||||
return
|
||||
try:
|
||||
shutil.rmtree(root)
|
||||
except:
|
||||
pass
|
||||
|
||||
# Prepare basic filesystem hierarchy
|
||||
_prepare_build_env_base_files(root)
|
||||
|
||||
# Install packages
|
||||
packie.chroot_update(root)
|
||||
packie.chroot_install(root, BASE_REQUIREMENTS + extreq)
|
||||
|
||||
# Refresh certificates
|
||||
enter_build_env(root, ["certutil", "refresh"])
|
||||
|
||||
# Create initialized tag
|
||||
with open(f"{root}/.INIT", "wt+") as file:
|
||||
file.write("OK")
|
||||
|
||||
|
||||
def enter_build_env(root: str, cmd: list[str], chdir: str = "/"):
|
||||
reserve_env = ["https_proxy", "http_proxy", "all_proxy"]
|
||||
reserve_env_args = []
|
||||
for i in reserve_env:
|
||||
if os.environ.get(i):
|
||||
reserve_env_args += ["--setenv", i, os.environ[i]]
|
||||
subprocess.run(
|
||||
[
|
||||
"bwrap",
|
||||
"--bind", root, "/",
|
||||
"--unshare-pid",
|
||||
"--unshare-user",
|
||||
"--uid", "0",
|
||||
"--gid", "0",
|
||||
"--dev", "/dev",
|
||||
"--bind", "/sys", "/sys",
|
||||
"--proc", "/proc",
|
||||
"--clearenv",
|
||||
"--setenv", "HOME", "/home/root",
|
||||
"--setenv", "PATH", "/bin",
|
||||
"--setenv", "SEMIOS_PKGBUILD_IN_ATOMIC", "1",
|
||||
"--setenv", "USER", "root",
|
||||
"--setenv", "LOGNAME", "root",
|
||||
"--chdir",
|
||||
chdir,
|
||||
]
|
||||
+ reserve_env_args
|
||||
+ cmd,
|
||||
check=True,
|
||||
)
|
||||
|
||||
|
||||
def copy_pkgbuild_tree(repo_root: str, pkgname: str, build_env_root: str):
|
||||
build_dir = f"{build_env_root}/Atom"
|
||||
if os.path.exists(build_dir):
|
||||
return
|
||||
os.mkdir(build_dir)
|
||||
shutil.copytree(f"{repo_root}/hooks", f"{build_dir}/hooks")
|
||||
shutil.copytree(f"{repo_root}/lib", f"{build_dir}/lib")
|
||||
shutil.copy2(f"{repo_root}/x", f"{build_dir}/x")
|
||||
shutil.copy2(f"{repo_root}/x.py", f"{build_dir}/x.py")
|
||||
os.makedirs(f"{build_dir}/packages/{pkgname}")
|
||||
for i in os.listdir(f"{repo_root}/packages/{pkgname}"):
|
||||
srcpath = f"{repo_root}/packages/{pkgname}/{i}"
|
||||
dstpath = f"{build_dir}/packages/{pkgname}/{i}"
|
||||
if i in ["target", "__pycache__"]:
|
||||
continue
|
||||
if os.path.isdir(srcpath):
|
||||
shutil.copytree(srcpath, dstpath)
|
||||
elif os.path.isfile(srcpath):
|
||||
shutil.copy2(srcpath, dstpath)
|
||||
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
import types
|
||||
|
||||
|
||||
def _wrap_treedir_entry(ent, prefix=""):
|
||||
wrapped = types.SimpleNamespace()
|
||||
wrapped.name = f"{prefix}/{ent.name}" if prefix else ent.name
|
||||
wrapped.path = ent.path
|
||||
wrapped.is_dir = ent.is_dir
|
||||
wrapped.is_file = ent.is_file
|
||||
wrapped.is_symlink = ent.is_symlink
|
||||
return wrapped
|
||||
|
||||
|
||||
def treedir(root: str, prefix: str = ""):
|
||||
with os.scandir(root) as entries:
|
||||
for ent in entries:
|
||||
wrapped = _wrap_treedir_entry(ent, prefix)
|
||||
yield wrapped
|
||||
if wrapped.is_dir(follow_symlinks=False):
|
||||
yield from treedir(ent.path, wrapped.name)
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from lib.common import treedir
|
||||
|
||||
from . import make as libmake
|
||||
from . import pkgcomposer
|
||||
|
||||
|
||||
def configure(rem: list[str] = []):
|
||||
subprocess.run(["./configure"] + rem, check=True)
|
||||
|
||||
|
||||
def cmake(rem: list[str] = []):
|
||||
source_dir = os.getcwd()
|
||||
os.makedirs("../cmake_build", exist_ok=True)
|
||||
os.chdir("../cmake_build")
|
||||
subprocess.run(
|
||||
[
|
||||
"cmake",
|
||||
"-GNinja",
|
||||
"-DCMAKE_BUILD_TYPE=Release",
|
||||
"-DCMAKE_INSTALL_PREFIX=/",
|
||||
source_dir,
|
||||
]
|
||||
+ rem,
|
||||
check=True,
|
||||
)
|
||||
|
||||
|
||||
def _move_install():
|
||||
subprocess.run(["sh", "-c", "cp -r ./pkg/*/* . 2>/dev/null || true"], check=False)
|
||||
subprocess.run(
|
||||
["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(["rm", "-rf", "./pkg", "./usr"], check=False)
|
||||
|
||||
|
||||
def make(rem: list[str] = []):
|
||||
subprocess.run(["make", f"-j{os.cpu_count()}"] + rem, check=True)
|
||||
|
||||
|
||||
def make_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
||||
default_rem = ["DESTDIR=" + os.getcwd() + "/../cpp_install"]
|
||||
if rem is None:
|
||||
try:
|
||||
shutil.rmtree("../cpp_install")
|
||||
except:
|
||||
pass
|
||||
subprocess.run(["make", "install"] + (rem or default_rem), check=True)
|
||||
if chdir:
|
||||
os.chdir("../cpp_install")
|
||||
if chdir and move:
|
||||
_move_install()
|
||||
|
||||
|
||||
def ninja(rem: list[str] = []):
|
||||
subprocess.run(["ninja"] + rem, check=True)
|
||||
|
||||
|
||||
def ninja_install(rem: list[str] = [], chdir: bool = True, move: bool = True):
|
||||
if chdir:
|
||||
os.environ["DESTDIR"] = os.getcwd() + "/../cpp_install"
|
||||
subprocess.run(["ninja", "install"] + rem, check=True)
|
||||
if chdir:
|
||||
os.chdir(os.environ["DESTDIR"])
|
||||
if chdir and move:
|
||||
_move_install()
|
||||
|
||||
|
||||
def meson_setup(rem: list[str] = []):
|
||||
subprocess.run(["meson", "setup", "_meson_build"] + rem, check=True)
|
||||
|
||||
|
||||
def meson_compile(rem: list[str] = []):
|
||||
subprocess.run(["meson", "compile", "-C", "_meson_build"] + rem, check=True)
|
||||
|
||||
|
||||
def meson_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
||||
default_rem = ["--destdir", f"{os.getcwd()}/../cpp_install"]
|
||||
if not rem:
|
||||
os.makedirs("../cpp_install", exist_ok=True)
|
||||
subprocess.run(
|
||||
["meson", "install", "-C", "_meson_build"] + (rem or default_rem), check=True
|
||||
)
|
||||
if chdir:
|
||||
os.chdir("../cpp_install")
|
||||
if chdir and move:
|
||||
_move_install()
|
||||
|
||||
|
||||
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
||||
if not os.path.exists(srcdir):
|
||||
return
|
||||
try:
|
||||
pc.makedir(dstdir)
|
||||
except Exception:
|
||||
pass
|
||||
for ent in treedir(srcdir):
|
||||
if filter(ent):
|
||||
if ent.is_file(follow_symlinks=False):
|
||||
pc.makedirs(os.path.dirname(f"{dstdir}/{ent.name}"))
|
||||
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
||||
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
|
||||
try:
|
||||
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def _is_dev_file(ent) -> bool:
|
||||
return (
|
||||
ent.name.endswith(".o")
|
||||
or ent.name.endswith(".a")
|
||||
or ent.name.endswith(".la")
|
||||
or ent.name.endswith(".pc")
|
||||
or ent.name.endswith(".h")
|
||||
or ent.name.endswith(".hpp")
|
||||
or ent.name.endswith(".cmake")
|
||||
or ent.name.endswith(".inc")
|
||||
or ("Makefile" in ent.name)
|
||||
)
|
||||
|
||||
|
||||
def _autopack_filter_lib(ent) -> bool:
|
||||
return not _is_dev_file(ent)
|
||||
|
||||
|
||||
def _autopack_filter_bin(ent) -> bool:
|
||||
return os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False)
|
||||
|
||||
|
||||
def _autopack_filter_dev(ent):
|
||||
return _is_dev_file(ent)
|
||||
|
||||
|
||||
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
|
||||
if "lib" in profiles:
|
||||
_do_auto_pack(pc, "lib", "lib", _autopack_filter_lib)
|
||||
if "bin" in profiles:
|
||||
_do_auto_pack(pc, "bin", "bin", _autopack_filter_bin)
|
||||
_do_auto_pack(pc, "sbin", "bin", _autopack_filter_bin)
|
||||
if "dev" in profiles:
|
||||
_do_auto_pack(pc, "lib", "lib", _autopack_filter_dev)
|
||||
_do_auto_pack(pc, "include", "include", _autopack_filter_dev)
|
||||
|
||||
|
||||
def use_auto_pack(profiles: list[str]):
|
||||
libmake.on_pack(lambda pc: _auto_pack(profiles, pc))
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
import typing
|
||||
import hashlib
|
||||
|
||||
from lib import arch
|
||||
|
||||
from . import pkgcomposer, sources
|
||||
|
||||
_key_global = "@global"
|
||||
_key_version = "version"
|
||||
_key_description = "description"
|
||||
_key_maintainers = "maintainers"
|
||||
_key_on_pack = "on_pack"
|
||||
_key_arch_any = "arch_any"
|
||||
_key_links = "links"
|
||||
_key_dependencies = "dependencies"
|
||||
_key_recommendations = "recommendations"
|
||||
_key_provides = "provides"
|
||||
|
||||
_current_pkgname: str = _key_global
|
||||
_pkginfo: dict[str, dict[str, typing.Any]] = {
|
||||
_key_global: {
|
||||
_key_links: [],
|
||||
_key_dependencies: [],
|
||||
_key_maintainers: [],
|
||||
_key_provides: [],
|
||||
_key_recommendations: [],
|
||||
},
|
||||
}
|
||||
_supported_arch: typing.Callable[[str], bool] = lambda x: True
|
||||
_on_build: typing.Callable[[], None] | None = None
|
||||
|
||||
_in_atombuild = False
|
||||
_builddep: list[str] = []
|
||||
|
||||
_blocked_hooks: list[str] = []
|
||||
|
||||
|
||||
def builddep(s: str):
|
||||
global _builddep
|
||||
if s == "shortcut/c":
|
||||
_builddep += ["semi-libc-dev", "clang", "llvm", "lld"]
|
||||
elif s == "shortcut/c++":
|
||||
builddep("shortcut/c")
|
||||
_builddep += ["libcxx-dev"]
|
||||
elif s == "shortcut/autotools":
|
||||
_builddep += ["gnu-make", "gnu-sed", "awk", "grep"]
|
||||
elif s == "shortcut/rust":
|
||||
builddep("shortcut/c")
|
||||
_builddep += ["cargo", "rustc"]
|
||||
elif s == "shortcut/cmake":
|
||||
_builddep += ["cmake", "ninja"]
|
||||
elif s == "shortcut/meson":
|
||||
_builddep += ["meson", "ninja"]
|
||||
else:
|
||||
_builddep += [s.replace("@target", f"@{arch.get_target()}")]
|
||||
|
||||
|
||||
def package(s: str):
|
||||
global _current_pkgname
|
||||
_current_pkgname = s
|
||||
_pkginfo[s] = _pkginfo[_key_global].copy()
|
||||
_pkginfo[s][_key_links] = _pkginfo[s][_key_links].copy()
|
||||
_pkginfo[s][_key_dependencies] = _pkginfo[s][_key_dependencies].copy()
|
||||
_pkginfo[s][_key_provides] = _pkginfo[s][_key_provides].copy()
|
||||
|
||||
|
||||
def version(s: str):
|
||||
_pkginfo[_current_pkgname][_key_version] = s
|
||||
|
||||
|
||||
def description(s: str):
|
||||
_pkginfo[_current_pkgname][_key_description] = s
|
||||
|
||||
|
||||
def maintainer(s: str):
|
||||
_pkginfo[_current_pkgname][_key_maintainers] += [s]
|
||||
|
||||
|
||||
def arch_any():
|
||||
_pkginfo[_current_pkgname][_key_arch_any] = True
|
||||
|
||||
|
||||
def provide(s: str):
|
||||
_pkginfo[_current_pkgname][_key_provides] += [
|
||||
s.replace("@same-arch", f"@{arch.get_target()}")
|
||||
]
|
||||
|
||||
|
||||
def _translate_dep_spec(s: str) -> str:
|
||||
return (
|
||||
s.replace("(same)", "(same-version) @same-arch")
|
||||
.replace("(same-version)", f"(={_pkginfo[_current_pkgname][_key_version]})")
|
||||
.replace("@same-arch", f"@{arch.get_target()}")
|
||||
)
|
||||
|
||||
|
||||
def dep(s: str):
|
||||
_pkginfo[_current_pkgname][_key_dependencies] += [_translate_dep_spec(s)]
|
||||
|
||||
|
||||
def recommend(s: str):
|
||||
_pkginfo[_current_pkgname][_key_recommendations] += [_translate_dep_spec(s)]
|
||||
|
||||
|
||||
def link(src: str, dst: str, default: bool = True):
|
||||
_pkginfo[_current_pkgname][_key_links] += [
|
||||
{
|
||||
"from": src,
|
||||
"to": dst,
|
||||
"default": default,
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
def get_prefix(pkgname: str) -> str:
|
||||
pkginfo = _pkginfo[pkgname]
|
||||
if pkginfo.get(_key_arch_any):
|
||||
pkgarch = "any"
|
||||
else:
|
||||
pkgarch = arch.get_target()
|
||||
pkgident = f"{pkgname}={pkginfo[_key_version]}@{pkgarch}"
|
||||
hasher = hashlib.sha3_224()
|
||||
hasher.update(pkgident.encode("utf-8"))
|
||||
return "/pkg/" + pkgname + "-" + hasher.hexdigest()
|
||||
|
||||
|
||||
def supported_arch(s: list[str] | typing.Callable[[str], bool]):
|
||||
global _supported_arch
|
||||
if isinstance(s, list):
|
||||
_supported_arch = lambda arch: arch in s
|
||||
else:
|
||||
_supported_arch = s
|
||||
|
||||
|
||||
def on_build(func: typing.Callable[[], None]):
|
||||
global _on_build
|
||||
_on_build = func
|
||||
|
||||
|
||||
def on_pack(func: typing.Callable[[pkgcomposer.PkgComposer], None]):
|
||||
_pkginfo[_current_pkgname][_key_on_pack] = func
|
||||
|
||||
|
||||
def block_hook(hook: str):
|
||||
_blocked_hooks.append(hook)
|
||||
|
||||
|
||||
def source_url(url: str):
|
||||
if not _in_atombuild:
|
||||
sources.source_url(url)
|
||||
|
||||
|
||||
def source_git(url: str, branch: str | None = None):
|
||||
if not _in_atombuild:
|
||||
sources.source_git(url, branch)
|
||||
|
||||
|
||||
def in_atomic():
|
||||
return os.environ.get("SEMIOS_PKGBUILD_IN_ATOMIC", "0") == "1"
|
||||
@@ -0,0 +1,46 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
PACKIE_EXEC = os.getenv("PACKIE", "packie")
|
||||
|
||||
|
||||
def host_arch() -> str:
|
||||
result = subprocess.run(
|
||||
[PACKIE_EXEC, "print", "profile.host_arch"],
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
return result.stdout.decode().strip()
|
||||
|
||||
|
||||
def chroot_update(root: str):
|
||||
subprocess.run([PACKIE_EXEC, "--chroot", root, "update"], check=True)
|
||||
|
||||
|
||||
def chroot_install(root: str, requirements: list[str]):
|
||||
subprocess.run(
|
||||
[PACKIE_EXEC, "--chroot", root, "install", "--yes"] + requirements, check=True
|
||||
)
|
||||
|
||||
|
||||
def update():
|
||||
subprocess.run([PACKIE_EXEC, "update"], check=True)
|
||||
|
||||
|
||||
def install(requirements: list[str]):
|
||||
subprocess.run([PACKIE_EXEC, "install", "--yes"] + requirements, check=True)
|
||||
|
||||
|
||||
def repo_add(repo: str, pkgfile: str):
|
||||
subprocess.run(
|
||||
[PACKIE_EXEC, "repo-admin", repo, "--add-package", pkgfile], check=True
|
||||
)
|
||||
|
||||
|
||||
def prefix_of(pkgident: str):
|
||||
result = subprocess.run(
|
||||
[PACKIE_EXEC, "print", f"package.prefix.{pkgident}"],
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
return result.stdout.decode().strip()
|
||||
@@ -0,0 +1,67 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
class PkgComposer:
|
||||
def __init__(self, pkgfile: str):
|
||||
self.pkgfile = os.path.abspath(pkgfile)
|
||||
|
||||
def setworkdir(self, workdir: str):
|
||||
self.workdir = workdir
|
||||
shutil.rmtree(workdir, ignore_errors=True)
|
||||
os.mkdir(workdir)
|
||||
os.mkdir(f"{workdir}/bundle")
|
||||
|
||||
def write_manifest(self, manifest: dict):
|
||||
with open(self.workdir + "/PkgManifest.json", "w") as f:
|
||||
json.dump(manifest, f)
|
||||
|
||||
def write_links(self, links: list[dict]):
|
||||
with open(self.workdir + "/_links", "w") as f:
|
||||
for link in links:
|
||||
json.dump(link, f)
|
||||
f.write("\n")
|
||||
|
||||
def compose(self):
|
||||
subprocess.run(
|
||||
[
|
||||
"tar", "cpf", f"{self.pkgfile}.tar",
|
||||
"-C", self.workdir,
|
||||
"--numeric-owner",
|
||||
".",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
subprocess.run(["zstd", "--rm", "-f", f"{self.pkgfile}.tar", "-o", self.pkgfile], check=True)
|
||||
|
||||
def makedir(self, name: str):
|
||||
os.mkdir(f"{self.workdir}/bundle/{name}")
|
||||
|
||||
def makedirs(self, name: str):
|
||||
os.makedirs(f"{self.workdir}/bundle/{name}", exist_ok=True)
|
||||
|
||||
def addfile(self, src: str, dst: str | None = None):
|
||||
if dst is None:
|
||||
dst = src
|
||||
shutil.copy2(src, f"{self.workdir}/bundle/{dst}", follow_symlinks=False)
|
||||
|
||||
def add_dir(self, src: str, dst: str | None = None, merge: bool = False):
|
||||
if dst is None:
|
||||
dst = src
|
||||
target = f"{self.workdir}/bundle/{dst}"
|
||||
if not os.path.exists(src):
|
||||
raise FileNotFoundError(f"Source directory not found: {src}")
|
||||
os.makedirs(os.path.dirname(target), exist_ok=True)
|
||||
if merge and os.path.exists(target) and os.path.isdir(target):
|
||||
cmd = ["cp", "-a", f"{src}/.", target]
|
||||
else:
|
||||
cmd = ["cp", "-a", src, target]
|
||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
raise RuntimeError(f"cp command failed: {result.stderr}")
|
||||
|
||||
def link_external(self, src: str, dst: str):
|
||||
os.symlink(src, f"{self.workdir}/bundle/{dst}")
|
||||
@@ -0,0 +1,62 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from . import make, arch
|
||||
|
||||
|
||||
PY3_VERSION = "3.14"
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(["python3", "-m", "build", "."], check=True)
|
||||
|
||||
def install():
|
||||
if os.path.exists("../pyinstall"):
|
||||
shutil.rmtree("../pyinstall")
|
||||
for i in os.listdir("dist"):
|
||||
if not i.endswith(".whl"):
|
||||
continue
|
||||
subprocess.run(["python3", "-m", "installer", f"--destdir=../pyinstall", f"dist/{i}"], check=True)
|
||||
os.chdir("../pyinstall")
|
||||
while len(os.listdir(".")) == 1:
|
||||
os.chdir(os.listdir(".")[0])
|
||||
|
||||
def version(s: str):
|
||||
make.version(f"{s}+python{PY3_VERSION}")
|
||||
|
||||
def _depcommon(s: str):
|
||||
if s == "python":
|
||||
return f"python (~{PY3_VERSION}.0) @{arch.get_target()}"
|
||||
elif ".py" in s:
|
||||
if ")" in s:
|
||||
return s.replace(")", f", +python{PY3_VERSION})")
|
||||
else:
|
||||
return s.replace(".py", f".py (+python{PY3_VERSION})")
|
||||
else:
|
||||
return None
|
||||
|
||||
def builddep(s: str):
|
||||
if s == "$shortcut":
|
||||
builddep("python")
|
||||
builddep("build.py")
|
||||
builddep("installer.py")
|
||||
elif _depcommon(s):
|
||||
make.builddep(_depcommon(s))
|
||||
else:
|
||||
raise RuntimeError("unrecognized python dep")
|
||||
|
||||
def dep(s: str):
|
||||
if _depcommon(s):
|
||||
make.dep(_depcommon(s))
|
||||
else:
|
||||
raise RuntimeError("unrecognized python dep")
|
||||
|
||||
def _auto_pack(composer):
|
||||
base = f"lib/python{PY3_VERSION}/site-packages"
|
||||
composer.makedirs(base)
|
||||
for i in os.listdir("."):
|
||||
composer.add_dir(i, f"{base}/{i}")
|
||||
|
||||
def use_auto_pack():
|
||||
make.on_pack(_auto_pack)
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from . import arch, make, pkgcomposer
|
||||
|
||||
|
||||
def _rust_triple(semios: str) -> str:
|
||||
return semios.replace("-semios-linux", "-unknown-linux-musl")
|
||||
|
||||
|
||||
def build(rem: list[str] = []):
|
||||
cmdline = [
|
||||
"cargo",
|
||||
"build",
|
||||
"--release",
|
||||
"--target",
|
||||
_rust_triple(arch.get_target()),
|
||||
] + rem
|
||||
os.environ["RUSTFLAGS"] = (
|
||||
os.environ.get("RUSTFLAGS", "") + " -C target-feature=-crt-static"
|
||||
)
|
||||
subprocess.run(cmdline)
|
||||
|
||||
|
||||
def artifacts_dir():
|
||||
return f"target/{_rust_triple(arch.get_target())}/release"
|
||||
|
||||
|
||||
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
||||
pc.makedir(dstdir)
|
||||
with os.scandir(srcdir) as entries:
|
||||
for ent in entries:
|
||||
if filter(ent):
|
||||
if ent.is_dir(follow_symlinks=False):
|
||||
pc.makedir(f"{dstdir}/{ent.name}")
|
||||
elif ent.is_file(follow_symlinks=False):
|
||||
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}")
|
||||
|
||||
|
||||
def _autopack_filter_lib(ent) -> bool:
|
||||
if ent.is_dir(follow_symlinks=False):
|
||||
return False
|
||||
if ent.name.endswith(".so"):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def _autopack_filter_bin(ent) -> bool:
|
||||
return os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False)
|
||||
|
||||
|
||||
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
|
||||
if "lib" in profiles:
|
||||
_do_auto_pack(pc, artifacts_dir(), "lib", _autopack_filter_lib)
|
||||
if "bin" in profiles:
|
||||
_do_auto_pack(pc, artifacts_dir(), "bin", _autopack_filter_bin)
|
||||
|
||||
|
||||
def use_auto_pack(profiles: list[str]):
|
||||
make.on_pack(lambda pc: _auto_pack(profiles, pc))
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
import zipfile
|
||||
|
||||
|
||||
def filename(url):
|
||||
parsed = urllib.parse.urlparse(url)
|
||||
path = parsed.path
|
||||
filename = os.path.basename(path)
|
||||
|
||||
if not filename:
|
||||
raise ValueError("No filename found in URL")
|
||||
|
||||
return filename
|
||||
|
||||
|
||||
def download(url, output):
|
||||
subprocess.run(["curl", "-L", "-o", output, url], check=True)
|
||||
|
||||
|
||||
def tar_common_root(tar: tarfile.TarFile) -> str | None:
|
||||
root = None
|
||||
for member in tar.getmembers():
|
||||
this_root = member.path.split("/")[0]
|
||||
if root is None:
|
||||
root = this_root
|
||||
if this_root != root:
|
||||
return None
|
||||
return root
|
||||
|
||||
|
||||
def zip_common_root(zip_file: zipfile.ZipFile) -> str | None:
|
||||
members = zip_file.infolist()
|
||||
if not members:
|
||||
return None
|
||||
root = None
|
||||
for member in members:
|
||||
path = member.filename.replace('\\', '/').lstrip('./').lstrip('/')
|
||||
if not path:
|
||||
continue
|
||||
this_root = path.split('/')[0]
|
||||
if this_root in ('', '.', '..'):
|
||||
continue
|
||||
if root is None:
|
||||
root = this_root
|
||||
elif this_root != root:
|
||||
return None
|
||||
return root
|
||||
|
||||
|
||||
def sources_dir_name() -> str:
|
||||
with open("./target/sources.tag") as file:
|
||||
return file.read()
|
||||
|
||||
|
||||
def source_url(url: str):
|
||||
if os.path.exists("./target/sources.tag"):
|
||||
return
|
||||
download_path = f"./target/{filename(url)}"
|
||||
download(url, download_path)
|
||||
|
||||
if download_path.endswith(".zip"):
|
||||
with zipfile.ZipFile(download_path, "r") as zip:
|
||||
common_root = zip_common_root(zip)
|
||||
else:
|
||||
with tarfile.open(download_path, "r") as tar:
|
||||
common_root = tar_common_root(tar)
|
||||
|
||||
extract_dir = "./target"
|
||||
sources_dir = f"./target/{common_root}"
|
||||
if common_root in ["", ".", None]:
|
||||
extract_dir = "./target/sources"
|
||||
sources_dir = "./target/sources"
|
||||
|
||||
if download_path.endswith(".zip"):
|
||||
with zipfile.ZipFile(download_path, "r") as zip:
|
||||
zip.extractall(extract_dir)
|
||||
else:
|
||||
with tarfile.open(download_path, "r") as tar:
|
||||
tar.extractall(extract_dir)
|
||||
|
||||
with open("./target/sources.tag", "wt+") as file:
|
||||
file.write(sources_dir)
|
||||
|
||||
|
||||
def _git_repo_name(url: str) -> str:
|
||||
return url.split("/")[-1].replace(".git", "")
|
||||
|
||||
|
||||
def source_git(url: str, branch: str | None = None):
|
||||
source_path = os.getcwd() + "/target/" + _git_repo_name(url)
|
||||
if os.path.exists("./target/sources.tag"):
|
||||
return
|
||||
cmdline = ["git", "clone", "--depth=1"]
|
||||
if branch:
|
||||
cmdline += ["-b", branch]
|
||||
cmdline += [url, source_path]
|
||||
subprocess.run(cmdline, check=True)
|
||||
with open("./target/sources.tag", "wt+") as file:
|
||||
file.write(source_path)
|
||||
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import python
|
||||
|
||||
|
||||
python.version("1.4.1")
|
||||
description("A super-fast templating language that borrows the best ideas from the existing templating languages.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://files.pythonhosted.org/packages/2a/12/b5fa2353e2754cd67fb9f83793fa48ff42c213a5da7e719869d2301f6ab8/mako-1.4.1.tar.gz")
|
||||
|
||||
python.builddep("$shortcut")
|
||||
python.builddep("MarkupSafe.py")
|
||||
|
||||
|
||||
def build():
|
||||
python.build()
|
||||
python.install()
|
||||
os.chdir("lib")
|
||||
while len(os.listdir(".")) == 1:
|
||||
os.chdir(os.listdir(".")[0])
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("Mako.py")
|
||||
python.dep("python")
|
||||
python.dep("MarkupSafe.py")
|
||||
python.use_auto_pack()
|
||||
@@ -0,0 +1,22 @@
|
||||
from lib.make import *
|
||||
from lib import python
|
||||
|
||||
|
||||
python.version("3.0.3")
|
||||
description("Safely add untrusted strings to HTML/XML markup.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz")
|
||||
|
||||
python.builddep("$shortcut")
|
||||
|
||||
|
||||
def build():
|
||||
python.build()
|
||||
python.install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("MarkupSafe.py")
|
||||
python.dep("python")
|
||||
python.use_auto_pack()
|
||||
@@ -0,0 +1,22 @@
|
||||
from lib.make import *
|
||||
from lib import python
|
||||
|
||||
|
||||
python.version("6.0.3")
|
||||
description("YAML parser and emitter for Python")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz")
|
||||
|
||||
python.builddep("$shortcut")
|
||||
|
||||
|
||||
def build():
|
||||
python.build()
|
||||
python.install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("PyYAML.py")
|
||||
python.dep("python")
|
||||
python.use_auto_pack()
|
||||
@@ -0,0 +1,27 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("1.4.357.0")
|
||||
description("SPIR-V headers")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz")
|
||||
|
||||
builddep("shortcut/cmake")
|
||||
builddep("shortcut/c")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([f"-DCMAKE_INSTALL_PREFIX={get_prefix('spirv-headers')}"])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.add_dir("include", "include")
|
||||
composer.add_dir("share", "lib")
|
||||
|
||||
package("spirv-headers")
|
||||
on_pack(pack)
|
||||
@@ -0,0 +1,38 @@
|
||||
from lib.make import *
|
||||
from lib import cpp, packie
|
||||
|
||||
|
||||
version("22.1.5")
|
||||
description("A tool and a library for bi-directional translation between SPIR-V and LLVM IR")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v22.1.5.tar.gz")
|
||||
|
||||
builddep("shortcut/cmake")
|
||||
builddep("shortcut/c++")
|
||||
builddep("libllvm-dev (~22.1.0) @target")
|
||||
builddep("libllvm-static (~22.1.0) @target")
|
||||
builddep("pkgconf @target")
|
||||
builddep("spirv-headers @target")
|
||||
builddep("spirv-tools-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
"-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=ON",
|
||||
f"-DLLVM_DIR={packie.prefix_of('libllvm-dev')}/lib/cmake/llvm",
|
||||
f"-DCMAKE_INSTALL_PREFIX={get_prefix('libllvmspirv-dev')}",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libllvmspirv-dev")
|
||||
dep("libllvm-dev (~22.1.0) @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("llvm-spirv")
|
||||
dep("libllvm (~22.1.0) @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,40 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
sdk_version = "1.4.357.0"
|
||||
|
||||
version(sdk_version)
|
||||
description("an API and commands for processing SPIR-V modules")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz")
|
||||
|
||||
builddep("shortcut/cmake")
|
||||
builddep("shortcut/c++")
|
||||
builddep(f"spirv-headers (={sdk_version}) @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DSPIRV-Headers_SOURCE_DIR=/lib/{arch.get_target()}",
|
||||
"-DCMAKE_CXX_FLAGS=-Wno-error=switch",
|
||||
f"-DCMAKE_INSTALL_BINDIR={get_prefix('spirv-tools')}/bin",
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('spirv-tools-dev')}/lib",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('spirv-tools-dev')}/include",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("spirv-tools")
|
||||
dep("libcxx @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("spirv-tools-dev")
|
||||
dep("spirv-tools (same)")
|
||||
cpp.use_auto_pack(["lib", "dev"])
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"os_name": "\u001b[36;4mSemiOS\u001b[0m",
|
||||
"config_dir": "/var/config/airup",
|
||||
"service_dir": "/share/airup/services",
|
||||
"milestone_dir": "/share/airup/milestones",
|
||||
"runtime_dir": "/run/airup",
|
||||
"env_vars": {},
|
||||
"early_cmds": []
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib import rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.10.9")
|
||||
description("Modern, portable and fast implementation of service supervisor and the init daemon.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/sisungo/airup/archive/refs/tags/v0.10.9.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
|
||||
def build():
|
||||
shutil.copy2("../../build_manifest.json", "build_manifest.json")
|
||||
rust.build()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_airup(composer):
|
||||
os.chdir(rust.artifacts_dir())
|
||||
composer.makedir("bin")
|
||||
composer.makedir("libexec")
|
||||
composer.addfile("airup", "bin/airup")
|
||||
composer.addfile("airupd", "bin/airupd")
|
||||
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
|
||||
|
||||
|
||||
package("airup")
|
||||
on_pack(pack_airup)
|
||||
dep("semi-libc @same-arch")
|
||||
@@ -0,0 +1,55 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "1.2.16.1"
|
||||
|
||||
version(upstream_version)
|
||||
description("audio and MIDI functionality for the Linux operating system")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.16.1.tar.bz2")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('alsa-lib')}/lib",
|
||||
f"--includedir={get_prefix('alsa-lib-dev')}/include",
|
||||
"--enable-symbolic-functions",
|
||||
f"--with-configdir={get_prefix('alsa-lib')}/share/alsa",
|
||||
f"--with-plugindir=/lib/{arch.get_target()}/alsa/plugins",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_alsa_lib(composer):
|
||||
composer.makedir("lib")
|
||||
for i in [
|
||||
"libasound.so",
|
||||
"libasound.so.2",
|
||||
"libasound.so.2.0.0",
|
||||
"libatopology.so",
|
||||
"libatopology.so.2",
|
||||
"libatopology.so.2.0.0",
|
||||
]:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/alsa", "share/alsa")
|
||||
|
||||
|
||||
package("alsa-lib")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_alsa_lib)
|
||||
|
||||
package("alsa-lib-dev")
|
||||
dep("alsa-lib (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,37 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
version("1.2.16")
|
||||
description("audio and MIDI functionality for the Linux operating system")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.alsa-project.org/files/pub/utils/alsa-utils-1.2.16.tar.bz2")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("pkgconf")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
builddep(f"alsa-lib-dev @{arch.get_target()}")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep("gettext")
|
||||
|
||||
def build():
|
||||
cpp.configure([f"--prefix={get_prefix('alsa-utils')}", "--disable-nls"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_alsa_utils(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("sbin", "bin", merge=True)
|
||||
composer.add_dir("lib", "lib")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/alsa", "share/alsa")
|
||||
composer.add_dir("share/sounds", "share/sounds")
|
||||
|
||||
package("alsa-utils")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("alsa-lib @same-arch")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(pack_alsa_utils)
|
||||
@@ -0,0 +1,30 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2026.4.26")
|
||||
description("The One True Awk programming language")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("bison")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.make()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("a.out", "bin/awk")
|
||||
|
||||
|
||||
package("awk")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/crypto/x509/x509_def.c
|
||||
+++ b/crypto/x509/x509_def.c
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// TODO(fork): cleanup
|
||||
|
||||
-#define OPENSSLDIR "/etc/ssl"
|
||||
+#define OPENSSLDIR "/var/config/ssl"
|
||||
|
||||
#define X509_CERT_AREA OPENSSLDIR
|
||||
#define X509_CERT_DIR OPENSSLDIR "/certs"
|
||||
@@ -0,0 +1,74 @@
|
||||
import os
|
||||
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("5.5.0")
|
||||
description("a general-purpose cryptographic library maintained by the AWS Cryptography team")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.5.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/cmake")
|
||||
|
||||
|
||||
def _fix_pc(name, prefix):
|
||||
filepath = f"lib/pkgconfig/{name}.pc"
|
||||
with open(filepath, "r") as f:
|
||||
content = f.read()
|
||||
new_content = content.replace("prefix=/", f"prefix={prefix}").replace("libdir=${prefix}/usr/lib", "libdir=${prefix}/lib")
|
||||
with open(filepath, "w") as f:
|
||||
f.write(new_content)
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake(
|
||||
[
|
||||
"-DBUILD_SHARED_LIBS=1",
|
||||
"-DBUILD_TESTING=OFF",
|
||||
"-DDISABLE_GO=ON",
|
||||
"-DDISABLE_PERL=ON",
|
||||
"-DCMAKE_INSTALL_PREFIX=/",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
_fix_pc("libssl", get_prefix("aws-lc-libssl"))
|
||||
_fix_pc("libcrypto", get_prefix("aws-lc-libcrypto"))
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libcrypto(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("lib/libcrypto.so", "lib/libcrypto.so")
|
||||
|
||||
|
||||
def pack_libssl(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("lib/libssl.so", "lib/libssl.so")
|
||||
|
||||
|
||||
package("aws-lc-libcrypto")
|
||||
on_pack(pack_libcrypto)
|
||||
dep("semi-libc @same-arch")
|
||||
provide("libcrypto@same-arch")
|
||||
|
||||
package("aws-lc-libssl")
|
||||
on_pack(pack_libssl)
|
||||
dep("aws-lc-libcrypto (same)")
|
||||
provide("libssl@same-arch")
|
||||
|
||||
package("aws-lc-tools")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("aws-lc-libcrypto (same)")
|
||||
dep("aws-lc-libssl (same)")
|
||||
dep("libcxx @same-arch")
|
||||
|
||||
package("aws-lc-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("aws-lc-libcrypto (same)")
|
||||
dep("aws-lc-libssl (same)")
|
||||
provide("libcrypto-dev@same-arch")
|
||||
provide("libssl-dev@same-arch")
|
||||
@@ -0,0 +1,85 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
version("5.3")
|
||||
description("the Bourne Again SHell")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--prefix={get_prefix('bash')}",
|
||||
f"--datarootdir={get_prefix('bash-doc')}/share",
|
||||
f"--localedir={get_prefix('bash')}/share/locale",
|
||||
"--enable-alias",
|
||||
"--enable-alt-array-implementation",
|
||||
"--enable-arith-for-command",
|
||||
"--enable-array-variables",
|
||||
"--enable-bang-history",
|
||||
"--enable-brace-expansion",
|
||||
"--enable-casemod-attributes",
|
||||
"--enable-casemod-expansions",
|
||||
"--enable-command-timing",
|
||||
"--enable-cond-command",
|
||||
"--enable-cond-regexp",
|
||||
"--enable-coprocesses",
|
||||
"--enable-directory-stack",
|
||||
"--enable-dparen-arithmetic",
|
||||
"--enable-extended-glob",
|
||||
"--enable-function-import",
|
||||
"--enable-glob-asciiranges-default",
|
||||
"--enable-help-builtin",
|
||||
"--enable-history",
|
||||
"--enable-job-control",
|
||||
"--enable-multibyte",
|
||||
"--enable-net-redirections",
|
||||
"--enable-process-substitution",
|
||||
"--enable-progcomp",
|
||||
"--enable-prompt-string-decoding",
|
||||
"--enable-readline",
|
||||
"--enable-restricted",
|
||||
"--enable-select",
|
||||
"--enable-separate-helpfiles",
|
||||
"--enable-single-help-strings",
|
||||
"--enable-translatable-strings",
|
||||
"--without-bash-malloc",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_bash(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.makedir("lib")
|
||||
composer.add_dir("lib/bash", "lib/bash")
|
||||
os.remove(f"{composer.workdir}/bundle/lib/bash/loadables.h")
|
||||
os.remove(f"{composer.workdir}/bundle/lib/bash/Makefile.inc")
|
||||
os.remove(f"{composer.workdir}/bundle/lib/bash/Makefile.sample")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/locale", "share/locale")
|
||||
|
||||
def pack_doc(composer):
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/bash", "share/bash")
|
||||
composer.add_dir("share/doc", "share/doc")
|
||||
composer.add_dir("share/info", "share/info")
|
||||
composer.add_dir("share/man", "share/man")
|
||||
|
||||
package("bash")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libncurses @same-arch")
|
||||
on_pack(pack_bash)
|
||||
|
||||
package("bash-dev")
|
||||
dep("bash (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("bash-doc")
|
||||
on_pack(pack_doc)
|
||||
@@ -0,0 +1,34 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("7.0.3")
|
||||
description("An implementation of the POSIX bc calculator with GNU extensions and dc")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
predefined_build_type = "GDH"
|
||||
if "-linux" in arch.get_target():
|
||||
predefined_build_type = "GNU"
|
||||
cpp.configure(
|
||||
[
|
||||
"--disable-nls",
|
||||
"--opt=3",
|
||||
f"--predefined-build-type={predefined_build_type}",
|
||||
f"--prefix={get_prefix('bc')}",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("bc")
|
||||
dep("semi-libc @same-arch")
|
||||
provide("dc")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,38 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.7.91")
|
||||
description("a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://alpha.gnu.org/gnu/bison/bison-3.7.91.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("gnu-m4")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([f"--prefix={get_prefix('bison')}", "--enable-relocatable"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_bison(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("lib", "lib")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/aclocal", "share/aclocal")
|
||||
composer.add_dir("share/bison", "share/bison")
|
||||
|
||||
|
||||
package("bison")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("gnu-m4")
|
||||
on_pack(pack_bison)
|
||||
link("bin/bison", "/bin/bison")
|
||||
link("bin/yacc", "/bin/yacc", default=False)
|
||||
@@ -0,0 +1,44 @@
|
||||
--- a/unit-tests/Makefile
|
||||
+++ b/unit-tests/Makefile
|
||||
@@ -62,7 +62,6 @@
|
||||
TESTS+= cmd-errors
|
||||
TESTS+= cmd-errors-jobs
|
||||
TESTS+= cmd-errors-lint
|
||||
-TESTS+= cmd-interrupt
|
||||
TESTS+= cmdline
|
||||
TESTS+= cmdline-redirect-stdin
|
||||
TESTS+= cmdline-undefined
|
||||
@@ -139,7 +138,6 @@
|
||||
TESTS+= deptgt-begin-fail
|
||||
TESTS+= deptgt-begin-fail-indirect
|
||||
TESTS+= deptgt-default
|
||||
-TESTS+= deptgt-delete_on_error
|
||||
TESTS+= deptgt-end
|
||||
TESTS+= deptgt-end-fail
|
||||
TESTS+= deptgt-end-fail-all
|
||||
@@ -147,7 +145,6 @@
|
||||
TESTS+= deptgt-end-jobs
|
||||
TESTS+= deptgt-error
|
||||
TESTS+= deptgt-ignore
|
||||
-TESTS+= deptgt-interrupt
|
||||
TESTS+= deptgt-main
|
||||
TESTS+= deptgt-makeflags
|
||||
TESTS+= deptgt-no_parallel
|
||||
@@ -511,8 +508,6 @@
|
||||
|
||||
.if ${.MAKE.OS:NIRIX*} == ""
|
||||
BROKEN_TESTS+= \
|
||||
- cmd-interrupt \
|
||||
- deptgt-interrupt \
|
||||
job-output-null \
|
||||
opt-chdir \
|
||||
opt-debug-x-trace \
|
||||
@@ -538,7 +533,6 @@
|
||||
BROKEN_TESTS+= job-output-null
|
||||
.else
|
||||
BROKEN_TESTS+= \
|
||||
- cmd-interrupt \
|
||||
job-flags \
|
||||
|
||||
.endif
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
VERSION = "2026.6.19"
|
||||
|
||||
version(VERSION)
|
||||
description("The BSD make utility ported to non-BSD systems")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.crufty.net/ftp/pub/sjg/bmake-20260619.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("bc")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--with-default-sys-path=/pkg/bmake={VERSION}@{arch.get_target()}/share/mk",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_bmake(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("bin/bmake", "bin/bmake")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/mk", "share/mk")
|
||||
|
||||
|
||||
package("bmake")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_bmake)
|
||||
@@ -0,0 +1,39 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("1.2.0")
|
||||
description("Brotli compression format")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/cmake")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libbrotli')}/lib",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libbrotli-dev')}/include",
|
||||
f"-DCMAKE_INSTALL_BINDIR={get_prefix('brotli')}/bin",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libbrotli")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("brotli")
|
||||
dep("libbrotli (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libbrotli-dev")
|
||||
dep("libbrotli (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,24 @@
|
||||
from lib.make import *
|
||||
from lib import python
|
||||
|
||||
|
||||
python.version("1.5.0")
|
||||
description("A simple, correct Python build frontend")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://files.pythonhosted.org/packages/78/e0/df5e171f685f82f37b12e1f208064e24244911079d7b767447d1af7e0d70/build-1.5.0.tar.gz")
|
||||
|
||||
python.builddep("$shortcut")
|
||||
python.builddep("packaging.py (>=25.0)")
|
||||
|
||||
|
||||
def build():
|
||||
python.build()
|
||||
python.install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("build.py")
|
||||
python.dep("python")
|
||||
python.dep("packaging.py (>=25.0)")
|
||||
python.use_auto_pack()
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.0")
|
||||
description("Berkeley yacc")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.invisible-island.net/archives/byacc/byacc-2.0.tgz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([f"--prefix={get_prefix('byacc')}", "--enable-btyacc"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
os.rename("bin/yacc", "bin/byacc")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("byacc")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin", "lib", "dev"])
|
||||
link("bin/byacc", "/bin/yacc")
|
||||
@@ -0,0 +1,50 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "1.0.8"
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
version(f"{upstream_version}")
|
||||
description("a freely available, patent free, high-quality data compressor")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(f"https://sourceware.org/pub/bzip2/bzip2-{upstream_version}.tar.gz")
|
||||
|
||||
|
||||
def build():
|
||||
makevars = [f"CC={os.environ.get('CC', 'cc')}"]
|
||||
cpp.make(["-f", "Makefile-libbz2_so"] + makevars)
|
||||
try:
|
||||
shutil.rmtree("../cpp_install")
|
||||
except Exception:
|
||||
pass
|
||||
cpp.make_install(["PREFIX=../cpp_install"] + makevars, chdir=False)
|
||||
shutil.copy2(
|
||||
f"libbz2.so.{upstream_version}",
|
||||
f"../cpp_install/lib/libbz2.so.{upstream_version}",
|
||||
)
|
||||
os.symlink(f"libbz2.so.{upstream_version}", "../cpp_install/lib/libbz2.so.1.0")
|
||||
os.symlink(f"libbz2.so.{upstream_version}", "../cpp_install/lib/libbz2.so.1")
|
||||
os.symlink(f"libbz2.so.{upstream_version}", "../cpp_install/lib/libbz2.so")
|
||||
os.chdir("../cpp_install")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libbzip2")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
dep("semi-libc @same-arch")
|
||||
|
||||
package("bzip2")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("libbzip2 (same)")
|
||||
dep("sh")
|
||||
dep("coreutils")
|
||||
|
||||
package("libbzip2-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("libbzip2 (same)")
|
||||
@@ -0,0 +1,35 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.34.8")
|
||||
description("A C library for asynchronous DNS requests")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/c-ares/c-ares/releases/download/v1.34.8/c-ares-1.34.8.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libcares')}/lib",
|
||||
f"--includedir={get_prefix('libcares-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libcares")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libcares-dev")
|
||||
dep("libcares (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,30 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("2026.7.4")
|
||||
description("SemiOS system-level trusted CA database")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://gitea.semilabs.org/semios/ca-certificates/releases/download/v2026.07.04/ca-certificates-2026.07.04.tar"
|
||||
)
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
|
||||
def build():
|
||||
for i in os.listdir("."):
|
||||
link(f"share/ca-certificates/{i}", f"/share/ca-certificates/{i}")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("share")
|
||||
composer.add_dir(".", "share/ca-certificates")
|
||||
|
||||
|
||||
package("ca-certificates")
|
||||
arch_any()
|
||||
on_pack(pack)
|
||||
@@ -0,0 +1,33 @@
|
||||
from lib.make import *
|
||||
from lib import rust
|
||||
|
||||
|
||||
version("0.98.0")
|
||||
description("The Rust package manager")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/rust-lang/cargo/archive/refs/tags/0.98.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("cargo")
|
||||
builddep("rust")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"pkgconf @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep(f"libgit2-dev @{arch.get_target()}")
|
||||
builddep(f"libssh2-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("cargo")
|
||||
dep("libssl @same-arch")
|
||||
dep("libcrypto @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
recommend("rust")
|
||||
rust.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,20 @@
|
||||
from lib import rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.1.0")
|
||||
description("SemiOS certification utility")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/certutil/archive/v0.1.0.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("certutil")
|
||||
dep("semi-libc @same-arch")
|
||||
rust.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,67 @@
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
|
||||
upstream_version = "4.4.2"
|
||||
[upstream_major, upstream_minor, upstream_rev] = upstream_version.split(".")
|
||||
|
||||
version(upstream_version)
|
||||
description("a cross-platform, open-source build system generator")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/Kitware/CMake/releases/download/v4.4.2/cmake-4.4.2.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("shortcut/cmake")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep(f"libexpat-dev @{arch.get_target()}")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
builddep(f"libbzip2-dev @{arch.get_target()}")
|
||||
builddep(f"liblzma-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"libnghttp2-dev @{arch.get_target()}")
|
||||
builddep(f"librhash-dev @{arch.get_target()}")
|
||||
builddep(f"libarchive-dev @{arch.get_target()}")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["CMAKE_PREFIX_PATH"] = f"/lib/{arch.get_target()}"
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_PREFIX={get_prefix('cmake')}",
|
||||
"-DCMAKE_USE_SYSTEM_CURL=ON",
|
||||
"-DCMAKE_USE_SYSTEM_ZLIB=ON",
|
||||
"-DCMAKE_USE_SYSTEM_ZSTD=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBRHASH=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBARCHIVE=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBLZMA=ON",
|
||||
"-DCMAKE_USE_SYSTEM_EXPAT=ON",
|
||||
"-DCMAKE_USE_SYSTEM_BZIP2=ON",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_cmake(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.makedir("share")
|
||||
composer.add_dir(f"share/cmake-{upstream_major}.{upstream_minor}")
|
||||
|
||||
package("cmake")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
dep("libcurl @same-arch")
|
||||
dep("librhash @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libarchive @same-arch")
|
||||
dep("libexpat @same-arch")
|
||||
on_pack(pack_cmake)
|
||||
@@ -0,0 +1,133 @@
|
||||
import lib.rust as rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.10.0")
|
||||
description("system core utilities")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.10.0.tar.gz")
|
||||
block_hook("autolink")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build(["--features", "unix"])
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
functions = [
|
||||
"[",
|
||||
"arch",
|
||||
"b2sum",
|
||||
"base32",
|
||||
"base64",
|
||||
"basename",
|
||||
"basenc",
|
||||
"cat",
|
||||
"chgrp",
|
||||
"chmod",
|
||||
"chown",
|
||||
"chroot",
|
||||
"cksum",
|
||||
"comm",
|
||||
"cp",
|
||||
"csplit",
|
||||
"cut",
|
||||
"date",
|
||||
"dd",
|
||||
"df",
|
||||
"dir",
|
||||
"dircolors",
|
||||
"dirname",
|
||||
"du",
|
||||
"echo",
|
||||
"env",
|
||||
"expand",
|
||||
"expr",
|
||||
"factor",
|
||||
"false",
|
||||
"fmt",
|
||||
"fold",
|
||||
"groups",
|
||||
"head",
|
||||
"hostid",
|
||||
"hostname",
|
||||
"id",
|
||||
"install",
|
||||
"join",
|
||||
"kill",
|
||||
"link",
|
||||
"ln",
|
||||
"logname",
|
||||
"ls",
|
||||
"md5sum",
|
||||
"mkdir",
|
||||
"mkfifo",
|
||||
"mknod",
|
||||
"mktemp",
|
||||
"more",
|
||||
"mv",
|
||||
"nice",
|
||||
"nl",
|
||||
"nohup",
|
||||
"nproc",
|
||||
"numfmt",
|
||||
"od",
|
||||
"paste",
|
||||
"pathchk",
|
||||
"pinky",
|
||||
"pr",
|
||||
"printenv",
|
||||
"printf",
|
||||
"ptx",
|
||||
"pwd",
|
||||
"readlink",
|
||||
"realpath",
|
||||
"rm",
|
||||
"rmdir",
|
||||
"seq",
|
||||
"sha1sum",
|
||||
"sha224sum",
|
||||
"sha256sum",
|
||||
"sha384sum",
|
||||
"sha512sum",
|
||||
"shred",
|
||||
"shuf",
|
||||
"sleep",
|
||||
"sort",
|
||||
"split",
|
||||
"stat",
|
||||
"stdbuf",
|
||||
"stty",
|
||||
"sum",
|
||||
"sync",
|
||||
"tac",
|
||||
"tail",
|
||||
"tee",
|
||||
"test",
|
||||
"timeout",
|
||||
"touch",
|
||||
"tr",
|
||||
"true",
|
||||
"truncate",
|
||||
"tsort",
|
||||
"tty",
|
||||
"uname",
|
||||
"unexpand",
|
||||
"uniq",
|
||||
"unlink",
|
||||
"uptime",
|
||||
"users",
|
||||
"vdir",
|
||||
"wc",
|
||||
"who",
|
||||
"whoami",
|
||||
"yes",
|
||||
]
|
||||
|
||||
package("coreutils")
|
||||
for func in functions:
|
||||
link(f"bin/coreutils", f"/bin/{func}")
|
||||
rust.use_auto_pack(["bin"])
|
||||
dep("semi-libc @same-arch")
|
||||
@@ -0,0 +1,104 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("8.21.0")
|
||||
description("command line tool and library for transferring data with URLs")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://curl.se/download/curl-8.21.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libnghttp2-dev @{arch.get_target()}")
|
||||
builddep(f"libcares-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libbrotli-dev @{arch.get_target()}")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"libpsl-dev @{arch.get_target()}")
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('curl')}/bin",
|
||||
f"--libdir={get_prefix('libcurl')}/lib",
|
||||
f"--includedir={get_prefix('libcurl-dev')}/include",
|
||||
"--enable-optimize",
|
||||
"--disable-debug",
|
||||
"--enable-warnings",
|
||||
"--enable-symbol-hiding",
|
||||
"--enable-ares",
|
||||
"--enable-http",
|
||||
"--enable-ftp",
|
||||
"--enable-file",
|
||||
"--enable-ipfs",
|
||||
"--disable-ldap",
|
||||
"--disable-ldaps",
|
||||
"--enable-rtsp",
|
||||
"--enable-proxy",
|
||||
"--enable-dict",
|
||||
"--enable-telnet",
|
||||
"--enable-tftp",
|
||||
"--enable-pop3",
|
||||
"--enable-imap",
|
||||
"--enable-smb",
|
||||
"--enable-smtp",
|
||||
"--enable-gopher",
|
||||
"--enable-mqtt",
|
||||
"--disable-init-mem-debug",
|
||||
"--enable-manual",
|
||||
"--enable-docs",
|
||||
"--enable-libcurl-option",
|
||||
"--enable-ipv6",
|
||||
"--enable-openssl-auto-load-config",
|
||||
"--with-ca-path=/var/config/ssl/certs",
|
||||
"--enable-versioned-symbols",
|
||||
"--enable-typecheck",
|
||||
"--enable-verbose",
|
||||
"--disable-tls-srp",
|
||||
"--enable-unix-sockets",
|
||||
"--enable-cookies",
|
||||
"--enable-socketpair",
|
||||
"--enable-http-auth",
|
||||
"--enable-doh",
|
||||
"--enable-mime",
|
||||
"--enable-bindlocal",
|
||||
"--enable-form-api",
|
||||
"--enable-dateparse",
|
||||
"--enable-netrc",
|
||||
"--enable-progress-meter",
|
||||
"--enable-get-easy-options",
|
||||
"--enable-alt-svc",
|
||||
"--enable-headers-api",
|
||||
"--enable-hsts",
|
||||
"--enable-websockets",
|
||||
"--with-openssl",
|
||||
"--with-nghttp2",
|
||||
"--without-libidn2",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libcurl")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libpsl @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libcares @same-arch")
|
||||
dep("libnghttp2 @same-arch")
|
||||
dep("libssl @same-arch")
|
||||
dep("libcrypto @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libbrotli @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("curl")
|
||||
dep("libcurl (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libcurl-dev")
|
||||
dep("libcurl (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,26 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
version("1.37")
|
||||
description("Linux D-Bus Message Broker")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/bus1/dbus-broker/releases/download/v37/dbus-broker-37.tar.xz")
|
||||
|
||||
supported_arch(lambda arch: "linux" in arch)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("linux-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup(["-Dlauncher=false", "--prefix=/"])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("dbus-broker")
|
||||
dep("semi-libc @same-arch")
|
||||
provide("dbus-daemon")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,56 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
version("1.16.2")
|
||||
description("a message bus system, a simple way for applications to talk to one another")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("gettext")
|
||||
builddep("libintl-dev @target")
|
||||
builddep("glib-dev @target")
|
||||
builddep("pkgconf @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"-Dapparmor=disabled",
|
||||
"-Dmessage_bus=false",
|
||||
"-Druntime_dir=/run",
|
||||
"-Dsystemd=disabled",
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libdbus')}/lib",
|
||||
f"--bindir={get_prefix('dbus-tools')}/bin",
|
||||
f"--includedir={get_prefix('libdbus-dev')}/include",
|
||||
"--sysconfdir=/var/config",
|
||||
"--localstatedir=/var/lib/dbus",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libdbus(composer):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if not ".so" in i:
|
||||
continue
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
composer.link_external(f"{get_prefix('libdbus-dev')}/lib/dbus-1.0", f"lib/dbus-1.0")
|
||||
|
||||
package("libdbus")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_libdbus)
|
||||
|
||||
package("dbus-tools")
|
||||
dep("libdbus (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libdbus-dev")
|
||||
dep("libdbus (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,24 @@
|
||||
import lib.rust as rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.5.0")
|
||||
description("utility to compute difference between text files")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/uutils/diffutils/archive/refs/tags/v0.5.0.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("diffutils")
|
||||
rust.use_auto_pack(["bin"])
|
||||
link("bin/diffutils", "/bin/cmp")
|
||||
link("bin/diffutils", "/bin/diff")
|
||||
dep("semi-libc @same-arch")
|
||||
@@ -0,0 +1,39 @@
|
||||
import os
|
||||
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("2.8.3")
|
||||
description("Fast streaming XML parser written in C99")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/libexpat/libexpat/releases/download/R_2_8_3/expat-2.8.3.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/cmake")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libexpat')}/lib",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libexpat-dev')}/include",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libexpat")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
dep("semi-libc @same-arch")
|
||||
|
||||
package("libexpat-tools")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("libexpat (same)")
|
||||
|
||||
package("libexpat-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("libexpat (same)")
|
||||
@@ -0,0 +1,62 @@
|
||||
import subprocess
|
||||
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
VERSION = "5.48"
|
||||
|
||||
version(VERSION)
|
||||
description("utility to infer file type and information")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_git("https://github.com/file/file.git", "FILE5_48")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"liblzma-dev @{arch.get_target()}")
|
||||
builddep(f"libbzip2-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(["autoreconf", "-fiv"], check=True)
|
||||
cpp.configure([
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libmagic')}/lib",
|
||||
f"--includedir={get_prefix('libmagic-dev')}/include",
|
||||
f"--bindir={get_prefix('file')}/bin",
|
||||
f"--datadir={get_prefix('file-magic-db')}/share",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_magic_db(composer):
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/misc")
|
||||
|
||||
|
||||
package("file-magic-db")
|
||||
arch_any()
|
||||
on_pack(pack_magic_db)
|
||||
|
||||
|
||||
package("libmagic")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("file-magic-db (same-version) @any")
|
||||
dep("libz @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("liblzma @same-arch")
|
||||
dep("libbzip2 @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libmagic-dev")
|
||||
dep("libmagic (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("file")
|
||||
dep("libmagic (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,21 @@
|
||||
import lib.rust as rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.10.0")
|
||||
description("implementation of the UNIX findutils")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/uutils/findutils/archive/refs/tags/0.10.0.tar.gz")
|
||||
|
||||
builddep("shortcut/rust")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("findutils")
|
||||
rust.use_auto_pack(["bin"])
|
||||
dep("semi-libc @same-arch")
|
||||
@@ -0,0 +1,29 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.6.4")
|
||||
description("The Fast Lexical Analyzer - scanner generator for lexing in C and C++")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("m4")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
f"--prefix={get_prefix('flex')}",
|
||||
"--disable-nls",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("flex")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin", "lib", "dev"])
|
||||
@@ -0,0 +1,50 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("2.18.3")
|
||||
description("a library for configuring and customizing font access")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.18.3/fontconfig-2.18.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("gettext")
|
||||
builddep("pkgconf")
|
||||
builddep("gperf")
|
||||
builddep("libintl-dev @target")
|
||||
builddep("libfreetype-dev @target")
|
||||
builddep("libexpat-dev @target")
|
||||
builddep("libpng-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
f"--datadir={get_prefix('libfontconfig')}/share",
|
||||
"--sysconfdir=/var/config",
|
||||
"-Dnls=enabled",
|
||||
"-Dtools=enabled",
|
||||
"-Dcache-build=disabled",
|
||||
"-Dxml-backend=expat",
|
||||
"-Ddefault-fonts-dirs=/share/fonts",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libfontconfig")
|
||||
dep("libexpat @same-arch")
|
||||
dep("libfreetype @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("fontconfig")
|
||||
dep("libfontconfig (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libfontconfig-dev")
|
||||
dep("libfontconfig (same)")
|
||||
dep("libexpat-dev @same-arch")
|
||||
dep("libfreetype-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,43 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("2.14.3")
|
||||
description("a freely available software library to render fonts")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("pkgconf")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep(f"libbzip2-dev @{arch.get_target()}")
|
||||
builddep(f"libpng-dev @{arch.get_target()}")
|
||||
builddep(f"libbrotli-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--libdir={get_prefix('libfreetype')}/lib",
|
||||
f"--includedir={get_prefix('libfreetype-dev')}/include",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libfreetype")
|
||||
dep("libz @same-arch")
|
||||
dep("libpng @same-arch")
|
||||
dep("libbzip2 @same-arch")
|
||||
dep("libbrotli @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libfreetype-dev")
|
||||
dep("libfreetype (same)")
|
||||
dep("libz-dev @same-arch")
|
||||
dep("libpng-dev @same-arch")
|
||||
dep("libbzip2-dev @same-arch")
|
||||
dep("libbrotli-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,33 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("0.3.3")
|
||||
description("small implementation of gettext and libintl")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/sabotage-linux/gettext-tiny/releases/download/v0.3.3/gettext-tiny-0.3.3.tar.xz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.make(["LIBINTL=musl"])
|
||||
cpp.make_install(
|
||||
["LIBINTL=musl", "DESTDIR=../cpp_install", "prefix=/"], chdir=False, move=False
|
||||
)
|
||||
os.chdir("../cpp_install")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libintl-dev")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("gettext")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,47 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.55.0")
|
||||
description("a free and open source distributed version control system")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.kernel.org/pub/software/scm/git/git-2.55.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/rust")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("libintl-dev @target")
|
||||
builddep("libz-dev @target")
|
||||
builddep("aws-lc-dev @target")
|
||||
builddep("linux-dev @target")
|
||||
builddep("libcurl-dev @target")
|
||||
builddep("libexpat-dev @target")
|
||||
builddep("gettext")
|
||||
builddep("libarchive-tools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--prefix={get_prefix('git')}",
|
||||
"--with-gitconfig=/var/config/git/config.ini",
|
||||
"--with-gitattributes=/var/config/git/attributes.txt",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_git(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("libexec", "libexec")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/git-core")
|
||||
composer.add_dir("share/gitweb")
|
||||
composer.add_dir("share/perl5")
|
||||
|
||||
|
||||
package("git")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libz @same-arch")
|
||||
on_pack(pack_git)
|
||||
@@ -0,0 +1,124 @@
|
||||
import shutil
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
upstream_version = "2.89.2"
|
||||
|
||||
version(upstream_version)
|
||||
description("a general-purpose, portable utility library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://download.gnome.org/sources/glib/2.89/glib-2.89.2.tar.xz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/meson")
|
||||
builddep("gettext")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep("pcre2-tools")
|
||||
builddep(f"libpcre2-dev @{arch.get_target()}")
|
||||
builddep(f"libffi-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep("libexpat")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["CFLAGS"] = os.environ.get("CFLAGS", "") + " -Wno-missing-include-dirs"
|
||||
os.environ["CXXFLAGS"] = os.environ.get("CXXLAGS", "") + os.environ["CFLAGS"]
|
||||
cpp.meson_setup([
|
||||
"-Druntime_dir=/run",
|
||||
f"-Dgio_module_dir=/lib/{arch.get_target()}/gio/modules",
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('glib-tools')}/bin",
|
||||
f"--libdir={get_prefix('glib-dev')}/lib",
|
||||
f"--includedir={get_prefix('glib-dev')}/include",
|
||||
f"--libexecdir={get_prefix('libglib')}/libexec",
|
||||
f"--datadir={get_prefix('glib')}/share",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libxxx(composer, prefix):
|
||||
composer.makedirs("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if not i.startswith(prefix):
|
||||
continue
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
|
||||
def pack_libglib(composer):
|
||||
composer.add_dir("libexec", "libexec")
|
||||
pack_libxxx(composer, "libglib")
|
||||
|
||||
|
||||
package("libglib")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libpcre2 @same-arch")
|
||||
on_pack(pack_libglib)
|
||||
|
||||
|
||||
package("libgobject")
|
||||
dep("libglib (same)")
|
||||
dep("libffi @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgobject"))
|
||||
|
||||
package("libgthread")
|
||||
dep("libglib (same)")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgthread"))
|
||||
|
||||
package("libgmodule")
|
||||
dep("libglib (same)")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgmodule"))
|
||||
|
||||
package("libgio")
|
||||
dep("libglib (same)")
|
||||
dep("libgobject (same)")
|
||||
dep("libgmodule (same)")
|
||||
dep("libz @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgio"))
|
||||
|
||||
package("libgirepository")
|
||||
dep("libglib (same)")
|
||||
dep("libgobject (same)")
|
||||
dep("libgmodule (same)")
|
||||
dep("libffi @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libxxx(composer, "libgirepository"))
|
||||
|
||||
|
||||
def pack_glib(composer):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if not i.endswith(".so"):
|
||||
continue
|
||||
pkgname = i.split("-")[0]
|
||||
os.symlink(f"{get_prefix(pkgname)}/lib/{i}", f"{composer.workdir}/bundle/lib/{i}")
|
||||
os.symlink(f"{get_prefix('glib-dev')}/lib/glib-2.0", f"{composer.workdir}/bundle/lib/glib-2.0")
|
||||
composer.add_dir("share", "share")
|
||||
|
||||
package("glib")
|
||||
dep("libglib (same)")
|
||||
dep("libgobject (same)")
|
||||
dep("libgthread (same)")
|
||||
dep("libgmodule (same)")
|
||||
dep("libgio (same)")
|
||||
dep("libgirepository (same)")
|
||||
on_pack(pack_glib)
|
||||
|
||||
package("glib-tools")
|
||||
dep("glib (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("glib-dev")
|
||||
dep("glib (same)")
|
||||
dep("libz-dev @same-arch")
|
||||
dep("libpcre2-dev @same-arch")
|
||||
dep("libffi-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,43 @@
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("16.5.0")
|
||||
description("Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/KhronosGroup/glslang/archive/refs/tags/16.5.0.tar.gz")
|
||||
|
||||
builddep("shortcut/cmake")
|
||||
builddep("shortcut/c++")
|
||||
builddep("spirv-tools-dev")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
"-DALLOW_EXTERNAL_SPIRV_TOOLS=ON",
|
||||
f"-DSPIRV-Tools-opt_DIR=/lib/{arch.get_target()}/cmake/SPIRV-Tools-opt",
|
||||
f"-DSPIRV-Tools_DIR=/lib/{arch.get_target()}/cmake/SPIRV-Tools",
|
||||
"-DGLSLANG_TESTS=OFF",
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('glslang-dev')}/lib",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('glslang-dev')}/include",
|
||||
f"-DCMAKE_INSTALL_BINDIR={get_prefix('glslang')}/bin",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_glslang(composer):
|
||||
composer.add_dir("bin")
|
||||
|
||||
package("glslang")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(pack_glslang)
|
||||
|
||||
package("glslang-dev")
|
||||
dep("libcxx-dev @same-arch")
|
||||
cpp.use_auto_pack(["lib", "dev"])
|
||||
@@ -0,0 +1,31 @@
|
||||
import os
|
||||
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("1.4.21")
|
||||
description("an implementation of the traditional Unix macro processor")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/m4/m4-1.4.21.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[f"--prefix={get_prefix('gnu-m4')}", "--enable-changeword", "--disable-nls"]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
os.rename("bin/m4", "bin/gnu-m4")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("gnu-m4")
|
||||
provide("m4")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
link("bin/gnu-m4", "/bin/m4")
|
||||
@@ -0,0 +1,36 @@
|
||||
--- a/lib/fnmatch.c
|
||||
+++ b/lib/fnmatch.c
|
||||
@@ -120,9 +120,6 @@
|
||||
/* Avoid depending on library functions or files
|
||||
whose names are inconsistent. */
|
||||
|
||||
-# if !defined _LIBC && !defined getenv
|
||||
-extern char *getenv ();
|
||||
-# endif
|
||||
|
||||
# ifndef errno
|
||||
extern int errno;
|
||||
|
||||
--- a/src/getopt.c
|
||||
+++ b/src/getopt.c
|
||||
@@ -202,7 +202,7 @@ static char *posixly_correct;
|
||||
whose names are inconsistent. */
|
||||
|
||||
#ifndef getenv
|
||||
-extern char *getenv ();
|
||||
+extern char *getenv (const char *);
|
||||
#endif
|
||||
|
||||
static char *
|
||||
|
||||
--- a/src/getopt.h
|
||||
+++ b/src/getopt.h
|
||||
@@ -102,7 +102,7 @@ struct option
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt (int argc, char *const *argv, const char *shortopts);
|
||||
#else /* not __GNU_LIBRARY__ */
|
||||
-extern int getopt ();
|
||||
+extern int getopt (int, char * const*, const char *);
|
||||
#endif /* __GNU_LIBRARY__ */
|
||||
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
@@ -0,0 +1,23 @@
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("4.4.1")
|
||||
description("a tool which controls the generation of executables and other non-source files of a program from the program's source files")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([f"--prefix={get_prefix('gnu-make')}"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("gnu-make")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("semi-libc @same-arch")
|
||||
@@ -0,0 +1,37 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("4.10")
|
||||
description("a non-interactive command-line text editor")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/gnu/sed/sed-4.10.tar.gz")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
f"--prefix={get_prefix('gnu-sed')}",
|
||||
"--disable-i18n",
|
||||
"--disable-nls",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
os.rename("bin/sed", "bin/gsed")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("gnu-sed")
|
||||
provide("sed")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
link("bin/gsed", "/bin/gsed")
|
||||
link("bin/gsed", "/bin/sed")
|
||||
@@ -0,0 +1,24 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("3.3")
|
||||
description("GNU perfect hash function generator")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://ftp.gnu.org/pub/gnu/gperf/gperf-3.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure()
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("gperf")
|
||||
dep("libcxx @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,48 @@
|
||||
import os
|
||||
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("1.3.15")
|
||||
description("Graphite is a \"smart font\" system developed specifically to handle the complexities of lesser-known languages of the world.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/silnrsi/graphite/releases/download/1.3.15/graphite2-1.3.15.tgz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/cmake")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_PREFIX={get_prefix('libgraphite-dev')}",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_dev(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("include", "include")
|
||||
composer.add_dir("share", "share")
|
||||
composer.makedir("lib")
|
||||
composer.add_dir("lib/pkgconfig", "lib/pkgconfig")
|
||||
for i in os.listdir("lib"):
|
||||
if not os.path.isfile(f"lib/{i}"):
|
||||
continue
|
||||
if ".so" in i:
|
||||
os.symlink(f"{get_prefix('libgraphite')}/lib/{i}", f"{composer.workdir}/bundle/lib/{i}")
|
||||
else:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
|
||||
package("libgraphite")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libgraphite-dev")
|
||||
dep("libgraphite (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
on_pack(pack_dev)
|
||||
@@ -0,0 +1,34 @@
|
||||
import subprocess
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("15.1.3")
|
||||
description("SemiOS file pattern searcher")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/grep/archive/v15.1.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep(f"libpcre2-dev @{arch.get_target()}")
|
||||
builddep("pcre2-tools")
|
||||
builddep(f"libbzip2-dev @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(["./build.sh"], check=True)
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_grep(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("grep", "bin/grep")
|
||||
|
||||
|
||||
package("grep")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libpcre2 @same-arch")
|
||||
on_pack(pack_grep)
|
||||
link("bin/grep", "/bin/egrep")
|
||||
link("bin/grep", "/bin/fgrep")
|
||||
@@ -0,0 +1,30 @@
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("3.5.2")
|
||||
description("an interactive process viewer")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/htop-dev/htop/releases/download/3.5.2/htop-3.5.2.tar.xz")
|
||||
|
||||
builddep("shortcut/autotools")
|
||||
builddep("shortcut/c")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--prefix={get_prefix('htop')}",
|
||||
"--enable-unicode",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("htop")
|
||||
dep("libncurses @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,37 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2026.4.22")
|
||||
description("code and data that represent the history of local time for many representative locations worldwide")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://data.iana.org/time-zones/releases/tzdb-2026b.tar.lz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_db(composer):
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/zoneinfo", "share/zoneinfo")
|
||||
|
||||
|
||||
package("iana-timezone-db")
|
||||
arch_any()
|
||||
on_pack(pack_db)
|
||||
|
||||
package("iana-timezone-tools")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("iana-timezone-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,45 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("78.3")
|
||||
description("a mature, widely used set of C/C++ libraries providing Unicode and Globalization support for software applications")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
os.chdir("source")
|
||||
cpp.configure(
|
||||
[
|
||||
"--enable-plugins",
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('icu4c')}/bin",
|
||||
f"--sbindir={get_prefix('icu4c')}/sbin",
|
||||
f"--libdir={get_prefix('libicu4c')}/lib",
|
||||
f"--includedir={get_prefix('libicu4c-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libicu4c")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
dep("semi-libc @same-arch")
|
||||
|
||||
package("icu4c")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("libicu4c (same)")
|
||||
|
||||
package("libicu4c-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("libicu4c (same)")
|
||||
@@ -0,0 +1,22 @@
|
||||
from lib.make import *
|
||||
from lib import python
|
||||
|
||||
|
||||
python.version("1.0.1")
|
||||
description("A library for installing Python wheels.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://files.pythonhosted.org/packages/06/fe/b9f481cf0cc867958a21338baa900357b7b7d86cac9b025948049d77923c/installer-1.0.1.tar.gz")
|
||||
|
||||
python.builddep("$shortcut")
|
||||
|
||||
|
||||
def build():
|
||||
python.build()
|
||||
python.install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("installer.py")
|
||||
python.dep("python")
|
||||
python.use_auto_pack()
|
||||
@@ -0,0 +1,40 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("7.1.0")
|
||||
description("a collection of userspace utilities for controlling and monitoring various aspects of networking in the Linux kernel")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_git("https://git.kernel.org/pub/scm/network/iproute2/iproute2.git", "v7.1.0")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("git")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure()
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_iproute2(composer):
|
||||
composer.makedirs("lib/iproute2")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("sbin", "bin")
|
||||
composer.add_dir("share/iproute2", "share/iproute2")
|
||||
composer.add_dir("lib/tc", "lib/iproute2/tc")
|
||||
|
||||
|
||||
package("iproute2")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_iproute2)
|
||||
|
||||
package("iproute2-dev")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,60 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("1.34")
|
||||
description("a set of tools to handle common tasks with Linux kernel modules like insert, remove, list, check properties, resolve dependencies and aliases")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/kmod-project/kmod/archive/refs/tags/v34.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"liblzma-dev @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"-Dprefix=/",
|
||||
f"-Dlibdir={get_prefix('libkmod')}/lib",
|
||||
f"-Dincludedir={get_prefix('libkmod-dev')}/include",
|
||||
f"-Dbindir={get_prefix('kmod')}/bin",
|
||||
f"-Ddistconfdir={get_prefix('libkmod')}/share",
|
||||
"-Dmoduledir=/lib/lkm",
|
||||
"-Dtools=true",
|
||||
"-Ddlopen=all",
|
||||
"-Dmanpages=false",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libkmod")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libcrypto @same-arch")
|
||||
recommend("libzstd @same-arch")
|
||||
recommend("libz @same-arch")
|
||||
recommend("liblzma @same-arch")
|
||||
|
||||
package("kmod")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("libkmod (same)")
|
||||
link("bin/kmod", "/bin/depmod")
|
||||
link("bin/kmod", "/bin/insmod")
|
||||
link("bin/kmod", "/bin/lsmod")
|
||||
link("bin/kmod", "/bin/modinfo")
|
||||
link("bin/kmod", "/bin/modprobe")
|
||||
link("bin/kmod", "/bin/rmmod")
|
||||
|
||||
package("libkmod-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("libkmod (same)")
|
||||
dep("libzstd-dev @same-arch")
|
||||
dep("libz-dev @same-arch")
|
||||
dep("liblzma-dev @same-arch")
|
||||
@@ -0,0 +1,25 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
|
||||
version("704")
|
||||
description("a free, open-source file pager")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://www.greenwoodsoftware.com/less/less-704.tar.gz")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([f"--prefix={get_prefix('less')}", "--with-regex=posix"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("less")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libncurses @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,57 @@
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.8.9")
|
||||
description("Multi-format archive and compression library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/libarchive/libarchive/releases/download/v3.8.9/libarchive-3.8.9.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"libbzip2-dev @{arch.get_target()}")
|
||||
builddep(f"liblzma-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('libarchive-tools')}/bin",
|
||||
f"--libdir={get_prefix('libarchive')}/lib",
|
||||
f"--includedir={get_prefix('libarchive-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libarchive")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
dep("libcrypto@same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("liblzma @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
|
||||
package("libarchive-tools")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("libarchive (same)")
|
||||
provide("tar")
|
||||
provide("cpio")
|
||||
provide("unzip")
|
||||
link("bin/bsdtar", "/bin/tar")
|
||||
link("bin/bsdcpio", "/bin/cpio")
|
||||
link("bin/bsdunzip", "/bin/unzip")
|
||||
|
||||
package("libarchive-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("libarchive (same)")
|
||||
dep("aws-lc-dev @same-arch")
|
||||
@@ -0,0 +1,43 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("2.4.134")
|
||||
description("libdrm Direct Rendering Manager library and headers")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.freedesktop.org/mesa/libdrm/-/archive/libdrm-2.4.134/libdrm-libdrm-2.4.134.tar.gz")
|
||||
|
||||
builddep("shortcut/meson")
|
||||
builddep("shortcut/c")
|
||||
builddep("linux-dev @target")
|
||||
builddep("pkgconf")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"--prefix", get_prefix('libdrm-dev'),
|
||||
"--libdir", f"{get_prefix('libdrm')}/lib",
|
||||
"--datadir", f"{get_prefix('libdrm')}/share",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libdrm(composer):
|
||||
composer.add_dir("share")
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if ".so" in i:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
package("libdrm")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_libdrm)
|
||||
|
||||
package("libdrm-dev")
|
||||
dep("libdrm (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,38 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.7.1")
|
||||
description("A portable foreign-function interface library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/libffi/libffi/releases/download/v3.7.1/libffi-3.7.1.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libffi')}/lib",
|
||||
f"--includedir={get_prefix('libffi-dev')}/include",
|
||||
"--enable-portable-binary",
|
||||
"--disable-multi-os-directory",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libffi")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libffi-dev")
|
||||
dep("libffi (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,33 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from lib import arch
|
||||
from lib.make import *
|
||||
|
||||
version("0.2.0")
|
||||
description("provides compatibility objects to gcc runtime libraries")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitea.semilabs.org/semios/libgcc-compat/archive/v0.2.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep(f"libunwind-dev @{arch.get_target()}")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(["./build.sh"], check=True)
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("libgcc_s.so.1", "lib/libgcc_s.so.1")
|
||||
composer.addfile("libatomic.so.1", "lib/libatomic.so.1")
|
||||
|
||||
|
||||
package("libgcc-compat")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libunwind @same-arch")
|
||||
on_pack(pack)
|
||||
@@ -0,0 +1,102 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("1.7.0")
|
||||
description("The GL Vendor-Neutral Dispatch library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v1.7.0/libglvnd-v1.7.0.tar.gz")
|
||||
|
||||
builddep("shortcut/meson")
|
||||
builddep("shortcut/c")
|
||||
builddep("libexpat")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"--sysconfdir=/var/config",
|
||||
"--datadir=/share",
|
||||
|
||||
"-Degl=true",
|
||||
"-Dentrypoint-patching=disabled",
|
||||
|
||||
# X11 Stuff
|
||||
# We don't have X11 yet, so leave them disabled
|
||||
"-Dx11=disabled",
|
||||
"-Dglx=disabled",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def fix_pc(path, name):
|
||||
with open(path, 'r') as file:
|
||||
content = file.read()
|
||||
devpkgname = f"{name}-dev"
|
||||
content = content.replace("prefix=/usr/local", f"prefix=/")
|
||||
content = content.replace("includedir=${prefix}/include", f"includedir={get_prefix(devpkgname)}/include")
|
||||
content = content.replace("libdir=${prefix}/lib", f"libdir={get_prefix(name)}/lib")
|
||||
with open(path, 'wt+') as file:
|
||||
file.write(content)
|
||||
|
||||
def pack_librun(composer, libname):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if ".so" in i and i.startswith(libname):
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
def pack_libdev(composer, pkgname, pkgconfname, includenames):
|
||||
composer.makedirs("lib/pkgconfig")
|
||||
for i in os.listdir("lib/pkgconfig"):
|
||||
if pkgconfname == i:
|
||||
composer.addfile(f"lib/pkgconfig/{i}", f"lib/pkgconfig/{i}")
|
||||
fix_pc(f"{composer.workdir}/bundle/lib/pkgconfig/{i}", pkgname)
|
||||
composer.makedir("include")
|
||||
for i in includenames:
|
||||
composer.add_dir(f"include/{i}", f"include/{i}")
|
||||
|
||||
|
||||
package("libgldispatch")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_librun(composer, "libGLdispatch"))
|
||||
|
||||
package("libgldispatch-dev")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_libdev(composer, "libgldispatch", "libglvnd.pc", ["glvnd", "KHR"]))
|
||||
|
||||
package("libegl")
|
||||
dep("libgldispatch (same)")
|
||||
on_pack(lambda composer: pack_librun(composer, "libEGL"))
|
||||
|
||||
package("libegl-dev")
|
||||
dep("libegl (same)")
|
||||
on_pack(lambda composer: pack_libdev(composer, "libegl", "egl.pc", ["EGL"]))
|
||||
|
||||
package("libglesv1-cm")
|
||||
dep("libgldispatch (same)")
|
||||
on_pack(lambda composer: pack_librun(composer, "libGLESv1_CM"))
|
||||
|
||||
package("libglesv1-cm-dev")
|
||||
dep("libglesv1-cm (same)")
|
||||
on_pack(lambda composer: pack_libdev(composer, "libglesv1-cm", "glesv1_cm.pc", ["GLES"]))
|
||||
|
||||
package("libglesv2")
|
||||
dep("libgldispatch (same)")
|
||||
on_pack(lambda composer: pack_librun(composer, "libGLESv2"))
|
||||
|
||||
package("libglesv2-dev")
|
||||
dep("libglesv2 (same)")
|
||||
on_pack(lambda composer: pack_libdev(composer, "libglesv2", "glesv2.pc", ["GLES2", "GLES3"]))
|
||||
|
||||
package("libopengl")
|
||||
dep("libgldispatch (same)")
|
||||
on_pack(lambda composer: pack_librun(composer, "libOpenGL"))
|
||||
|
||||
package("libopengl-dev")
|
||||
dep("libopengl (same)")
|
||||
on_pack(lambda composer: pack_libdev(composer, "libopengl", "opengl.pc", ["GL"]))
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "3.2.25"
|
||||
|
||||
version(upstream_version)
|
||||
source_url("https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("flex")
|
||||
builddep("bison")
|
||||
builddep("gnu-m4")
|
||||
builddep("linux-dev @target")
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
"--prefix=/",
|
||||
"--sysconfdir=/var/config",
|
||||
f"--includedir={get_prefix('libnl-dev')}/include",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
SO_SUFFIX = ["", ".200", ".200.20.0"]
|
||||
|
||||
|
||||
def pack_core(composer):
|
||||
composer.makedir("lib")
|
||||
for i in SO_SUFFIX:
|
||||
composer.addfile(f"lib/libnl-3.so{i}", f"lib/libnl-3.so{i}")
|
||||
|
||||
package("libnl-core")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_core)
|
||||
|
||||
def pack_genl(composer):
|
||||
composer.makedir("lib")
|
||||
for i in SO_SUFFIX:
|
||||
composer.addfile(f"lib/libnl-genl-3.so{i}", f"lib/libnl-genl-3.so{i}")
|
||||
|
||||
package("libnl-genl")
|
||||
dep("libnl-core (same)")
|
||||
on_pack(pack_genl)
|
||||
|
||||
def pack_idiag(composer):
|
||||
composer.makedir("lib")
|
||||
for i in SO_SUFFIX:
|
||||
composer.addfile(f"lib/libnl-idiag-3.so{i}", f"lib/libnl-idiag-3.so{i}")
|
||||
|
||||
package("libnl-idiag")
|
||||
dep("libnl-core (same)")
|
||||
on_pack(pack_idiag)
|
||||
|
||||
def pack_route(composer):
|
||||
composer.makedir("lib")
|
||||
for i in SO_SUFFIX:
|
||||
composer.addfile(f"lib/libnl-route-3.so{i}", f"lib/libnl-route-3.so{i}")
|
||||
|
||||
package("libnl-route")
|
||||
dep("libnl-core (same)")
|
||||
on_pack(pack_route)
|
||||
|
||||
def pack_nf(composer):
|
||||
composer.makedir("lib")
|
||||
for i in SO_SUFFIX:
|
||||
composer.addfile(f"lib/libnl-nf-3.so{i}", f"lib/libnl-nf-3.so{i}")
|
||||
|
||||
package("libnl-nf")
|
||||
dep("libnl-core (same)")
|
||||
dep("libnl-route (same)")
|
||||
on_pack(pack_nf)
|
||||
|
||||
def pack_cli(composer):
|
||||
composer.makedir("lib")
|
||||
for i in SO_SUFFIX:
|
||||
composer.addfile(f"lib/libnl-cli-3.so{i}", f"lib/libnl-cli-3.so{i}")
|
||||
|
||||
package("libnl-cli")
|
||||
dep("libnl-core (same)")
|
||||
dep("libnl-nf (same)")
|
||||
dep("libnl-route (same)")
|
||||
on_pack(pack_cli)
|
||||
|
||||
def pack_libnl(composer):
|
||||
composer.makedir("lib")
|
||||
for soname in ["-3", "-nf-3", "-route-3", "-idiag-3", "-genl-3"]:
|
||||
if soname == "-3":
|
||||
pkgname = "libnl-core"
|
||||
elif "nf" in soname:
|
||||
pkgname = "libnl-nf"
|
||||
elif "route" in soname:
|
||||
pkgname = "libnl-route"
|
||||
elif "idiag" in soname:
|
||||
pkgname = "libnl-idiag"
|
||||
elif "genl" in soname:
|
||||
pkgname = "libnl-genl"
|
||||
for suffix in SO_SUFFIX:
|
||||
fullname = f"libnl{soname}.so{suffix}"
|
||||
os.symlink(
|
||||
f"/pkg/{pkgname}={upstream_version}@{arch.get_target()}/lib/{fullname}",
|
||||
f"{composer.workdir}/bundle/lib/{fullname}",
|
||||
)
|
||||
|
||||
package("libnl")
|
||||
dep("libnl-core (same)")
|
||||
dep("libnl-nf (same)")
|
||||
dep("libnl-route (same)")
|
||||
dep("libnl-idiag (same)")
|
||||
dep("libnl-genl (same)")
|
||||
on_pack(pack_libnl)
|
||||
|
||||
package("libnl-tools")
|
||||
dep("libnl (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libnl-dev")
|
||||
dep("libnl (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,33 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.6.1")
|
||||
description("a totally open, royalty-free, highly versatile audio codec")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://downloads.xiph.org/releases/opus/opus-1.6.1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libopus')}/lib",
|
||||
f"--includedir={get_prefix('libopus-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libopus")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libopus-dev")
|
||||
dep("libopus (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,56 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("1.6.58")
|
||||
description("the official PNG reference library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.58.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("libz-ng-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--libdir={get_prefix('libpng')}/lib",
|
||||
f"--includedir={get_prefix('libpng')}/include",
|
||||
"--enable-hardware-optimizations=on",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_tools(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("bin/png-fix-itxt")
|
||||
composer.addfile("bin/pngfix")
|
||||
|
||||
def pack_dev(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("lib/libpng.a")
|
||||
composer.addfile("lib/libpng.la")
|
||||
composer.addfile("lib/libpng16.a")
|
||||
composer.addfile("lib/libpng16.la")
|
||||
composer.add_dir("lib/pkgconfig")
|
||||
composer.makedir("bin")
|
||||
composer.addfile("bin/libpng-config")
|
||||
composer.addfile("bin/libpng16-config")
|
||||
composer.add_dir("include")
|
||||
|
||||
|
||||
package("libpng")
|
||||
dep("libz @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libpng-tools")
|
||||
dep("libpng (same)")
|
||||
on_pack(pack_tools)
|
||||
|
||||
package("libpng-dev")
|
||||
dep("libpng (same)")
|
||||
dep("libz-dev @same-arch")
|
||||
on_pack(pack_dev)
|
||||
@@ -0,0 +1,43 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("0.23.1")
|
||||
description("C library for the Public Suffix List")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/rockdaboot/libpsl/releases/download/0.23.1/libpsl-0.23.1.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libicu4c-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libpsl')}/lib",
|
||||
f"--includedir={get_prefix('libpsl-dev')}/include",
|
||||
"--disable-nls",
|
||||
"--enable-runtime=libicu",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libpsl")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libicu4c @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libpsl-tools")
|
||||
dep("libpsl (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libpsl-dev")
|
||||
dep("libpsl (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,40 @@
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("2.24.1")
|
||||
description("an implementation for VA-API")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/intel/libva/releases/download/2.24.1/libva-2.24.1.tar.bz2")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("libwayland-dev @target")
|
||||
builddep("libdrm-dev @target")
|
||||
builddep("libffi-dev @target")
|
||||
builddep("pkgconf @target")
|
||||
builddep("linux-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--libdir={get_prefix('libva')}/lib",
|
||||
f"--includedir={get_prefix('libva-dev')}/include",
|
||||
"--enable-wayland",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libva")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libwayland @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libva-dev")
|
||||
dep("libva (same)")
|
||||
dep("libwayland-dev @same-arch")
|
||||
dep("libdrm-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,31 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("2.15.3")
|
||||
description("an XML toolkit implemented in C, originally developed for the GNOME Project")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.3.tar.xz")
|
||||
|
||||
builddep("shortcut/autotools")
|
||||
builddep("shortcut/c")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
f"--libdir={get_prefix('libxml2')}/lib",
|
||||
f"--includedir={get_prefix('libxml2-dev')}/include",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libxml2")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libxml2-dev")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,19 @@
|
||||
from lib.make import *
|
||||
|
||||
version("2.0")
|
||||
description("A small self-contained alternative to readline and libedit")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/antirez/linenoise/archive/refs/tags/2.0.tar.gz")
|
||||
|
||||
on_build(lambda: None)
|
||||
|
||||
|
||||
def pack_dev(composer):
|
||||
composer.addfile("linenoise.c", "linenoise.c")
|
||||
composer.addfile("linenoise.h", "linenoise.h")
|
||||
composer.addfile("Makefile", "Makefile")
|
||||
|
||||
|
||||
package("linenoise-dev")
|
||||
arch_any()
|
||||
on_pack(pack_dev)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,84 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
import lib.arch as arch
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "6.18.45"
|
||||
|
||||
version(f"{upstream_version}")
|
||||
description("the Linux operating system kernel")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
f"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-{upstream_version}.tar.xz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("libncurses-dev")
|
||||
builddep("aws-lc-dev")
|
||||
builddep("aws-lc-tools")
|
||||
|
||||
|
||||
def get_arch():
|
||||
return arch.get_target().split("-")[0].replace("aarch64", "arm64")
|
||||
|
||||
|
||||
def build():
|
||||
makeopts = [f"ARCH={get_arch()}", "LLVM=1", f"HOSTCC={os.environ.get('HOSTCC', 'cc')}"]
|
||||
config_name = get_arch()
|
||||
if os.environ.get("LINUX_VARIANT"):
|
||||
config_name += "-" + os.environ["LINUX_VARIANT"]
|
||||
config_file = "../../configs/config." + config_name
|
||||
|
||||
shutil.copy2(config_file, ".config")
|
||||
|
||||
cpp.make(makeopts + ["olddefconfig"])
|
||||
cpp.make(makeopts)
|
||||
cpp.make(["headers_install", "INSTALL_HDR_PATH=../kheaders_install"])
|
||||
cpp.make(["install", "INSTALL_PATH=../kimage_install"])
|
||||
cpp.make(
|
||||
["modules_install", "INSTALL_MOD_STRIP=1", "INSTALL_MOD_PATH=../kmod_install"]
|
||||
)
|
||||
os.remove(f"../kmod_install/lib/modules/{upstream_version}/build")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
base_name = "linux"
|
||||
if os.environ.get("LINUX_VARIANT"):
|
||||
base_name += "-" + os.environ["LINUX_VARIANT"]
|
||||
|
||||
|
||||
def pack_linux_dev(composer):
|
||||
composer.add_dir(
|
||||
"../kheaders_install/include",
|
||||
"include",
|
||||
)
|
||||
|
||||
|
||||
package(f"{base_name}-dev")
|
||||
on_pack(pack_linux_dev)
|
||||
|
||||
|
||||
def pack_linux(composer):
|
||||
try:
|
||||
composer.addfile(f"../kimage_install/vmlinux-{upstream_version}", "vmlinux")
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
composer.addfile(f"../kimage_install/vmlinuz-{upstream_version}", "vmlinuz")
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
composer.addfile(
|
||||
f"../kimage_install/System.map-{upstream_version}", "System.map"
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
composer.add_dir(f"../kmod_install/lib/modules/{upstream_version}", "modules")
|
||||
|
||||
|
||||
package(f"{base_name}")
|
||||
on_pack(pack_linux)
|
||||
@@ -0,0 +1,334 @@
|
||||
import os
|
||||
import subprocess
|
||||
import shutil
|
||||
import glob
|
||||
|
||||
import lib
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
pkgver = "22.1.8"
|
||||
[pkgver_major, pkgver_minor, pkgver_rev] = pkgver.split(".")
|
||||
|
||||
version(pkgver)
|
||||
description("a collection of modular and reusable compiler and toolchain technologies")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{pkgver}/llvm-project-{pkgver}.src.tar.xz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/cmake")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
builddep(f"libffi-dev @{arch.get_target()}")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libunwind-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
srcdir = None
|
||||
packname = None
|
||||
|
||||
def llvm_host_triple():
|
||||
return arch.get_target().replace("-semios-linux", "-unknown-linux-musl")
|
||||
|
||||
def cmake(sourcedir, args):
|
||||
builddir = os.getcwd() + f"/../_build_{sourcedir}"
|
||||
installdir = os.getcwd() + f"/../_cpp_install/{sourcedir}"
|
||||
template_args = [
|
||||
"cmake", "-G", "Ninja", "-S", sourcedir, "-B", builddir,
|
||||
"-DCMAKE_BUILD_TYPE=Release",
|
||||
|
||||
f"-DLLVM_DEFAULT_TARGET_TRIPLE={llvm_host_triple()}",
|
||||
f"-DLLVM_HOST_TRIPLE={llvm_host_triple()}",
|
||||
|
||||
"-DLLVM_ENABLE_EH=ON",
|
||||
"-DLLVM_ENABLE_RTTI=ON",
|
||||
"-DLLVM_ENABLE_ASSERTIONS=OFF",
|
||||
"-DLLVM_BUILD_LLVM_DYLIB=ON",
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON",
|
||||
|
||||
"-DLLVM_ENABLE_LIBCXX=ON",
|
||||
"-DLLVM_ENABLE_LLD=ON",
|
||||
"-DLLVM_ENABLE_FFI=ON",
|
||||
]
|
||||
subprocess.run(template_args + args, check=True)
|
||||
subprocess.run(["cmake", "--build", builddir], check=True)
|
||||
os.environ["DESTDIR"] = installdir
|
||||
subprocess.run(["cmake", "--install", builddir], check=True)
|
||||
|
||||
def import_llvm():
|
||||
return [f"-DLLVM_ROOT={os.getcwd()}/../_cpp_install/llvm/usr/local"]
|
||||
|
||||
def import_clang():
|
||||
return [f"-DClang_DIR={os.getcwd()}/../_cpp_install/clang/usr/local"]
|
||||
|
||||
def enter_install(name):
|
||||
global packname
|
||||
packname = name
|
||||
|
||||
def auto_pack_static(composer):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if ".a" in i:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
def auto_pack_dev(composer, name, devbins=[], extdirs=["lib/cmake"]):
|
||||
composer.add_dir("include", "include")
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
prefix = None
|
||||
if os.path.isdir(f"lib/{i}") and f"lib/{i}" in extdirs:
|
||||
composer.add_dir(f"lib/{i}", f"lib/{i}")
|
||||
elif ".so" in i:
|
||||
prefix = get_prefix(f"lib{name}")
|
||||
elif ".a" in i:
|
||||
prefix = get_prefix(f"lib{name}-static")
|
||||
if prefix:
|
||||
os.symlink(f"{prefix}/lib/{i}", f"{composer.workdir}/bundle/lib/{i}")
|
||||
composer.makedir("bin")
|
||||
for i in devbins:
|
||||
composer.addfile(f"bin/{i}", f"bin/{i}")
|
||||
for i in os.listdir("bin"):
|
||||
if i in devbins:
|
||||
continue
|
||||
prefix = get_prefix(name)
|
||||
os.symlink(f"{prefix}/bin/{i}", f"{composer.workdir}/bundle/bin/{i}")
|
||||
|
||||
def auto_pack_runtime_lib(composer, name):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir("lib"):
|
||||
if name in i and ".so" in i:
|
||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
||||
|
||||
def auto_pack_glob(composer, matches):
|
||||
for matchable in matches:
|
||||
for i in glob.glob(matchable):
|
||||
composer.makedirs(f"{os.path.dirname(i)}")
|
||||
if os.path.isdir(i):
|
||||
composer.add_dir(i, i)
|
||||
else:
|
||||
composer.addfile(i, i)
|
||||
|
||||
|
||||
old_on_pack = on_pack
|
||||
def new_on_pack(f):
|
||||
current_packname = packname
|
||||
def wrap_f(composer):
|
||||
pkgdir = f"{srcdir}/../_cpp_install/{current_packname}/usr/local"
|
||||
os.chdir(pkgdir)
|
||||
f(composer)
|
||||
old_on_pack(wrap_f)
|
||||
lib.make.on_pack = new_on_pack
|
||||
on_pack = new_on_pack
|
||||
|
||||
|
||||
def build_llvm():
|
||||
cmake("llvm", [])
|
||||
|
||||
def build_bolt():
|
||||
cmake("bolt", import_llvm())
|
||||
|
||||
def build_clang():
|
||||
options = [
|
||||
"-DCLANG_DEFAULT_CXX_STDLIB=libc++",
|
||||
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
|
||||
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||
f"-DC_INCLUDE_DIRS=/lib/{arch.get_target()}/include:{get_prefix('clang')}/lib/clang/{pkgver_major}/include",
|
||||
]
|
||||
cmake("clang", import_llvm() + options)
|
||||
|
||||
def build_lldb():
|
||||
cmake("lldb", import_llvm() + import_clang())
|
||||
|
||||
def build_lld():
|
||||
cmake("lld", import_llvm())
|
||||
|
||||
def build_polly():
|
||||
cmake("polly", import_llvm())
|
||||
|
||||
def build_runtimes():
|
||||
os.makedirs("../_build_runtimes", exist_ok=True)
|
||||
shutil.rmtree("../_build_runtimes")
|
||||
options = [
|
||||
# Configure runtimes
|
||||
"-DLLVM_ENABLE_RUNTIMES=libunwind;libcxxabi;libcxx",
|
||||
|
||||
# Configure libcxx
|
||||
"-DLIBCXX_HAS_MUSL_LIBC=ON",
|
||||
]
|
||||
cmake("runtimes", options)
|
||||
shutil.rmtree("../_build_runtimes")
|
||||
options = [
|
||||
# Configure runtimes
|
||||
"-DLLVM_ENABLE_RUNTIMES=compiler-rt",
|
||||
|
||||
# Configure compiler-rt
|
||||
"-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON",
|
||||
"-DCOMPILER_RT_BUILD_GWP_ASAN=OFF",
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF",
|
||||
]
|
||||
cmake("runtimes", options)
|
||||
|
||||
|
||||
def build():
|
||||
global srcdir
|
||||
srcdir = os.getcwd()
|
||||
build_llvm()
|
||||
build_bolt()
|
||||
build_clang()
|
||||
build_lldb()
|
||||
build_lld()
|
||||
build_polly()
|
||||
build_runtimes()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
enter_install("llvm")
|
||||
|
||||
package("libllvm")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libunwind @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
dep("libcxxabi @same-arch")
|
||||
dep("libffi @same-arch")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/*.so*"]))
|
||||
|
||||
package("libllvm-dev")
|
||||
dep("libllvm (same)")
|
||||
on_pack(lambda composer: auto_pack_dev(composer, "llvm", ["llvm-config"]))
|
||||
|
||||
package("libllvm-static")
|
||||
on_pack(auto_pack_static)
|
||||
|
||||
def pack_llvm(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
os.remove(f"{composer.workdir}/bundle/bin/llvm-config")
|
||||
composer.add_dir("share", "share")
|
||||
|
||||
package("llvm")
|
||||
dep("libllvm (same)")
|
||||
on_pack(pack_llvm)
|
||||
for i in ["strip", "ar", "ranlib", "readelf", "objcopy", "objdump", "strings", "nm"]:
|
||||
link(f"bin/llvm-{i}", f"/bin/{i}")
|
||||
|
||||
|
||||
enter_install("bolt")
|
||||
|
||||
package("bolt")
|
||||
dep("libcxx @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
|
||||
enter_install("clang")
|
||||
|
||||
package("libclang")
|
||||
dep("libllvm (same)")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libclang-static")
|
||||
on_pack(auto_pack_static)
|
||||
|
||||
package("libclang-dev")
|
||||
dep("libclang (same)")
|
||||
on_pack(lambda composer: auto_pack_dev(composer, "clang"))
|
||||
|
||||
def pack_clang(composer):
|
||||
# Add base files
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("libexec", "libexec")
|
||||
composer.makedir("share")
|
||||
for i in ["clang", "scan-build", "scan-view"]:
|
||||
composer.add_dir(f"share/{i}", f"share/{i}")
|
||||
|
||||
# Add resource files
|
||||
composer.makedir("lib")
|
||||
composer.add_dir("lib/clang", "lib/clang")
|
||||
|
||||
# Add compiler-rt for current architecture
|
||||
linuxrtdir = "../../../runtimes/usr/local/lib/linux"
|
||||
localrtdir = f"lib/clang/{pkgver_major}/lib/{llvm_host_triple()}"
|
||||
composer.makedirs(localrtdir)
|
||||
for rtlib in os.listdir(linuxrtdir):
|
||||
larch = llvm_host_triple().split("-")[0]
|
||||
lrtlib = rtlib.replace(f"-{larch}", "")
|
||||
composer.addfile(f"{linuxrtdir}/{rtlib}", f"{localrtdir}/{lrtlib}")
|
||||
|
||||
# Add symlink to system directories, which is required for finding libc++
|
||||
os.symlink(f"/lib/{arch.get_target()}/include", f"{composer.workdir}/bundle/include")
|
||||
|
||||
# Add configuration
|
||||
clang_cfg = f"-L/lib/{arch.get_target()}\n-B/lib/{arch.get_target()}\n-rtlib=compiler-rt\n"
|
||||
clangxx_cfg = f"-stdlib=libc++\n{clang_cfg}"
|
||||
with open(f"{composer.workdir}/bundle/bin/clang.cfg", "wt+") as file:
|
||||
file.write(clang_cfg)
|
||||
with open(f"{composer.workdir}/bundle/bin/clang++.cfg", "wt+") as file:
|
||||
file.write(clangxx_cfg)
|
||||
|
||||
package("clang")
|
||||
dep("libclang (same)")
|
||||
on_pack(pack_clang)
|
||||
link("bin/clang", "/bin/cc")
|
||||
link("bin/clang++", "/bin/c++")
|
||||
link("bin/clang-cpp", "/bin/cpp")
|
||||
|
||||
|
||||
enter_install("lld")
|
||||
|
||||
package("lld")
|
||||
dep("libllvm (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
link("bin/ld.lld", "/bin/ld")
|
||||
|
||||
package("lld-dev")
|
||||
dep("lld (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
|
||||
enter_install("lldb")
|
||||
|
||||
package("liblldb")
|
||||
dep("libclang (same)")
|
||||
dep("libllvm (same)")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("liblldb-dev")
|
||||
dep("liblldb (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
package("lldb")
|
||||
dep("liblldb (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
|
||||
enter_install("polly")
|
||||
|
||||
package("polly")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["*"]))
|
||||
|
||||
|
||||
enter_install("runtimes")
|
||||
|
||||
package("libunwind")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: auto_pack_runtime_lib(composer, "unwind"))
|
||||
|
||||
package("libunwind-dev")
|
||||
dep("libunwind (same)")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libunwind.a", "include/*unwind*", "include/mach-o"]))
|
||||
|
||||
package("libcxxabi")
|
||||
dep("libunwind (same)")
|
||||
on_pack(lambda composer: auto_pack_runtime_lib(composer, "libc++abi"))
|
||||
|
||||
package("libcxxabi-dev")
|
||||
dep("libcxxabi (same)")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libc++abi.a"]))
|
||||
|
||||
package("libcxx")
|
||||
dep("libcxxabi (same)")
|
||||
on_pack(lambda composer: auto_pack_runtime_lib(composer, "libc++"))
|
||||
|
||||
package("libcxx-dev")
|
||||
dep("libcxx (same)")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/libc++experimental.a", "lib/libc++.a", "lib/libc++.modules.json", "include/c++", "share/libc++"]))
|
||||
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.14.6")
|
||||
description("a suite of tools compiling mdoc, the roff macro language, and man")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure()
|
||||
cpp.make([f"CC={os.environ['CC']}"])
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("mandoc")
|
||||
dep("libz @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,259 @@
|
||||
import glob
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("26.2.0")
|
||||
description("Open source implementations of OpenGL, OpenGL ES, Vulkan, OpenCL, and more")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://archive.mesa3d.org/mesa-26.2.0.tar.xz")
|
||||
|
||||
builddep("shortcut/meson")
|
||||
builddep("shortcut/c++")
|
||||
builddep("libwayland-dev @target")
|
||||
builddep("wayland-protocols @target")
|
||||
builddep("libffi-dev @target")
|
||||
builddep("libexpat-dev @target")
|
||||
builddep("pkgconf @target")
|
||||
builddep("libllvm-dev @target")
|
||||
builddep("libclang-dev @target")
|
||||
builddep("libunwind-dev @target")
|
||||
builddep("libz-ng-dev @target")
|
||||
builddep("libzstd-dev @target")
|
||||
builddep("libgldispatch-dev @target")
|
||||
builddep("libegl-dev @target")
|
||||
builddep("libopengl-dev @target")
|
||||
builddep("libglesv2-dev @target")
|
||||
builddep("libva-dev @target")
|
||||
builddep("libdrm-dev @target")
|
||||
builddep("libllvmspirv-dev @target")
|
||||
builddep("spirv-tools-dev @target")
|
||||
builddep("libpng-dev @target")
|
||||
builddep("libarchive-dev @target")
|
||||
builddep("aws-lc-dev @target")
|
||||
builddep("libxml2-dev @target")
|
||||
builddep("linux-dev @target")
|
||||
builddep("bison")
|
||||
builddep("flex")
|
||||
builddep("PyYAML.py")
|
||||
builddep("Mako.py")
|
||||
builddep("packaging.py")
|
||||
builddep("pycparser.py")
|
||||
builddep("glslang")
|
||||
|
||||
archspec = {
|
||||
"aarch64-semios-linux": {
|
||||
"vulkan_drivers": [
|
||||
"mesa-vulkan-asahi",
|
||||
"mesa-vulkan-freedreno",
|
||||
"mesa-vulkan-intel",
|
||||
"mesa-vulkan-lvp",
|
||||
"mesa-vulkan-panfrost",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
# Generic directories
|
||||
f"--libdir=/lib/{arch.get_target()}",
|
||||
f"--includedir=/lib/{arch.get_target()}/include",
|
||||
f"--datadir=/share",
|
||||
|
||||
# Platform selection
|
||||
"-Dplatforms=wayland",
|
||||
|
||||
# User Features
|
||||
"-Dshader-cache=enabled",
|
||||
"-Dxmlconfig=enabled",
|
||||
|
||||
# Gallium
|
||||
"-Dgallium-drivers=auto",
|
||||
"-Dgallium-va=enabled",
|
||||
f"-Dva-libs-path=/lib/{arch.get_target()}/dri",
|
||||
|
||||
# Vulkan
|
||||
"-Dvulkan-drivers=auto",
|
||||
"-Dvulkan-layers=device-select,overlay,screenshot,anti-lag,vram-report-limit",
|
||||
f"-Dvulkan-icd-dir=/lib/{arch.get_target()}/vulkan/icd.d",
|
||||
"-Dvulkan-manifest-per-architecture=false",
|
||||
f"-Dvulkan-loader-rpath=/lib/{arch.get_target()}",
|
||||
|
||||
# GLES
|
||||
"-Dgles1=disabled",
|
||||
"-Dgles2=enabled",
|
||||
|
||||
# GBM
|
||||
"-Dgbm=enabled",
|
||||
f"-Dgbm-backends-path=/lib/{arch.get_target()}/gbm",
|
||||
f"-Ddri-drivers-path=/lib/{arch.get_target()}/dri",
|
||||
|
||||
# EGL
|
||||
"-Degl=enabled",
|
||||
"-Degl-native-platform=surfaceless",
|
||||
|
||||
# GLVND
|
||||
"-Dglvnd=enabled",
|
||||
|
||||
# Hardware Video Decoding
|
||||
"-Dvideo-codecs=all_free",
|
||||
|
||||
# Intel
|
||||
"-Dintel-rt=enabled",
|
||||
|
||||
# LLVM Configuration
|
||||
"-Dllvm=enabled",
|
||||
"-Dshared-llvm=enabled",
|
||||
"-Dllvm-orcjit=true",
|
||||
|
||||
# Libraries to use
|
||||
"-Dexpat=enabled",
|
||||
"-Dzstd=enabled",
|
||||
"-Dzlib=enabled",
|
||||
|
||||
# X11-related stuff
|
||||
# We don't have X11 yet, so leave them disabled.
|
||||
"-Dxlib-lease=disabled",
|
||||
"-Dglx=disabled",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install(move=False)
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
libdir = f"lib/{arch.get_target()}"
|
||||
includedir = f"{libdir}/include"
|
||||
|
||||
def composer_add(composer, src, dst):
|
||||
if os.path.isdir(src):
|
||||
composer.add_dir(src, dst)
|
||||
else:
|
||||
composer.addfile(src, dst)
|
||||
|
||||
def pack_lib_simple(composer, name):
|
||||
composer.makedir("lib")
|
||||
for i in os.listdir(libdir):
|
||||
if name in i:
|
||||
composer_add(composer, f"{libdir}/{i}", f"lib/{i}")
|
||||
|
||||
def pack_dev_simple(composer, name):
|
||||
composer.makedirs("lib/pkgconfig")
|
||||
composer.makedir("include")
|
||||
for i in os.listdir(f"{libdir}/pkgconfig"):
|
||||
if name in i:
|
||||
composer.addfile(f"{libdir}/pkgconfig/{i}", f"lib/pkgconfig/{i}")
|
||||
for i in os.listdir(includedir):
|
||||
if name in i:
|
||||
composer_add(composer, f"{includedir}/{i}", f"include/{i}")
|
||||
|
||||
def pack_dri_dev(composer):
|
||||
composer.makedir("include")
|
||||
composer.add_dir(f"{includedir}/GL", "include/GL")
|
||||
composer.makedirs("lib/pkgconfig")
|
||||
composer.addfile(f"{libdir}/pkgconfig/dri.pc", "lib/pkgconfig/dri.pc")
|
||||
|
||||
def pack_libgallium(composer):
|
||||
pack_lib_simple(composer, "gallium")
|
||||
composer.add_dir(f"{libdir}/dri", "lib/dri")
|
||||
composer.add_dir("share/drirc.d", "share/drirc.d")
|
||||
|
||||
def pack_libegl(composer):
|
||||
pack_lib_simple(composer, "EGL")
|
||||
composer.add_dir("share/glvnd", "share/glvnd")
|
||||
|
||||
def pack_vulkan(composer, name):
|
||||
composer.makedir("lib")
|
||||
composer.addfile(f"{libdir}/libvulkan_{name}.so", f"lib/libvulkan_{name}.so")
|
||||
composer.makedirs("lib/vulkan/icd.d")
|
||||
composer.addfile(f"{libdir}/vulkan/icd.d/{name}_icd.json", f"lib/vulkan/icd.d/{name}_icd.json")
|
||||
|
||||
def hasvulkan(name):
|
||||
return name in archspec[arch.get_target()]["vulkan_drivers"]
|
||||
|
||||
|
||||
package("libgbm")
|
||||
dep("libdrm @same-arch")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(lambda composer: pack_lib_simple(composer, "gbm"))
|
||||
|
||||
package("libgbm-dev")
|
||||
dep("libdrm-dev @same-arch")
|
||||
dep("libgbm (same)")
|
||||
on_pack(lambda composer: pack_dev_simple(composer, "gbm"))
|
||||
|
||||
package("libgallium")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libllvm @same-arch")
|
||||
dep("libexpat @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(pack_libgallium)
|
||||
|
||||
package("mesa-dri-dev")
|
||||
on_pack(pack_dri_dev)
|
||||
|
||||
package("libegl-mesa")
|
||||
dep("libgallium (same)")
|
||||
dep("libgbm (same)")
|
||||
dep("libexpat @same-arch")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libwayland @same-arch")
|
||||
on_pack(pack_libegl)
|
||||
|
||||
package("libegl-mesa-dev")
|
||||
dep("libgbm-dev (same)")
|
||||
dep("libexpat-dev @same-arch")
|
||||
dep("libdrm-dev @same-arch")
|
||||
dep("libwayland-dev @same-arch")
|
||||
dep("libegl-mesa (same)")
|
||||
on_pack(lambda composer: pack_dev_simple(composer, "EGL"))
|
||||
|
||||
if hasvulkan("mesa-vulkan-asahi"):
|
||||
package("mesa-vulkan-asahi")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libwayland @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(lambda composer: pack_vulkan(composer, "asahi"))
|
||||
|
||||
if hasvulkan("mesa-vulkan-freedreno"):
|
||||
package("mesa-vulkan-freedreno")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libwayland @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(lambda composer: pack_vulkan(composer, "freedreno"))
|
||||
|
||||
if hasvulkan("mesa-vulkan-intel"):
|
||||
package("mesa-vulkan-intel")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libwayland @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(lambda composer: pack_vulkan(composer, "intel"))
|
||||
|
||||
if hasvulkan("mesa-vulkan-lvp"):
|
||||
package("mesa-vulkan-lvp")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libwayland @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(lambda composer: pack_vulkan(composer, "lvp"))
|
||||
|
||||
if hasvulkan("mesa-vulkan-panfrost"):
|
||||
package("mesa-vulkan-panfrost")
|
||||
dep("libdrm @same-arch")
|
||||
dep("libwayland @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
on_pack(lambda composer: pack_vulkan(composer, "panfrost"))
|
||||
@@ -0,0 +1,37 @@
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("1.12.0")
|
||||
description("The Meson Build System")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/mesonbuild/meson/releases/download/1.12.0/meson-1.12.0.tar.gz")
|
||||
|
||||
builddep("python")
|
||||
|
||||
|
||||
def build():
|
||||
if os.path.exists("meson"):
|
||||
os.remove("meson")
|
||||
subprocess.run([
|
||||
"python3",
|
||||
"./packaging/create_zipapp.py",
|
||||
"--outfile",
|
||||
"meson",
|
||||
"--interpreter",
|
||||
"/bin/python3"
|
||||
])
|
||||
os.chmod("meson", 0o555)
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_meson(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("meson", "bin/meson")
|
||||
|
||||
package("meson")
|
||||
dep("python @same-arch")
|
||||
recommend("ninja")
|
||||
on_pack(pack_meson)
|
||||
@@ -0,0 +1,32 @@
|
||||
import subprocess
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("1.59.2")
|
||||
description("the MirBSD Korn Shell, a minimal and useful implementation of the POSIX shell with extensions")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/mirabilos/mksh-cvs2git/archive/refs/tags/mksh-R59c.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("gnu-sed")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(["sh", "./Build.sh"], check=True)
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_mksh(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("mksh", "bin/mksh")
|
||||
|
||||
|
||||
package("mksh")
|
||||
on_pack(pack_mksh)
|
||||
dep("semi-libc @same-arch")
|
||||
provide("sh")
|
||||
link("bin/mksh", "/bin/sh")
|
||||
@@ -0,0 +1,70 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("6.6")
|
||||
description("the ncurses terminal library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://invisible-island.net/archives/ncurses/ncurses-6.6.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('ncurses-tools')}/bin",
|
||||
f"--sbindir={get_prefix('ncurses-tools')}/sbin",
|
||||
f"--libdir={get_prefix('libncurses')}/lib",
|
||||
f"--includedir={get_prefix('libncurses')}/include",
|
||||
"--enable-pc-files",
|
||||
"--with-shared",
|
||||
f"--with-terminfo-dirs={get_prefix('ncurses-terminfo')}/share/terminfo:/share/terminfo",
|
||||
"--enable-symlinks",
|
||||
"--enable-sp-funcs",
|
||||
"--enable-ext-colors",
|
||||
"--enable-rgb-color",
|
||||
"--enable-ext-mouse",
|
||||
"--enable-ext-putwin",
|
||||
"--enable-no-padding",
|
||||
"--enable-sigwinch",
|
||||
"--enable-tcap-names",
|
||||
"--with-pthread",
|
||||
"--enable-pthreads-eintr",
|
||||
"--enable-weak-symbols",
|
||||
"--enable-reentrant",
|
||||
"--without-develop",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
os.unlink("lib/terminfo")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libncurses")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("ncurses-tools")
|
||||
dep("libncurses (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libncurses-dev")
|
||||
dep("libncurses (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
|
||||
def pack_terminfo(composer):
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/tabset")
|
||||
composer.add_dir("share/terminfo")
|
||||
|
||||
|
||||
package("ncurses-terminfo")
|
||||
arch_any()
|
||||
on_pack(pack_terminfo)
|
||||
@@ -0,0 +1,30 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("19")
|
||||
description("A vi/ex editor for editing UTF-8 text")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/aligrudi/neatvi/archive/refs/tags/19.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.make([f"CC={os.environ['CC']}"])
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("vi", "bin/vi")
|
||||
|
||||
|
||||
package("neatvi")
|
||||
provide("vi")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack)
|
||||
@@ -0,0 +1,32 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("5.3")
|
||||
description("A small vi/ex terminal text editor (neatvi rewrite)")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/kyx0r/nextvi/archive/refs/tags/5.3.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["PREFIX"] = "/"
|
||||
subprocess.run(["./cbuild.sh"])
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("vi", "bin/vi")
|
||||
|
||||
|
||||
package("nextvi")
|
||||
on_pack(pack)
|
||||
dep("semi-libc @same-arch")
|
||||
provide("vi")
|
||||
@@ -0,0 +1,32 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("1.70.0")
|
||||
description("nghttp2 - HTTP/2 C Library and tools")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url(
|
||||
"https://github.com/nghttp2/nghttp2/releases/download/v1.70.0/nghttp2-1.70.0.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/cmake")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libnghttp2')}/lib",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libnghttp2-dev')}/include",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libnghttp2")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
dep("semi-libc @same-arch")
|
||||
|
||||
package("libnghttp2-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("libnghttp2 (same)")
|
||||
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("1.13.2")
|
||||
description("a small build system with a focus on speed")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/ninja-build/ninja/archive/refs/tags/v1.13.2.tar.gz")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("sed")
|
||||
|
||||
|
||||
def build():
|
||||
os.system("python3 ./configure.py --bootstrap")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_ninja(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("ninja", "bin/ninja")
|
||||
|
||||
|
||||
package("ninja")
|
||||
on_pack(pack_ninja)
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
@@ -0,0 +1,62 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("10.3.1")
|
||||
description("the premier connectivity tool for remote login with the SSH protocol")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.3p1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
"--sysconfdir=/var/config",
|
||||
"--disable-etc-default-login",
|
||||
"--with-linux-memlock-onfault",
|
||||
"--without-shadow",
|
||||
"--with-pam",
|
||||
"--with-pie",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_client(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.makedir("libexec")
|
||||
composer.addfile("libexec/ssh-sk-helper", "libexec/ssh-sk-helper")
|
||||
composer.addfile("libexec/ssh-pkcs11-helper", "libexec/ssh-pkcs11-helper")
|
||||
|
||||
|
||||
package("openssh-client")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libcrypto @same-arch")
|
||||
dep("libz @same-arch")
|
||||
on_pack(pack_client)
|
||||
provide("ssh")
|
||||
|
||||
|
||||
def pack_server(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("sbin/sshd", "bin/sshd")
|
||||
composer.makedir("libexec")
|
||||
composer.addfile("libexec/sftp-server", "libexec/sftp-server")
|
||||
composer.addfile("libexec/ssh-keysign", "libexec/ssh-keysign")
|
||||
composer.addfile("libexec/sshd-auth", "libexec/sshd-auth")
|
||||
composer.addfile("libexec/sshd-session", "libexec/sshd-session")
|
||||
|
||||
|
||||
package("openssh-server")
|
||||
dep("openssh-client (same)")
|
||||
dep("libpam @same-arch")
|
||||
on_pack(pack_server)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user