libdom: add package (#5384)
parent
e8d35c9424
commit
b4b92315f9
4 changed files with 66 additions and 0 deletions
@ -0,0 +1,15 @@ |
||||
add_rules("mode.debug", "mode.release") |
||||
|
||||
add_requires("expat", "libhubbub", "libparserutils", "libwapcaplet") |
||||
add_packages("expat", "libhubbub", "libparserutils", "libwapcaplet") |
||||
|
||||
target("dom") |
||||
set_kind("$(kind)") |
||||
add_files("src/**.c", "bindings/hubbub/*.c", "bindings/xml/expat_xmlparser.c") |
||||
add_includedirs("include", "src") |
||||
add_headerfiles("include/(dom/**.h)") |
||||
add_headerfiles("(bindings/**.h)", {prefixdir = "dom"}) |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all") |
||||
end |
@ -0,0 +1,21 @@ |
||||
package("libdom") |
||||
set_homepage("https://www.netsurf-browser.org/projects/libdom") |
||||
set_description("LibDOM is an implementation of the W3C DOM") |
||||
set_license("MIT") |
||||
|
||||
set_urls("https://source.netsurf-browser.org/libdom.git/snapshot/libdom-release/$(version).tar.bz2", |
||||
"https://git.netsurf-browser.org/libdom.git") |
||||
|
||||
add_versions("0.4.2", "dc3c00c78abe981f701cdd4dd610c44e154fa8981515d53d91b82690d80b8f98") |
||||
|
||||
add_deps("expat", "libhubbub", "libparserutils", "libwapcaplet") |
||||
|
||||
on_install(function (package) |
||||
os.cd(package:version_str()) |
||||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("dom_namespace_finalise", {includes = "dom/dom.h"})) |
||||
end) |
@ -0,0 +1,11 @@ |
||||
add_rules("mode.debug", "mode.release") |
||||
|
||||
target("wapcaplet") |
||||
set_kind("$(kind)") |
||||
add_files("src/*.c") |
||||
add_includedirs("include") |
||||
add_headerfiles("include/(libwapcaplet/*.h)") |
||||
|
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all") |
||||
end |
@ -0,0 +1,19 @@ |
||||
package("libwapcaplet") |
||||
set_homepage("https://www.netsurf-browser.org/projects/libwapcaplet") |
||||
set_description("LibWapcaplet is a string internment library") |
||||
set_license("MIT") |
||||
|
||||
set_urls("https://source.netsurf-browser.org/libwapcaplet.git/snapshot/libwapcaplet-release/$(version).tar.bz2", |
||||
"https://git.netsurf-browser.org/libwapcaplet.git") |
||||
|
||||
add_versions("0.4.3", "641e2a3e02069a0c724b8d862fcda5ab87a67e879f30a2e87af1b10b9f3c3498") |
||||
|
||||
on_install(function (package) |
||||
os.cd(package:version_str()) |
||||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
import("package.tools.xmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("lwc_intern_string", {includes = "libwapcaplet/libwapcaplet.h"})) |
||||
end) |
Loading…
Reference in new issue