Files
semios-packages/packages/bc/pkgbuild.py
T
2026-08-08 01:37:30 +08:00

34 lines
767 B
Python

from lib import arch, cpp
from lib.make import *
version("7.0.3")
description("An implementation of the POSIX bc calculator with GNU extensions and dc")
source_url("https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
predefined_build_type = "GDH"
if "-linux" in arch.get_target():
predefined_build_type = "GNU"
cpp.configure(
[
"--disable-nls",
"--opt=3",
f"--predefined-build-type={predefined_build_type}",
f"--prefix={get_prefix('bc')}",
]
)
cpp.make()
cpp.make_install()
on_build(build)
package("bc")
dep("semi-libc @same-arch")
provide("dc")
cpp.use_auto_pack(["bin"])