[gimp/meson: 2/127] Added subdirs. Translation, themes and cursors fully OK
- From: Félix Piédallu <fpiedallu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/meson: 2/127] Added subdirs. Translation, themes and cursors fully OK
- Date: Fri, 2 Feb 2018 15:59:55 +0000 (UTC)
commit c4d4dc7c7ff3cce0e9d8b1ed19a864a427990602
Author: Félix Piédallu <felix piedallu me>
Date: Wed Nov 1 17:07:36 2017 +0100
Added subdirs. Translation, themes and cursors fully OK
cursors/meson.build | 134 ++++++++++++++++++++++++++++++++++++++++++++++
meson.build | 98 ++++++++++++++++++---------------
po-libgimp/meson.build | 1 +
po-plug-ins/meson.build | 1 +
po-python/meson.build | 1 +
po-script-fu/meson.build | 1 +
po-tips/meson.build | 1 +
po/meson.build | 1 +
themes/meson.build | 21 +++++++
9 files changed, 214 insertions(+), 45 deletions(-)
---
diff --git a/cursors/meson.build b/cursors/meson.build
new file mode 100644
index 0000000..d42a3d4
--- /dev/null
+++ b/cursors/meson.build
@@ -0,0 +1,134 @@
+tool_cursors = [
+ 'cursor-bad.png',
+ 'cursor-color-picker.png',
+ 'cursor-corner-bottom-left.png',
+ 'cursor-corner-bottom-right.png',
+ 'cursor-corner-bottom.png',
+ 'cursor-corner-left.png',
+ 'cursor-corner-right.png',
+ 'cursor-corner-top-left.png',
+ 'cursor-corner-top-right.png',
+ 'cursor-corner-top.png',
+ 'cursor-crosshair-small.png',
+ 'cursor-crosshair.png',
+ 'cursor-mouse.png',
+ 'cursor-move.png',
+ 'cursor-none.png',
+ 'cursor-side-bottom-left.png',
+ 'cursor-side-bottom-right.png',
+ 'cursor-side-bottom.png',
+ 'cursor-side-left.png',
+ 'cursor-side-right.png',
+ 'cursor-side-top-left.png',
+ 'cursor-side-top-right.png',
+ 'cursor-side-top.png',
+ 'cursor-zoom.png',
+
+ 'modifier-anchor.png',
+ 'modifier-background.png',
+ 'modifier-bad.png',
+ 'modifier-control.png',
+ 'modifier-foreground.png',
+ 'modifier-intersect.png',
+ 'modifier-join.png',
+ 'modifier-minus.png',
+ 'modifier-move.png',
+ 'modifier-pattern.png',
+ 'modifier-plus.png',
+ 'modifier-resize.png',
+ 'modifier-select.png',
+
+ 'tool-airbrush.png',
+ 'tool-blend.png',
+ 'tool-blur.png',
+ 'tool-bucket-fill.png',
+ 'tool-burn.png',
+ 'tool-clone.png',
+ 'tool-color-picker.png',
+ 'tool-crop.png',
+ 'tool-dodge.png',
+ 'tool-ellipse-select.png',
+ 'tool-eraser.png',
+ 'tool-flip-horizontal.png',
+ 'tool-flip-vertical.png',
+ 'tool-free-select.png',
+ 'tool-fuzzy-select.png',
+ 'tool-hand.png',
+ 'tool-heal.png',
+ 'tool-ink.png',
+ 'tool-iscissors.png',
+ 'tool-measure.png',
+ 'tool-move.png',
+ 'tool-paintbrush.png',
+ 'tool-paths-anchor.png',
+ 'tool-paths-control.png',
+ 'tool-paths-segment.png',
+ 'tool-paths.png',
+ 'tool-pencil.png',
+ 'tool-perspective.png',
+ 'tool-polygon-select.png',
+ 'tool-rect-select.png',
+ 'tool-resize.png',
+ 'tool-rotate.png',
+ 'tool-shear.png',
+ 'tool-smudge.png',
+ 'tool-text.png',
+ 'tool-warp.png',
+ 'tool-zoom.png',
+]
+
+color_picker_cursors = [ 'cursor-color-picker.png', ]
+
+# Build xml files, in source dir, at Meson-runtime
+# TODO : versionning, or write in build dir
+
+cursors_resourcename = 'gimp-tool-cursors'
+cursors_xml = cursors_resourcename + '.gresource.xml'
+cursors_xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
+cursors_xml_content += '<gresources>\n'
+cursors_xml_content += ' <gresource prefix="/org/gimp/tool-cursors">\n'
+foreach cursor : tool_cursors
+ cursors_xml_content+=' <file preprocess="to-pixdata">'+ cursor +'</file>\n'
+endforeach
+cursors_xml_content += ' </gresource>\n'
+cursors_xml_content += '</gresources>\n'
+
+run_command('bash', '-c',
+ 'cat <<EOS > '+ join_paths(meson.current_source_dir(), cursors_xml) +'\n'
+ + cursors_xml_content + '\nEOS',
+)
+
+
+pickers_resourcename = 'gimp-color-picker-cursors'
+pickers_xml = pickers_resourcename + '.gresource.xml'
+pickers_xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
+pickers_xml_content += '<gresources>\n'
+pickers_xml_content += ' <gresource prefix="/org/gimp/color-picker-cursors">\n'
+foreach cursor : color_picker_cursors
+ pickers_xml_content+=' <file preprocess="to-pixdata">'+ cursor +'</file>\n'
+endforeach
+pickers_xml_content += ' </gresource>\n'
+pickers_xml_content += ' <gresource prefix="/org/gimp/color-picker-cursors-raw">\n'
+foreach cursor : color_picker_cursors
+ pickers_xml_content+=' <file >'+ cursor +'</file>\n'
+endforeach
+pickers_xml_content += ' </gresource>\n'
+pickers_xml_content += '</gresources>\n'
+
+run_command('bash', '-c',
+ 'cat <<EOS >'+ join_paths(meson.current_source_dir(), pickers_xml) +'\n'
+ + pickers_xml_content + '\nEOS',
+)
+
+
+cursors_sources = gnome.compile_resources(
+ cursors_resourcename,
+ cursors_xml,
+ c_name: cursors_resourcename.underscorify(),
+)
+
+pickers_sources = gnome.compile_resources(
+ pickers_resourcename,
+ pickers_xml,
+ c_name: pickers_resourcename.underscorify(),
+)
diff --git a/meson.build b/meson.build
index 42c56d7..961b5c5 100644
--- a/meson.build
+++ b/meson.build
@@ -21,6 +21,8 @@ ansi = get_option('ansi')
################################################################################
# Projects infos
+# TODO post-merge : simplify the whole version number handling
+
prettyname = 'GIMP'
full_name = 'GNU Image Manipulation Program'
@@ -54,13 +56,11 @@ sysconf_version = '2.0'
tool_version = '2.0'
user_version = '2.9'
-unstable = (minor_version % 2 == 1)
-stable = not unstable
-
-conf.set10('GIMP_UNSTABLE', unstable)
+stable = (minor_version % 2 == 0)
+conf.set10('GIMP_UNSTABLE', not stable)
################################################################################
-# Host system
+# Host system detection
host_cpu = host_machine.cpu()
message('Architecture: ' + host_cpu)
@@ -91,8 +91,6 @@ platform_win32 = (host_os.startswith('mingw') or host_os.startswith('cygwin'))
# Is this native win32
os_win32 = host_os.startswith('mingw')
-pathsep = os_win32 ? ';' : ':'
-
platform_osx = host_os.startswith('darwin')
conf.set10('PLATFORM_OSX', platform_osx)
@@ -101,41 +99,50 @@ conf.set10('PLATFORM_OSX', platform_osx)
################################################################################
# Dependencies
-babl = dependency('babl', version: '>=0.1.31')
-gegl_minver = '0.3.21'
-gegl = dependency('gegl-0.3', version: '>='+gegl_minver)
-glib = dependency('glib-2.0', version: '>=2.43.0')
+atk = dependency('atk', version: '>=2.2.0')
+
+# babl_minver = '>=0.1.31'
+babl_minver = '>=0.1.30'
+babl = dependency('babl', version: babl_minver)
+
+cairo_minver = '>=1.12.2'
+cairo = dependency('cairo', version: cairo_minver)
+
+fontconfig_minver = os_win32 ? '>=2.11.1' : '>=2.2.0'
+fontconfig_name = 'fontconfig' + (os_win32 ? '_win32' : '')
+fontconfig = dependency(fontconfig_name, version: fontconfig_minver)
+
+freetype2 = dependency('freetype2', version: '>=2.1.7')
+
+gdk_pixbuf_minver = '>=2.30.8'
+gdk_pixbuf = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_minver)
+
+gegl_minver = '>=0.2.0'
+gegl = dependency('gegl-0.2', version: gegl_minver)
+# gegl_minver = '>=0.3.21'
+# gegl = dependency('gegl-0.3', version: gegl_minver)
+
+gexiv2 = dependency('gexiv2', version: '>=0.10.6')
+
gio = dependency('gio-2.0')
gio_specific_name = 'gio-' + (os_win32 ? 'windows-2.0' : 'unix-2.0')
gio_specific = dependency(gio_specific_name)
-atk = dependency('atk', version: '>=2.2.0')
+glib = dependency('glib-2.0', version: '>=2.43.0')
gmodule = dependency('gmodule-no-export-2.0')
-gtk2_minver = '2.24.10'
-gtk2 = dependency('gtk+-2.0', version: '>='+gtk2_minver)
-gdk_pixbuf_minver = '2.30.8'
-gdk_pixbuf = dependency('gdk-pixbuf-2.0', version: '>='+gdk_pixbuf_minver)
-cairo_minver = '1.12.2'
-cairo = dependency('cairo', version: '>='+cairo_minver)
-pangocairo = dependency('pangocairo', version: '>=1.29.4')
-fontconfig_name = 'fontconfig' + (os_win32 ? '_win32' : '')
-fontconfig_vers = os_win32 ? '>=2.11.1' : '>=2.2.0'
-fontconfig = dependency(fontconfig_name, version: fontconfig_vers)
-harfbuzz = dependency('harfbuzz', version: '>=0.9.19')
-gexiv2 = dependency('gexiv2', version: '>=0.10.6')
+gtk2_minver = '>=2.24.10'
+gtk2 = dependency('gtk+-2.0', version: gtk2_minver)
+harfbuzz = dependency('harfbuzz', version: '>=0.9.19')
+lcms = dependency('lcms2', version: '>=2.8')
libmypaint = dependency('libmypaint-1.3', version: '>=1.3.0')
+pangocairo = dependency('pangocairo', version: '>=1.29.4')
rsvg = dependency('librsvg-2.0', version: '>=2.40.6')
-lcms = dependency('lcms2', version: '>=2.8')
-# alsa = dependency('alsa', version: '>=1.0.0')
-# freetype2 = dependency('freetype2', version: '>=2.1.7')
-# gtk_mac_integration= dependency('gtk_mac_integration',version: '>=2.0.0')
-# gtk_win32 = dependency('gtk_win32', version: '>=2.24.32')
-# gtkdoc = dependency('gtkdoc', version: '>=1.0')
-# intltool = dependency('intltool', version: '>=0.40.1')
+
# xgettext = dependency('xgettext', version: '>=0.19')
+################################################################################
# Check for GLib Networking
have_glib_networking_run = cc.run(
@@ -153,6 +160,7 @@ if not have_glib_networking
# TODO check if cross-compiling
endif
+################################################################################
# Check if Pango is built with a recent fontconfig
pango_check_run = cc.run(
@@ -459,7 +467,7 @@ endif
have_alsa = false
if get_option('with-alsa')
have_alsa = true
- alsa = dependency('alsa')
+ alsa = dependency('alsa', version: '>=1.0.0')
endif
# Linux-input
@@ -727,14 +735,14 @@ has_nl_measurement = cc.has_function(
-# subdir('cursors')
-# subdir('themes')
-# subdir('po')
-# subdir('po-libgimp')
-# subdir('po-plug-ins')
-# subdir('po-python')
-# subdir('po-script-fu')
-# subdir('po-tips')
+subdir('cursors')
+subdir('themes')
+subdir('po')
+subdir('po-libgimp')
+subdir('po-plug-ins')
+subdir('po-python')
+subdir('po-script-fu')
+subdir('po-tips')
# subdir('data')
# subdir('desktop')
# subdir('menus')
@@ -780,9 +788,9 @@ pkgconfig.generate(filebase: 'gimp-' + pkgconfig_version,
description: 'GIMP Library',
version: meson.project_version(),
requires: [
- 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_minver,
- 'cairo >= ' + cairo_minver,
- 'gegl-0.3 >= ' + gegl_minver,
+ 'gdk-pixbuf-2.0 ' + gdk_pixbuf_minver,
+ 'cairo ' + cairo_minver,
+ 'gegl-0.3 ' + gegl_minver,
],
libraries: [
'-L${libdir}',
@@ -807,7 +815,7 @@ pkgconfig.generate(filebase: 'gimpthumb-' + pkgconfig_version,
description: 'GIMP Thumbnail Library',
version: meson.project_version(),
requires: [
- 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_minver,
+ 'gdk-pixbuf-2.0 ' + gdk_pixbuf_minver,
],
libraries: [
'-L${libdir}',
@@ -823,7 +831,7 @@ pkgconfig.generate(filebase: 'gimpui-' + pkgconfig_version,
version: meson.project_version(),
requires: [
'gimp-' + pkgconfig_version + ' >= ' + app_version,
- 'gtk+-2.0 >= ' + gtk2_minver,
+ 'gtk+-2.0 ' + gtk2_minver,
],
libraries: [
'-L${libdir}',
diff --git a/po-libgimp/meson.build b/po-libgimp/meson.build
new file mode 100644
index 0000000..72691f7
--- /dev/null
+++ b/po-libgimp/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-libgimp')
diff --git a/po-plug-ins/meson.build b/po-plug-ins/meson.build
new file mode 100644
index 0000000..1ba8bed
--- /dev/null
+++ b/po-plug-ins/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-std-plug-ins')
diff --git a/po-python/meson.build b/po-python/meson.build
new file mode 100644
index 0000000..036e032
--- /dev/null
+++ b/po-python/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-python')
diff --git a/po-script-fu/meson.build b/po-script-fu/meson.build
new file mode 100644
index 0000000..2df4c88
--- /dev/null
+++ b/po-script-fu/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-script-fu')
diff --git a/po-tips/meson.build b/po-tips/meson.build
new file mode 100644
index 0000000..a8b45a8
--- /dev/null
+++ b/po-tips/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-tips')
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..d2a005f
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package)
diff --git a/themes/meson.build b/themes/meson.build
new file mode 100644
index 0000000..36013ae
--- /dev/null
+++ b/themes/meson.build
@@ -0,0 +1,21 @@
+themes = run_command('find',
+ meson.current_source_dir(),
+ '-maxdepth', '1',
+ '-mindepth', '1',
+ '-type', 'd',
+ '-printf', '%f\n'
+).stdout().strip().split('\n')
+
+foreach theme : themes
+ install_data(
+ join_paths(theme, 'gtkrc'),
+ install_dir: join_paths(datadir, 'themes', theme)
+ )
+
+ if run_command('[', '-d', join_paths(theme, 'ui'), ']').returncode() == 0
+ install_subdir(
+ join_paths(theme, 'ui'),
+ install_dir: join_paths(datadir, 'themes', theme)
+ )
+ endif
+endforeach
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]