[gimp/meson: 28/127] Change datadir -> gimpdatadir to prevent confusion.



commit 760877c7494b258ae39615c9abf0b3a86b607d43
Author: Félix Piédallu <felix piedallu me>
Date:   Fri Nov 17 11:37:36 2017 +0100

    Change datadir -> gimpdatadir to prevent confusion.

 app/config/meson.build          |    2 +-
 app/tests/meson.build           |  103 +++++++++++++++------------------------
 data/brushes/meson.build        |    2 +-
 data/dynamics/Basic/meson.build |    2 +-
 data/dynamics/FX/meson.build    |    2 +-
 data/dynamics/meson.build       |    2 +-
 data/environ/meson.build        |    2 +-
 data/gradients/meson.build      |    4 +-
 data/images/meson.build         |    2 +-
 data/interpreters/meson.build   |    2 +-
 data/palettes/meson.build       |    2 +-
 data/patterns/meson.build       |    2 +-
 data/tags/meson.build           |    2 +-
 data/tips/meson.build           |    2 +-
 data/tool-presets/meson.build   |    2 +-
 desktop/meson.build             |    4 +-
 etc/meson.build                 |    2 +-
 icons/meson.build               |    2 +-
 m4macros/meson.build            |    2 +-
 tools/meson.build               |   10 ++--
 20 files changed, 64 insertions(+), 89 deletions(-)
