Compare commits

...
10 Commits
Author SHA1 Message Date
sisungo 07297e8fa8 feat: add package musl-obstack
Signed-off-by: sisungo <[email protected]>
2026-07-16 15:39:02 +08:00
sisungo 65a884ddd4 Merge pull request 'feat (lib): add meson/cmake shortcuts' (#130) from sisungo/semios-packages:shortcut_meson into master
Reviewed-on: semios/semios-packages#130
2026-07-15 16:27:49 +08:00
sisungo 8c41ed811f Merge pull request 'feat: add package meson' (#129) from sisungo/semios-packages:meson into master
Reviewed-on: semios/semios-packages#129
2026-07-15 16:24:09 +08:00
sisungo e421add41d feat (lib): add meson/cmake shortcuts
Signed-off-by: sisungo <[email protected]>
2026-07-14 15:58:55 +08:00
sisungo 1b2f8a2295 feat: add package meson
Signed-off-by: sisungo <[email protected]>
2026-07-14 15:48:08 +08:00
sisungo 02cf225a7e Merge pull request 'feat: add package cmake' (#72) from sisungo/semios-packages:cmake into master
Reviewed-on: semios/semios-packages#72
2026-07-11 22:31:12 +08:00
sisungo 8d99e1d12a feat: add package cmake
Signed-off-by: sisungo <[email protected]>
2026-07-11 16:17:17 +08:00
sisungo 89f0038e99 Merge pull request 'feat: add package curl' (#77) from sisungo/semios-packages:curl into master
Reviewed-on: semios/semios-packages#77
2026-07-11 09:20:49 +08:00
sisungo 7e66f0669d Merge pull request 'feat: add package libpsl' (#78) from sisungo/semios-packages:libpsl into master
Reviewed-on: semios/semios-packages#78
2026-07-11 08:45:25 +08:00
sisungo 6abf94ba6c feat: add package libpsl
Signed-off-by: sisungo <[email protected]>
2026-07-11 05:59:50 +08:00
7 changed files with 201 additions and 1 deletions
+4
View File
@@ -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]
+63
View File
@@ -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)
+41
View File
@@ -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"])
+30
View File
@@ -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)
+33
View File
@@ -0,0 +1,33 @@
import subprocess
import os
from lib.make import *
from lib import cpp
version("1.2.3")
source_url("https://github.com/void-linux/musl-obstack/archive/refs/tags/v1.2.3.tar.gz")
def compile_obj(name):
subprocess.run(
os.environ.get("CC", "cc").split(" ")
+ ["-std=c23", "-I", ".", "-O3", "-c", "-o", f"{name}.o", f"{name}.c"],
check=True,
)
def build():
with open("config.h", "wt+") as config_h:
pass
compile_obj("obstack")
compile_obj("obstack_printf")
subprocess.run(["ar", "rcs", "libiberty_obstack.a", "obstack.o", "obstack_printf.o"], check=True)
on_build(build)
def pack_dev(composer):
composer.makedir("lib")
composer.addfile("libiberty_obstack.a", "lib/libiberty_obstack.a")
composer.makedir("include")
composer.addfile("obstack.h", "include/obstack.h")
package("libiberty-obstack-dev")
on_pack(pack_dev)
+11
View File
@@ -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:
+19 -1
View File
@@ -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)