Pārlūkot izejas kodu

add zimg (#907)

* add zimg

* add libtool to zimg
ruki 3 gadi atpakaļ
vecāks
revīzija
bf95457b43
1 mainītis faili ar 25 papildinājumiem un 0 dzēšanām
  1. 25 0
      packages/z/zimg/xmake.lua

+ 25 - 0
packages/z/zimg/xmake.lua

@@ -0,0 +1,25 @@
+package("zimg")
+    set_homepage("https://github.com/sekrit-twc/zimg")
+    set_description("Scaling, colorspace conversion, and dithering library")
+    set_license("WTFPL")
+
+    add_urls("https://github.com/sekrit-twc/zimg/archive/refs/tags/release-$(version).tar.gz")
+    add_versions("3.0.3", "5e002992bfe8b9d2867fdc9266dc84faca46f0bfd931acc2ae0124972b6170a7")
+
+    add_deps("autoconf", "automake", "libtool")
+
+    on_install("macosx", "linux", "bsd", function (package)
+        local configs = {}
+        table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
+        if package:debug() then
+            table.insert(configs, "--enable-debug")
+        end
+        if package:is_plat("linux") and package:config("pic") ~= false then
+            table.insert(configs, "--with-pic")
+        end
+        import("package.tools.autoconf").install(package, configs)
+    end)
+
+    on_test(function (package)
+        assert(package:has_cfuncs("zimg_image_format_default", {includes = "zimg.h"}))
+    end)