瀏覽代碼

litehtml: add v0.9 (#6703)

* litehtml: add v0.9

* Update xmake.lua
star9029 4 月之前
父節點
當前提交
232c1bdff2
共有 2 個文件被更改,包括 13 次插入12 次删除
  1. 2 6
      packages/g/gumbo-parser/xmake.lua
  2. 11 6
      packages/l/litehtml/xmake.lua

+ 2 - 6
packages/g/gumbo-parser/xmake.lua

@@ -17,15 +17,11 @@ package("gumbo-parser")
                 if is_plat("windows") then
                     add_includedirs("visualc/include")
                     if is_kind("shared") then
-                        add_rules("utils.symbols.export_all", {export_classes = true})
+                        add_rules("utils.symbols.export_all")
                     end
                 end
         ]])
-        local configs = {}
-        if package:config("shared") then
-            configs.kind = "shared"
-        end
-        import("package.tools.xmake").install(package, configs)
+        import("package.tools.xmake").install(package)
     end)
 
     on_test(function (package)

+ 11 - 6
packages/l/litehtml/xmake.lua

@@ -1,20 +1,25 @@
 package("litehtml")
     set_homepage("http://www.litehtml.com/")
     set_description("Fast and lightweight HTML/CSS rendering engine")
+    set_license("BSD-3-Clause")
 
-    add_urls("https://github.com/litehtml/litehtml.git")
-    add_versions("2023.01.05", "1e803393bdc8e586e8eefd4c33973e04994bb288")
+    add_urls("https://github.com/litehtml/litehtml/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/litehtml/litehtml.git")
 
-    add_deps("cmake", "gumbo-parser")
+    add_versions("v0.9", "ef957307da15b1258a70961942840bcf54225a8d75315dcbc156186eba35b1a7")
+
+    add_deps("cmake")
+    add_deps("gumbo-parser")
 
     on_install(function (package)
-        local configs = {"-DBUILD_TESTING=OFF", "-DEXTERNAL_GUMBO=ON"}
+        local configs = {"-DBUILD_TESTING=OFF", "-DLITEHTML_BUILD_TESTING=OFF", "-DEXTERNAL_GUMBO=ON"}
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
+        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         if package:is_plat("windows") and package:config("shared") then
             table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON")
         end
-        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
-        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         import("package.tools.cmake").install(package, configs, {packagedeps = "gumbo-parser"})
+
         os.cp("include/litehtml.h", package:installdir("include"))
     end)