Compare commits

..
Author SHA1 Message Date
sisungo e3d032623f feat: improve llvm packaging
Signed-off-by: sisungo <[email protected]>
2026-07-04 18:35:57 +08:00
24 changed files with 346 additions and 522 deletions
+1 -16
View File
@@ -1,5 +1,4 @@
import os
import shutil
import subprocess
from lib.common import treedir
@@ -33,25 +32,11 @@ 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):
def make_install(rem: list[str] | None = None, chdir: 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] = []):
-9
View File
@@ -72,15 +72,6 @@ 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):
-24
View File
@@ -1,24 +0,0 @@
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)
@@ -1,44 +0,0 @@
--- 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
-36
View File
@@ -1,36 +0,0 @@
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()
os.chmod("bin/bmake", 0o655)
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)
+1 -1
View File
@@ -6,7 +6,7 @@ source_url("https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz")
def build():
cpp.configure([f"--prefix={get_prefix('gnu-make')}"])
cpp.configure(["--prefix=/"])
cpp.make()
cpp.make_install()
+1
View File
@@ -10,6 +10,7 @@ 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)
+1 -10
View File
@@ -11,16 +11,7 @@ source_url(
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.configure(["--enable-plugins", "--prefix=/"])
cpp.make()
cpp.make_install()
+1 -8
View File
@@ -8,14 +8,7 @@ source_url(
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.configure(["--prefix=/"])
cpp.make()
cpp.make_install()
-32
View File
@@ -1,32 +0,0 @@
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"])
-28
View File
@@ -1,28 +0,0 @@
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"])
+299 -271
View File
@@ -1,6 +1,154 @@
import glob
import os
import subprocess
upstream_version = "22.1.7"
[upstream_major, upstream_minor, upstream_rev] = upstream_version.split(".")
# Begin of file lists
LLVM_TOOLS = [
"bugpoint",
"dsymutil",
"llc",
"lli",
"llvm-addr2line",
"llvm-ar",
"llvm-as",
"llvm-bcanalyzer",
"llvm-bitcode-strip",
"llvm-bolt",
"llvm-bolt-binary-analysis",
"llvm-bolt-heatmap",
"llvm-boltdiff",
"llvm-c-test",
"llvm-cas",
"llvm-cat",
"llvm-cfi-verify",
"llvm-cgdata",
"llvm-config",
"llvm-cov",
"llvm-ctxprof-util",
"llvm-cvtres",
"llvm-cxxdump",
"llvm-cxxfilt",
"llvm-cxxmap",
"llvm-debuginfo-analyzer",
"llvm-debuginfod",
"llvm-debuginfod-find",
"llvm-diff",
"llvm-dis",
"llvm-dlltool",
"llvm-dwarfdump",
"llvm-dwarfutil",
"llvm-dwp",
"llvm-exegesis",
"llvm-extract",
"llvm-gsymutil",
"llvm-ifs",
"llvm-install-name-tool",
"llvm-ir2vec",
"llvm-jitlink",
"llvm-lib",
"llvm-libtool-darwin",
"llvm-link",
"llvm-lipo",
"llvm-lto",
"llvm-lto2",
"llvm-mc",
"llvm-mca",
"llvm-ml",
"llvm-ml64",
"llvm-modextract",
"llvm-nm",
"llvm-objcopy",
"llvm-objdump",
"llvm-offload-binary",
"llvm-offload-wrapper",
"llvm-opt-report",
"llvm-otool",
"llvm-pdbutil",
"llvm-profdata",
"llvm-profgen",
"llvm-ranlib",
"llvm-rc",
"llvm-readelf",
"llvm-readobj",
"llvm-readtapi",
"llvm-reduce",
"llvm-remarkutil",
"llvm-rtdyld",
"llvm-sim",
"llvm-size",
"llvm-split",
"llvm-stress",
"llvm-strings",
"llvm-strip",
"llvm-symbolizer",
"llvm-tblgen",
"llvm-tli-checker",
"llvm-undname",
"llvm-windres",
"llvm-xray",
"merge-fdata",
"opt",
"perf2bolt",
"reduce-chunk-list",
"sancov",
"sanstats",
"verify-uselistorder",
]
LLDB_BINARIES = [
"lldb",
"lldb-argdumper",
"lldb-dap",
"lldb-instr",
"lldb-mcp",
"lldb-server",
"yaml2macho-core",
]
LLD_BINARIES = ["lld", "lld-link", "ld64.lld", "wasm-ld", "wrapper://ld.lld~ld.lld"]
CLANG_BINARIES = [
f"clang-{upstream_major}~llvm-clang",
"wrapper://clang~clang",
"wrapper://clang++~clang++",
f"wrapper://clang~clang-{upstream_major}",
"clang-check",
"clang-cl",
"clang-cpp",
"clang-extdef-mapping",
"clang-format",
"clang-installapi",
"clang-linker-wrapper",
"clang-nvlink-wrapper",
"clang-offload-bundler",
"clang-offload-packager",
"clang-refactor",
"clang-repl",
"clang-scan-deps",
"clang-sycl-linker",
"clang-tblgen",
"diagtool",
"git-clang-format",
"hmaptool",
"intercept-build",
"amdgpu-arch",
"c-index-test",
"analyze-build",
"nvptx-arch",
"offload-arch",
"scan-build",
"scan-build-py",
"scan-view",
"libexec/analyze-c++",
"libexec/analyze-cc",
"libexec/c++-analyzer",
"libexec/ccc-analyzer",
"libexec/intercept-c++",
"libexec/intercept-cc",
]
# End of file lists
import lib.cpp as cpp
from lib import arch
from lib.make import *
@@ -37,6 +185,7 @@ def build():
"-DLLVM_BUILD_LLVM_DYLIB=ON",
"-DLLVM_ENABLE_LIBCXX=ON",
"-DLLVM_ENABLE_LIBEDIT=ON",
"-DLLVM_ENABLE_LLD=ON",
"-DLLVM_LINK_LLVM_DYLIB=ON",
"-DLIBCXX_HAS_MUSL_LIBC=ON",
"-DCOMPILER_RT_BUILD_GWP_ASAN=OFF",
@@ -52,315 +201,194 @@ def build():
on_build(build)
def pack_runtime_lib(composer, files):
composer.makedir("lib")
for file in files:
composer.addfile(f"lib/{llvm_host_triple()}/{file}", f"lib/{file}")
# Begin of helper functions
package_dir = os.getcwd()
def pack_runtime_dev(composer, files: list[str]):
for file in files:
if file.startswith("lib/"):
composer.makedirs("lib")
composer.addfile(file.replace("lib/", f"lib/{llvm_host_triple()}/"), file)
elif file.startswith("include/"):
realpath = file.replace("include/", "usr/include/")
composer.makedirs(os.path.dirname(file))
if os.path.isfile(realpath):
composer.addfile(realpath, file)
elif os.path.isdir(realpath):
composer.add_dir(realpath, file)
def install_wrapper(composer, name: str, dst: str):
composer.addfile(f"{package_dir}/wrapper/{name}.wrapper", dst)
with open(f"{composer.workdir}/bundle/{dst}", "r") as f:
s = f.read()
s = s.replace("LLVM_VERSION=", f"LLVM_VERSION={upstream_version}").replace(
"ARCHITECTURE=", "ARCHITECTURE=" + arch.get_target()
)
with open(f"{composer.workdir}/bundle/{dst}", "w") as f:
f.write(s)
os.chmod(f"{composer.workdir}/bundle/{dst}", 0o755)
def auto_pack_llvm_runtime(composer, prefix, dev):
composer.makedirs("lib")
parent_dir = f"./lib/{llvm_host_triple()}"
for i in os.listdir(parent_dir):
fullpath = f"{parent_dir}/{i}"
if i.split(".")[0] != prefix:
continue
if dev:
if ".so" in i:
continue
else:
if not ".so" in i:
continue
composer.addfile(fullpath, f"lib/{i}")
if not dev:
return
def auto_pack_llvm_runtime_dev(composer, condition):
composer.makedir("include")
parent_include = f"./usr/include"
for i in condition:
if i.startswith("lib:"):
auto_pack_llvm_runtime(composer, i.replace("lib:", ""), True)
continue
i = i.replace("include:", "")
for file in glob.glob(f"{parent_include}/{i}"):
name = file.replace(f"{parent_include}/", "")
if "/" in name:
composer.makedirs(f"include/{os.path.dirname(name)}")
if os.path.isdir(file):
composer.add_dir(file, f"include/{name}")
else:
composer.addfile(file, f"include/{name}")
def use_llvm_runtime_auto_pack(prefix: str):
on_pack(lambda composer: auto_pack_llvm_runtime(composer, prefix, False))
def use_llvm_runtime_dev_auto_pack(des: list[str]):
on_pack(lambda composer: auto_pack_llvm_runtime_dev(composer, des))
def auto_pack_llvm_libs(composer, prefixes: list[str]):
composer.makedirs("lib")
parent_dir = f"./lib/"
for i in os.listdir(parent_dir):
fullpath = f"{parent_dir}/{i}"
if not i.split(".")[0] in prefixes:
continue
if not ".so" in i:
continue
composer.addfile(fullpath, f"lib/{i}")
def use_llvm_libs_auto_pack(prefixes: list[str]):
on_pack(lambda composer: auto_pack_llvm_libs(composer, prefixes))
def auto_pack_bin(composer, conditions: list[str]):
for i in conditions:
prefix = "bin"
if i.startswith("libexec/"):
i = i.replace("libexec/", "")
prefix = "libexec"
composer.makedirs(prefix)
src = i
dst = f"{prefix}/{i}"
if len(i.split("~")) == 2:
src = i.split("~")[0]
dst = f"bin/{i.split('~')[1]}"
if src.startswith("wrapper://"):
src = src.replace("wrapper://", "")
if len(i.split("~")) == 1:
dst = f"bin/{src}.wrapper"
install_wrapper(composer, src, dst)
continue
if os.path.exists(f"{prefix}/{src}"):
src = f"{prefix}/{src}"
elif os.path.exists(f"usr/{prefix}/{src}"):
src = f"usr/{prefix}/{src}"
composer.addfile(src, dst)
def use_bin_auto_pack(conditions: list[str]):
on_pack(lambda composer: auto_pack_bin(composer, conditions))
# End of helper functions
# Begin of packages
package("libunwind")
on_pack(
lambda composer: pack_runtime_lib(
composer, ["libunwind.so.1.0", "libunwind.so.1", "libunwind.so"]
)
)
dep("semi-libc @same-arch")
use_llvm_runtime_auto_pack("libunwind")
package("libunwind-dev")
on_pack(
lambda composer: pack_runtime_dev(
composer,
[
"lib/libunwind.a",
"include/mach-o/compact_unwind_encoding.h",
"include/__libunwind_config.h",
"include/libunwind.h",
"include/libunwind.modulemap",
"include/unwind.h",
"include/unwind_arm_ehabi.h",
"include/unwind_itanium.h",
],
)
dep("libunwind (same)")
use_llvm_runtime_dev_auto_pack(
["lib:libunwind", "include:mach-o", "include:*unwind*.h"]
)
package("libcxxabi")
on_pack(
lambda composer: pack_runtime_lib(
composer, ["libc++abi.so", "libc++abi.so.1", "libc++abi.so.1.0"]
)
)
dep("libunwind (same)")
use_llvm_runtime_auto_pack("libc++abi")
package("libcxxabi-dev")
on_pack(lambda composer: pack_runtime_dev(composer, ["lib/libc++abi.a"]))
dep("libcxxabi (same)")
use_llvm_runtime_dev_auto_pack(["lib:libc++abi"])
package("libcxx")
on_pack(
lambda composer: pack_runtime_lib(
composer, ["libc++.so", "libc++.so.1", "libc++.so.1.0"]
)
)
dep("libcxxabi (same)")
use_llvm_runtime_auto_pack("libc++")
package("libcxx-dev")
on_pack(
lambda composer: pack_runtime_dev(
composer,
[
"lib/libc++.a",
"lib/libc++experimental.a",
"lib/libc++.modules.json",
f"include/{llvm_host_triple()}/c++/v1",
"include/c++/v1",
],
)
)
def pack_libllvm(composer):
LIBRARIES = [
"libLLVM.so.22.1",
"libLLVM.so",
"libLLVM-22.so",
"libLTO.so",
"libLTO.so.22.1",
"libRemarks.so",
"libRemarks.so.22.1",
dep("libcxx (same)")
use_llvm_runtime_dev_auto_pack(
[
"lib:libc++",
"lib:libc++experimental",
f"include:{llvm_host_triple()}/c++/v1/__config_site",
"include:c++/v1",
]
composer.makedir("lib")
for lib in LIBRARIES:
composer.addfile(f"lib/{lib}", f"lib/{lib}")
)
package("libllvm")
on_pack(pack_libllvm)
def pack_llvm(composer):
BINARIES = [
"bugpoint",
"dsymutil",
"llc",
"lli",
"llvm-addr2line",
"llvm-ar",
"llvm-as",
"llvm-bcanalyzer",
"llvm-bitcode-strip",
"llvm-bolt",
"llvm-bolt-binary-analysis",
"llvm-bolt-heatmap",
"llvm-boltdiff",
"llvm-c-test",
"llvm-cas",
"llvm-cat",
"llvm-cfi-verify",
"llvm-cgdata",
"llvm-config",
"llvm-cov",
"llvm-ctxprof-util",
"llvm-cvtres",
"llvm-cxxdump",
"llvm-cxxfilt",
"llvm-cxxmap",
"llvm-debuginfo-analyzer",
"llvm-debuginfod",
"llvm-debuginfod-find",
"llvm-diff",
"llvm-dis",
"llvm-dlltool",
"llvm-dwarfdump",
"llvm-dwarfutil",
"llvm-dwp",
"llvm-exegesis",
"llvm-extract",
"llvm-gsymutil",
"llvm-ifs",
"llvm-install-name-tool",
"llvm-ir2vec",
"llvm-jitlink",
"llvm-lib",
"llvm-libtool-darwin",
"llvm-link",
"llvm-lipo",
"llvm-lto",
"llvm-lto2",
"llvm-mc",
"llvm-mca",
"llvm-ml",
"llvm-ml64",
"llvm-modextract",
"llvm-nm",
"llvm-objcopy",
"llvm-objdump",
"llvm-offload-binary",
"llvm-offload-wrapper",
"llvm-opt-report",
"llvm-otool",
"llvm-pdbutil",
"llvm-profdata",
"llvm-profgen",
"llvm-ranlib",
"llvm-rc",
"llvm-readelf",
"llvm-readobj",
"llvm-readtapi",
"llvm-reduce",
"llvm-remarkutil",
"llvm-rtdyld",
"llvm-sim",
"llvm-size",
"llvm-split",
"llvm-stress",
"llvm-strings",
"llvm-strip",
"llvm-symbolizer",
"llvm-tblgen",
"llvm-tli-checker",
"llvm-undname",
"llvm-windres",
"llvm-xray",
"merge-fdata",
"opt",
"perf2bolt",
"reduce-chunk-list",
"sancov",
"sanstats",
"verify-uselistorder",
]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"usr/bin/{bin}", f"bin/{bin}")
dep("libcxx @same-arch")
use_llvm_libs_auto_pack(["libLLVM", "libLTO", "libRemarks"])
package("llvm")
on_pack(pack_llvm)
def pack_lld(composer):
BINARIES = ["lld", "lld-link", "ld.lld", "ld64.lld", "wasm-ld"]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"usr/bin/{bin}", f"bin/{bin}")
dep("libllvm (same)")
use_bin_auto_pack(LLVM_TOOLS)
for i in ["strip", "ar", "ranlib", "readelf", "objcopy", "objdump", "strings", "nm"]:
link(f"bin/llvm-{i}", f"/bin/{i}")
package("lld")
on_pack(pack_lld)
def pack_liblldb(composer):
LIBRARIES = [
"liblldb.so",
"liblldb.so.22.1",
"liblldb.so.22.1.7",
"liblldbIntelFeatures.so",
"liblldbIntelFeatures.so.22.1",
]
composer.makedir("lib")
for lib in LIBRARIES:
composer.addfile(f"lib/{lib}", f"lib/{lib}")
dep("libcxx @same-arch")
use_bin_auto_pack(LLD_BINARIES)
link("bin/ld.lld", "/bin/ld")
package("liblldb")
on_pack(pack_liblldb)
def pack_lldb(composer):
BINARIES = [
"lldb",
"lldb-argdumper",
"lldb-dap",
"lldb-instr",
"lldb-mcp",
"lldb-server",
"yaml2macho-core",
]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"bin/{bin}", f"bin/{bin}")
dep("libcxx @same-arch")
use_llvm_libs_auto_pack(["liblldb", "liblldbIntelFeatures"])
package("lldb")
on_pack(pack_lldb)
def pack_libclang(composer):
LIBRARIES = [
"libclang.so",
"libclang-cpp.so",
"libclang-cpp.so.22.1",
"libclang.so.22.1",
"libclang.so.22.1.7",
]
composer.makedir("lib")
for lib in LIBRARIES:
composer.addfile(f"lib/{lib}", f"lib/{lib}")
dep("libcxx @same-arch")
dep("liblldb (same)")
use_bin_auto_pack(LLDB_BINARIES)
package("libclang")
on_pack(pack_libclang)
dep("libcxx @same-arch")
dep("libllvm (same)")
use_llvm_libs_auto_pack(["libclang", "libclang-cpp"])
def pack_clang(composer):
BINARIES = [
"clang",
"clang++",
"clang-22",
"clang-check",
"clang-cl",
"clang-cpp",
"clang-extdef-mapping",
"clang-format",
"clang-installapi",
"clang-linker-wrapper",
"clang-nvlink-wrapper",
"clang-offload-bundler",
"clang-offload-packager",
"clang-refactor",
"clang-repl",
"clang-scan-deps",
"clang-sycl-linker",
"clang-tblgen",
"diagtool",
"git-clang-format",
"hmaptool",
"intercept-build",
"amdgpu-arch",
"c-index-test",
"analyze-build",
"nvptx-arch",
"offload-arch",
"scan-build",
"scan-build-py",
"scan-view",
]
LIBEXEC = [
"analyze-c++",
"analyze-cc",
"c++-analyzer",
"ccc-analyzer",
"intercept-c++",
"intercept-cc",
]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"usr/bin/{bin}", f"bin/{bin}")
composer.makedir("libexec")
for libexec in LIBEXEC:
composer.addfile(f"usr/libexec/{libexec}", f"libexec/{libexec}")
auto_pack_bin(composer, CLANG_BINARIES)
composer.makedirs("lib/clang/22/lib")
composer.add_dir(
f"lib/clang/22/lib/{llvm_host_triple()}",
f"lib/clang/22/lib/{llvm_host_triple()}",
)
package("clang")
dep("libclang (same)")
on_pack(pack_clang)
# End of packages
@@ -0,0 +1,13 @@
#!/bin/sh
LLVM_VERSION=
ARCHITECTURE=
CLANG=$(packie print package.prefix."clang (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/llvm-clang
exec ${CLANG} -x c++ \
-isystem /lib/${ARCHITECTURE}/include \
-stdlib=libc++ \
-rtlib=compiler-rt \
-B /lib/${ARCHITECTURE} \
"$@"
@@ -0,0 +1,12 @@
#!/bin/sh
LLVM_VERSION=
ARCHITECTURE=
CLANG=$(packie print package.prefix."clang (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/llvm-clang
exec ${CLANG} \
-isystem /lib/${ARCHITECTURE}/include \
-rtlib=compiler-rt \
-B /lib/${ARCHITECTURE} \
"$@"
@@ -0,0 +1,8 @@
#!/bin/sh
LLVM_VERSION=
ARCHITECTURE=
LLD=$(packie print package.prefix."lld (=${LLVM_VERSION}) @${ARCHITECTURE}")/bin/lld
exec ${LLD} -flavor gnu -L/lib/${ARCHITECTURE} "$@"
+1
View File
@@ -12,6 +12,7 @@ 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)
+1 -4
View File
@@ -11,10 +11,6 @@ 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",
@@ -37,6 +33,7 @@ def build():
cpp.make()
cpp.make_install()
os.unlink("lib/terminfo")
os.rename("usr/lib/pkgconfig", "lib/pkgconfig")
on_build(build)
-25
View File
@@ -1,25 +0,0 @@
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)
-3
View File
@@ -10,9 +10,6 @@ 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",
+4
View File
@@ -37,6 +37,10 @@ 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}"
-3
View File
@@ -9,9 +9,6 @@ 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",
+1 -8
View File
@@ -8,14 +8,7 @@ source_url(
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('liblzma')}/lib",
f"--bindir={get_prefix('xz')}/bin",
f"--includedir={get_prefix('liblzma-dev')}/include",
]
)
cpp.configure(["--prefix=/"])
cpp.make()
cpp.make_install()
+1
View File
@@ -11,6 +11,7 @@ def build():
cpp.cmake(["-DZLIB_COMPAT=ON", "-DINSTALL_UTILS=ON"])
cpp.ninja()
cpp.ninja_install()
os.chdir("usr")
on_build(build)
+1
View File
@@ -12,6 +12,7 @@ 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)