forked from semios/semios-packages
Compare commits
6
Commits
cmake
...
musl-obstack
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07297e8fa8 | ||
|
|
65a884ddd4 | ||
|
|
8c41ed811f | ||
|
|
e421add41d | ||
|
|
1b2f8a2295 | ||
|
|
02cf225a7e |
@@ -46,6 +46,8 @@ def builddep(s: str):
|
|||||||
_builddep += ["cargo", "rustc"]
|
_builddep += ["cargo", "rustc"]
|
||||||
elif s == "shortcut/cmake":
|
elif s == "shortcut/cmake":
|
||||||
_builddep += ["cmake", "ninja"]
|
_builddep += ["cmake", "ninja"]
|
||||||
|
elif s == "shortcut/meson":
|
||||||
|
_builddep += ["meson", "ninja"]
|
||||||
else:
|
else:
|
||||||
_builddep += [s]
|
_builddep += [s]
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -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)
|
||||||
Reference in New Issue
Block a user