[gimp] icons: remove use of meson 'fs' module.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] icons: remove use of meson 'fs' module.
- Date: Wed, 26 Jan 2022 15:48:54 +0000 (UTC)
commit 8aee873c95dd1e61f6a35efd55e01f0490881b33
Author: Jehan <jehan girinstud io>
Date: Wed Jan 26 12:43:02 2022 +0100
icons: remove use of meson 'fs' module.
I realize that this module is available since meson 0.53.0 though our
current requirement is meson 0.50.0.
Note sure why meson was not popping any warning (normally it does when
we use a feature younger than the minimum requirement; but maybe this
doesn't work for modules).
Anyway this does the same thing without the 'fs' module, and maybe even
better (we know which icons should be converted or used from source, no
need to add any test logics here).
icons/Symbolic/64/meson.build | 25 +++++++++----------------
icons/Symbolic/meson.build | 37 ++++++++++++++++++-------------------
meson.build | 1 -
3 files changed, 27 insertions(+), 36 deletions(-)
---
diff --git a/icons/Symbolic/64/meson.build b/icons/Symbolic/64/meson.build
index 2241e60c01..86adb2552b 100644
--- a/icons/Symbolic/64/meson.build
+++ b/icons/Symbolic/64/meson.build
@@ -4,20 +4,13 @@ foreach icon : source_icons
icon_name = icon + '-symbolic.symbolic.png'
input_path = '../scalable/' + icon + '-symbolic.svg'
- if fs.exists(input_path)
- custom_target(icon_name,
- input : [ input_path ],
- output: [ icon_name ],
- command: [
- gtk_encode_symbolic_svg, '-o', '@OUTDIR@', '@INPUT@', icons_dir
- ],
- install: true,
- install_dir: gimpiconsdir / theme / icons_dir / 'apps',
- )
- else
- # In size 64, some icons are not generated from vector images.
- install_data(icon + '.png',
- install_dir: gimpiconsdir / theme / icons_dir / 'apps',
- )
- endif
+ custom_target(icon_name,
+ input : [ input_path ],
+ output: [ icon_name ],
+ command: [
+ gtk_encode_symbolic_svg, '-o', '@OUTDIR@', '@INPUT@', icons_dir
+ ],
+ install: true,
+ install_dir: gimpiconsdir / theme / icons_dir / 'apps',
+ )
endforeach
diff --git a/icons/Symbolic/meson.build b/icons/Symbolic/meson.build
index 23574bdc03..5bdc4f0b48 100644
--- a/icons/Symbolic/meson.build
+++ b/icons/Symbolic/meson.build
@@ -6,19 +6,6 @@ if have_vector_icons
#'bitmap_64-system': [ '64x64', '64', '.png' ],
'bitmap_64-always': [ '64x64', '64', '.png' ],
}
-
- foreach source, out : source_icons
- outdir = out[0]
- indir = out[1]
- suffix = out[2]
-
- icon_list = '../icon-lists/@0@.list'.format(source)
- cmd = run_command('python3', '-c',
- 'print(",".join(["@0@/" + line.strip() + "@1@" for line in
open("@2@")]))'.format(indir, suffix, icon_list),
- check: true)
- source_icons = cmd.stdout().strip().split(',')
- install_data(source_icons, install_dir: gimpiconsdir / theme / outdir / 'apps')
- endforeach
else
gtk_encode_symbolic_svg = find_program('gtk-encode-symbolic-svg')
@@ -33,12 +20,6 @@ else
source_icons = cmd.stdout().strip().split(',')
if size == '64'
- icon_list = '../icon-lists/bitmap_64-always.list'
- cmd = run_command('python3', '-c',
- 'print(",".join([line.strip() for line in open("@0@")]))'.format(icon_list),
- check: true)
- source_icons += cmd.stdout().strip().split(',')
-
icon_list = '../icon-lists/bitmap_64-system.list'
cmd = run_command('python3', '-c',
'print(",".join([line.strip() for line in open("@0@")]))'.format(icon_list),
@@ -54,12 +35,30 @@ else
# meson.build as it also installs some non-symbolic images.
subdir(size)
endforeach
+
+ # Install these directly from PNG sources.
+ source_icons = {
+ 'bitmap_64-always': [ '64x64', '64', '.png' ],
+ }
endif
install_data('index.theme',
install_dir: gimpiconsdir / theme,
)
+foreach source, out : source_icons
+ outdir = out[0]
+ indir = out[1]
+ suffix = out[2]
+
+ icon_list = '../icon-lists/@0@.list'.format(source)
+ cmd = run_command('python3', '-c',
+ 'print(",".join(["@0@/" + line.strip() + "@1@" for line in open("@2@")]))'.format(indir,
suffix, icon_list),
+ check: true)
+ source_icons = cmd.stdout().strip().split(',')
+ install_data(source_icons, install_dir: gimpiconsdir / theme / outdir / 'apps')
+endforeach
+
icons_core = [ '64/gimp-question.png', ]
icons_imgs = [ '64/gimp-wilber-eek.png', ]
diff --git a/meson.build b/meson.build
index 3927d7f933..4fe4f0cc6d 100644
--- a/meson.build
+++ b/meson.build
@@ -87,7 +87,6 @@ i18n = import('i18n')
gnome = import('gnome')
pythonmod = import('python')
simd = import('unstable-simd')
-fs = import('fs')
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]