Jelajahi Sumber

add libredwg package (#3494)

* add libredwg package

* update desc

* upd

* upd

* adopt CR

* Revert "adopt CR"

This reverts commit 9511eaec12da844a104542e59d4f366b57bb26f5.

* upd

* Update xmake.lua

---------

Co-authored-by: ruki <[email protected]>
c8ef 1 tahun lalu
induk
melakukan
4138195f7f
1 mengubah file dengan 19 tambahan dan 0 penghapusan
  1. 19 0
      packages/l/libredwg/xmake.lua

+ 19 - 0
packages/l/libredwg/xmake.lua

@@ -0,0 +1,19 @@
+package("libredwg")
+    set_homepage("https://github.com/LibreDWG/libredwg")
+    set_description("A library to allow reading data from a DWG file.")
+
+    add_urls("https://github.com/LibreDWG/libredwg.git")
+    add_versions("0.13.3", "97c7225596c17430b82fd0161e7eff6beb5b1034")
+
+    add_deps("cmake")
+
+    on_install("windows", "linux", function (package)
+        local configs = {"-DBUILD_TESTING=OFF", "-DDISABLE_WERROR=ON"}
+        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)
+    end)
+
+    on_test(function (package)
+        assert(package:has_cfuncs("dwg_rgb_palette_index", {includes = "dwg.h"}))
+    end)