|
@@ -3,26 +3,25 @@ package("cairo")
|
|
set_homepage("https://cairographics.org/")
|
|
set_homepage("https://cairographics.org/")
|
|
set_description("Vector graphics library with cross-device output support.")
|
|
set_description("Vector graphics library with cross-device output support.")
|
|
|
|
|
|
- add_urls("https://gitlab.freedesktop.org/cairo/cairo/-/archive/a04786b9330109ce54bf7f65c7068281419cec6a/cairo-a04786b9330109ce54bf7f65c7068281419cec6a.tar.gz")
|
|
|
|
- add_versions("2021.10.07", "8fc7e374a2de1d975171b58c7d43e4d430a28da082c0536ad6e2b178a9863d03")
|
|
|
|
|
|
+ add_urls("https://gitlab.freedesktop.org/cairo/cairo/-/archive/$(version)/cairo-$(version).tar.gz")
|
|
|
|
+ add_urls("https://gitlab.freedesktop.org/cairo/cairo.git")
|
|
|
|
+ add_versions("1.17.6", "a2227afc15e616657341c42af9830c937c3a6bfa63661074eabef13600e8936f")
|
|
|
|
|
|
add_deps("meson", "ninja")
|
|
add_deps("meson", "ninja")
|
|
- add_deps("libpng", "pixman", "zlib", "freetype", "expat", "glib")
|
|
|
|
|
|
+ add_deps("libpng", "pixman", "zlib", "freetype", "glib")
|
|
if is_plat("windows") then
|
|
if is_plat("windows") then
|
|
add_deps("pkgconf")
|
|
add_deps("pkgconf")
|
|
end
|
|
end
|
|
|
|
|
|
add_includedirs("include", "include/cairo")
|
|
add_includedirs("include", "include/cairo")
|
|
|
|
|
|
- add_patches("2021.10.07", path.join(os.scriptdir(), "patches", "2021.10.07", "macosx.patch"), "8f47e272eb9112e0592b2fcf816fe225c6540a9298dbddc38543ae2fc9fe4e6d")
|
|
|
|
-
|
|
|
|
if is_plat("linux", "macosx") then
|
|
if is_plat("linux", "macosx") then
|
|
add_syslinks("pthread")
|
|
add_syslinks("pthread")
|
|
add_deps("fontconfig")
|
|
add_deps("fontconfig")
|
|
end
|
|
end
|
|
|
|
|
|
if is_plat("windows") then
|
|
if is_plat("windows") then
|
|
- add_syslinks("gdi32", "msimg32", "user32")
|
|
|
|
|
|
+ add_syslinks("gdi32", "msimg32", "user32", "ole32")
|
|
elseif is_plat("macosx") then
|
|
elseif is_plat("macosx") then
|
|
add_frameworks("CoreGraphics", "CoreFoundation", "Foundation")
|
|
add_frameworks("CoreGraphics", "CoreFoundation", "Foundation")
|
|
end
|
|
end
|
|
@@ -34,11 +33,18 @@ package("cairo")
|
|
end)
|
|
end)
|
|
|
|
|
|
on_install("windows", "macosx", "linux", function (package)
|
|
on_install("windows", "macosx", "linux", function (package)
|
|
|
|
+ import("package.tools.meson")
|
|
|
|
+
|
|
local configs = {
|
|
local configs = {
|
|
|
|
+ "--wrap-mode=nopromote",
|
|
"-Dtests=disabled",
|
|
"-Dtests=disabled",
|
|
"-Dgtk_doc=false",
|
|
"-Dgtk_doc=false",
|
|
"-Dfreetype=enabled",
|
|
"-Dfreetype=enabled",
|
|
- "-Dgtk2-utils=disabled"}
|
|
|
|
|
|
+ "-Dgtk2-utils=disabled",
|
|
|
|
+ "-Dpng=enabled",
|
|
|
|
+ "-Dzlib=enabled",
|
|
|
|
+ "-Dglib=enabled"
|
|
|
|
+ }
|
|
if package:is_plat("macosx") or package:is_plat("linux") then
|
|
if package:is_plat("macosx") or package:is_plat("linux") then
|
|
table.insert(configs, "-Dfontconfig=enabled")
|
|
table.insert(configs, "-Dfontconfig=enabled")
|
|
else
|
|
else
|
|
@@ -48,11 +54,13 @@ package("cairo")
|
|
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
|
|
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
|
|
io.replace("meson.build", "subdir('fuzzing')", "", {plain = true})
|
|
io.replace("meson.build", "subdir('fuzzing')", "", {plain = true})
|
|
io.replace("meson.build", "subdir('docs')", "", {plain = true})
|
|
io.replace("meson.build", "subdir('docs')", "", {plain = true})
|
|
- io.replace("meson.build", "fallback: ['fontconfig', 'fontconfig_dep'],", "", {plain = true})
|
|
|
|
- io.replace("meson.build", "'CoreFoundation'", "'CoreFoundation', 'Foundation'", {plain = true})
|
|
|
|
io.replace("meson.build", "subdir('util')", "", {plain = true})
|
|
io.replace("meson.build", "subdir('util')", "", {plain = true})
|
|
-
|
|
|
|
- import("package.tools.meson").install(package, configs)
|
|
|
|
|
|
+ io.replace("meson.build", "'CoreFoundation'", "'CoreFoundation', 'Foundation'", {plain = true})
|
|
|
|
+ local envs = meson.buildenvs(package)
|
|
|
|
+ if package:is_plat("windows") then
|
|
|
|
+ envs.PATH = package:dep("pkgconf"):installdir("bin") .. path.envsep() .. envs.PATH
|
|
|
|
+ end
|
|
|
|
+ meson.install(package, configs, {envs = envs})
|
|
end)
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|