forked from semios/semios-packages
Compare commits
38
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
868a631c93 | ||
|
|
bbe4604406 | ||
|
|
c471a18585 | ||
|
|
c4e694cd42 | ||
|
|
7300eb7d00 | ||
|
|
aba5fba2e3 | ||
|
|
3ced6357dc | ||
|
|
b026069a61 | ||
|
|
bafd4098a8 | ||
|
|
ed7d0b5680 | ||
|
|
66626cf702 | ||
|
|
bfd4548869 | ||
|
|
abfe30c539 | ||
|
|
b0ae1f4bf4 | ||
|
|
2938e9e969 | ||
|
|
50e41c4c36 | ||
|
|
df1accfb3e | ||
|
|
2fa379760a | ||
|
|
f541a95e49 | ||
|
|
764a7355f0 | ||
|
|
b7d9d9b7d6 | ||
|
|
f55398575a | ||
|
|
2b73f626a1 | ||
|
|
aef0d22091 | ||
|
|
424ff5f6e4 | ||
|
|
3022b06b20 | ||
|
|
dac07d40bb | ||
|
|
f947e27187 | ||
|
|
e0cbdf7a1b | ||
|
|
19659a6b43 | ||
|
|
f7ff9d9742 | ||
|
|
c9627305c2 | ||
|
|
69adb4a599 | ||
|
|
7076f76481 | ||
|
|
83e967f858 | ||
|
|
bc23a14b1a | ||
|
|
5b78c48d8e | ||
|
|
36ceb91590 |
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import stat
|
||||
import subprocess
|
||||
|
||||
from lib import common
|
||||
@@ -19,4 +20,7 @@ def autostrip(composer):
|
||||
continue
|
||||
if not _is_elf(ent.path):
|
||||
continue
|
||||
oldperm = stat.S_IMODE(os.stat(ent.path).st_mode)
|
||||
os.chmod(ent.path, 0o777)
|
||||
subprocess.run([strip, ent.path], check=True)
|
||||
os.chmod(ent.path, oldperm)
|
||||
|
||||
+16
-1
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from lib.common import treedir
|
||||
@@ -32,11 +33,25 @@ 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):
|
||||
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 rem is None and chdir:
|
||||
os.chdir("../cpp_install")
|
||||
if chdir and move:
|
||||
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 ninja(rem: list[str] = []):
|
||||
|
||||
@@ -72,6 +72,15 @@ def link(src: str, dst: str, default: bool = True):
|
||||
]
|
||||
|
||||
|
||||
def get_prefix(pkgname: str) -> str:
|
||||
pkginfo = _pkginfo[pkgname]
|
||||
if pkginfo.get(_key_arch_any):
|
||||
pkgarch = "any"
|
||||
else:
|
||||
pkgarch = arch.get_target()
|
||||
return f"/pkg/{pkgname}={pkginfo[_key_version]}@{pkgarch}"
|
||||
|
||||
|
||||
def supported_arch(s: list[str] | typing.Callable[[str], bool]):
|
||||
global _supported_arch
|
||||
if isinstance(s, list):
|
||||
|
||||
@@ -30,6 +30,45 @@ def download(url, output):
|
||||
last_percent = percent
|
||||
|
||||
try:
|
||||
if url.startswith("file://"):
|
||||
file_path = url[7:]
|
||||
if not os.path.exists(file_path):
|
||||
raise Exception("File not found: " + file_path)
|
||||
|
||||
total_size = os.path.getsize(file_path)
|
||||
if total_size <= 0:
|
||||
print("Copying...")
|
||||
with open(file_path, "rb") as src, open(output, "wb") as dst:
|
||||
while True:
|
||||
chunk = src.read(8192)
|
||||
if not chunk:
|
||||
break
|
||||
dst.write(chunk)
|
||||
print("Download completed: " + output)
|
||||
return output
|
||||
|
||||
sys.stdout.write("downloading... 0%")
|
||||
sys.stdout.flush()
|
||||
|
||||
with open(file_path, "rb") as src, open(output, "wb") as dst:
|
||||
downloaded = 0
|
||||
block_size = 8192
|
||||
while True:
|
||||
chunk = src.read(block_size)
|
||||
if not chunk:
|
||||
break
|
||||
dst.write(chunk)
|
||||
downloaded += len(chunk)
|
||||
percent = int(downloaded * 100 / total_size)
|
||||
report_progress(percent)
|
||||
|
||||
if last_percent != 100:
|
||||
report_progress(100)
|
||||
|
||||
sys.stdout.write("\n")
|
||||
print("Download completed: " + output)
|
||||
return output
|
||||
|
||||
req = urllib.request.Request(url, method="GET")
|
||||
req.add_header(
|
||||
"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "1.2.16.1"
|
||||
|
||||
version(upstream_version)
|
||||
source_url("https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.16.1.tar.bz2")
|
||||
|
||||
|
||||
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,24 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2026.4.26")
|
||||
source_url("https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz")
|
||||
|
||||
|
||||
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,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,35 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
VERSION = "2026.6.19"
|
||||
|
||||
version(VERSION)
|
||||
source_url("https://www.crufty.net/ftp/pub/sjg/bmake-20260619.tar.gz")
|
||||
|
||||
|
||||
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,29 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.2.0")
|
||||
source_url("https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake()
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
os.chdir("usr")
|
||||
|
||||
|
||||
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)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("2026.7.4")
|
||||
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,16 @@
|
||||
from lib import rust
|
||||
from lib.make import *
|
||||
|
||||
version("0.1.0")
|
||||
source_url("https://gitea.semilabs.org/semios/certutil/archive/v0.1.0.tar.gz")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("certutil")
|
||||
dep("semi-libc @same-arch")
|
||||
rust.use_auto_pack(["bin"])
|
||||
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("0.3.3")
|
||||
source_url(
|
||||
"https://github.com/sabotage-linux/gettext-tiny/releases/download/v0.3.3/gettext-tiny-0.3.3.tar.xz"
|
||||
)
|
||||
|
||||
|
||||
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"])
|
||||
@@ -6,7 +6,7 @@ source_url("https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(["--prefix=/"])
|
||||
cpp.configure([f"--prefix={get_prefix('gnu-make')}"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ source_url("https://data.iana.org/time-zones/releases/tzdb-2026b.tar.lz")
|
||||
def build():
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
os.chdir("usr")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
@@ -11,7 +11,16 @@ source_url(
|
||||
|
||||
def build():
|
||||
os.chdir("source")
|
||||
cpp.configure(["--enable-plugins", "--prefix=/"])
|
||||
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()
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("7.1.0")
|
||||
source_git("https://git.kernel.org/pub/scm/network/iproute2/iproute2.git", "v7.1.0")
|
||||
|
||||
|
||||
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"])
|
||||
@@ -8,7 +8,14 @@ source_url(
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(["--prefix=/"])
|
||||
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()
|
||||
|
||||
@@ -27,7 +34,12 @@ dep("libzstd @same-arch")
|
||||
package("libarchive-tools")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
dep("libarchive (same)")
|
||||
provide("bsdtar")
|
||||
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"])
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("3.6.0")
|
||||
source_url(
|
||||
"https://github.com/libffi/libffi/releases/download/v3.6.0/libffi-3.6.0.tar.gz"
|
||||
)
|
||||
|
||||
|
||||
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"])
|
||||
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from lib.make import *
|
||||
|
||||
version("0.1.0")
|
||||
source_url(f"file://{os.getcwd()}/empty.tar")
|
||||
|
||||
|
||||
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,
|
||||
)
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("lib")
|
||||
composer.addfile("libgcc_s.so.1", "lib/libgcc_s.so.1")
|
||||
|
||||
|
||||
package("libgcc-compat")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libunwind @same-arch")
|
||||
on_pack(pack)
|
||||
@@ -0,0 +1,28 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.6.1")
|
||||
source_url("https://downloads.xiph.org/releases/opus/opus-1.6.1.tar.gz")
|
||||
|
||||
|
||||
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"])
|
||||
@@ -12,8 +12,6 @@ def build():
|
||||
cpp.configure()
|
||||
cpp.make([f"CC={os.environ['CC']}"])
|
||||
cpp.make_install()
|
||||
os.chdir("usr/local")
|
||||
subprocess.run(["sh", "-c", "chmod +w bin/* sbin/*"], check=True)
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
@@ -11,6 +11,10 @@ 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",
|
||||
"--with-terminfo-dirs=/share/terminfo",
|
||||
@@ -33,7 +37,6 @@ def build():
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
os.unlink("lib/terminfo")
|
||||
os.rename("usr/lib/pkgconfig", "lib/pkgconfig")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("19")
|
||||
source_url("https://github.com/aligrudi/neatvi/archive/refs/tags/19.tar.gz")
|
||||
|
||||
|
||||
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,72 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "5.42.2"
|
||||
|
||||
version(upstream_version)
|
||||
source_url("https://www.cpan.org/src/5.0/perl-5.42.2.tar.gz")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(
|
||||
[
|
||||
"./Configure",
|
||||
"-de",
|
||||
f"-Dcc={os.environ.get('CC', 'cc')}",
|
||||
f"-Doptimize={os.environ.get('CFLAGS', '')}",
|
||||
"-Dusethreads",
|
||||
"-Duseshrplib",
|
||||
"-Dprefix=/",
|
||||
"-Dvendorprefix=/",
|
||||
f"-Dprivlib={get_prefix('libperl')}/share/core_perl",
|
||||
f"-Darchlib={get_prefix('libperl')}/lib/core_perl",
|
||||
f"-Dsitelib=/lib/{arch.get_target()}/perl5/site_perl",
|
||||
f"-Dsitearch=/lib/{arch.get_target()}/perl5/site_arch",
|
||||
f"-Dvendorlib=/lib/{arch.get_target()}/perl5/vendor_perl",
|
||||
f"-Dvendorarch=/lib/{arch.get_target()}/perl5/vendor_arch",
|
||||
f"-Dscriptdir={get_prefix('perl')}/bin/core_perl",
|
||||
"-Dsitescript=/bin/site_perl",
|
||||
"-Dvendorscript=/bin/vendor_perl",
|
||||
"-Dinc_version_list=none",
|
||||
"-Dman1dir=/share/man/man1",
|
||||
"-Dman3dir=/share/man/man3",
|
||||
"-Dman1ext=1perl",
|
||||
"-Dman3ext=3perl",
|
||||
f"-Dlddlflags=-shared {os.environ.get('LDFLAGS', '')}",
|
||||
f"-Dldflags={os.environ.get('LDFLAGS', '')}",
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libperl(composer):
|
||||
composer.makedir("lib")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("lib/core_perl", "lib/core_perl")
|
||||
composer.add_dir("share/core_perl", "share/core_perl")
|
||||
|
||||
|
||||
package("libperl")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_libperl)
|
||||
|
||||
|
||||
def pack_perl(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
|
||||
|
||||
package("perl")
|
||||
dep("libperl (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
link("bin/perl", "/bin/perl")
|
||||
link(f"bin/perl{upstream_version}", f"/bin/perl{upstream_version}")
|
||||
@@ -10,6 +10,9 @@ def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('pkgconf')}/bin",
|
||||
f"--libdir={get_prefix('libpkgconf')}/lib",
|
||||
f"--includedir={get_prefix('libpkgconf-dev')}/include",
|
||||
f"--with-system-libdir=/lib:/lib/{arch.get_target()}",
|
||||
f"--with-system-includedir=/lib/{arch.get_target()}/include",
|
||||
f"--with-pkg-config-dir=/lib/{arch.get_target()}/pkgconfig",
|
||||
|
||||
@@ -37,10 +37,6 @@ def build():
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
try:
|
||||
shutil.rmtree("../cpp_install")
|
||||
except:
|
||||
pass
|
||||
cpp.make_install()
|
||||
os.rename(
|
||||
f"lib/{arch.get_target()}/python{VERSION_BASE}", f"lib/python{VERSION_BASE}"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.4.6")
|
||||
source_url("https://github.com/rhash/RHash/archive/refs/tags/v1.4.6.tar.gz")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('rhash-tools')}/bin",
|
||||
f"--libdir={get_prefix('librhash')}/lib",
|
||||
"--disable-gettext",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("librhash")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("rhash-tools")
|
||||
dep("librhash (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("librhash-dev")
|
||||
dep("librhash (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -1,15 +1,14 @@
|
||||
import lib.arch as arch
|
||||
from lib.cpp import *
|
||||
from lib import arch, cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.2.6+1")
|
||||
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6-1.tar.gz")
|
||||
|
||||
version("1.2.6")
|
||||
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6.tar.gz")
|
||||
|
||||
def build():
|
||||
configure(["--prefix=/"])
|
||||
make()
|
||||
make_install()
|
||||
cpp.configure(["--prefix=/"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
@@ -20,9 +19,10 @@ def musl_target():
|
||||
|
||||
|
||||
package("semi-libc")
|
||||
use_auto_pack(["lib"])
|
||||
cpp.use_auto_pack(["lib"])
|
||||
link("lib/libc.so", f"/lib/ld-musl-{musl_target()}.so.1")
|
||||
link("lib/libc.so", "/bin/ldd")
|
||||
|
||||
package("semi-libc-dev")
|
||||
use_auto_pack(["dev"])
|
||||
cpp.use_auto_pack(["dev"])
|
||||
dep("semi-libc (same)")
|
||||
|
||||
@@ -9,6 +9,9 @@ def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libsqlite')}/lib",
|
||||
f"--bindir={get_prefix('sqlite')}/bin",
|
||||
f"--includedir={get_prefix('libsqlite-dev')}/include",
|
||||
"--all",
|
||||
"--with-linenoise=/pkg/linenoise-dev=2.0@any",
|
||||
"--icu-collations",
|
||||
|
||||
@@ -8,7 +8,14 @@ source_url(
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(["--prefix=/"])
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('liblzma')}/lib",
|
||||
f"--bindir={get_prefix('xz')}/bin",
|
||||
f"--includedir={get_prefix('liblzma-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ def build():
|
||||
cpp.cmake(["-DZLIB_COMPAT=ON", "-DINSTALL_UTILS=ON"])
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
os.chdir("usr")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
@@ -12,7 +12,6 @@ source_url(
|
||||
def build():
|
||||
cpp.make(["HAVE_ZLIB=0", "HAVE_LZMA=0", "HAVE_LZ4=0"])
|
||||
cpp.make_install()
|
||||
os.chdir("usr/local")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
Reference in New Issue
Block a user