void-packages/srcpkgs/gdk-pixbuf/patches/gdk-pixbuf-query-loaders-new-option.diff
2010-10-23 17:48:31 +02:00

41 lines
1.5 KiB
Diff

Implement --print-cache-file option to print the path to the
cache file used by gdk-pixbuf.
--- docs/reference/gdk-pixbuf/gdk-pixbuf-query-loaders.1.orig 2010-10-23 15:38:09.302070058 +0200
+++ docs/reference/gdk-pixbuf/gdk-pixbuf-query-loaders.1 2010-10-23 15:39:56.156994937 +0200
@@ -7,7 +7,7 @@
.\" Source: [FIXME: source]
.\" Language: English
.\"
-.TH "GDK\-PIXBUF\-QUERY\-" "1" "09/21/2010" "[FIXME: source]" "[FIXME: manual]"
+.TH "GDK\-PIXBUF\-QUERY\-" "1" "10/23/2010" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -59,6 +59,11 @@ gdk\-pixbuf
at the file\&.
.SH "OPTIONS"
.PP
+\-\-print\-cache\-file
+Prints the full path to the default cache file to stdout.
+.RS 4
+.RE
+.PP
\-\-update\-cache
.RS 4
Write the output to the default cache location instead of
--- gdk-pixbuf/queryloaders.c.orig 2010-10-23 15:34:28.360421197 +0200
+++ gdk-pixbuf/queryloaders.c 2010-10-23 15:36:27.509779280 +0200
@@ -283,7 +283,11 @@ int main (int argc, char **argv)
#endif
- if (argc > 1 && strcmp (argv[1], "--update-cache") == 0) {
+ if (argc > 1 && strcmp (argv[1], "--print-cache-file") == 0) {
+ cache_file = gdk_pixbuf_get_module_file ();
+ printf ("%s\n", cache_file);
+ return 0;
+ } else if (argc > 1 && strcmp (argv[1], "--update-cache") == 0) {
cache_file = gdk_pixbuf_get_module_file ();
first_file = 2;
}