build: clean up obsolete icon rename handling
This commit is contained in:
parent
edf3bfe790
commit
b5e0656f19
2 changed files with 74 additions and 8 deletions
74
0001-build-Fix-app-icon-install.patch
Normal file
74
0001-build-Fix-app-icon-install.patch
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
From e0fdaf084c4b7e28687f2d3e38c1e0cbba1478e0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeremy Bicha <jbicha@ubuntu.com>
|
||||||
|
Date: Sat, 17 Feb 2018 11:37:31 -0500
|
||||||
|
Subject: [PATCH] build: Fix app icon install
|
||||||
|
|
||||||
|
---
|
||||||
|
.../16x16/apps/gnome-control-center.png} | Bin
|
||||||
|
.../24x24/apps/gnome-control-center.png} | Bin
|
||||||
|
.../32x32/apps/gnome-control-center.png} | Bin
|
||||||
|
.../48x48/apps/gnome-control-center.png} | Bin
|
||||||
|
.../512x512/apps/gnome-control-center.png} | Bin
|
||||||
|
.../apps/gnome-control-center-symbolic.svg} | 0
|
||||||
|
data/icons/meson.build | 21 ++-------------------
|
||||||
|
7 files changed, 2 insertions(+), 19 deletions(-)
|
||||||
|
rename data/icons/{hicolor_apps_16x16_gnome-control-center.png => hicolor/16x16/apps/gnome-control-center.png} (100%)
|
||||||
|
rename data/icons/{hicolor_apps_24x24_gnome-control-center.png => hicolor/24x24/apps/gnome-control-center.png} (100%)
|
||||||
|
rename data/icons/{hicolor_apps_32x32_gnome-control-center.png => hicolor/32x32/apps/gnome-control-center.png} (100%)
|
||||||
|
rename data/icons/{hicolor_apps_48x48_gnome-control-center.png => hicolor/48x48/apps/gnome-control-center.png} (100%)
|
||||||
|
rename data/icons/{hicolor_apps_512x512_gnome-control-center.png => hicolor/512x512/apps/gnome-control-center.png} (100%)
|
||||||
|
rename data/icons/{hicolor_apps_symbolic_gnome-control-center-symbolic.svg => hicolor/scalable/apps/gnome-control-center-symbolic.svg} (100%)
|
||||||
|
|
||||||
|
diff --git a/data/icons/hicolor_apps_16x16_gnome-control-center.png b/data/icons/hicolor/16x16/apps/gnome-control-center.png
|
||||||
|
similarity index 100%
|
||||||
|
rename from data/icons/hicolor_apps_16x16_gnome-control-center.png
|
||||||
|
rename to data/icons/hicolor/16x16/apps/gnome-control-center.png
|
||||||
|
diff --git a/data/icons/hicolor_apps_24x24_gnome-control-center.png b/data/icons/hicolor/24x24/apps/gnome-control-center.png
|
||||||
|
similarity index 100%
|
||||||
|
rename from data/icons/hicolor_apps_24x24_gnome-control-center.png
|
||||||
|
rename to data/icons/hicolor/24x24/apps/gnome-control-center.png
|
||||||
|
diff --git a/data/icons/hicolor_apps_32x32_gnome-control-center.png b/data/icons/hicolor/32x32/apps/gnome-control-center.png
|
||||||
|
similarity index 100%
|
||||||
|
rename from data/icons/hicolor_apps_32x32_gnome-control-center.png
|
||||||
|
rename to data/icons/hicolor/32x32/apps/gnome-control-center.png
|
||||||
|
diff --git a/data/icons/hicolor_apps_48x48_gnome-control-center.png b/data/icons/hicolor/48x48/apps/gnome-control-center.png
|
||||||
|
similarity index 100%
|
||||||
|
rename from data/icons/hicolor_apps_48x48_gnome-control-center.png
|
||||||
|
rename to data/icons/hicolor/48x48/apps/gnome-control-center.png
|
||||||
|
diff --git a/data/icons/hicolor_apps_512x512_gnome-control-center.png b/data/icons/hicolor/512x512/apps/gnome-control-center.png
|
||||||
|
similarity index 100%
|
||||||
|
rename from data/icons/hicolor_apps_512x512_gnome-control-center.png
|
||||||
|
rename to data/icons/hicolor/512x512/apps/gnome-control-center.png
|
||||||
|
diff --git a/data/icons/hicolor_apps_symbolic_gnome-control-center-symbolic.svg b/data/icons/hicolor/scalable/apps/gnome-control-center-symbolic.svg
|
||||||
|
similarity index 100%
|
||||||
|
rename from data/icons/hicolor_apps_symbolic_gnome-control-center-symbolic.svg
|
||||||
|
rename to data/icons/hicolor/scalable/apps/gnome-control-center-symbolic.svg
|
||||||
|
diff --git a/data/icons/meson.build b/data/icons/meson.build
|
||||||
|
index 56fa96791..087bd800f 100644
|
||||||
|
--- a/data/icons/meson.build
|
||||||
|
+++ b/data/icons/meson.build
|
||||||
|
@@ -1,19 +1,2 @@
|
||||||
|
-icon_sizes = [
|
||||||
|
- '16x16',
|
||||||
|
- '24x24',
|
||||||
|
- '32x32',
|
||||||
|
- '48x48',
|
||||||
|
- '512x512'
|
||||||
|
-]
|
||||||
|
-
|
||||||
|
-foreach icon_size: icon_sizes
|
||||||
|
- install_data(
|
||||||
|
- '_'.join(['hicolor', 'apps', icon_size, 'gnome-control-center.png']),
|
||||||
|
- install_dir: join_paths(control_center_icondir, 'hicolor', icon_size, 'apps')
|
||||||
|
- )
|
||||||
|
-endforeach
|
||||||
|
-
|
||||||
|
-install_data(
|
||||||
|
- 'hicolor_apps_symbolic_gnome-control-center-symbolic.svg',
|
||||||
|
- install_dir: join_paths(control_center_icondir, 'hicolor', 'symbolic', 'apps')
|
||||||
|
-)
|
||||||
|
+install_subdir ('hicolor',
|
||||||
|
+ install_dir: join_paths(control_center_datadir, 'icons'))
|
||||||
|
--
|
||||||
|
2.15.1
|
||||||
|
|
|
@ -1,19 +1,11 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import glob
|
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
|
icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
|
||||||
|
|
||||||
name_pattern = re.compile('hicolor_(?:apps)_(?:\d+x\d+|symbolic)_(.*)')
|
|
||||||
search_pattern = '/**/hicolor_*'
|
|
||||||
|
|
||||||
[os.rename(file, os.path.join(os.path.dirname(file), name_pattern.search(file).group(1)))
|
|
||||||
for file in glob.glob(icondir + search_pattern, recursive=True)]
|
|
||||||
|
|
||||||
if not os.environ.get('DESTDIR'):
|
if not os.environ.get('DESTDIR'):
|
||||||
print('Update icon cache...')
|
print('Update icon cache...')
|
||||||
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
|
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
|
||||||
|
|
Loading…
Add table
Reference in a new issue