View | Details | Raw Unified | Return to bug 179711
Collapse All | Expand All

(-)./Makefile (-9 / +7 lines)
Lines 1-23 Link Here
1
# New ports collection makefile for:	x11/menu-cache
1
# Created by: Kris Moore <kmoore@freebsd.org>
2
# Date created:				23 Sept 2010
3
# Whom:					Kris Moore <kmoore@freebsd.org>
4
#
5
# $FreeBSD: head/x11/menu-cache/Makefile 321199 2013-06-18 15:55:34Z kmoore $
2
# $FreeBSD: head/x11/menu-cache/Makefile 321199 2013-06-18 15:55:34Z kmoore $
6
#
7
3
8
PORTNAME=	menu-cache
4
PORTNAME=	menu-cache
9
PORTVERSION=	0.3.3
5
PORTVERSION=	0.4.1
10
CATEGORIES=	x11
6
CATEGORIES=	x11
11
MASTER_SITES=	SF/lxde/menu-cache/menu-cache%20${PORTVERSION}/
7
MASTER_SITES=	SF/lxde/menu-cache/menu-cache%20${PORTVERSION}/
12
8
13
MAINTAINER=	ports@FreeBSD.org
9
MAINTAINER=	nemysis@gmx.ch
14
COMMENT=	The menu-cache portion of LXDE
10
COMMENT=	The menu-cache portion of LXDE
15
11
16
USE_GNOME=	gnomehack gtk20 pkgconfig
12
USES=		pkgconfig
13
USE_GNOME=	gnomehack gtk20
17
USE_AUTOTOOLS=	libtool
14
USE_AUTOTOOLS=	libtool
18
USE_LDCONFIG=	yes
19
USE_GMAKE=	yes
15
USE_GMAKE=	yes
16
USE_LDCONFIG=	yes
20
USE_FAM=	yes
17
USE_FAM=	yes
18
21
CPPFLAGS+=	-I${LOCALBASE}/include
19
CPPFLAGS+=	-I${LOCALBASE}/include
22
LDFLAGS+=	-L${LOCALBASE}/lib
20
LDFLAGS+=	-L${LOCALBASE}/lib
23
21
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (menu-cache-0.3.3.tar.gz) = 07241c1f5f371b426d3b0a6e571a86184ec6256bdd7ead7a4da866cd10f25955
1
SHA256 (menu-cache-0.4.1.tar.gz) = 4fa9408e353fedba5b7314cbf6b6cd06d873a1424e281aa050d88bb9c0a0191e
2
SIZE (menu-cache-0.3.3.tar.gz) = 392291
2
SIZE (menu-cache-0.4.1.tar.gz) = 412859
(-)./files/patch-libmenu-cache__menu-cache.c (-20 lines)
Lines 1-20 Link Here
1
--- ./libmenu-cache/menu-cache.c.orig	2012-03-18 14:12:13.000000000 +1030
2
+++ ./libmenu-cache/menu-cache.c	2012-03-18 14:13:02.000000000 +1030
3
@@ -226,7 +226,7 @@
4
 
5
     /* file name */
6
     if( G_UNLIKELY( ! fgets( line, G_N_ELEMENTS(line) - 1, f ) ))
7
-        return;
8
+        return NULL;
9
     len = strlen( line );
10
     if( G_LIKELY(len > 1) )
11
         item->file_name = g_strndup( line, len - 1 );
12
@@ -240,7 +240,7 @@
13
 
14
     /* desktop file dir */
15
     if( G_UNLIKELY( ! fgets( line, G_N_ELEMENTS(line) - 1, f ) ))
16
-        return;
17
+        return NULL;
18
     idx = atoi( line );
19
     if( G_LIKELY( idx >=0 && idx < cache->n_all_used_files ) )
20
         item->file_dir = cache->all_used_files[ idx ] + 1;
(-)./files/patch-menu-cached.c (-32 lines)
Lines 1-32 Link Here
1
--- menu-cache-daemon/menu-cached.c.o	2011-03-17 10:58:03.876822788 -0400
2
+++ menu-cache-daemon/menu-cached.c	2011-03-17 10:58:49.355824755 -0400
3
@@ -341,6 +341,29 @@
4
                       GFileMonitorEvent evt, Cache* cache )
5
 {
6
     /* DEBUG("file %s is changed (%d).", g_file_get_path(gf), evt); */
7
+
8
+    if ( evt == G_FILE_MONITOR_EVENT_DELETED )
9
+    {
10
+        int idx;
11
+        /* dirty hack: get index of the monitor in array */
12
+        for(idx = 0; idx < cache->n_files; ++idx)
13
+        {
14
+            if(mon == cache->mons[idx])
15
+                break;
16
+        }
17
+
18
+        /* Check if this file or directory was already removed from the cache */
19
+        char* changed_file = g_file_get_path(gf);
20
+        char* dir_path = cache->files[idx]+1;
21
+        int len = strlen(dir_path);
22
+        char* base_name = changed_file + len + 1;
23
+        gboolean in_cache = is_desktop_file_in_cache(cache, idx, g_file_get_path(gf));
24
+        if( ! in_cache ) { /* Means this file was already deleted, no need to refresh cache */
25
+          DEBUG("files are changed, but no re-generation is needed.");
26
+          return;
27
+        }
28
+    }
29
+
30
     /* if( mon != cache->cache_mon ) */
31
     {
32
         /* Optimization: Some files in the dir are changed, but it
(-)./pkg-plist (-6 / +5 lines)
Lines 1-10 Link Here
1
lib/libmenu-cache.so
1
include/menu-cache/menu-cache.h
2
lib/libmenu-cache.so.1
3
lib/libmenu-cache.la
4
lib/libmenu-cache.a
2
lib/libmenu-cache.a
3
lib/libmenu-cache.la
4
lib/libmenu-cache.so
5
lib/libmenu-cache.so.2
5
libdata/pkgconfig/libmenu-cache.pc
6
libdata/pkgconfig/libmenu-cache.pc
6
libexec/menu-cached
7
libexec/menu-cache-gen
7
libexec/menu-cache-gen
8
include/menu-cache/menu-cache.h
8
libexec/menu-cached
9
@dirrm include/menu-cache
9
@dirrm include/menu-cache
10
@dirrmtry libdata/pkgconfig

Return to bug 179711