[gtk/matthiasc/color-profile-rebased: 3/51] Add an lcms2 subproject




commit 588a7212c710f5b8019a77b0b6e2247e0f63969b
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Sep 29 16:30:00 2021 -0400

    Add an lcms2 subproject
    
    Since lcms2 is using autotools, this uses the
    experimental 'external project' module of meson,
    and adds a minimal meson.build file to lcms2.
    
    It seems to work.

 meson.build                                |  3 ++-
 subprojects/lcms2.wrap                     |  6 ++++++
 subprojects/packagefiles/lcms2/meson.build | 14 ++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 7bb4f7bd06..935b663470 100644
--- a/meson.build
+++ b/meson.build
@@ -399,7 +399,8 @@ fribidi_dep    = dependency('fribidi', version: fribidi_req,
 harfbuzz_dep   = dependency('harfbuzz', version: harfbuzz_req,
                             fallback: ['harfbuzz', 'libharfbuzz_dep'],
                             default_options: ['coretext=enabled'])
-lcms2_dep      = dependency('lcms2', version: lcms2_req)
+lcms2_dep      = dependency('lcms2', version: lcms2_req,
+                            fallback : ['lcms2', 'liblcms2_dep'])
 
 # Require PangoFT2 if on X11 or wayland
 require_pangoft2 = wayland_enabled or x11_enabled
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..ef8f6e27a1
--- /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')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]