From 8cd6683b114ad4117f2593feedebc86c9e5bb343 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 7 Jun 2024 14:43:18 -0400 Subject: [PATCH] cms: Add lcms to the build --- .gitlab-ci/test-msys2.sh | 6 +++++- gdk/meson.build | 1 + meson.build | 3 +++ subprojects/lcms2.wrap | 6 ++++++ subprojects/packagefiles/lcms2/meson.build | 14 ++++++++++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 subprojects/lcms2.wrap create mode 100644 subprojects/packagefiles/lcms2/meson.build diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index d7ba93faaa..79ae22364d 100644 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -35,7 +35,11 @@ pacman --noconfirm -S --needed \ mingw-w64-$MSYS2_ARCH-python-gobject \ mingw-w64-$MSYS2_ARCH-shaderc \ mingw-w64-$MSYS2_ARCH-vulkan \ - mingw-w64-$MSYS2_ARCH-vulkan-headers + mingw-w64-$MSYS2_ARCH-vulkan-headers \ + mingw-w64-$MSYS2_ARCH-libpng \ + mingw-w64-$MSYS2_ARCH-libjpeg-turbo \ + mingw-w64-$MSYS2_ARCH-libtiff \ + mingw-w64-$MSYS2_ARCH-lcms2 mkdir -p _ccache export CCACHE_BASEDIR="$(pwd)" diff --git a/gdk/meson.build b/gdk/meson.build index eb055e56e0..ea30f6faeb 100644 --- a/gdk/meson.build +++ b/gdk/meson.build @@ -227,6 +227,7 @@ gdk_deps = [ fontconfig_dep, platform_gio_dep, pangocairo_dep, + lcms2_dep, vulkan_dep, libdrm_dep, png_dep, diff --git a/meson.build b/meson.build index b18c8ca882..93c4ec039a 100644 --- a/meson.build +++ b/meson.build @@ -18,6 +18,7 @@ harfbuzz_req = '>= 2.6.0' fribidi_req = '>= 1.0.6' cairo_req = '>= 1.18.0' gdk_pixbuf_req = '>= 2.30.0' +lcms2_req = '>= 2.8' wayland_proto_req = '>= 1.36' wayland_req = '>= 1.21.0' graphene_req = '>= 1.10.0' @@ -400,6 +401,8 @@ fribidi_dep = dependency('fribidi', version: fribidi_req, harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req, default_options: ['coretext=enabled']) hb_subset_dep = dependency('harfbuzz-subset', version: harfbuzz_req) +lcms2_dep = dependency('lcms2', version: lcms2_req, + fallback: ['lcms2', 'liblcms2_dep']) # Require PangoFT2 if on X11 or wayland pangoft_dep = dependency('pangoft2', version: pango_req, diff --git a/subprojects/lcms2.wrap b/subprojects/lcms2.wrap new file mode 100644 index 0000000000..6c81dd34eb --- /dev/null +++ b/subprojects/lcms2.wrap @@ -0,0 +1,6 @@ +[wrap-git] +directory=lcms2 +url=https://github.com/mm2/Little-CMS.git +revision=master +patch_directory=lcms2 +depth=1 diff --git a/subprojects/packagefiles/lcms2/meson.build b/subprojects/packagefiles/lcms2/meson.build new file mode 100644 index 0000000000..2f9def55bb --- /dev/null +++ b/subprojects/packagefiles/lcms2/meson.build @@ -0,0 +1,14 @@ +project('lcms2', 'c', + version : '2.12', + meson_version : '>=0.56.0', +) + +mod = import('unstable_external_project') + +p = mod.add_project('configure', + configure_options : ['--prefix=@PREFIX@', + '--libdir=@PREFIX@/@LIBDIR@', + ], +) + +liblcms2_dep = p.dependency('lcms2'