aboutsummaryrefslogtreecommitdiffstats
path: root/x11/gnome-desktop
diff options
context:
space:
mode:
authormezz <mezz@FreeBSD.org>2013-03-21 05:18:27 +0800
committermezz <mezz@FreeBSD.org>2013-03-21 05:18:27 +0800
commitd4a376879824f1f77591d97c33d918fe32bbb926 (patch)
treee4daca9abf4005497e7a271c4bdac6627c514ab1 /x11/gnome-desktop
parent5d102745b1083855f45c42bb0a6058dfccb34a0d (diff)
downloadfreebsd-ports-gnome-d4a376879824f1f77591d97c33d918fe32bbb926.tar.gz
freebsd-ports-gnome-d4a376879824f1f77591d97c33d918fe32bbb926.tar.zst
freebsd-ports-gnome-d4a376879824f1f77591d97c33d918fe32bbb926.zip
- Remove GNOME_DESKTOP_VERSION, it shouldn't be there.
- Teach gnome-desktop about the update glib's change of thumbnails cache from ~/.thumbnails to ~/.cache/thumbnails. It solves the issues that some GNOME applications run CPU very high load. [1] - Bump the PORTREVISION. Reported by: Kevin Oberman <rkoberman@gmail.com> [1] Sergio Lenzi <lenzi.sergio@gmail.com> [1] Tested by: Kevin Oberman <rkoberman@gmail.com> [1]
Diffstat (limited to 'x11/gnome-desktop')
-rw-r--r--x11/gnome-desktop/Makefile3
-rw-r--r--x11/gnome-desktop/files/patch-glib2_34114
2 files changed, 115 insertions, 2 deletions
diff --git a/x11/gnome-desktop/Makefile b/x11/gnome-desktop/Makefile
index 556fa968e4c2..319adff81d82 100644
--- a/x11/gnome-desktop/Makefile
+++ b/x11/gnome-desktop/Makefile
@@ -4,7 +4,7 @@
PORTNAME= gnome-desktop
PORTVERSION= 2.32.1
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES= x11 gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
@@ -22,7 +22,6 @@ USE_XORG= xpm
USES= bison pathfix
USE_GNOME= gnomeprefix intlhack gnomedocutils gconf2 pygtk2 \
ltverhack referencehack
-GNOME_DESKTOP_VERSION=2
USE_GETTEXT= yes
USE_GMAKE= yes
USE_PYTHON= yes
diff --git a/x11/gnome-desktop/files/patch-glib2_34 b/x11/gnome-desktop/files/patch-glib2_34
new file mode 100644
index 000000000000..26e9b425da55
--- /dev/null
+++ b/x11/gnome-desktop/files/patch-glib2_34
@@ -0,0 +1,114 @@
+--- libgnome-desktop/gnome-desktop-thumbnail.c.orig 2013-03-20 11:15:01.000000000 -0500
++++ libgnome-desktop/gnome-desktop-thumbnail.c 2013-03-20 11:30:58.000000000 -0500
+@@ -525,9 +525,14 @@
+ g_assert (digest_len == 16);
+
+ file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
+-
++
++#if GLIB_CHECK_VERSION (2, 34, 0)
++ path = g_build_filename (g_get_user_cache_dir (),
++ "thumbnails",
++#else
+ path = g_build_filename (g_get_home_dir (),
+ ".thumbnails",
++#endif
+ (priv->size == GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
+ file,
+ NULL);
+@@ -587,8 +592,13 @@
+
+ file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
+
++#if GLIB_CHECK_VERSION (2, 34, 0)
++ path = g_build_filename (g_get_user_cache_dir (),
++ "thumbnails/fail",
++#else
+ path = g_build_filename (g_get_home_dir (),
+ ".thumbnails/fail",
++#endif
+ appname,
+ file,
+ NULL);
+@@ -678,7 +688,8 @@
+ /* Don't thumbnail thumbnails */
+ if (uri &&
+ strncmp (uri, "file:/", 6) == 0 &&
+- strstr (uri, "/.thumbnails/") != NULL)
++ (strstr (uri, "/.thumbnails/") != NULL ||
++ strstr (uri, "/.cache/thumbnails/") != NULL))
+ return FALSE;
+
+ if (!mime_type)
+@@ -917,8 +928,13 @@
+
+ res = FALSE;
+
++#if GLIB_CHECK_VERSION (2, 34, 0)
++ thumbnail_dir = g_build_filename (g_get_user_cache_dir (),
++ "thumbnails",
++#else
+ thumbnail_dir = g_build_filename (g_get_home_dir (),
+ ".thumbnails",
++#endif
+ NULL);
+ if (!g_file_test (thumbnail_dir, G_FILE_TEST_IS_DIR))
+ {
+@@ -951,8 +967,13 @@
+
+ res = FALSE;
+
++#if GLIB_CHECK_VERSION (2, 34, 0)
++ thumbnail_dir = g_build_filename (g_get_user_cache_dir (),
++ "thumbnails",
++#else
+ thumbnail_dir = g_build_filename (g_get_home_dir (),
+ ".thumbnails",
++#endif
+ NULL);
+ if (!g_file_test (thumbnail_dir, G_FILE_TEST_IS_DIR))
+ {
+@@ -1025,8 +1046,13 @@
+
+ file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
+
++#if GLIB_CHECK_VERSION (2, 34, 0)
++ path = g_build_filename (g_get_user_cache_dir (),
++ "thumbnails",
++#else
+ path = g_build_filename (g_get_home_dir (),
+ ".thumbnails",
++#endif
+ (priv->size == GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
+ file,
+ NULL);
+@@ -1129,8 +1155,13 @@
+
+ file = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
+
++#if GLIB_CHECK_VERSION (2, 34, 0)
++ path = g_build_filename (g_get_user_cache_dir (),
++ "thumbnails/fail",
++#else
+ path = g_build_filename (g_get_home_dir (),
+ ".thumbnails/fail",
++#endif
+ appname,
+ file,
+ NULL);
+@@ -1220,9 +1251,14 @@
+ md5 = gnome_desktop_thumbnail_md5 (uri);
+ file = g_strconcat (md5, ".png", NULL);
+ g_free (md5);
+-
++
++#if GLIB_CHECK_VERSION (2, 34, 0)
++ path = g_build_filename (g_get_user_cache_dir (),
++ "thumbnails",
++#else
+ path = g_build_filename (g_get_home_dir (),
+ ".thumbnails",
++#endif
+ (size == GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL)?"normal":"large",
+ file,
+ NULL);