Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jul 2013 00:48:27 +0200
From:      nemysis <nemysis@gmx.ch>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        jpaetzel@FreeBSD.org
Subject:   ports/180132: [MAINTAINER] x11/menu-cache: Change dependency, fix 3 seconds LXDE menu bug
Message-ID:  <20130630224830.6EC58B3C@hub.freebsd.org>
Resent-Message-ID: <201306302250.r5UMo0i9008085@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         180132
>Category:       ports
>Synopsis:       [MAINTAINER] x11/menu-cache: Change dependency, fix 3 seconds LXDE menu bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 30 22:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.1-RELEASE-p8 amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.1-RELEASE-p8 FreeBSD 9.1-RELEASE-p8 #0: Tue Jun 18 15:25:28 UTC 2013
>Description:

- Bump portrevision
- Change dependency gtk20 --> glib20
- Add files/patch-menu-cache-daemon-menu-cached.c

Generated and tested manually, tested with port test and with RedPorts, sent with FreeBSD Port Tools 0.99_8 (mode: change, diff: ports)
>How-To-Repeat:

Dependency is changed because LXDE Upstream have told this.

Patch is needed that LXDE menu not reload each 3 seconds,
because not existing /etc/xdg. Needed for all systems which use
/usr/local/etc/xdg. Fixed in Git and in next version is this
patch not more needed.

Build log

https://redports.org/buildarchive/20130630221100-30140/

>Fix:

--- menu-cache-0.4.1_1.patch begins here ---
diff -ruN /usr/ports/x11/menu-cache/Makefile ./Makefile
--- /usr/ports/x11/menu-cache/Makefile	2013-06-20 21:56:58.000000000 +0200
+++ ./Makefile	2013-07-01 00:08:24.000000000 +0200
@@ -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 @@
 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 -ruN /usr/ports/x11/menu-cache/files/patch-menu-cache-daemon-menu-cached.c ./files/patch-menu-cache-daemon-menu-cached.c
--- /usr/ports/x11/menu-cache/files/patch-menu-cache-daemon-menu-cached.c	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-menu-cache-daemon-menu-cached.c	2013-07-01 00:02:35.000000000 +0200
@@ -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;
+ }
--- menu-cache-0.4.1_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130630224830.6EC58B3C>