@@ -9,6 +9,7 @@ package("cairo")
99 add_versions (" 1.17.6" , " a2227afc15e616657341c42af9830c937c3a6bfa63661074eabef13600e8936f" )
1010 add_versions (" 1.17.8" , " b4ed6d33037171d4c6594345b42d81796f335a6995fdf5638db0d306c17a0d3e" )
1111 add_versions (" 1.18.0" , " 39a78afdc33a435c0f2ab53a5ec2a693c3c9b6d2ec9783ceecb2b94d54d942b0" )
12+ add_versions (" 1.18.4" , " 2f3e6e665dbbb420809102b71ad7d0f7ce870a0b1bf8b34c073f06aefb511fc6" )
1213
1314 add_patches (" 1.18.0" , path.join (os.scriptdir (), " patches" , " 1.18.0" , " alloca.patch" ), " 55f8577929537d43eed9f74241560821001b6c8613d6a7a21cff83f8431c6a70" )
1415
@@ -34,14 +35,14 @@ package("cairo")
3435 add_syslinks (" pthread" )
3536 end
3637
37- if is_plat (" windows" ) then
38- add_syslinks (" gdi32" , " msimg32" , " user32" , " ole32" )
38+ if is_plat (" windows" , " mingw " , " msys " , " cygwin " ) then
39+ add_syslinks (" gdi32" , " msimg32" , " user32" , " ole32" , " windowscodecs " )
3940 elseif is_plat (" macosx" ) then
4041 add_frameworks (" CoreGraphics" , " CoreFoundation" , " CoreText" , " Foundation" )
4142 end
4243
43- on_load (" windows|x64 " , " windows|x86 " , " macosx " , " linux " , function (package )
44- if package :is_plat (" windows" ) and not package :config (" shared" ) then
44+ on_load (function (package )
45+ if package :is_plat (" windows" , " mingw " , " msys " , " cygwin " ) and not package :config (" shared" ) then
4546 package :add (" defines" , " CAIRO_WIN32_STATIC_BUILD=1" )
4647 end
4748 if package :config (" freetype" ) then
@@ -58,7 +59,7 @@ package("cairo")
5859 end
5960 end )
6061
61- on_install (" windows|x64 " , " windows|x86 " , " macosx " , " linux " , function (package )
62+ on_install (function (package )
6263 import (" package.tools.meson" )
6364
6465 local configs = {
@@ -77,7 +78,11 @@ package("cairo")
7778 io .replace (" meson.build" , " subdir('fuzzing')" , " " , {plain = true })
7879 io .replace (" meson.build" , " subdir('docs')" , " " , {plain = true })
7980 io .replace (" meson.build" , " 'CoreFoundation'" , " 'CoreFoundation', 'Foundation'" , {plain = true })
80- local envs = meson .buildenvs (package , {packagedeps = {" libintl" , " libiconv" , " lzo" }})
81+ local cflags = {}
82+ if package :is_plat (" iphoneos" ) then
83+ table.insert (cflags , " -D_DEFAULT_SOURCE" )
84+ end
85+ local envs = meson .buildenvs (package , {cflags = cflags , packagedeps = {" libintl" , " libiconv" , " lzo" }})
8186 if package :is_plat (" windows" ) then
8287 envs .PATH = package :dep (" pkgconf" ):installdir (" bin" ) .. path.envsep () .. envs .PATH
8388 end
0 commit comments