|
| 1 | +diff '--color=auto' -uNr cairo-1.18.4/meson.build cairo-1.18.4.mod/meson.build |
| 2 | +--- cairo-1.18.4/meson.build 2025-03-08 18:53:25.000000000 +0530 |
| 3 | ++++ cairo-1.18.4.mod/meson.build 2025-07-14 20:42:56.226164648 +0530 |
| 4 | +@@ -235,11 +235,13 @@ |
| 5 | + conf.set('HAVE_ZLIB', 1) |
| 6 | + endif |
| 7 | + |
| 8 | +-png_dep = dependency('libpng', |
| 9 | +- required: get_option('png'), |
| 10 | +- version: libpng_required_version, |
| 11 | +- fallback: ['libpng', 'libpng_dep'] |
| 12 | ++png_inc = include_directories(get_option('png_include_dir')) |
| 13 | ++png_lib = cc.find_library('png16', dirs: [get_option('png_lib_dir')], required: true) |
| 14 | ++png_dep = declare_dependency( |
| 15 | ++ include_directories: png_inc, |
| 16 | ++ dependencies: [png_lib] |
| 17 | + ) |
| 18 | ++ |
| 19 | + if png_dep.found() |
| 20 | + feature_conf.set('CAIRO_HAS_SVG_SURFACE', 1) |
| 21 | + feature_conf.set('CAIRO_HAS_PNG_FUNCTIONS', 1) |
| 22 | +@@ -265,7 +267,7 @@ |
| 23 | + |
| 24 | + # Disable fontconfig by default on platforms where it is optional |
| 25 | + fontconfig_option = get_option('fontconfig') |
| 26 | +-fontconfig_required = host_machine.system() not in ['windows', 'darwin'] |
| 27 | ++fontconfig_required = false |
| 28 | + fontconfig_option = fontconfig_option.disable_auto_if(not fontconfig_required) |
| 29 | + |
| 30 | + fontconfig_dep = dependency('fontconfig', |
| 31 | +@@ -304,11 +306,14 @@ |
| 32 | + freetype_required = host_machine.system() not in ['windows', 'darwin'] |
| 33 | + freetype_option = freetype_option.disable_auto_if(not freetype_required) |
| 34 | + |
| 35 | +-freetype_dep = dependency('freetype2', |
| 36 | +- required: freetype_option, |
| 37 | +- version: freetype_required_version, |
| 38 | +- fallback: ['freetype2', 'freetype_dep'], |
| 39 | ++freetype_inc = include_directories(get_option('freetype_include_dir')) |
| 40 | ++freetype_lib = cc.find_library('freetype', dirs: [get_option('freetype_lib_dir')], required: true) |
| 41 | ++ |
| 42 | ++freetype_dep = declare_dependency( |
| 43 | ++ include_directories: freetype_inc, |
| 44 | ++ dependencies: [freetype_lib] |
| 45 | + ) |
| 46 | ++ |
| 47 | + if freetype_dep.found() |
| 48 | + feature_conf.set('CAIRO_HAS_FT_FONT', 1) |
| 49 | + built_features += [{ |
| 50 | +diff '--color=auto' -uNr cairo-1.18.4/meson.options cairo-1.18.4.mod/meson.options |
| 51 | +--- cairo-1.18.4/meson.options 2025-03-08 18:53:25.000000000 +0530 |
| 52 | ++++ cairo-1.18.4.mod/meson.options 2025-07-14 20:43:00.473191452 +0530 |
| 53 | +@@ -28,3 +28,11 @@ |
| 54 | + # Documentation |
| 55 | + option('gtk_doc', type : 'boolean', value : false, |
| 56 | + description: 'Build the Cairo API reference (depends on gtk-doc)') |
| 57 | ++ |
| 58 | ++# Deps |
| 59 | ++ |
| 60 | ++option('png_include_dir', type: 'string', value: '', description: 'Path to PNG headers') |
| 61 | ++option('png_lib_dir', type: 'string', value: '', description: 'Path to PNG library') |
| 62 | ++option('freetype_include_dir', type: 'string', value: '', description: 'Path to FreeType headers') |
| 63 | ++option('freetype_lib_dir', type: 'string', value: '', description: 'Path to FreeType library') |
| 64 | ++ |
0 commit comments