[gnome-boxes/wip/inigomartinez/meson: 1/13] build: Fix icons installation
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/inigomartinez/meson: 1/13] build: Fix icons installation
- Date: Sun, 10 Dec 2017 13:08:34 +0000 (UTC)
commit ef6351b1fe51aad7266f1bb8fec36df1ac835f69
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Dec 8 21:12:36 2017 +0100
build: Fix icons installation
Looking at meson's build files, it expects a directory tree which
is not present. However, the icons' files that are present work
properly with autotools.
This patch creates the proper directory tree, renames all files'
names to their final names, and also modifies both autotools' and
meson's build files to install these files properly.
https://bugzilla.gnome.org/show_bug.cgi?id=791343
data/icons/Makefile.am | 58 +++++++++-----------
.../16x16/apps/gnome-boxes.png} | Bin 958 -> 958 bytes
.../22x22/apps/gnome-boxes.png} | Bin 1480 -> 1480 bytes
.../24x24/apps/gnome-boxes.png} | Bin 1489 -> 1489 bytes
.../256x256/apps/gnome-boxes.png} | Bin 30256 -> 30256 bytes
.../32x32/apps/gnome-boxes.png} | Bin 2109 -> 2109 bytes
.../48x48/apps/gnome-boxes.png} | Bin 3704 -> 3704 bytes
.../symbolic/apps/gnome-boxes-symbolic.svg} | 0
data/meson.build | 5 +--
9 files changed, 28 insertions(+), 35 deletions(-)
---
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index e66c652..71b36d5 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -4,22 +4,39 @@ public_icons_themes = \
hicolor \
$(NULL)
-public_icons = \
- hicolor_apps_16x16_gnome-boxes.png \
- hicolor_apps_22x22_gnome-boxes.png \
- hicolor_apps_24x24_gnome-boxes.png \
- hicolor_apps_32x32_gnome-boxes.png \
- hicolor_apps_48x48_gnome-boxes.png \
- hicolor_apps_256x256_gnome-boxes.png \
- hicolor_apps_symbolic_gnome-boxes-symbolic.svg \
- $(NULL)
+public_16x16_iconsdir = $(datadir)/icons/hicolor/16x16/apps
+public_16x16_icons_DATA = hicolor/16x16/apps/gnome-boxes.png
+
+public_22x22_iconsdir = $(datadir)/icons/hicolor/22x22/apps
+public_22x22_icons_DATA = hicolor/22x22/apps/gnome-boxes.png
+
+public_24x24_iconsdir = $(datadir)/icons/hicolor/24x24/apps
+public_24x24_icons_DATA = hicolor/24x24/apps/gnome-boxes.png
+
+public_32x32_iconsdir = $(datadir)/icons/hicolor/32x32/apps
+public_32x32_icons_DATA = hicolor/32x32/apps/gnome-boxes.png
+
+public_48x48_iconsdir = $(datadir)/icons/hicolor/48x48/apps
+public_48x48_icons_DATA = hicolor/48x48/apps/gnome-boxes.png
+
+public_256x256_iconsdir = $(datadir)/icons/hicolor/256x256/apps
+public_256x256_icons_DATA = hicolor/256x256/apps/gnome-boxes.png
+
+public_symbolic_iconsdir = $(datadir)/icons/hicolor/symbolic/apps
+public_symbolic_icons_DATA = hicolor/symbolic/apps/gnome-boxes-symbolic.svg
noinst_DATA = \
gnome-boxes.svg \
$(NULL)
EXTRA_DIST = \
- $(public_icons) \
+ $(public_16x16_icons_DATA) \
+ $(public_22x22_icons_DATA) \
+ $(public_24x24_icons_DATA) \
+ $(public_32x32_icons_DATA) \
+ $(public_48x48_icons_DATA) \
+ $(public_256x256_icons_DATA) \
+ $(public_symbolic_icons_DATA) \
$(noinst_DATA) \
$(NULL)
@@ -40,29 +57,8 @@ update-icon-cache:
done; \
fi
-install-icons:
- for icon in $(public_icons); do \
- THEME=`echo $$icon | cut -d_ -f1`; \
- CONTEXT=`echo $$icon | cut -d_ -f2`; \
- SIZE=`echo $$icon | cut -d_ -f3`; \
- ICONFILE=`echo $$icon | cut -d_ -f4`; \
- mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
- $(INSTALL_DATA) $(srcdir)/$$icon
$(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
- done
-
-uninstall-icons:
- -for icon in $(public_icons); do \
- THEME=`echo $$icon | cut -d_ -f1`; \
- CONTEXT=`echo $$icon | cut -d_ -f2`; \
- SIZE=`echo $$icon | cut -d_ -f3`; \
- ICONFILE=`echo $$icon | cut -d_ -f4`; \
- rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
- done
-
-install-data-local: install-icons
install-data-hook: update-icon-cache
-uninstall-local: uninstall-icons
uninstall-hook: update-icon-cache
-include $(top_srcdir)/git.mk
diff --git a/data/icons/hicolor_apps_symbolic_gnome-boxes-symbolic.svg
b/data/icons/hicolor/symbolic/apps/gnome-boxes-symbolic.svg
similarity index 100%
rename from data/icons/hicolor_apps_symbolic_gnome-boxes-symbolic.svg
rename to data/icons/hicolor/symbolic/apps/gnome-boxes-symbolic.svg
diff --git a/data/meson.build b/data/meson.build
index daa5267..d8c35e5 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,7 +1,4 @@
-icons_dir = join_paths (data_dir, 'icons', 'hicolor')
-foreach size: ['16x16', '22x22', '32x32', '48x48', '256x256', 'symbolic']
- install_subdir('icons/hicolor/' + size, install_dir: icons_dir)
-endforeach
+install_subdir('icons/hicolor/', install_dir: join_paths (data_dir, 'icons'))
resource_files = files ('gnome-boxes.gresource.xml')
resources = gnome.compile_resources ('org.gnome.Boxes',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]