summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorZhai Edwin <edwin.zhai@intel.com>2010-07-22 19:30:47 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-24 00:07:31 +0100
commitd6ba72ac3425596aae96ccfd1ddbbaaf20b11705 (patch)
tree4dcfca5427a5be6698315d2ec35155151c075445 /meta
parentcbea4ae33f42c1553ed99a7d3bada00ce68ff9fd (diff)
downloadpoky-d6ba72ac3425596aae96ccfd1ddbbaaf20b11705.tar.gz
pcmanfm: Update to 0.9.7
New dependency on libfm & menu-cache, which are added in previous commits following patches are removed as they either don't apply or this new version has no those problems: desktop.patch no-fam.patch no-warnings.patch pcmanfm-mips-fix.patch the pending one is aowl-window-menu.patch, which need more work as the sources have changed a lot. So far w/o this patch it still works. but we need more verification later Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/pcmanfm/files/desktop.patch15
-rw-r--r--meta/packages/pcmanfm/files/no-fam.patch432
-rw-r--r--meta/packages/pcmanfm/files/no-warnings.patch60
-rw-r--r--meta/packages/pcmanfm/files/pcmanfm-mips-fix.patch13
-rw-r--r--meta/packages/pcmanfm/pcmanfm_0.9.7.bb (renamed from meta/packages/pcmanfm/pcmanfm_0.5.bb)17
5 files changed, 5 insertions, 532 deletions
diff --git a/meta/packages/pcmanfm/files/desktop.patch b/meta/packages/pcmanfm/files/desktop.patch
deleted file mode 100644
index 93cdd87035..0000000000
--- a/meta/packages/pcmanfm/files/desktop.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Index: pcmanfm-0.5/pcmanfm.desktop.in
2===================================================================
3--- pcmanfm-0.5.orig/pcmanfm.desktop.in
4+++ pcmanfm-0.5/pcmanfm.desktop.in
5@@ -1,8 +1,7 @@
6 [Desktop Entry]
7 Version=1.0
8-Encoding=UTF-8
9-Name=PCMan File Manager
10-Categories=Application;System;Utility;Core;GTK;
11+Name=File Manager
12+Categories=System;Utility;Core;GTK;
13 Name[zh_TW]=檔案總管
14 Exec=pcmanfm %F
15 Icon=pcmanfm
diff --git a/meta/packages/pcmanfm/files/no-fam.patch b/meta/packages/pcmanfm/files/no-fam.patch
deleted file mode 100644
index b87a02df01..0000000000
--- a/meta/packages/pcmanfm/files/no-fam.patch
+++ /dev/null
@@ -1,432 +0,0 @@
1diff -urNd ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/configure.in pcmanfm-0.3.0.1/configure.in
2--- ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/configure.in 2006-08-20 15:45:28.000000000 +0100
3+++ pcmanfm-0.3.0.1/configure.in 2006-08-20 20:37:36.000000000 +0100
4@@ -63,8 +63,8 @@
5 LIBS="$LIBS $FAM_LIBS"
6 AC_CHECK_FUNCS([FAMNoExists])
7 LIBS="$save_LIBS"
8-else
9- AC_MSG_ERROR([Fatal Error: no fam or gamin detected.])
10+#else
11+# AC_MSG_ERROR([Fatal Error: no fam or gamin detected.])
12 fi
13
14 AC_SUBST([FAM_CFLAGS])
15diff -urNd ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c
16--- ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c 2006-07-16 20:00:46.000000000 +0100
17+++ pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c 2006-08-20 20:54:07.000000000 +0100
18@@ -31,7 +31,6 @@
19 VFSFileMonitorCallbackEntry;
20
21 static GHashTable* monitor_hash = NULL;
22-static FAMConnection fam;
23 static GIOChannel* fam_io_channel = NULL;
24 static guint fam_io_watch = 0;
25
26@@ -40,6 +39,8 @@
27 GIOCondition cond,
28 gpointer user_data );
29
30+#ifdef HAVE_FAM_H
31+static FAMConnection fam;
32
33 static gboolean connect_to_fam()
34 {
35@@ -81,6 +82,16 @@
36 FAMClose( &fam );
37 }
38 }
39+#else
40+static gboolean connect_to_fam ()
41+{
42+ return FALSE;
43+}
44+
45+static void disconnect_from_fam ()
46+{
47+}
48+#endif
49
50 /* final cleanup */
51 void vfs_file_monitor_clean()
52@@ -109,6 +120,7 @@
53 VFSFileMonitorCallback cb,
54 gpointer user_data )
55 {
56+#ifdef HAVE_FAM_H
57 VFSFileMonitor * monitor;
58 VFSFileMonitorCallbackEntry cb_ent;
59 gboolean add_new = FALSE;
60@@ -154,12 +166,16 @@
61 }
62 ++monitor->n_ref;
63 return monitor;
64+#else
65+ return NULL;
66+#endif
67 }
68
69 void vfs_file_monitor_remove( VFSFileMonitor* fm,
70 VFSFileMonitorCallback cb,
71 gpointer user_data )
72 {
73+#ifdef HAVE_FAM_H
74 int i;
75 VFSFileMonitorCallbackEntry* callbacks;
76 if ( cb && fm->callbacks )
77@@ -183,12 +199,14 @@
78 g_array_free( fm->callbacks, TRUE );
79 g_slice_free( VFSFileMonitor, fm );
80 }
81+#endif
82 }
83
84 static void reconnect_fam( gpointer key,
85 gpointer value,
86 gpointer user_data )
87 {
88+#ifdef HAVE_FAM_H
89 struct stat file_stat;
90 VFSFileMonitor* monitor = ( VFSFileMonitor* ) value;
91 const char* path = ( const char* ) key;
92@@ -209,6 +227,7 @@
93 monitor );
94 }
95 }
96+#endif
97 }
98
99 /* event handler of all FAM events */
100@@ -216,6 +235,7 @@
101 GIOCondition cond,
102 gpointer user_data )
103 {
104+#ifdef HAVE_FAM_H
105 FAMEvent evt;
106 VFSFileMonitor* monitor = NULL;
107 VFSFileMonitorCallbackEntry* cb;
108@@ -266,5 +286,8 @@
109 }
110 }
111 return TRUE;
112+#else
113+ return TRUE;
114+#endif
115 }
116
117diff -urNd ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c~ pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c~
118--- ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c~ 1970-01-01 01:00:00.000000000 +0100
119+++ pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.c~ 2006-08-20 20:50:49.000000000 +0100
120@@ -0,0 +1,292 @@
121+/*
122+* C Implementation: vfs-monitor
123+*
124+* Description:
125+*
126+*
127+* Author: Hong Jen Yee (PCMan) <pcman.tw (AT) gmail.com>, (C) 2006
128+*
129+* Copyright: See COPYING file that comes with this distribution
130+*
131+*/
132+
133+#ifdef HAVE_CONFIG_H
134+#include "config.h"
135+#endif
136+
137+#include "vfs-file-monitor.h"
138+#include <sys/types.h> /* for stat */
139+#include <sys/stat.h>
140+
141+#include <stdlib.h>
142+#include <string.h>
143+
144+#include "glib-mem.h"
145+
146+typedef struct
147+{
148+ VFSFileMonitorCallback callback;
149+ gpointer user_data;
150+}
151+VFSFileMonitorCallbackEntry;
152+
153+static GHashTable* monitor_hash = NULL;
154+static FAMConnection fam;
155+static GIOChannel* fam_io_channel = NULL;
156+static guint fam_io_watch = 0;
157+
158+/* event handler of all FAM events */
159+static gboolean on_fam_event( GIOChannel *channel,
160+ GIOCondition cond,
161+ gpointer user_data );
162+
163+#ifdef HAVE_FAM_H
164+static gboolean connect_to_fam()
165+{
166+ if ( FAMOpen( &fam ) )
167+ {
168+ fam_io_channel = NULL;
169+ fam.fd = -1;
170+ g_warning( "There is no FAM/gamin server\n" );
171+ return FALSE;
172+ }
173+#if HAVE_FAMNOEXISTS
174+ /*
175+ * Disable the initital directory content loading.
176+ * This can greatly speed up directory loading, but
177+ * unfortunately, it's not compatible with original FAM.
178+ */
179+ FAMNoExists( &fam ); /* This is an extension of gamin */
180+#endif
181+
182+ fam_io_channel = g_io_channel_unix_new( fam.fd );
183+ g_io_channel_set_encoding( fam_io_channel, NULL, NULL );
184+ g_io_channel_set_buffered( fam_io_channel, FALSE );
185+
186+ fam_io_watch = g_io_add_watch( fam_io_channel,
187+ G_IO_IN | G_IO_HUP,
188+ on_fam_event,
189+ NULL );
190+ return TRUE;
191+}
192+
193+static void disconnect_from_fam()
194+{
195+ if ( fam_io_channel )
196+ {
197+ g_io_channel_unref( fam_io_channel );
198+ fam_io_channel = NULL;
199+ g_source_remove( fam_io_watch );
200+
201+ FAMClose( &fam );
202+ }
203+}
204+#else
205+static gboolean connect_to_fam ()
206+{
207+ return FALSE;
208+}
209+
210+static void disconnect_from_fam ()
211+{
212+}
213+#endif
214+
215+/* final cleanup */
216+void vfs_file_monitor_clean()
217+{
218+ disconnect_from_fam();
219+ if ( monitor_hash )
220+ {
221+ g_hash_table_destroy( monitor_hash );
222+ monitor_hash = NULL;
223+ }
224+}
225+
226+/*
227+* Init monitor:
228+* Establish connection with gamin/fam.
229+*/
230+gboolean vfs_file_monitor_init()
231+{
232+ monitor_hash = g_hash_table_new( g_str_hash, g_str_equal );
233+ if ( ! connect_to_fam() )
234+ return FALSE;
235+ return TRUE;
236+}
237+
238+VFSFileMonitor* vfs_file_monitor_add( const char* path,
239+ VFSFileMonitorCallback cb,
240+ gpointer user_data )
241+{
242+#ifdef HAVE_FAM_H
243+ VFSFileMonitor * monitor;
244+ VFSFileMonitorCallbackEntry cb_ent;
245+ gboolean add_new = FALSE;
246+ struct stat file_stat;
247+
248+ if ( ! monitor_hash )
249+ {
250+ if ( !vfs_file_monitor_init() )
251+ return NULL;
252+ }
253+ monitor = ( VFSFileMonitor* ) g_hash_table_lookup ( monitor_hash, path );
254+ if ( ! monitor )
255+ {
256+ monitor = g_slice_new0( VFSFileMonitor );
257+ monitor->path = g_strdup( path );
258+ monitor->callbacks = g_array_new ( FALSE, FALSE, sizeof( VFSFileMonitorCallbackEntry ) );
259+ g_hash_table_insert ( monitor_hash,
260+ path,
261+ monitor );
262+ if ( lstat( path, &file_stat ) != -1 )
263+ {
264+ if ( S_ISDIR( file_stat.st_mode ) )
265+ {
266+ FAMMonitorDirectory( &fam,
267+ path,
268+ &monitor->request,
269+ monitor );
270+ }
271+ else
272+ {
273+ FAMMonitorFile( &fam,
274+ path,
275+ &monitor->request,
276+ monitor );
277+ }
278+ }
279+ }
280+ if ( cb )
281+ { /* Install a callback */
282+ cb_ent.callback = cb;
283+ cb_ent.user_data = user_data;
284+ monitor->callbacks = g_array_append_val( monitor->callbacks, cb_ent );
285+ }
286+ ++monitor->n_ref;
287+ return monitor;
288+#else
289+ return NULL;
290+#endif
291+}
292+
293+void vfs_file_monitor_remove( VFSFileMonitor* fm,
294+ VFSFileMonitorCallback cb,
295+ gpointer user_data )
296+{
297+#ifdef HAVE_FAM_H
298+ int i;
299+ VFSFileMonitorCallbackEntry* callbacks;
300+ if ( cb && fm->callbacks )
301+ {
302+ callbacks = ( VFSFileMonitorCallbackEntry* ) fm->callbacks->data;
303+ for ( i = 0; i < fm->callbacks->len; ++i )
304+ {
305+ if ( callbacks[ i ].callback == cb && callbacks[ i ].user_data == user_data )
306+ {
307+ fm->callbacks = g_array_remove_index_fast ( fm->callbacks, i );
308+ break;
309+ }
310+ }
311+ }
312+ --fm->n_ref;
313+ if ( 0 >= fm->n_ref )
314+ {
315+ FAMCancelMonitor( &fam, &fm->request );
316+ g_hash_table_remove( monitor_hash, fm->path );
317+ g_free( fm->path );
318+ g_array_free( fm->callbacks, TRUE );
319+ g_slice_free( VFSFileMonitor, fm );
320+ }
321+#endif
322+}
323+
324+static void reconnect_fam( gpointer key,
325+ gpointer value,
326+ gpointer user_data )
327+{
328+#ifdef HAVE_FAM_H
329+ struct stat file_stat;
330+ VFSFileMonitor* monitor = ( VFSFileMonitor* ) value;
331+ const char* path = ( const char* ) key;
332+ if ( lstat( path, &file_stat ) != -1 )
333+ {
334+ if ( S_ISDIR( file_stat.st_mode ) )
335+ {
336+ FAMMonitorDirectory( &fam,
337+ path,
338+ &monitor->request,
339+ monitor );
340+ }
341+ else
342+ {
343+ FAMMonitorFile( &fam,
344+ path,
345+ &monitor->request,
346+ monitor );
347+ }
348+ }
349+#endif
350+}
351+
352+/* event handler of all FAM events */
353+static gboolean on_fam_event( GIOChannel *channel,
354+ GIOCondition cond,
355+ gpointer user_data )
356+{
357+#ifdef HAVE_FAM_H
358+ FAMEvent evt;
359+ VFSFileMonitor* monitor = NULL;
360+ VFSFileMonitorCallbackEntry* cb;
361+ VFSFileMonitorCallback func;
362+ int i;
363+
364+ if ( cond & G_IO_HUP )
365+ {
366+ disconnect_from_fam();
367+ if ( g_hash_table_size ( monitor_hash ) > 0 )
368+ {
369+ /*
370+ Disconnected from FAM server, but there are still monitors.
371+ This may be caused by crash of FAM server.
372+ So we have to reconnect to FAM server.
373+ */
374+ connect_to_fam();
375+ g_hash_table_foreach( monitor_hash, ( GHFunc ) reconnect_fam, NULL );
376+ }
377+ return TRUE; /* don't need to remove the event source since
378+ it has been removed by disconnect_from_fam(). */
379+ }
380+
381+ while ( FAMPending( &fam ) )
382+ {
383+ if ( FAMNextEvent( &fam, &evt ) > 0 )
384+ {
385+ monitor = ( VFSFileMonitor* ) evt.userdata;
386+ switch ( evt.code )
387+ {
388+ case FAMCreated:
389+ case FAMDeleted:
390+ case FAMChanged:
391+ /* Call the callback functions */
392+ if ( monitor->callbacks && monitor->callbacks->len )
393+ {
394+ cb = ( VFSFileMonitorCallbackEntry* ) monitor->callbacks->data;
395+ for ( i = 0; i < monitor->callbacks->len; ++i )
396+ {
397+ func = cb[ i ].callback;
398+ func( monitor, evt.code, evt.filename, cb[ i ].user_data );
399+ }
400+ }
401+ break;
402+ default:
403+ return TRUE; /* Other events are not supported */
404+ }
405+ }
406+ }
407+ return TRUE;
408+#else
409+ return TRUE;
410+#endif
411+}
412+
413diff -urNd ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.h pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.h
414--- ../pcmanfm-0.3.0.1-r0/pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.h 2006-04-03 00:38:33.000000000 +0100
415+++ pcmanfm-0.3.0.1/src/vfs/vfs-file-monitor.h 2006-08-20 20:47:00.000000000 +0100
416@@ -20,7 +20,16 @@
417 #define _VFS_FILE_MONITOR_H_
418
419 #include <glib.h>
420+#ifdef HAVE_FAM_H
421 #include <fam.h>
422+#else
423+# define FAMCreated 0
424+# define FAMDeleted 1
425+# define FAMChanged 2
426+typedef struct {
427+ int reqnum;
428+} FAMRequest;
429+#endif
430
431 G_BEGIN_DECLS
432
diff --git a/meta/packages/pcmanfm/files/no-warnings.patch b/meta/packages/pcmanfm/files/no-warnings.patch
deleted file mode 100644
index b1570a0d98..0000000000
--- a/meta/packages/pcmanfm/files/no-warnings.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1Index: pcmanfm-0.5/src/main.c
2===================================================================
3--- pcmanfm-0.5.orig/src/main.c
4+++ pcmanfm-0.5/src/main.c
5@@ -118,7 +118,7 @@
6
7 static void init_folder();
8 static void init_daemon_or_desktop();
9-static void check_icon_theme();
10+/*static void check_icon_theme();*/
11
12 static gboolean handle_parsed_commandline_args();
13
14@@ -322,7 +322,7 @@
15 gtk_widget_show ( GTK_WIDGET( main_window ) );
16 return main_window;
17 }
18-
19+#if 0
20 void check_icon_theme()
21 {
22 GtkSettings * settings;
23@@ -361,7 +361,7 @@
24 }
25 g_free( theme );
26 }
27-
28+#endif
29 #ifdef _DEBUG_THREAD
30
31 G_LOCK_DEFINE(gdk_lock);
32@@ -405,7 +405,7 @@
33 vfs_file_info_set_thumbnail_size( app_settings.big_icon_size,
34 app_settings.small_icon_size );
35
36- check_icon_theme();
37+/* check_icon_theme();*/
38 folder_initialized = TRUE;
39 }
40
41Index: pcmanfm-0.5/src/main-window.c
42===================================================================
43--- pcmanfm-0.5.orig/src/main-window.c
44+++ pcmanfm-0.5/src/main-window.c
45@@ -633,6 +633,7 @@
46 gtk_widget_grab_focus ( GTK_WIDGET( main_window->address_bar ) );
47
48 #ifdef SUPER_USER_CHECKS
49+#if 0
50 /* Create warning bar for super user */
51 if ( geteuid() == 0 ) /* Run as super user! */
52 {
53@@ -648,6 +649,7 @@
54 main_window->status_bar, FALSE, FALSE, 2 );
55 }
56 #endif
57+#endif
58
59 /* Create client area */
60 main_window->notebook = gtk_notebook_new();
diff --git a/meta/packages/pcmanfm/files/pcmanfm-mips-fix.patch b/meta/packages/pcmanfm/files/pcmanfm-mips-fix.patch
deleted file mode 100644
index ad5dc67727..0000000000
--- a/meta/packages/pcmanfm/files/pcmanfm-mips-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1--- pcmanfm-0.3.2.2-org/src/inotify/inotify-syscalls.h 2010-01-07 14:53:56.938000062 +0800
2+++ pcmanfm-0.3.2.2/src/inotify/inotify-syscalls.h 2010-01-07 14:54:57.830000065 +0800
3@@ -39,6 +39,10 @@
4 # define __NR_inotify_init 290
5 # define __NR_inotify_add_watch 291
6 # define __NR_inotify_rm_watch 292
7+#elif defined (__mips__)
8+# define __NR_inotify_init 284
9+# define __NR_inotify_add_watch 285
10+# define __NR_inotify_rm_watch 286
11 #else
12 # error "Unsupported architecture!"
13 #endif
diff --git a/meta/packages/pcmanfm/pcmanfm_0.5.bb b/meta/packages/pcmanfm/pcmanfm_0.9.7.bb
index e253d79fba..3f690668b8 100644
--- a/meta/packages/pcmanfm/pcmanfm_0.5.bb
+++ b/meta/packages/pcmanfm/pcmanfm_0.9.7.bb
@@ -4,12 +4,12 @@ BUGTRACKER = ""
4 4
5LICENSE = "GPLv2 & GPLv2+ & LGPLv2.1+" 5LICENSE = "GPLv2 & GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://src/pcmanfm.h;endline=22;md5=0fa9129ee918f493e573154f6ec43fb7 \ 7 file://src/pcmanfm.h;endline=22;md5=417b3855771a3a87f8ad753d994491f0 \
8 file://src/find-files.c;endline=26;md5=9a92e8f329c97de94e90976a37dde5a5" 8 file://src/gseal-gtk-compat.h;endline=21;md5=46922c8691f58d124f9420fe16149ce2"
9 9
10SECTION = "x11" 10SECTION = "x11"
11PRIORITY = "optional" 11PRIORITY = "optional"
12DEPENDS = "gtk+ startup-notification" 12DEPENDS = "gtk+ startup-notification libfm"
13DEPENDS_append_poky = " libowl" 13DEPENDS_append_poky = " libowl"
14 14
15PR = "r0" 15PR = "r0"
@@ -20,14 +20,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.gz \
20 file://gnome-fs-directory.png \ 20 file://gnome-fs-directory.png \
21 file://gnome-fs-regular.png \ 21 file://gnome-fs-regular.png \
22 file://gnome-mime-text-plain.png \ 22 file://gnome-mime-text-plain.png \
23 file://emblem-symbolic-link.png \ 23 file://emblem-symbolic-link.png"
24 file://desktop.patch;patch=1 \
25 file://no-warnings.patch;patch=1 \
26 file://pcmanfm-mips-fix.patch;patch=1"
27 24
28SRC_URI_append_poky = " file://owl-window-menu.patch;patch=1" 25#SRC_URI_append_poky = " file://owl-window-menu.patch;patch=1"
29
30EXTRA_OECONF = "--enable-inotify --disable-hal"
31 26
32inherit autotools pkgconfig 27inherit autotools pkgconfig
33 28
@@ -37,5 +32,3 @@ do_install_append () {
37 32
38 install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps 33 install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps
39} 34}
40
41FILES_${PN} += "${datadir}/pixmaps/*.png"