[gimp/meson: 135/135] Backport LibMyPaint modifications to meson.



commit 11af20fa1bc59cb2cf10b9fc888c18090c429ae2
Author: Salamandar <felix piedallu me>
Date:   Wed Apr 11 16:24:35 2018 +0200

    Backport LibMyPaint modifications to meson.

 app/config/meson.build |    7 ++-----
 docs/meson.build       |    1 +
 etc/meson.build        |    1 +
 meson.build            |   22 +++++++++++++---------
 meson_options.txt      |    1 +
 5 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/app/config/meson.build b/app/config/meson.build
index cd17f1a..d811a68 100644
--- a/app/config/meson.build
+++ b/app/config/meson.build
@@ -29,12 +29,9 @@ libappconfig_sources = [
 libappconfig = static_library('appconfig',
   libappconfig_sources,
   include_directories: [ rootInclude, rootAppInclude, ],
-  c_args: [
-    '-DG_LOG_DOMAIN="Gimp-Config"',
-    mypaint_args,
-  ],
+  c_args: [ '-DG_LOG_DOMAIN="Gimp-Config"', ],
   dependencies: [
-    cairo, gegl, gdk_pixbuf, gio, gio_specific, gtk2, libmypaint, mypaint_brushes,
+    cairo, gegl, gdk_pixbuf, gio, gio_specific, gtk2, libmypaint, libmypaint_brushes,
   ],
 )
 
diff --git a/docs/meson.build b/docs/meson.build
index 134184e..0c60360 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -7,6 +7,7 @@ manconf.set('gimplocaledir',  join_paths(prefix, localedir))
 manconf.set('gimpplugindir',  join_paths(prefix, gimpplugindir))
 manconf.set('manpage_gimpdir', '\fB$XDG_CONFIG_HOME\fP/' + join_paths(gimpdir, user_version))
 manconf.set('gimpsysconfdir', gimpsysconfdir)
+manconf.set('mypaint_brushes_dir', libmypaint_brushes_dir)
 
 
 man_files = [
diff --git a/etc/meson.build b/etc/meson.build
index ad11e05..1b6a3f5 100644
--- a/etc/meson.build
+++ b/etc/meson.build
@@ -1,4 +1,5 @@
 etcconf = configuration_data()
+etcconf.set('mypaint_brushes_dir', libmypaint_brushes_dir)
 
 
 install_data(
diff --git a/meson.build b/meson.build
index 4cea0c3..a775490 100644
--- a/meson.build
+++ b/meson.build
@@ -278,14 +278,18 @@ lcms              = dependency('lcms2',              version: '>=2.8')
 libmypaint_name   = platform_win32 ? 'libmypaint' : 'libmypaint-1.3'
 libmypaint        = dependency(libmypaint_name,      version: '>=1.3.0')
 libmypaint_brushes= dependency('mypaint-brushes-1.0',required: false)
-# Mypaint-brushes not available on MingW
-# TODO should be removed when MingW adds them
-mypaint_brushes = libmypaint_brushes.found() ? [
-  libmypaint_brushes,
-] : []
-mypaint_args    = libmypaint_brushes.found() ? [] : [
-  '-DMYPAINT_BRUSHES_DIR="/usr/share/mypaint-data/1.0/brushes"',
-]
+
+libmypaint_brushes_bundled = get_option('with-bundled-mypaint-brushes')
+conf.set('ENABLE_BUNDLED_MYPAINT_BRUSHES', libmypaint_brushes_bundled)
+
+if libmypaint_brushes_bundled
+  libmypaint_brushes_dir = join_paths(
+    '${gimp_installation_dir}', 'share', 'mypaint-data', '1.0', 'brushes')
+elif libmypaint_brushes.found()
+  libmypaint_brushes_dir = libmypaint_brushes.get_pkgconfig_variable('brushesdir')
+endif
+conf.set_quoted('MYPAINT_BRUSHES_DIR', libmypaint_brushes_dir)
+
 
 pangocairo        = dependency('pangocairo',         version: '>=1.29.4')
 pangoft2          = dependency('pangoft2',           version: '>=1.29.4')
@@ -1487,7 +1491,7 @@ Optional Features:
   Language selection:  @0@'''.format(isocodes.found()) +'''
   Vector icons:        @0@'''.format(have_vector_icons) +'''
   Dr. Mingw (Win32):   @0@'''.format(drmingw.found()) +'''
-
+  Bundled MyPaint Brushes: @0@ (at @1@)'''.format('enable_bundled_mypaint_brushes', 
libmypaint_brushes_dir)+'''
 Optional Plug-Ins:
   Ascii Art:           @0@'''.format(libaa.found()) +'''
   Ghostscript:         @0@'''.format(ghostscript.found()) +'''
diff --git a/meson_options.txt b/meson_options.txt
index b595c87..02e8dee 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,6 +8,7 @@ option('windows-installer', type: 'boolean', value: false,description: 'Generate
 option('with-aa',           type: 'boolean', value: true, description: 'AA plugin')
 option('with-alsa',         type: 'boolean', value: true, description: 'Alsa support in midi input 
controller')
 option('with-appdata-test', type: 'boolean', value: true, description: 'Validate the appdata file')
+option('with-bundled-mypaint-brushes', type: 'boolean', value: true, description: 'Treat MyPaint brushes as 
bundled in the install prefix')
 option('with-cairo-pdf',    type: 'boolean', value: true, description: 'Cairo-pdf support')
 option('with-directx-sdk',  type: 'string',  value: '',   description: 'Prefix where the DirectX SDK is 
installed(optional)')
 option('with-ghostscript',  type: 'boolean', value: true, description: 'Ghostscript support')


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