aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2013-07-03 20:38:31 +0800
committerwg <wg@FreeBSD.org>2013-07-03 20:38:31 +0800
commit7717a7026982e066a71c8596f938025f304dd6b2 (patch)
tree011ad9112f0f3b2cd2a212d389e63e70f6d9d4dd /x11
parentdb588b7987cccd06897ab2179ca6502366185995 (diff)
downloadfreebsd-ports-gnome-7717a7026982e066a71c8596f938025f304dd6b2.tar.gz
freebsd-ports-gnome-7717a7026982e066a71c8596f938025f304dd6b2.tar.zst
freebsd-ports-gnome-7717a7026982e066a71c8596f938025f304dd6b2.zip
x11/menu-cache: fix LXDE menu bug
- Fix LXDE menu bug (from upstream) - Change depenency to glib20 PR: ports/180132 Submitted by: nemysis <nemysis@gmx.ch> (maintainer)
Diffstat (limited to 'x11')
-rw-r--r--x11/menu-cache/Makefile3
-rw-r--r--x11/menu-cache/files/patch-menu-cache-daemon-menu-cached.c46
2 files changed, 48 insertions, 1 deletions
diff --git a/x11/menu-cache/Makefile b/x11/menu-cache/Makefile
index 75025f31cfef..a780ec3e173b 100644
--- a/x11/menu-cache/Makefile
+++ b/x11/menu-cache/Makefile
@@ -3,6 +3,7 @@
PORTNAME= menu-cache
PORTVERSION= 0.4.1
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= SF/lxde/menu-cache/menu-cache%20${PORTVERSION}/
@@ -10,7 +11,7 @@ MAINTAINER= nemysis@gmx.ch
COMMENT= The menu-cache portion of LXDE
USES= pkgconfig
-USE_GNOME= gnomehack gtk20
+USE_GNOME= gnomehack glib20
USE_AUTOTOOLS= libtool
USE_GMAKE= yes
USE_LDCONFIG= yes
diff --git a/x11/menu-cache/files/patch-menu-cache-daemon-menu-cached.c b/x11/menu-cache/files/patch-menu-cache-daemon-menu-cached.c
new file mode 100644
index 000000000000..d6ba4ccb0d51
--- /dev/null
+++ b/x11/menu-cache/files/patch-menu-cache-daemon-menu-cached.c
@@ -0,0 +1,46 @@
+--- menu-cache-daemon/menu-cached.c.orig 2012-11-14 09:07:36.000000000 +0100
++++ menu-cache-daemon/menu-cached.c 2013-07-01 00:02:26.000000000 +0200
+@@ -121,7 +121,7 @@
+ static gboolean read_all_used_files( FILE* f, int* n_files, char*** used_files )
+ {
+ char line[ 4096 ];
+- int i, n;
++ int i, n, x;
+ char** files;
+ int ver_maj, ver_min;
+
+@@ -141,20 +141,31 @@
+ if( ! fgets( line, G_N_ELEMENTS(line), f ) )
+ return FALSE;
+
+- *n_files = n = atoi( line );
++ n = atoi( line );
+ files = g_new0( char*, n + 1 );
+
+- for( i = 0; i < n; ++i )
++ for( i = 0, x = 0; i < n; ++i )
+ {
+ int len;
++ GFile *gfile;
+ if( ! fgets( line, G_N_ELEMENTS(line), f ) )
+ return FALSE;
+
+ len = strlen( line );
+ if( len <= 1 )
+ return FALSE;
+- files[ i ] = g_strndup( line, len - 1 ); /* don't include \n */
++ files[ x ] = g_strndup( line, len - 1 ); /* don't include \n */
++ gfile = g_file_new_for_path(files[x]+1);
++ if (g_file_query_exists(gfile, NULL))
++ x++;
++ else
++ {
++ DEBUG("ignoring not existant file from menu-cache-gen: %s", files[x]);
++ g_free(files[x]);
++ }
++ g_object_unref(gfile);
+ }
++ *n_files = x;
+ *used_files = files;
+ return TRUE;
+ }