forked from semios/semios-packages
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4be003698b |
@@ -44,10 +44,6 @@ 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]
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
upstream_version = "1.18"
|
||||
|
||||
version(upstream_version)
|
||||
source_url("https://ftp.gnu.org/gnu/automake/automake-1.18.tar.xz")
|
||||
|
||||
builddep("shortcut/autotools")
|
||||
builddep("perl")
|
||||
builddep("gnu-m4")
|
||||
builddep("autoconf")
|
||||
builddep("libtool")
|
||||
|
||||
|
||||
def build():
|
||||
# Build original source code
|
||||
cpp.configure([f"--prefix={get_prefix('automake')}"])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
# Patch perl binary path
|
||||
for i in os.listdir("bin"):
|
||||
with open(f"bin/{i}") as file:
|
||||
content = file.read()
|
||||
with open(f"bin/{i}", "wt") as file:
|
||||
file.write(content.replace("/usr/bin/perl", "/bin/perl"))
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_automake(composer):
|
||||
composer.add_dir("bin", "bin")
|
||||
composer.makedir("share")
|
||||
composer.add_dir("share/aclocal", "share/aclocal")
|
||||
composer.add_dir(f"share/aclocal-{upstream_version}", f"share/aclocal-{upstream_version}")
|
||||
composer.add_dir(f"share/automake-{upstream_version}", f"share/automake-{upstream_version}")
|
||||
|
||||
package("automake")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("gnu-m4")
|
||||
on_pack(pack_automake)
|
||||
@@ -1,63 +0,0 @@
|
||||
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)
|
||||
@@ -1,44 +0,0 @@
|
||||
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)
|
||||
@@ -6,7 +6,7 @@ from lib.make import *
|
||||
VERSION = "5.48"
|
||||
|
||||
version(VERSION)
|
||||
source_git("https://github.com/file/file.git", "FILE5_48")
|
||||
source_url("https://github.com/file/file/archive/refs/tags/FILE5_48.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
@@ -14,6 +14,9 @@ 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()}")
|
||||
builddep("autoconf")
|
||||
builddep("automake")
|
||||
builddep("libtool")
|
||||
|
||||
|
||||
def build():
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
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)
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=/
|
||||
exec_prefix=${prefix}
|
||||
libdir=
|
||||
includedir=
|
||||
|
||||
Name: librhash
|
||||
Description: LibRHash shared library
|
||||
Version:
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lrhash
|
||||
Libs.private:
|
||||
@@ -1,43 +1,25 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
import os
|
||||
|
||||
upstream_version = "1.4.6"
|
||||
|
||||
version(upstream_version)
|
||||
version("1.4.6")
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user