forked from semios/semios-packages
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
909f4b009b | ||
|
|
164d9f9006 | ||
|
|
2f204dc5ff | ||
|
|
6f46eb5bc9 | ||
|
|
b084ee0c6b | ||
|
|
fc4a14281c | ||
|
|
86139f1ddc | ||
|
|
95483cedaf | ||
|
|
fb4af908ba | ||
|
|
828e4dcf6d | ||
|
|
a2fe8796d3 | ||
|
|
15b8c28c56 | ||
|
|
791a621723 | ||
|
|
7d16c90042 | ||
|
|
91226580aa | ||
|
|
e8c3ebafc7 | ||
|
|
d159cd0b5b | ||
|
|
5b4036abd2 | ||
|
|
daa4312ece | ||
|
|
aaae8fc7af | ||
|
|
ec67faee81 | ||
|
|
f9dba39603 | ||
|
|
d8007af248 | ||
|
|
ff75acbb20 | ||
|
|
bf52025629 | ||
|
|
1a2fa464c6 | ||
|
|
797459750f | ||
|
|
b94159b492 | ||
|
|
4c6c0a2ecc |
+6
-1
@@ -1,9 +1,14 @@
|
|||||||
from typing import Callable, TypeAlias
|
from typing import Callable, TypeAlias
|
||||||
|
|
||||||
from . import autostrip
|
from . import autopatch, autostrip
|
||||||
|
|
||||||
|
PreBuild: TypeAlias = Callable[[], None]
|
||||||
PostBuild: TypeAlias = Callable[[], None]
|
PostBuild: TypeAlias = Callable[[], None]
|
||||||
|
|
||||||
|
pre_build: dict[str, PreBuild] = {
|
||||||
|
"autopatch": autopatch.autopatch,
|
||||||
|
}
|
||||||
|
|
||||||
post_build: dict[str, PostBuild] = {
|
post_build: dict[str, PostBuild] = {
|
||||||
"autostrip": autostrip.autostrip,
|
"autostrip": autostrip.autostrip,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,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)
|
||||||
+58
-17
@@ -1,6 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
from lib.common import treedir
|
||||||
|
|
||||||
from . import make as libmake
|
from . import make as libmake
|
||||||
from . import pkgcomposer
|
from . import pkgcomposer
|
||||||
|
|
||||||
@@ -9,6 +11,23 @@ def configure(rem: list[str] = []):
|
|||||||
subprocess.run(["./configure"] + rem, check=True)
|
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 make(rem: list[str] = []):
|
def make(rem: list[str] = []):
|
||||||
subprocess.run(["make", f"-j{os.cpu_count()}"] + rem, check=True)
|
subprocess.run(["make", f"-j{os.cpu_count()}"] + rem, check=True)
|
||||||
|
|
||||||
@@ -20,33 +39,55 @@ def make_install(rem: list[str] | None = None, chdir: bool = True):
|
|||||||
os.chdir("../cpp_install")
|
os.chdir("../cpp_install")
|
||||||
|
|
||||||
|
|
||||||
|
def ninja(rem: list[str] = []):
|
||||||
|
subprocess.run(["ninja"] + rem, check=True)
|
||||||
|
|
||||||
|
|
||||||
|
def ninja_install(rem: list[str] = [], chdir: 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"])
|
||||||
|
|
||||||
|
|
||||||
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
||||||
pc.makedir(srcdir)
|
if not os.path.exists(srcdir):
|
||||||
with os.scandir(srcdir) as entries:
|
return
|
||||||
for ent in entries:
|
try:
|
||||||
if filter(ent):
|
pc.makedir(dstdir)
|
||||||
if ent.is_dir(follow_symlinks=False):
|
except Exception:
|
||||||
pc.makedir(f"{dstdir}/{ent.name}")
|
pass
|
||||||
elif ent.is_file(follow_symlinks=False):
|
for ent in treedir(srcdir):
|
||||||
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
if filter(ent):
|
||||||
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
|
if ent.is_file(follow_symlinks=False):
|
||||||
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
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)):
|
||||||
|
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
||||||
|
|
||||||
|
|
||||||
|
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(".cmake")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _autopack_filter_lib(ent) -> bool:
|
def _autopack_filter_lib(ent) -> bool:
|
||||||
if ent.name.endswith(".o") or ent.name.endswith(".a"):
|
return not _is_dev_file(ent)
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
def _autopack_filter_bin(ent) -> bool:
|
def _autopack_filter_bin(ent) -> bool:
|
||||||
return True
|
return os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False)
|
||||||
|
|
||||||
|
|
||||||
def _autopack_filter_dev(ent):
|
def _autopack_filter_dev(ent):
|
||||||
if ".so" in ent.name:
|
return _is_dev_file(ent)
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
|
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
|
||||||
|
|||||||
@@ -59,3 +59,7 @@ def block_hook(hook: str):
|
|||||||
|
|
||||||
def source_url(url: str):
|
def source_url(url: str):
|
||||||
sources.source_url(url)
|
sources.source_url(url)
|
||||||
|
|
||||||
|
|
||||||
|
def source_git(url: str, branch: str | None = None):
|
||||||
|
sources.source_git(url, branch)
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ class PkgComposer:
|
|||||||
def makedir(self, name: str):
|
def makedir(self, name: str):
|
||||||
os.mkdir(f"{self.workdir}/bundle/{name}")
|
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):
|
def addfile(self, src: str, dst: str):
|
||||||
shutil.copy2(src, f"{self.workdir}/bundle/{dst}", follow_symlinks=False)
|
shutil.copy2(src, f"{self.workdir}/bundle/{dst}", follow_symlinks=False)
|
||||||
|
|
||||||
|
|||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
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 _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):
|
||||||
|
target_dir = f"target/{_rust_triple(arch.get_target())}/release"
|
||||||
|
if "lib" in profiles:
|
||||||
|
_do_auto_pack(pc, target_dir, "lib", _autopack_filter_lib)
|
||||||
|
if "bin" in profiles:
|
||||||
|
_do_auto_pack(pc, target_dir, "bin", _autopack_filter_bin)
|
||||||
|
|
||||||
|
|
||||||
|
def use_auto_pack(profiles: list[str]):
|
||||||
|
make.on_pack(lambda pc: _auto_pack(profiles, pc))
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tarfile
|
import tarfile
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
@@ -109,3 +110,20 @@ def source_url(url: str):
|
|||||||
tar.extractall(extract_dir)
|
tar.extractall(extract_dir)
|
||||||
with open("./target/sources.tag", "wt+") as file:
|
with open("./target/sources.tag", "wt+") as file:
|
||||||
file.write(sources_dir)
|
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,40 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("5.0.0")
|
||||||
|
source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.0.0.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.cmake(["-DBUILD_SHARED_LIBS=1"])
|
||||||
|
cpp.ninja()
|
||||||
|
cpp.ninja_install()
|
||||||
|
os.chdir("usr")
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
package("aws-lc-libssl")
|
||||||
|
on_pack(pack_libssl)
|
||||||
|
|
||||||
|
package("aws-lc-tools")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("aws-lc-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import lib.rust as rust
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("0.9.0")
|
||||||
|
source_url("https://github.com/uutils/findutils/archive/refs/tags/0.9.0.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
rust.build()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("findutils")
|
||||||
|
rust.use_auto_pack(["bin"])
|
||||||
@@ -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,17 @@
|
|||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("4.4.1")
|
||||||
|
source_url("https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure(["--prefix=/"])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("gnu-make")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("3.8.7")
|
||||||
|
source_url(
|
||||||
|
"https://github.com/libarchive/libarchive/releases/download/v3.8.7/libarchive-3.8.7.tar.gz"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure(["--prefix=/"])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libarchive")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libarchive-tools")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libarchive-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("2.0")
|
||||||
|
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)
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("1.59.2")
|
||||||
|
source_git("https://github.com/mirabilos/mksh-cvs2git.git", "mksh-R59c")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
os.system("sh ./Build.sh")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_mksh(composer):
|
||||||
|
composer.makedir("bin")
|
||||||
|
composer.addfile("mksh", "bin/mksh")
|
||||||
|
|
||||||
|
|
||||||
|
package("mksh")
|
||||||
|
on_pack(pack_mksh)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("1.13.2")
|
||||||
|
source_url("https://github.com/ninja-build/ninja/archive/refs/tags/v1.13.2.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
os.system("./configure.py --bootstrap")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_ninja(composer):
|
||||||
|
composer.makedir("bin")
|
||||||
|
composer.addfile("ninja", "bin/ninja")
|
||||||
|
|
||||||
|
|
||||||
|
package("ninja")
|
||||||
|
on_pack(pack_ninja)
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("3.53.2")
|
||||||
|
source_url("https://sqlite.org/2026/sqlite-autoconf-3530200.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure(
|
||||||
|
[
|
||||||
|
"--prefix=/",
|
||||||
|
"--all",
|
||||||
|
"--with-linenoise=/pkg/linenoise-dev=2.0@any",
|
||||||
|
"--icu-collations",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libsqlite")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("sqlite")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libsqlite-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("2.3.3")
|
||||||
|
source_url("https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.3.3.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.cmake(["-DZLIB_COMPAT=ON", "-DINSTALL_UTILS=ON"])
|
||||||
|
cpp.ninja()
|
||||||
|
cpp.ninja_install()
|
||||||
|
os.chdir("usr")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libz-ng")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("zlib-ng-tools")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libz-ng-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("1.5.7")
|
||||||
|
source_url(
|
||||||
|
"https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
os.chdir("usr/local")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libzstd")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("zstd")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libzstd-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -46,6 +46,13 @@ def run_build_package(package: str):
|
|||||||
print(f"Architecture {lib.arch.get_target()} is not supported for this package")
|
print(f"Architecture {lib.arch.get_target()} is not supported for this package")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
# Run `pre_build` hooks
|
||||||
|
for n in hooks.pre_build.keys():
|
||||||
|
if n in lib.make._blocked_hooks:
|
||||||
|
continue
|
||||||
|
hooks.pre_build[n]()
|
||||||
|
os.chdir(package_dir)
|
||||||
|
|
||||||
# Build the package
|
# Build the package
|
||||||
if lib.make._on_build:
|
if lib.make._on_build:
|
||||||
os.chdir(lib.sources.sources_dir_name())
|
os.chdir(lib.sources.sources_dir_name())
|
||||||
@@ -54,10 +61,12 @@ def run_build_package(package: str):
|
|||||||
print("on_build(): Not defined")
|
print("on_build(): Not defined")
|
||||||
|
|
||||||
# Run `post_build` hooks
|
# Run `post_build` hooks
|
||||||
|
post_build_dir = os.getcwd()
|
||||||
for n in hooks.post_build.keys():
|
for n in hooks.post_build.keys():
|
||||||
if n in lib.make._blocked_hooks:
|
if n in lib.make._blocked_hooks:
|
||||||
continue
|
continue
|
||||||
hooks.post_build[n]()
|
hooks.post_build[n]()
|
||||||
|
os.chdir(post_build_dir)
|
||||||
|
|
||||||
# Pack packages
|
# Pack packages
|
||||||
for pkgname in lib.make._pkginfo.keys():
|
for pkgname in lib.make._pkginfo.keys():
|
||||||
|
|||||||
Reference in New Issue
Block a user