Selaa lähdekoodia

add awk (#906)

* Create xmake.lua

* Update xmake.lua

* add bison to bsd

* Update xmake.lua
ruki 3 vuotta sitten
vanhempi
commit
ae32fa234f
2 muutettua tiedostoa jossa 21 lisäystä ja 2 poistoa
  1. 19 0
      packages/a/awk/xmake.lua
  2. 2 2
      packages/b/bison/xmake.lua

+ 19 - 0
packages/a/awk/xmake.lua

@@ -0,0 +1,19 @@
+package("awk")
+    set_kind("binary")
+    set_homepage("https://github.com/onetrueawk/awk")
+    set_description("One true awk")
+
+    add_urls("https://github.com/onetrueawk/awk.git")
+    add_versions("2021.12.26", "b9c01f51224fd302519e8a35bd06effc06f6d3d1")
+
+    add_deps("bison")
+
+    on_install("macosx", "linux", function (package)
+        local configs = {}
+        import("package.tools.make").make(package, configs)
+        os.cp("a.out", path.join(package:installdir("bin"), "awk"))
+    end)
+
+    on_test(function (package)
+        os.vrun("awk --version")
+    end)

+ 2 - 2
packages/b/bison/xmake.lua

@@ -10,11 +10,11 @@ package("bison")
     add_versions("3.7.6", "69dc0bb46ea8fc307d4ca1e0b61c8c355eb207d0b0c69f4f8462328e74d7b9ea")
     add_versions("3.8.2", "06c9e13bdf7eb24d4ceb6b59205a4f67c2c7e7213119644430fe82fbd14a0abb")
 
-    if is_plat("linux") then
+    if is_plat("linux", "bsd") then
         add_deps("m4")
     end
 
-    on_install("macosx", "linux", function (package)
+    on_install("macosx", "linux", "bsd", function (package)
         import("package.tools.autoconf").install(package)
         os.rm(package:installdir("share", "doc"))
     end)