From 8b4ef8bdfc32b2228bcf8fbdfedca7cc62a073bd Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 24 Jul 2022 19:04:46 +0200 Subject: [PATCH 1/2] Fix detection of `ImportImagePixels` and `ImagesToBlob` for IM7 (#2944) ImageMagick 7.x uses the `` include directive instead of ``. --- meson.build | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 68d489ad..87440d21 100644 --- a/meson.build +++ b/meson.build @@ -174,29 +174,34 @@ if not get_option('magick').disabled() and magick_dep.found() else libvips_deps += magick_dep endif - if magick_dep.version().version_compare('>=7.0') + magick7 = magick_dep.version().version_compare('>=7.0') + # IM7 uses + # IM6 uses (since 6.2.3) but still provides + # GM uses + magick_include = magick7 ? '#include ' : '#include ' + if magick7 cfg_var.set('HAVE_MAGICK7', '1') else # come here for imagemagick6, and graphicsmagick1.x, which also uses # the im6 API cfg_var.set('HAVE_MAGICK6', '1') - if cc.has_member('struct _ImageInfo', 'number_scenes', prefix: '#include ', dependencies: magick_dep) + if cc.has_member('struct _ImageInfo', 'number_scenes', prefix: magick_include, dependencies: magick_dep) cfg_var.set('HAVE_NUMBER_SCENES', '1') endif func_names = [ 'InheritException', 'AcquireExceptionInfo', 'SetImageProperty', 'SetImageExtent', 'AcquireImage', 'GetVirtualPixels', 'ResetImageProfileIterator', 'ResetImageAttributeIterator', 'ResetImagePropertyIterator', 'MagickCoreGenesis', 'SetImageOption', 'BlobToStringInfo', 'OptimizePlusImageLayers', 'OptimizeImageTransparency' ] foreach func_name : func_names - if cc.has_function(func_name, prefix: '#include ', dependencies: magick_dep) + if cc.has_function(func_name, prefix: magick_include, dependencies: magick_dep) cfg_var.set('HAVE_' + func_name.to_upper(), '1') endif endforeach - if cc.compiles('#include \nColorspaceType colorspace = CMYColorspace;', name: 'Has CMYColorspace', dependencies: magick_dep) + if cc.compiles(magick_include + '\nColorspaceType colorspace = CMYColorspace;', name: 'Has CMYColorspace', dependencies: magick_dep) cfg_var.set('HAVE_CMYCOLORSPACE', '1') endif - if cc.compiles('#include \nColorspaceType colorspace = HCLpColorspace;', name: 'Has HCLpColorspace', dependencies: magick_dep) + if cc.compiles(magick_include + '\nColorspaceType colorspace = HCLpColorspace;', name: 'Has HCLpColorspace', dependencies: magick_dep) cfg_var.set('HAVE_HCLPCOLORSPACE', '1') endif # GetImageMagick() takes two args under GM, three under IM - if cc.compiles('#include \nint main() {(void)GetImageMagick(NULL, 0, NULL);}', name: 'GetImageMagick takes three arguments', dependencies: magick_dep) + if cc.compiles(magick_include + '\nint main() {(void)GetImageMagick(NULL, 0, NULL);}', name: 'GetImageMagick takes three arguments', dependencies: magick_dep) cfg_var.set('HAVE_GETIMAGEMAGICK3', '1') endif endif @@ -206,10 +211,10 @@ if not get_option('magick').disabled() and magick_dep.found() endif if 'save' in get_option('magick-features') cfg_var.set('ENABLE_MAGICKSAVE', '1') - if cc.has_function('ImportImagePixels', prefix: '#include ', dependencies: magick_dep) + if cc.has_function('ImportImagePixels', prefix: magick_include, dependencies: magick_dep) cfg_var.set('HAVE_IMPORTIMAGEPIXELS', '1') endif - if cc.has_function('ImagesToBlob', prefix: '#include ', dependencies: magick_dep) + if cc.has_function('ImagesToBlob', prefix: magick_include, dependencies: magick_dep) cfg_var.set('HAVE_IMAGESTOBLOB', '1') endif endif From 5e93ac43ac8542e797bad3d7391fac9c38b38dff Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 26 Jul 2022 12:20:43 +0100 Subject: [PATCH 2/2] bump 8.13 version --- ChangeLog | 3 +++ configure.ac | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f6e56eb..6b9f2753 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +24/7/22 started 8.13.1 +- fix im7 feature detection in meson + 21/11/21 started 8.13 - configure fails for requested but unmet dependencies [remicollet] - add support for another quantiser [DarthSim] diff --git a/configure.ac b/configure.ac index 2ed8b9a4..1d0093f4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # also update the version number in the m4 macros below -AC_INIT([vips], [8.13.0], [vipsip@jiscmail.ac.uk]) +AC_INIT([vips], [8.13.1], [vipsip@jiscmail.ac.uk]) # required for gobject-introspection AC_PREREQ([2.69]) @@ -18,7 +18,7 @@ AC_CONFIG_MACRO_DIR([m4]) # user-visible library versioning m4_define([vips_major_version], [8]) m4_define([vips_minor_version], [13]) -m4_define([vips_micro_version], [0]) +m4_define([vips_micro_version], [1]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version])