From b4b92315f94eaddaf827458cd7f997d52f6aa095 Mon Sep 17 00:00:00 2001 From: star9029 Date: Mon, 30 Sep 2024 21:49:44 +0800 Subject: [PATCH] libdom: add package (#5384) --- packages/l/libdom/port/xmake.lua | 15 +++++++++++++++ packages/l/libdom/xmake.lua | 21 +++++++++++++++++++++ packages/l/libwapcaplet/port/xmake.lua | 11 +++++++++++ packages/l/libwapcaplet/xmake.lua | 19 +++++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 packages/l/libdom/port/xmake.lua create mode 100644 packages/l/libdom/xmake.lua create mode 100644 packages/l/libwapcaplet/port/xmake.lua create mode 100644 packages/l/libwapcaplet/xmake.lua diff --git a/packages/l/libdom/port/xmake.lua b/packages/l/libdom/port/xmake.lua new file mode 100644 index 000000000..3d8645933 --- /dev/null +++ b/packages/l/libdom/port/xmake.lua @@ -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 diff --git a/packages/l/libdom/xmake.lua b/packages/l/libdom/xmake.lua new file mode 100644 index 000000000..f962ec331 --- /dev/null +++ b/packages/l/libdom/xmake.lua @@ -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) diff --git a/packages/l/libwapcaplet/port/xmake.lua b/packages/l/libwapcaplet/port/xmake.lua new file mode 100644 index 000000000..b8aeb5e0a --- /dev/null +++ b/packages/l/libwapcaplet/port/xmake.lua @@ -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 diff --git a/packages/l/libwapcaplet/xmake.lua b/packages/l/libwapcaplet/xmake.lua new file mode 100644 index 000000000..996630059 --- /dev/null +++ b/packages/l/libwapcaplet/xmake.lua @@ -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)