diff options
author | Paul de Vrieze <pauldv@gentoo.org> | 2007-06-26 02:37:15 +0000 |
---|---|---|
committer | Paul de Vrieze <pauldv@gentoo.org> | 2007-06-26 02:37:15 +0000 |
commit | 49a015fb57401cfd89fe28ff93805099678f4405 (patch) | |
tree | b2868b9e5b2936d12bbcaf37f94562ff91814eb6 /x11-libs | |
parent | New gtk versions (diff) | |
download | pauldv-49a015fb57401cfd89fe28ff93805099678f4405.tar.gz pauldv-49a015fb57401cfd89fe28ff93805099678f4405.tar.bz2 pauldv-49a015fb57401cfd89fe28ff93805099678f4405.zip |
Forgot the icon-subdirs patch
svn path=/trunk/overlay/; revision=33
Diffstat (limited to 'x11-libs')
-rw-r--r-- | x11-libs/gtk+/Manifest | 8 | ||||
-rw-r--r-- | x11-libs/gtk+/files/gtk+-2.10.11-update-icon-subdirs.patch | 132 |
2 files changed, 136 insertions, 4 deletions
diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest index dc7b7fa..230a772 100644 --- a/x11-libs/gtk+/Manifest +++ b/x11-libs/gtk+/Manifest @@ -10,6 +10,10 @@ AUX gtk+-1.2.10-m4.patch 220 RMD160 c3f0ac9022a32aeef80ccf77493779fd58884b10 SHA MD5 0ec83a4bf20f79d85eb2976b58c39465 files/gtk+-1.2.10-m4.patch 220 RMD160 c3f0ac9022a32aeef80ccf77493779fd58884b10 files/gtk+-1.2.10-m4.patch 220 SHA256 88f45c2f0413f29d62ca138c87b41d24a73b47456f5b469277843de827717324 files/gtk+-1.2.10-m4.patch 220 +AUX gtk+-2.10.11-update-icon-subdirs.patch 3756 RMD160 60c3abb77f6484b8700a5f42ffa5b0784503fea0 SHA1 ffb3d5b1d1d346d3a38899d93883874232e86baf SHA256 41d31835a5feaaf5eafdd0ab173be30c8d9579c4d08824105db2a12ad765436e +MD5 be90a759af580f4ce2103b8138237b5f files/gtk+-2.10.11-update-icon-subdirs.patch 3756 +RMD160 60c3abb77f6484b8700a5f42ffa5b0784503fea0 files/gtk+-2.10.11-update-icon-subdirs.patch 3756 +SHA256 41d31835a5feaaf5eafdd0ab173be30c8d9579c4d08824105db2a12ad765436e files/gtk+-2.10.11-update-icon-subdirs.patch 3756 AUX gtk+-2.10.7-mozilla-dnd-fix.patch 2899 RMD160 2cc33847d78fe0c207bc79f514546113d740ca2c SHA1 5f385f6fcd05cb21c33e0fbbbaa98389ee24019e SHA256 9ec24dbe7e652aaee7d6118adffb4919ee0b3d7887587649cb475f3e69f5d729 MD5 ffd8534d7546dad5d54fd70be4af97f7 files/gtk+-2.10.7-mozilla-dnd-fix.patch 2899 RMD160 2cc33847d78fe0c207bc79f514546113d740ca2c files/gtk+-2.10.7-mozilla-dnd-fix.patch 2899 @@ -93,10 +97,6 @@ MISC NOTES 82 RMD160 58293858cde627b688c697e076d2d45f005007b2 SHA1 2f0647b873ce5 MD5 61f1935636c8a7927b7a2deecd6ed127 NOTES 82 RMD160 58293858cde627b688c697e076d2d45f005007b2 NOTES 82 SHA256 6878454f7bf28d1c462b4e213724c88d89eac6694d3323e0f372d227cdbb5f34 NOTES 82 -MISC gtk+-2.10.13.ebuild.orig 4154 RMD160 c6c82bb03c56ba3130d4027a9e335a32ba9ed55c SHA1 3977b6df7963dec57b14ac9c008a4ba0b1206f1f SHA256 822a3f5dc58f20037b5ecad5f8fc5e039e306e4004a29739e1172a1810fa556d -MD5 a1d0bdb01cb423ad11816d4e27571876 gtk+-2.10.13.ebuild.orig 4154 -RMD160 c6c82bb03c56ba3130d4027a9e335a32ba9ed55c gtk+-2.10.13.ebuild.orig 4154 -SHA256 822a3f5dc58f20037b5ecad5f8fc5e039e306e4004a29739e1172a1810fa556d gtk+-2.10.13.ebuild.orig 4154 MD5 9a443de5999df036ffd6e66f5b0f83ce files/digest-gtk+-1.2.10-r11 506 RMD160 45ddc3e7c5ca97084139787b6be318498a9965db files/digest-gtk+-1.2.10-r11 506 SHA256 4bd7f7ef31547e6dabca532b07bc6be7e37c96d234abd2818afbb85d725aed47 files/digest-gtk+-1.2.10-r11 506 diff --git a/x11-libs/gtk+/files/gtk+-2.10.11-update-icon-subdirs.patch b/x11-libs/gtk+/files/gtk+-2.10.11-update-icon-subdirs.patch new file mode 100644 index 0000000..64cbb0f --- /dev/null +++ b/x11-libs/gtk+/files/gtk+-2.10.11-update-icon-subdirs.patch @@ -0,0 +1,132 @@ +diff --exclude-from=/home/dang/bin/scripts/diffrc -up -ruN gtk+-2.10.11.orig/gtk/updateiconcache.c gtk+-2.10.11/gtk/updateiconcache.c +--- gtk+-2.10.11.orig/gtk/updateiconcache.c 2007-03-14 00:07:02.000000000 -0400 ++++ gtk+-2.10.11/gtk/updateiconcache.c 2007-05-01 17:01:46.000000000 -0400 +@@ -43,6 +43,7 @@ static gboolean force_update = FALSE; + static gboolean ignore_theme_index = FALSE; + static gboolean quiet = FALSE; + static gboolean index_only = FALSE; ++static gboolean check_subdirs = FALSE; + static gchar *var_name = "-"; + + #define CACHE_NAME "icon-theme.cache" +@@ -61,8 +62,82 @@ static gchar *var_name = "-"; + #define ALIGN_VALUE(this, boundary) \ + (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1))) + ++/* returns >0 if dir is newer than time, 0 if dir is older than time, ++ * <0 if stat fails */ ++int ++dir_check (const gchar *path, time_t cache_time) ++{ ++ struct stat path_stat; ++ ++ if (g_stat (path, &path_stat) < 0) ++ { ++ return -1; ++ } ++ return cache_time < path_stat.st_mtime; ++} ++ ++/* Check the subdirectories of the cache dir to see if the cache is up-to-date ++ * We check first and second level subdirs. */ ++gboolean ++is_cache_up_to_date_subdirs (const gchar *toppath, time_t cache_time) ++{ ++ GDir *topdir, *subdir; ++ const gchar *name, *subname; ++ gchar *path, *subpath; ++ int dir_state; ++ ++ topdir = g_dir_open (toppath, 0, NULL); ++ if (!topdir) ++ { ++ /* we can't open dir, assume updated cache */ ++ return TRUE; ++ } ++ ++ while ((name = g_dir_read_name (topdir))) ++ { ++ path = g_build_filename (toppath, name, NULL); ++ dir_state = dir_check (path, cache_time); ++ if (dir_state < 0) ++ { ++ /* cannot stat dir, for some reason; skip */ ++ g_free (path); ++ continue; ++ } ++ else if (dir_state > 0) ++ { ++ /* cache is out of date */ ++ g_free (path); ++ return FALSE; ++ } ++ ++ subdir = g_dir_open (path, 0, NULL); ++ if (!subdir) ++ { ++ /* Cannot open subdir; skip */ ++ g_free (path); ++ continue; ++ } ++ while ((subname = g_dir_read_name (subdir))) ++ { ++ subpath = g_build_filename (path, subname, NULL); ++ dir_state = dir_check (subpath, cache_time); ++ g_free (subpath); ++ ++ if (dir_state > 0) ++ { ++ /* Cache out of date */ ++ return FALSE; ++ } ++ } ++ g_free (path); ++ } ++ ++ /* If we get here, the cache is up to date */ ++ return TRUE; ++} ++ + gboolean +-is_cache_up_to_date (const gchar *path) ++is_cache_up_to_date (const gchar *path, gboolean check_subdirs) + { + struct stat path_stat, cache_stat; + gchar *cache_path; +@@ -88,7 +163,18 @@ is_cache_up_to_date (const gchar *path) + } + + /* Check mtime */ +- return cache_stat.st_mtime >= path_stat.st_mtime; ++ if (cache_stat.st_mtime < path_stat.st_mtime) ++ { ++ /* Cache is out of date */ ++ return FALSE; ++ } ++ if (check_subdirs) ++ { ++ return is_cache_up_to_date_subdirs (path, cache_stat.st_mtime); ++ } ++ ++ /* Cache is up to date */ ++ return TRUE; + } + + gboolean +@@ -1284,6 +1370,7 @@ static GOptionEntry args[] = { + { "index-only", 'i', 0, G_OPTION_ARG_NONE, &index_only, N_("Don't include image data in the cache"), NULL }, + { "source", 'c', 0, G_OPTION_ARG_STRING, &var_name, N_("Output a C header file"), "NAME" }, + { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, N_("Turn off verbose output"), NULL }, ++ { "check-subdirs", 's', 0, G_OPTION_ARG_NONE, &check_subdirs, N_("Check subdirectories when determining if cache is up-to-date"), NULL }, + { NULL } + }; + +@@ -1316,7 +1403,7 @@ main (int argc, char **argv) + return 1; + } + +- if (!force_update && is_cache_up_to_date (path)) ++ if (!force_update && is_cache_up_to_date (path, check_subdirs)) + return 0; + + g_type_init (); |