forked from semios/semios-packages
Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5dac3b19d0 | ||
|
|
65a884ddd4 | ||
|
|
8c41ed811f | ||
|
|
e421add41d | ||
|
|
1b2f8a2295 | ||
|
|
02cf225a7e | ||
|
|
8d99e1d12a | ||
|
|
89f0038e99 | ||
|
|
0743d92327 | ||
|
|
7e66f0669d | ||
|
|
557aae6cb5 | ||
|
|
178f5820e7 | ||
|
|
aded8393fe | ||
|
|
ea6c4592e9 | ||
|
|
6abf94ba6c | ||
|
|
a903430180 | ||
|
|
b3d71e0a3a | ||
|
|
6dd8c911a1 | ||
|
|
5c22c479bd | ||
|
|
6704ec11ea | ||
|
|
8c58073118 | ||
|
|
eea8869aa5 | ||
|
|
7e888b8408 | ||
|
|
5729463e2e | ||
|
|
9dc11ca666 | ||
|
|
e567c27db8 | ||
|
|
4f4ec0468a | ||
|
|
ab71a8ae75 | ||
|
|
07c93dac59 | ||
|
|
5dece05466 |
+3
-1
@@ -15,12 +15,14 @@ BASE_REQUIREMENTS = [
|
||||
"packie",
|
||||
"patch",
|
||||
"zstd",
|
||||
"libz-ng",
|
||||
"liblzma",
|
||||
"libbzip2",
|
||||
# Basic libraries
|
||||
"sqlite",
|
||||
"libgcc-compat",
|
||||
"libcxx",
|
||||
"semi-libc",
|
||||
"libz-ng",
|
||||
# Networking
|
||||
"ca-certificates",
|
||||
"certutil",
|
||||
|
||||
@@ -44,6 +44,10 @@ def builddep(s: str):
|
||||
elif s == "shortcut/rust":
|
||||
builddep("shortcut/c")
|
||||
_builddep += ["cargo", "rustc"]
|
||||
elif s == "shortcut/cmake":
|
||||
_builddep += ["cmake", "ninja"]
|
||||
elif s == "shortcut/meson":
|
||||
_builddep += ["meson", "ninja"]
|
||||
else:
|
||||
_builddep += [s]
|
||||
|
||||
|
||||
@@ -29,3 +29,9 @@ def update():
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
@@ -8,18 +8,26 @@ source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.1.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
|
||||
def _fix_pc(name, prefix):
|
||||
filepath = f"lib/pkgconfig/{name}.pc"
|
||||
with open(filepath, "r") as f:
|
||||
content = f.read()
|
||||
new_content = content.replace("prefix=/", f"prefix={prefix}").replace("libdir=${prefix}/usr/lib", "libdir=${prefix}/lib")
|
||||
with open(filepath, "w") as f:
|
||||
f.write(new_content)
|
||||
|
||||
def build():
|
||||
cpp.cmake(
|
||||
[
|
||||
"-DBUILD_SHARED_LIBS=1",
|
||||
"-DCMAKE_INSTALL_PREFIX=/",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
_fix_pc("libssl", get_prefix("aws-lc-libssl"))
|
||||
_fix_pc("libcrypto", get_prefix("aws-lc-libcrypto"))
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.7.91")
|
||||
source_url("https://alpha.gnu.org/gnu/bison/bison-3.7.91.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("gnu-m4")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(["--enable-relocatable"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_bison(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.add_dir("lib", "lib")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/aclocal", "share/aclocal")
|
||||
composer.add_dir("share/bison", "share/bison")
|
||||
|
||||
|
||||
package("bison")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("gnu-m4")
|
||||
on_pack(pack_bison)
|
||||
link("bin/bison", "/bin/bison")
|
||||
link("bin/yacc", "/bin/yacc", default=False)
|
||||
@@ -20,7 +20,7 @@ def build():
|
||||
shutil.rmtree("../cpp_install")
|
||||
except Exception:
|
||||
pass
|
||||
cpp.make_install(["PREFIX=../cpp_install" + makevars], chdir=False)
|
||||
cpp.make_install(["PREFIX=../cpp_install"] + makevars, chdir=False)
|
||||
shutil.copy2(
|
||||
f"libbz2.so.{upstream_version}",
|
||||
f"../cpp_install/lib/libbz2.so.{upstream_version}",
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "4.3.4"
|
||||
[upstream_major, upstream_minor, upstream_rev] = upstream_version.split(".")
|
||||
|
||||
version(upstream_version)
|
||||
source_url(
|
||||
"https://github.com/Kitware/CMake/releases/download/v4.3.4/cmake-4.3.4.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("shortcut/cmake")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep(f"libexpat-dev @{arch.get_target()}")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
builddep(f"libbzip2-dev @{arch.get_target()}")
|
||||
builddep(f"liblzma-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"libnghttp2-dev @{arch.get_target()}")
|
||||
builddep(f"librhash-dev @{arch.get_target()}")
|
||||
builddep(f"libarchive-dev @{arch.get_target()}")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["CMAKE_PREFIX_PATH"] = f"/lib/{arch.get_target()}"
|
||||
cpp.cmake([
|
||||
f"-DCMAKE_INSTALL_PREFIX={get_prefix('cmake')}",
|
||||
"-DCMAKE_USE_SYSTEM_CURL=ON",
|
||||
"-DCMAKE_USE_SYSTEM_ZLIB=ON",
|
||||
"-DCMAKE_USE_SYSTEM_ZSTD=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBRHASH=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBARCHIVE=ON",
|
||||
"-DCMAKE_USE_SYSTEM_LIBLZMA=ON",
|
||||
"-DCMAKE_USE_SYSTEM_EXPAT=ON",
|
||||
"-DCMAKE_USE_SYSTEM_BZIP2=ON",
|
||||
])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_cmake(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.makedir("share")
|
||||
composer.add_dir(
|
||||
f"share/cmake-{upstream_major}.{upstream_minor}",
|
||||
f"share/cmake-{upstream_major}.{upstream_minor}",
|
||||
)
|
||||
|
||||
package("cmake")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
dep("libcurl @same-arch")
|
||||
on_pack(pack_cmake)
|
||||
@@ -0,0 +1,102 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("8.21.0")
|
||||
source_url("https://curl.se/download/curl-8.21.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libnghttp2-dev @{arch.get_target()}")
|
||||
builddep(f"libcares-dev @{arch.get_target()}")
|
||||
builddep(f"aws-lc-dev @{arch.get_target()}")
|
||||
builddep(f"libbrotli-dev @{arch.get_target()}")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
builddep(f"libzstd-dev @{arch.get_target()}")
|
||||
builddep(f"libpsl-dev @{arch.get_target()}")
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('curl')}/bin",
|
||||
f"--libdir={get_prefix('libcurl')}/lib",
|
||||
f"--includedir={get_prefix('libcurl-dev')}/include",
|
||||
"--enable-optimize",
|
||||
"--disable-debug",
|
||||
"--enable-warnings",
|
||||
"--enable-symbol-hiding",
|
||||
"--enable-ares",
|
||||
"--enable-http",
|
||||
"--enable-ftp",
|
||||
"--enable-file",
|
||||
"--enable-ipfs",
|
||||
"--disable-ldap",
|
||||
"--disable-ldaps",
|
||||
"--enable-rtsp",
|
||||
"--enable-proxy",
|
||||
"--enable-dict",
|
||||
"--enable-telnet",
|
||||
"--enable-tftp",
|
||||
"--enable-pop3",
|
||||
"--enable-imap",
|
||||
"--enable-smb",
|
||||
"--enable-smtp",
|
||||
"--enable-gopher",
|
||||
"--enable-mqtt",
|
||||
"--disable-init-mem-debug",
|
||||
"--enable-manual",
|
||||
"--enable-docs",
|
||||
"--enable-libcurl-option",
|
||||
"--enable-ipv6",
|
||||
"--enable-openssl-auto-load-config",
|
||||
"--enable-ca-native",
|
||||
"--enable-versioned-symbols",
|
||||
"--enable-typecheck",
|
||||
"--enable-verbose",
|
||||
"--disable-tls-srp",
|
||||
"--enable-unix-sockets",
|
||||
"--enable-cookies",
|
||||
"--enable-socketpair",
|
||||
"--enable-http-auth",
|
||||
"--enable-doh",
|
||||
"--enable-mime",
|
||||
"--enable-bindlocal",
|
||||
"--enable-form-api",
|
||||
"--enable-dateparse",
|
||||
"--enable-netrc",
|
||||
"--enable-progress-meter",
|
||||
"--enable-get-easy-options",
|
||||
"--enable-alt-svc",
|
||||
"--enable-headers-api",
|
||||
"--enable-hsts",
|
||||
"--enable-websockets",
|
||||
"--with-openssl",
|
||||
"--with-nghttp2",
|
||||
"--without-libidn2",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libcurl")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libpsl @same-arch")
|
||||
dep("libz @same-arch")
|
||||
dep("libcares @same-arch")
|
||||
dep("libnghttp2 @same-arch")
|
||||
dep("libssl @same-arch")
|
||||
dep("libcrypto @same-arch")
|
||||
dep("libzstd @same-arch")
|
||||
dep("libbrotli @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("curl")
|
||||
dep("libcurl (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libcurl-dev")
|
||||
dep("libcurl (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,44 @@
|
||||
import os
|
||||
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("0.195")
|
||||
source_url("https://sourceware.org/elfutils/ftp/0.195/elfutils-0.195.tar.bz2")
|
||||
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libargp-dev @{arch.get_target()}")
|
||||
builddep("gettext")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep("pkgconf")
|
||||
builddep(f"libz-ng-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"libfts-dev @{arch.get_target()}")
|
||||
builddep(f"libiberty-obstack-dev @{arch.get_target()}")
|
||||
builddep(f"libcurl-dev @{arch.get_target()}")
|
||||
builddep("bzip2")
|
||||
builddep("gnu-m4")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["LIBS"] = "-liberty_obstack -largp -lfts"
|
||||
os.environ["ac_cv_search__obstack_free"] = "yes"
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
"--disable-stacktrace",
|
||||
"--disable-demangler",
|
||||
#"--enable-libdebuginfod",
|
||||
#"--enable-debuginfod",
|
||||
#"--enable-debuginfod-ima-verification",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
@@ -1,6 +1,6 @@
|
||||
import subprocess
|
||||
|
||||
from lib import cpp
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
VERSION = "5.48"
|
||||
@@ -10,6 +10,10 @@ 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():
|
||||
@@ -35,6 +39,10 @@ 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")
|
||||
|
||||
@@ -8,7 +8,8 @@ source_url("https://www.kernel.org/pub/software/scm/git/git-2.55.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libz-dev {arch.get_target()}")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep(f"libz-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("1.4.21")
|
||||
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,23 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"libncurses-dev @{arch.get_target()}")
|
||||
|
||||
version("704")
|
||||
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"])
|
||||
@@ -1,4 +1,4 @@
|
||||
from lib import cpp
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.6.0")
|
||||
@@ -8,6 +8,7 @@ source_url(
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
|
||||
Binary file not shown.
@@ -4,28 +4,16 @@ import subprocess
|
||||
from lib import arch
|
||||
from lib.make import *
|
||||
|
||||
version("0.1.0")
|
||||
source_url(f"file://{os.getcwd()}/empty.tar")
|
||||
version("0.2.0")
|
||||
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()}")
|
||||
builddep(f"libunwind-dev @{arch.get_target()}")
|
||||
builddep(f"linux-dev @{arch.get_target()}")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(
|
||||
os.environ.get("CC", "cc").split(" ")
|
||||
+ [
|
||||
"-shared",
|
||||
"-o",
|
||||
"libgcc_s.so.1",
|
||||
"-Wl,--no-as-needed",
|
||||
"-lunwind",
|
||||
"-Wl,--no-undefined",
|
||||
"-Wl,-soname,libgcc_s.so.1",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
subprocess.run(["./build.sh"], check=True)
|
||||
|
||||
|
||||
on_build(build)
|
||||
@@ -34,6 +22,7 @@ on_build(build)
|
||||
def pack(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("libgcc_s.so.1", "lib/libgcc_s.so.1")
|
||||
composer.addfile("libatomic.so.1", "lib/libatomic.so.1")
|
||||
|
||||
|
||||
package("libgcc-compat")
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
from lib import cpp, arch
|
||||
from lib.make import *
|
||||
|
||||
version("0.22.0")
|
||||
source_url(
|
||||
"https://github.com/rockdaboot/libpsl/releases/download/0.22.0/libpsl-0.22.0.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"])
|
||||
@@ -5,7 +5,7 @@ import lib.arch as arch
|
||||
import lib.cpp as cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "6.18.35"
|
||||
upstream_version = "6.18.38"
|
||||
|
||||
version(f"{upstream_version}")
|
||||
source_url(
|
||||
|
||||
@@ -2,7 +2,7 @@ import glob
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
upstream_version = "22.1.7"
|
||||
upstream_version = "22.1.8"
|
||||
[upstream_major, upstream_minor, upstream_rev] = upstream_version.split(".")
|
||||
|
||||
# Begin of file lists
|
||||
@@ -153,9 +153,9 @@ import lib.cpp as cpp
|
||||
from lib import arch
|
||||
from lib.make import *
|
||||
|
||||
version("22.1.7")
|
||||
version(upstream_version)
|
||||
source_url(
|
||||
"https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.7/llvm-project-22.1.7.src.tar.xz"
|
||||
f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{upstream_version}/llvm-project-{upstream_version}.src.tar.xz"
|
||||
)
|
||||
|
||||
|
||||
@@ -164,6 +164,7 @@ def llvm_host_triple():
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["CXXFLAGS"] = os.environ.get("CXXFLAGS", "") + " --rtlib=compiler-rt"
|
||||
subprocess.run(
|
||||
[
|
||||
"cmake",
|
||||
@@ -211,7 +212,7 @@ def install_wrapper(composer, name: str, dst: str):
|
||||
s = f.read()
|
||||
s = s.replace("LLVM_VERSION=", f"LLVM_VERSION={upstream_version}").replace(
|
||||
"ARCHITECTURE=", "ARCHITECTURE=" + arch.get_target()
|
||||
)
|
||||
).replace("LLVM_ARCH=", "LLVM_ARCH=" + llvm_host_triple())
|
||||
with open(f"{composer.workdir}/bundle/{dst}", "w") as f:
|
||||
f.write(s)
|
||||
os.chmod(f"{composer.workdir}/bundle/{dst}", 0o755)
|
||||
@@ -380,10 +381,10 @@ use_llvm_libs_auto_pack(["libclang", "libclang-cpp"])
|
||||
|
||||
def pack_clang(composer):
|
||||
auto_pack_bin(composer, CLANG_BINARIES)
|
||||
composer.makedirs("lib/clang/22/lib")
|
||||
composer.makedirs(f"lib/clang/{upstream_major}/lib")
|
||||
composer.add_dir(
|
||||
f"lib/clang/22/lib/{llvm_host_triple()}",
|
||||
f"lib/clang/22/lib/{llvm_host_triple()}",
|
||||
f"lib/clang/{upstream_major}/lib/{llvm_host_triple()}",
|
||||
f"lib/clang/{upstream_major}/lib/{llvm_host_triple()}",
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -2,12 +2,18 @@
|
||||
|
||||
LLVM_VERSION=
|
||||
ARCHITECTURE=
|
||||
LLVM_ARCH=
|
||||
|
||||
CLANG=$(packie print package.prefix."clang (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/llvm-clang
|
||||
|
||||
exec ${CLANG} -x c++ \
|
||||
exec ${CLANG} \
|
||||
-Wno-unused-command-line-argument \
|
||||
-isystem /lib/${ARCHITECTURE}/include/c++/v1 \
|
||||
-isystem /lib/${ARCHITECTURE}/include/${LLVM_ARCH}/c++/v1 \
|
||||
-isystem /lib/${ARCHITECTURE}/include \
|
||||
-stdlib=libc++ \
|
||||
-rtlib=compiler-rt \
|
||||
-B /lib/${ARCHITECTURE} \
|
||||
-lc++ \
|
||||
-Wunused-command-line-argument \
|
||||
"$@"
|
||||
|
||||
@@ -6,7 +6,9 @@ ARCHITECTURE=
|
||||
CLANG=$(packie print package.prefix."clang (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/llvm-clang
|
||||
|
||||
exec ${CLANG} \
|
||||
-Wno-unused-command-line-argument \
|
||||
-isystem /lib/${ARCHITECTURE}/include \
|
||||
-rtlib=compiler-rt \
|
||||
-B /lib/${ARCHITECTURE} \
|
||||
-Wunused-command-line-argument \
|
||||
"$@"
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import subprocess
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("1.11.2")
|
||||
source_url("https://github.com/mesonbuild/meson/releases/download/1.11.2/meson-1.11.2.tar.gz")
|
||||
|
||||
builddep("python")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run([
|
||||
"python3",
|
||||
"./packaging/create_zipapp.py",
|
||||
"--outfile",
|
||||
"meson",
|
||||
"--interpreter",
|
||||
"/bin/python3"
|
||||
])
|
||||
|
||||
on_build(build)
|
||||
|
||||
def pack_meson(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("meson", "bin/meson")
|
||||
|
||||
package("meson")
|
||||
dep("python @same-arch")
|
||||
recommend("ninja")
|
||||
on_pack(pack_meson)
|
||||
@@ -8,7 +8,7 @@ source_url(
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("sed")
|
||||
builddep("gnu-sed")
|
||||
|
||||
|
||||
def build():
|
||||
|
||||
@@ -6,10 +6,11 @@ version("1.13.2")
|
||||
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("./configure.py --bootstrap")
|
||||
os.system("python3 ./configure.py --bootstrap")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
@@ -6,6 +6,9 @@ source_url(
|
||||
"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz"
|
||||
)
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
prefix=/
|
||||
exec_prefix=${prefix}
|
||||
libdir=
|
||||
includedir=
|
||||
|
||||
Name: librhash
|
||||
Description: LibRHash shared library
|
||||
Version:
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lrhash
|
||||
Libs.private:
|
||||
@@ -1,25 +1,43 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.4.6")
|
||||
import os
|
||||
|
||||
upstream_version = "1.4.6"
|
||||
|
||||
version(upstream_version)
|
||||
source_url("https://github.com/rhash/RHash/archive/refs/tags/v1.4.6.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
with open("files/librhash.pc") as f:
|
||||
librhash_pc = f.read()
|
||||
|
||||
def build():
|
||||
global librhash_pc
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('rhash-tools')}/bin",
|
||||
f"--libdir={get_prefix('librhash')}/lib",
|
||||
"--disable-gettext",
|
||||
"--enable-lib-static",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
os.symlink("librhash.so.1", "./lib/librhash.so")
|
||||
os.makedirs("./lib/pkgconfig", exist_ok=True)
|
||||
with open("./lib/pkgconfig/librhash.pc", "w+") as file:
|
||||
librhash_pc = (librhash_pc
|
||||
.replace("libdir=", f"libdir={get_prefix('librhash')}/lib")
|
||||
.replace("includedir=", f"includedir={get_prefix('librhash-dev')}/include")
|
||||
.replace("Version:", f"Version: {upstream_version}")
|
||||
)
|
||||
file.write(librhash_pc)
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
@@ -27,9 +27,14 @@ subparsers = argparser.add_subparsers(dest="subcommand")
|
||||
parser_build = subparsers.add_parser("build")
|
||||
parser_build.add_argument("BUILD_PKGNAME")
|
||||
parser_clean = subparsers.add_parser("clean")
|
||||
parser_clean.add_argument("CLEAN_PKGNAME")
|
||||
parser_clean.add_argument("CLEAN_PKGNAME", nargs="*")
|
||||
parser_clean.add_argument("--all", action="store_true")
|
||||
parser_clean.add_argument("--no-artifacts", action="store_true")
|
||||
parser_list = subparsers.add_parser("list")
|
||||
parser_list.add_argument("ITEM", choices=("all", "built", "new"))
|
||||
parser_repo_push = subparsers.add_parser("repo-push")
|
||||
parser_repo_push.add_argument("REPO_DIR")
|
||||
parser_repo_push.add_argument("REPO_PUSH_PKGNAME", nargs="*")
|
||||
args = argparser.parse_args()
|
||||
|
||||
if args.target:
|
||||
@@ -50,7 +55,7 @@ def run_hooks(map, arg: typing.Any = None):
|
||||
os.chdir(current_dir)
|
||||
|
||||
|
||||
def run_build_package(package: str):
|
||||
def cmd_build_package(package: str):
|
||||
try:
|
||||
os.chdir(f"packages/{package}")
|
||||
os.makedirs("target", exist_ok=True)
|
||||
@@ -126,25 +131,37 @@ def run_build_package(package: str):
|
||||
file.write("OK")
|
||||
|
||||
|
||||
def run_clean_package(package: str):
|
||||
try:
|
||||
shutil.rmtree(f"packages/{package}/target")
|
||||
except Exception:
|
||||
pass
|
||||
def cmd_clean_package(package: list[str]):
|
||||
for i in package:
|
||||
targetdir = f"packages/{i}/target"
|
||||
if not os.path.exists(targetdir):
|
||||
continue
|
||||
if args.no_artifacts:
|
||||
for file in os.listdir(targetdir):
|
||||
path = f"{targetdir}/{file}"
|
||||
if file.endswith(".pkg") or file == "build-ok.tag":
|
||||
continue
|
||||
if os.path.isfile(path) or os.path.islink(path):
|
||||
os.remove(path)
|
||||
else:
|
||||
shutil.rmtree(path)
|
||||
|
||||
else:
|
||||
shutil.rmtree(targetdir)
|
||||
|
||||
|
||||
def run_list(item):
|
||||
def do_list(item: str):
|
||||
if item == "all":
|
||||
for i in os.listdir("packages"):
|
||||
if i.startswith("."):
|
||||
continue
|
||||
print(i)
|
||||
yield i
|
||||
elif item == "built":
|
||||
for i in os.listdir("packages"):
|
||||
if i.startswith("."):
|
||||
continue
|
||||
if os.path.exists(f"packages/{i}/target/build-ok.tag"):
|
||||
print(i)
|
||||
yield i
|
||||
elif item == "new":
|
||||
for i in os.listdir("packages"):
|
||||
if i.startswith("."):
|
||||
@@ -153,12 +170,17 @@ def run_list(item):
|
||||
pkgbuild_mtime = os.path.getmtime(f"packages/{i}/pkgbuild.py")
|
||||
target_mtime = os.path.getmtime(f"packages/{i}/target/build-ok.tag")
|
||||
if target_mtime < pkgbuild_mtime:
|
||||
print(i)
|
||||
yield i
|
||||
except Exception:
|
||||
print(i)
|
||||
yield i
|
||||
|
||||
|
||||
def run_build_atom(pkgname: str):
|
||||
def cmd_list(item):
|
||||
for i in do_list(item):
|
||||
print(i)
|
||||
|
||||
|
||||
def cmd_build_atom(pkgname: str):
|
||||
# Declare necessary paths
|
||||
repo_root = os.getcwd()
|
||||
package_dir = f"{repo_root}/packages/{pkgname}"
|
||||
@@ -194,16 +216,41 @@ def run_build_atom(pkgname: str):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Build success
|
||||
with open(f"{target_dir}/build-ok.tag", "wt+") as file:
|
||||
file.write("OK")
|
||||
|
||||
|
||||
def cmd_repo_push(repo_dir: str, pkgname: list[str]):
|
||||
for pkg in pkgname:
|
||||
targetdir = f"packages/{pkg}/target"
|
||||
if not os.path.exists(targetdir):
|
||||
print(f"error: failed to add '{pkg}': package is not built")
|
||||
continue
|
||||
for target_file in os.listdir(targetdir):
|
||||
if not target_file.endswith(".pkg"):
|
||||
continue
|
||||
try:
|
||||
lib.packie.repo_add(repo_dir, f"{targetdir}/{target_file}")
|
||||
except:
|
||||
print(f"error: failed to add '{pkg}': see the output above")
|
||||
|
||||
|
||||
if args.subcommand == "build":
|
||||
if args.atombuild:
|
||||
run_build_atom(args.BUILD_PKGNAME)
|
||||
cmd_build_atom(args.BUILD_PKGNAME)
|
||||
else:
|
||||
run_build_package(args.BUILD_PKGNAME)
|
||||
cmd_build_package(args.BUILD_PKGNAME)
|
||||
elif args.subcommand == "clean":
|
||||
run_clean_package(args.CLEAN_PKGNAME)
|
||||
if args.all:
|
||||
pkgs = os.listdir("packages")
|
||||
else:
|
||||
pkgs = args.CLEAN_PKGNAME
|
||||
cmd_clean_package(pkgs)
|
||||
elif args.subcommand == "list":
|
||||
run_list(args.ITEM)
|
||||
cmd_list(args.ITEM)
|
||||
elif args.subcommand == "repo-push":
|
||||
cmd_repo_push(args.REPO_DIR, args.REPO_PUSH_PKGNAME)
|
||||
else:
|
||||
print("error: no action specified", file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user