[Buildroot] [PATCH v4 4/4] package/libgtk3: fix update-icon-cache on empty directory
Thomas Devoogdt
thomas at devoogdt.com
Thu Feb 23 12:56:12 UTC 2023
If both, hicolor-icon-theme (selected by libgtk3-demo) and
adwaita-icon-theme is not selected, then the /usr/share/icons
folder is empty, causing find to fail.
Signed-off-by: Thomas Devoogdt <thomas.devoogdt at barco.com>
---
v3:
- rebased on https://patchwork.ozlabs.org/project/buildroot/list/?series=336254
- needed to fix the webkitgtk 2.38.5 compilation
(https://patchwork.ozlabs.org/project/buildroot/patch/20230220090923.2155635-2-thomas.devoogdt@barco.com/)
v4:
- replace only update-icon-cache when the demos are built to a dir check
---
package/libgtk3/libgtk3.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/libgtk3/libgtk3.mk b/package/libgtk3/libgtk3.mk
index 2821c7eb52..e2dc8eabfb 100644
--- a/package/libgtk3/libgtk3.mk
+++ b/package/libgtk3/libgtk3.mk
@@ -146,6 +146,7 @@ endef
# Create icon-theme.cache for each of the icon directories/themes
# It's not strictly necessary but speeds up lookups
define LIBGTK3_UPDATE_ICON_CACHE
+[ ! -d $(TARGET_DIR)/usr/share/icons ] || \
find $(TARGET_DIR)/usr/share/icons -maxdepth 1 -mindepth 1 -type d \
-exec $(HOST_DIR)/bin/gtk-update-icon-cache {} \;
endef
--
2.39.2
More information about the buildroot
mailing list