瀏覽代碼

libgtk3: create icon-theme.cache for icon themes

It makes icon lookups faster, though it's not strictly necessary.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
[Thomas: enclsoe the hook definition in the condition.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Gustavo Zacarias 9 年之前
父節點
當前提交
52a2f0a074
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      package/libgtk3/libgtk3.mk

+ 10 - 0
package/libgtk3/libgtk3.mk

@@ -180,5 +180,15 @@ define HOST_LIBGTK3_INSTALL_CMDS
 		$(HOST_DIR)/usr/bin/gtk-encode-symbolic-svg
 		$(HOST_DIR)/usr/bin/gtk-encode-symbolic-svg
 endef
 endef
 
 
+# Create icon-theme.cache for each of the icon directories/themes
+# It's not strictly necessary but speeds up lookups
+ifeq ($(BR2_PACKAGE_LIBGTK3),y)
+define LIBGTK3_UPDATE_ICON_CACHE
+	find $(TARGET_DIR)/usr/share/icons -maxdepth 1 -mindepth 1 -type d \
+		-exec $(HOST_DIR)/usr/bin/gtk-update-icon-cache {} \;
+endef
+TARGET_FINALIZE_HOOKS += LIBGTK3_UPDATE_ICON_CACHE
+endif
+
 $(eval $(autotools-package))
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
 $(eval $(host-autotools-package))