Compare commits

..
1 Commits
Author SHA1 Message Date
sisungo 3b78c450c5 feat: add package byacc
Signed-off-by: sisungo <[email protected]>
2026-07-07 08:03:32 +08:00
2 changed files with 22 additions and 29 deletions
-29
View File
@@ -1,29 +0,0 @@
from lib import arch, cpp
from lib.make import *
version("7.0.3")
source_url("https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.gz")
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"])
+22
View File
@@ -0,0 +1,22 @@
import os
from lib import cpp
from lib.make import *
version("2.0")
source_url("https://www.invisible-island.net/archives/byacc/byacc-2.0.tgz")
def build():
cpp.configure([f"--prefix={get_prefix('byacc')}", "--enable-btyacc"])
cpp.make()
cpp.make_install()
os.rename("bin/yacc", "bin/byacc")
on_build(build)
package("byacc")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin", "lib", "dev"])
link("bin/byacc", "/bin/yacc")