---
diff --git a/app/config/meson.build b/app/config/meson.build
index b5487d2..70c0acd 100644
--- a/app/config/meson.build
+++ b/app/config/meson.build
@@ -66,7 +66,7 @@ libappconfig = static_library('appconfig',
   c_args: [
     '-DG_LOG_DOMAIN="Gimp-Config"',
     '-DGIMP_APP_VERSION_STRING="'+ app_version +'"',
-    '-DDATADIR="'+ datadir +'"',
+    '-DDATADIR="'+ gimpdatadir +'"',
   ],
   dependencies: [
     cairo, gegl, gdk_pixbuf, gio, gio_specific, gtk2,
diff --git a/app/tests/meson.build b/app/tests/meson.build
index 5eaa4fd..5451259 100644
--- a/app/tests/meson.build
+++ b/app/tests/meson.build
@@ -40,11 +40,13 @@ apptests_links = [
 ]
 
 
+libapptestutils_sources = [
+  'gimp-app-test-utils.c',
+  'gimp-test-session-utils.c',
+]
+
 libapptestutils = static_library('apptestutils',
-  [
-    'gimp-app-test-utils.c',
-    'gimp-test-session-utils.c',
-  ],
+  libapptestutils_sources,
   include_directories: apptests_includes,
   dependencies: apptests_deps,
   link_with: apptests_links,
@@ -52,63 +54,36 @@ libapptestutils = static_library('apptestutils',
 
 apptests_links += libapptestutils
 
-executable('test-core',
-  'test-core.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-gimpidtable',
-  'test-gimpidtable.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-save-and-export',
-  'test-save-and-export.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-session-2-6-compatibility',
-  'test-session-2-6-compatibility.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-session-2-8-compatibility-multi-window',
-  'test-session-2-8-compatibility-multi-window.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-session-2-8-compatibility-single-window',
-  'test-session-2-8-compatibility-single-window.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-single-window-mode',
-  'test-single-window-mode.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-tools',
-  'test-tools.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-ui',
-  'test-ui.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
-executable('test-xcf',
-  'test-xcf.c',
-  include_directories: apptests_includes,
-  dependencies: apptests_deps,
-  link_with: apptests_links,
-)
\ No newline at end of file
+
+app_tests = [
+  'test-core',
+  'test-gimpidtable',
+  'test-save-and-export',
+  'test-session-2-6-compatibility',
+  'test-session-2-8-compatibility-multi-window',
+  'test-session-2-8-compatibility-single-window',
+  'test-single-window-mode',
+  'test-tools',
+  'test-ui',
+  'test-xcf',
+]
+
+foreach test_name : app_tests
+  test_exe = executable(test_name,
+    test_name + '.c',
+    include_directories: apptests_includes,
+    dependencies: apptests_deps,
+    link_with: apptests_links,
+  )
+
+  test('App test ' + test_name,
+    test_exe,
+    env: [
+      'GIMP_TESTING_ABS_TOP_SRCDIR=' + meson.source_root(),
+      'GIMP_TESTING_ABS_TOP_BUILDDIR=' + meson.build_root(),
+      'GIMP_TESTING_PLUGINDIRS=' + join_paths(meson.build_root(), 'plug-ins', 'common'),
+      'GIMP_TESTING_PLUGINDIRS_BASENAME_IGNORES=mkgen.pl',
+    ]
+  )
+
+endforeach
\ No newline at end of file
diff --git a/data/brushes/meson.build b/data/brushes/meson.build
index b1ef0d7..1c1d466 100644
--- a/data/brushes/meson.build
+++ b/data/brushes/meson.build
@@ -22,6 +22,6 @@ foreach brush : brushes
 
 
   install_data(files,
-    install_dir: join_paths(datadir, 'brushes', brush)
+    install_dir: join_paths(gimpdatadir, 'brushes', brush)
   )
 endforeach
diff --git a/data/dynamics/Basic/meson.build b/data/dynamics/Basic/meson.build
index 03581d6..a4e8a64 100644
--- a/data/dynamics/Basic/meson.build
+++ b/data/dynamics/Basic/meson.build
@@ -8,5 +8,5 @@ install_data([
     'Pressure-Opacity.gdyn',
     'Pressure-Size.gdyn',
   ],
-  install_dir: join_paths(datadir, 'dynamics', 'Basic')
+  install_dir: join_paths(gimpdatadir, 'dynamics', 'Basic')
 )
diff --git a/data/dynamics/FX/meson.build b/data/dynamics/FX/meson.build
index 5f74e71..304cf66 100644
--- a/data/dynamics/FX/meson.build
+++ b/data/dynamics/FX/meson.build
@@ -3,5 +3,5 @@ install_data([
     'Perspective.gdyn',
     'Speed_Size_Opacity.gdyn',
   ],
-  install_dir: join_paths(datadir, 'dynamics', 'FX')
+  install_dir: join_paths(gimpdatadir, 'dynamics', 'FX')
 )
diff --git a/data/dynamics/meson.build b/data/dynamics/meson.build
index 086bc78..b638c10 100644
--- a/data/dynamics/meson.build
+++ b/data/dynamics/meson.build
@@ -8,7 +8,7 @@ install_data([
     'Track-Direction.gdyn',
     'Velocity-Tapering.gdyn',
   ],
-  install_dir: join_paths(datadir, 'dynamics', 'FX')
+  install_dir: join_paths(gimpdatadir, 'dynamics', 'FX')
 )
 
 subdir('Basic')
diff --git a/data/environ/meson.build b/data/environ/meson.build
index 5668bb4..83fd2d8 100644
--- a/data/environ/meson.build
+++ b/data/environ/meson.build
@@ -1,3 +1,3 @@
 install_data('default.env',
-  install_dir: join_paths(datadir, 'environ')
+  install_dir: join_paths(gimpplugindir, 'environ')
 )
\ No newline at end of file
diff --git a/data/gradients/meson.build b/data/gradients/meson.build
index ef5361f..4a88574 100644
--- a/data/gradients/meson.build
+++ b/data/gradients/meson.build
@@ -85,9 +85,9 @@ gradients_obsolete = [
 
 install_data(
   gradients,
-  install_dir: join_paths(datadir, 'gradients'),
+  install_dir: join_paths(gimpdatadir, 'gradients'),
 )
 install_data(
   gradients_obsolete,
-  install_dir: join_paths(datadir, 'gradients', 'gimp-obsolete-files'),
+  install_dir: join_paths(gimpdatadir, 'gradients', 'gimp-obsolete-files'),
 )
diff --git a/data/images/meson.build b/data/images/meson.build
index eca6aed..2c03c04 100644
--- a/data/images/meson.build
+++ b/data/images/meson.build
@@ -7,5 +7,5 @@ images += stable ? 'gimp-logo.png' : 'gimp-devel-logo.png'
 
 install_data(
   images,
-  install_dir: join_paths(datadir, 'images'),
+  install_dir: join_paths(gimpdatadir, 'images'),
 )
\ No newline at end of file
diff --git a/data/interpreters/meson.build b/data/interpreters/meson.build
index 6949860..34738ea 100644
--- a/data/interpreters/meson.build
+++ b/data/interpreters/meson.build
@@ -1,3 +1,3 @@
 install_data('default.interp',
-  install_dir: join_paths(datadir, 'interpreters')
+  install_dir: join_paths(gimpplugindir, 'interpreters')
 )
\ No newline at end of file
diff --git a/data/palettes/meson.build b/data/palettes/meson.build
index 213809e..1c8861b 100644
--- a/data/palettes/meson.build
+++ b/data/palettes/meson.build
@@ -43,5 +43,5 @@ palettes = [
 ]
 
 install_data(palettes,
-  install_dir: join_paths(datadir, 'palettes'),
+  install_dir: join_paths(gimpdatadir, 'palettes'),
 )
\ No newline at end of file
diff --git a/data/patterns/meson.build b/data/patterns/meson.build
index 1006ef5..946c8a7 100644
--- a/data/patterns/meson.build
+++ b/data/patterns/meson.build
@@ -16,6 +16,6 @@ foreach pattern : patterns
 
 
   install_data(files,
-    install_dir: join_paths(datadir, 'patterns', pattern)
+    install_dir: join_paths(gimpdatadir, 'patterns', pattern)
   )
 endforeach
diff --git a/data/tags/meson.build b/data/tags/meson.build
index 66cb848..4e2b149 100644
--- a/data/tags/meson.build
+++ b/data/tags/meson.build
@@ -15,7 +15,7 @@ gimp_tags_default = custom_target(xmlfilename,
     '@OUTPUT@',
   ],
   install: true,
-  install_dir: join_paths(datadir, 'tags'),
+  install_dir: join_paths(gimpdatadir, 'tags'),
 )
 
 
diff --git a/data/tips/meson.build b/data/tips/meson.build
index 168a503..daf7a5d 100644
--- a/data/tips/meson.build
+++ b/data/tips/meson.build
@@ -15,7 +15,7 @@ gimp_tips = custom_target(xmlfilename,
     '@OUTPUT@',
   ],
   install: true,
-  install_dir: join_paths(datadir, 'tips'),
+  install_dir: join_paths(gimpdatadir, 'tips'),
 )
 
 
diff --git a/data/tool-presets/meson.build b/data/tool-presets/meson.build
index e329961..1ee4451 100644
--- a/data/tool-presets/meson.build
+++ b/data/tool-presets/meson.build
@@ -16,6 +16,6 @@ foreach preset : presets
 
 
   install_data(files,
-    install_dir: join_paths(datadir, 'tool-presets', preset)
+    install_dir: join_paths(gimpdatadir, 'tool-presets', preset)
   )
 endforeach
diff --git a/desktop/meson.build b/desktop/meson.build
index b6dcbe3..50c0efd 100644
--- a/desktop/meson.build
+++ b/desktop/meson.build
@@ -12,7 +12,7 @@ foreach size : sizes
   sizedir = size+'x'+size
   install_data(join_paths(sizedir, 'gimp.png'),
     install_dir: join_paths(
-      datadir, 'icons', 'hicolor', sizedir, 'apps'
+      get_option('datadir'), 'icons', 'hicolor', sizedir, 'apps'
     )
   )
 endforeach
@@ -45,7 +45,7 @@ desktopfile = custom_target(desktopfilename,
     '@OUTPUT@',
   ],
   install: true,
-  install_dir: join_paths(datadir, 'applications'),
+  install_dir: join_paths(get_option('datadir'), 'applications'),
 )
 
 
diff --git a/etc/meson.build b/etc/meson.build
index 4581431..fb21c5a 100644
--- a/etc/meson.build
+++ b/etc/meson.build
@@ -8,5 +8,5 @@ install_data(
     'templaterc',
     'unitrc',
   ],
-  install_dir: sysconfdir
+  install_dir: gimpsysconfdir,
 )
diff --git a/icons/meson.build b/icons/meson.build
index 138aca5..b207134 100644
--- a/icons/meson.build
+++ b/icons/meson.build
@@ -1090,7 +1090,7 @@ else
 endif
 
 
-gimpiconsdir = join_paths(datadir, 'icons')
+gimpiconsdir = join_paths(gimpdatadir, 'icons')
 
 themes = [
   'Color',
diff --git a/m4macros/meson.build b/m4macros/meson.build
index f474e26..17eeaaf 100644
--- a/m4macros/meson.build
+++ b/m4macros/meson.build
@@ -1,5 +1,5 @@
 install_data([
     gimp_api_name + '.m4',
   ],
-  install_dir: join_paths(datadir, 'aclocal')
+  install_dir: join_paths(get_option('datadir'), 'aclocal')
 )
diff --git a/tools/meson.build b/tools/meson.build
index 4d222f3..4440ebe 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -10,14 +10,14 @@ endif
 tools_cflags = [
   '-DBINDIR="'+ get_option('bindir') +'"',
   '-DCC="'+ cc.get_id() +'"',
-  '-DDATADIR="'+ datadir +'"',
-  '-DDATAROOTDIR="'+ datadir +'"',
+  '-DDATADIR="'+ get_option('datadir') +'"',
+  '-DDATAROOTDIR="'+ get_option('datadir') +'"',
   '-DEXEC_PREFIX="'+ prefix +'"',
   '-DGIMP_APP_VERSION="'+ app_version +'"',
   '-DGIMP_PLUGIN_VERSION="'+ plugin_version +'"',
-  '-DGIMPDATADIR="'+ datadir +'"',
+  '-DGIMPDATADIR="'+ gimpdatadir +'"',
   '-DGIMPDIR="'+ gimpdir +'"',
-  '-DGIMPPLUGINDIR="'+ plugindir +'"',
+  '-DGIMPPLUGINDIR="'+ gimpplugindir +'"',
   '-DINFODIR="'+ get_option('infodir') +'"',
   '-DLIBDIR="'+ get_option('libdir') +'"',
   '-DLIBEXECDIR="'+ get_option('libexecdir') +'"',
@@ -27,7 +27,7 @@ tools_cflags = [
   '-DPREFIX="'+ prefix +'"',
   '-DSBINDIR="'+ get_option('sbindir') +'"',
   '-DSHAREDSTATEDIR="'+ get_option('sharedstatedir') +'"',
-  '-DSYSCONFDIR="'+ sysconfdir +'"',
+  '-DSYSCONFDIR="'+ gimpsysconfdir +'"',
 ]
 
 


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