package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.3 KiB
32 lines
1.3 KiB
package("pixman") |
|
|
|
set_homepage("https://cairographics.org/") |
|
set_description("Low-level library for pixel manipulation.") |
|
|
|
set_urls("https://cairographics.org/releases/pixman-$(version).tar.gz") |
|
add_versions("0.38.0", "a7592bef0156d7c27545487a52245669b00cf7e70054505381cff2136d890ca8") |
|
add_versions("0.40.0", "6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc") |
|
|
|
if is_plat("windows") then |
|
add_deps("make") |
|
else |
|
add_deps("pkg-config") |
|
end |
|
add_includedirs("include/pixman-1") |
|
|
|
on_install("windows", function (package) |
|
import("core.tool.toolchain") |
|
local runenvs = toolchain.load("msvc"):runenvs() |
|
io.gsub("Makefile.win32.common", "%-MD", "-" .. package:config("vs_runtime")) |
|
os.vrunv("make", {"-f", "Makefile.win32", "pixman", "MMX=off"}, {envs = runenvs}) |
|
os.cp("pixman/*.h", package:installdir("include/pixman-1")) |
|
os.cp("pixman/release/*.lib", package:installdir("lib")) |
|
end) |
|
|
|
on_install("macosx", "linux", function (package) |
|
import("package.tools.autoconf").install(package, {"--disable-dependency-tracking", "--disable-gtk", "--disable-silent-rules"}) |
|
end) |
|
|
|
on_test(function (package) |
|
assert(package:has_cfuncs("pixman_image_create_solid_fill", {includes = "pixman.h"})) |
|
end)
|
|
|