aboutsummaryrefslogtreecommitdiffstats
path: root/main/tumbler
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-16 11:33:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-16 11:33:28 +0000
commit197d862dbf5a4831b9ee076bd6cf0c26c7cd6616 (patch)
treed3e0adbddd57beb26ee6394881aad217167d5f2c /main/tumbler
parente2b48a7966a40c57cbf3488c2a75afef9858e36c (diff)
downloadaports-197d862dbf5a4831b9ee076bd6cf0c26c7cd6616.tar.bz2
aports-197d862dbf5a4831b9ee076bd6cf0c26c7cd6616.tar.xz
main/tumbler: fix cache dir location
patch is from upstream: https://bugzilla.xfce.org/show_bug.cgi?id=10613
Diffstat (limited to 'main/tumbler')
-rw-r--r--main/tumbler/APKBUILD15
-rw-r--r--main/tumbler/cachedir.patch89
2 files changed, 99 insertions, 5 deletions
diff --git a/main/tumbler/APKBUILD b/main/tumbler/APKBUILD
index f65c1e91f6..13d978de5e 100644
--- a/main/tumbler/APKBUILD
+++ b/main/tumbler/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tumbler
pkgver=0.1.30
-pkgrel=0
+pkgrel=1
pkgdesc="D-Bus service for applications to request thumbnails"
url="http://git.xfce.org/xfce/tumbler/"
arch="all"
@@ -11,7 +11,9 @@ depends=
makedepends="gtk+-dev dbus-glib-dev libjpeg-turbo-dev poppler-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
-source="http://archive.xfce.org/src/apps/tumbler/${pkgver%.*}/tumbler-$pkgver.tar.bz2"
+source="http://archive.xfce.org/src/apps/tumbler/${pkgver%.*}/tumbler-$pkgver.tar.bz2
+ cachedir.patch
+ "
_builddir="$srcdir"/tumbler-$pkgver
prepare() {
@@ -44,6 +46,9 @@ package() {
find "$pkgdir" -name '*.la' -delete
}
-md5sums="2524e39439c13238565160da0b6fed2d tumbler-0.1.30.tar.bz2"
-sha256sums="e7c20d79c830465f8b3b792893f05e8b8d5ba90aec4973e7517e07ef31537304 tumbler-0.1.30.tar.bz2"
-sha512sums="dba70e631fd00cfcc35ce6f119b7bfed9193af5a7c01535a651d263959deade1ea49f6fd75a4ff308bcd836367b2caa885539ed2cb9798c9ae9aa01c081e9aea tumbler-0.1.30.tar.bz2"
+md5sums="2524e39439c13238565160da0b6fed2d tumbler-0.1.30.tar.bz2
+e1480eb496f425aa84411de8090a822a cachedir.patch"
+sha256sums="e7c20d79c830465f8b3b792893f05e8b8d5ba90aec4973e7517e07ef31537304 tumbler-0.1.30.tar.bz2
+640f77e3c1ac383e93f4283dbca8af89f9aac27726919df0c8ec4762078f0f84 cachedir.patch"
+sha512sums="dba70e631fd00cfcc35ce6f119b7bfed9193af5a7c01535a651d263959deade1ea49f6fd75a4ff308bcd836367b2caa885539ed2cb9798c9ae9aa01c081e9aea tumbler-0.1.30.tar.bz2
+c20083fc74c5aac03e33ae52ff3f1b08dbb7a6ddedcf01e45a231382f1e948fe6d4cdb4f9255f419fbaf6bed39fccdd7dd413b12fd943bf9306431a09b6d76c0 cachedir.patch"
diff --git a/main/tumbler/cachedir.patch b/main/tumbler/cachedir.patch
new file mode 100644
index 0000000000..97570ac824
--- /dev/null
+++ b/main/tumbler/cachedir.patch
@@ -0,0 +1,89 @@
+From 28ddddbb7ff0890ecab3b326ab78c659666e410c Mon Sep 17 00:00:00 2001
+From: Jeremy Whiting <jpwhiting@kde.org>
+Date: Wed, 6 Aug 2014 15:26:36 -0600
+Subject: [PATCH] Change thumbnails to go into $XDG_CACHE_HOME/thumbnails as
+ per spec change.
+
+---
+ plugins/xdg-cache/xdg-cache-cache.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/plugins/xdg-cache/xdg-cache-cache.c b/plugins/xdg-cache/xdg-cache-cache.c
+index 6c85523..3afe316 100644
+--- a/plugins/xdg-cache/xdg-cache-cache.c
++++ b/plugins/xdg-cache/xdg-cache-cache.c
+@@ -507,7 +507,7 @@ xdg_cache_cache_is_thumbnail (TumblerCache *cache,
+ const gchar *uri)
+ {
+ XDGCacheCache *xdg_cache = XDG_CACHE_CACHE (cache);
+- const gchar *home;
++ const gchar *cachedir;
+ const gchar *dirname;
+ gboolean is_thumbnail = FALSE;
+ GList *iter;
+@@ -520,9 +520,9 @@ xdg_cache_cache_is_thumbnail (TumblerCache *cache,
+
+ for (iter = xdg_cache->flavors; !is_thumbnail && iter != NULL; iter = iter->next)
+ {
+- home = xdg_cache_cache_get_home ();
++ cachedir = g_get_user_cache_dir ();
+ dirname = tumbler_thumbnail_flavor_get_name (iter->data);
+- path = g_build_filename (home, ".thumbnails", dirname, NULL);
++ path = g_build_filename (cachedir, "thumbnails", dirname, NULL);
+
+ flavor_dir = g_file_new_for_path (path);
+ file = g_file_new_for_uri (uri);
+@@ -570,7 +570,7 @@ GFile *
+ xdg_cache_cache_get_file (const gchar *uri,
+ TumblerThumbnailFlavor *flavor)
+ {
+- const gchar *home;
++ const gchar *cachedir;
+ const gchar *dirname;
+ GFile *file;
+ gchar *filename;
+@@ -580,12 +580,12 @@ xdg_cache_cache_get_file (const gchar *uri,
+ g_return_val_if_fail (uri != NULL && *uri != '\0', NULL);
+ g_return_val_if_fail (TUMBLER_IS_THUMBNAIL_FLAVOR (flavor), NULL);
+
+- home = xdg_cache_cache_get_home ();
++ cachedir = g_get_user_cache_dir ();
+ dirname = tumbler_thumbnail_flavor_get_name (flavor);
+
+ md5_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1);
+ filename = g_strdup_printf ("%s.png", md5_hash);
+- path = g_build_filename (home, ".thumbnails", dirname, filename, NULL);
++ path = g_build_filename (cachedir, "thumbnails", dirname, filename, NULL);
+
+ file = g_file_new_for_path (path);
+
+@@ -602,7 +602,7 @@ GFile *
+ xdg_cache_cache_get_temp_file (const gchar *uri,
+ TumblerThumbnailFlavor *flavor)
+ {
+- const gchar *home;
++ const gchar *cachedir;
+ const gchar *dirname;
+ GTimeVal current_time = { 0, 0 };
+ GFile *file;
+@@ -613,7 +613,7 @@ xdg_cache_cache_get_temp_file (const gchar *uri,
+ g_return_val_if_fail (uri != NULL && *uri != '\0', NULL);
+ g_return_val_if_fail (TUMBLER_IS_THUMBNAIL_FLAVOR (flavor), NULL);
+
+- home = xdg_cache_cache_get_home ();
++ cachedir = g_get_user_cache_dir ();
+ dirname = tumbler_thumbnail_flavor_get_name (flavor);
+
+ g_get_current_time (&current_time);
+@@ -621,7 +621,7 @@ xdg_cache_cache_get_temp_file (const gchar *uri,
+ md5_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1);
+ filename = g_strdup_printf ("%s-%ld-%ld.png", md5_hash,
+ current_time.tv_sec, current_time.tv_usec);
+- path = g_build_filename (home, ".thumbnails", dirname, filename, NULL);
++ path = g_build_filename (cachedir, "thumbnails", dirname, filename, NULL);
+
+ file = g_file_new_for_path (path);
+
+--
+2.0.4
+