Skip to content

Commit

Permalink
Wren: add package (#5023)
Browse files Browse the repository at this point in the history
* add wren

* removed nunecessary config

* shortened description

* removed define ndebug

* simplified test

* fix windows shared

* Update xmake.lua

---------

Co-authored-by: star9029 <[email protected]>
  • Loading branch information
burdockcascade and star-hengxing authored Aug 24, 2024
1 parent 20149ac commit bdf1716
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/w/wren/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package("wren")
set_homepage("http://wren.io")
set_description("Wren is a small, fast, class-based concurrent scripting language.")
set_license("MIT")

add_urls("https://github.com/wren-lang/wren/archive/refs/tags/$(version).tar.gz",
"https://github.com/wren-lang/wren.git")

add_versions("0.4.0", "23c0ddeb6c67a4ed9285bded49f7c91714922c2e7bb88f42428386bf1cf7b339")

on_install(function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
target("wren")
set_kind("$(kind)")
add_headerfiles("src/include/*.h", "src/vm/*.h", "src/optional/*.h")
add_includedirs("src/include", "src/vm", "src/optional")
add_files("src/vm/*.c", "src/optional/*.c")
if is_mode("debug") then
add_defines("DEBUG")
end
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all")
end
]])
import("package.tools.xmake").install(package)
end)

on_test(function (package)
assert(package:has_cfuncs("wrenInterpret", {includes = "wren.h"}))
end)

0 comments on commit bdf1716

Please sign in to comment.