rpms/totem/OLPC-2 totem-2.18.1-remove-libsn.patch, NONE, 1.1 totem-gtk-init-gst.patch, NONE, 1.1 totem.spec, 1.103, 1.104

John (J5) Palmieri (johnp) fedora-extras-commits at redhat.com
Mon Jun 18 20:16:42 UTC 2007


Author: johnp

Update of /cvs/extras/rpms/totem/OLPC-2
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7651

Modified Files:
	totem.spec 
Added Files:
	totem-2.18.1-remove-libsn.patch totem-gtk-init-gst.patch 
Log Message:
- Build for OLPC-2
- Remove dependencies on gnome libraries


totem-2.18.1-remove-libsn.patch:

--- NEW FILE totem-2.18.1-remove-libsn.patch ---
--- totem-2.18.1/browser-plugin/totem-plugin-viewer.c.remove-libsn	2007-05-29 16:53:17.000000000 -0400
+++ totem-2.18.1/browser-plugin/totem-plugin-viewer.c	2007-05-29 16:55:43.000000000 -0400
@@ -34,8 +34,6 @@
 #include <glade/glade.h>
 #include <gconf/gconf-client.h>
 
-#define SN_API_NOT_YET_FROZEN
-#include <libsn/sn.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 
@@ -583,54 +581,6 @@
 }
 
 
-static void
-sn_error_trap_push (SnDisplay *display,
-		    Display   *xdisplay)
-{
-	gdk_error_trap_push ();
-}
-
-static void
-sn_error_trap_pop (SnDisplay *display,
-		   Display   *xdisplay)
-{
-	gdk_error_trap_pop ();
-}
-
-static char **
-make_spawn_environment_for_sn_context (SnLauncherContext *sn_context,
-				       char             **envp)
-{
-	char **retval;
-	int    i, j;
-
-	retval = NULL;
-	
-	if (envp == NULL) {
-		envp = environ;
-	}
-	
-	for (i = 0; envp[i]; i++) {
-		/* Count length */
-	}
-
-	retval = g_new (char *, i + 2);
-
-	for (i = 0, j = 0; envp[i]; i++) {
-		if (!g_str_has_prefix (envp[i], "DESKTOP_STARTUP_ID=")) {
-			retval[j] = g_strdup (envp[i]);
-			++j;
-	        }
-	}
-
-	retval[j] = g_strdup_printf ("DESKTOP_STARTUP_ID=%s",
-				     sn_launcher_context_get_startup_id (sn_context));
-	++j;
-	retval[j] = NULL;
-
-	return retval;
-}
-
 /* This should be fairly long, as it's confusing to users if a startup
  * ends when it shouldn't (it appears that the startup failed, and
  * they have to relaunch the app). Also the timeout only matters when
@@ -651,109 +601,6 @@
 	guint timeout_id;
 } StartupTimeoutData;
 
-static void
-free_startup_timeout (void *data)
-{
-	StartupTimeoutData *std;
-
-	std = data;
-
-	g_slist_foreach (std->contexts,
-			 (GFunc) sn_launcher_context_unref,
-			 NULL);
-	g_slist_free (std->contexts);
-
-	if (std->timeout_id != 0) {
-		g_source_remove (std->timeout_id);
-		std->timeout_id = 0;
-	}
-
-	g_free (std);
-}
-
-static gboolean
-startup_timeout (void *data)
-{
-	StartupTimeoutData *std;
-	GSList *tmp;
-	GTimeVal now;
-	int min_timeout;
-
-	std = data;
-
-	min_timeout = STARTUP_TIMEOUT_LENGTH;
-	
-	g_get_current_time (&now);
-	
-	tmp = std->contexts;
-	while (tmp != NULL) {
-		SnLauncherContext *sn_context;
-		GSList *next;
-		long tv_sec, tv_usec;
-		double elapsed;
-		
-		sn_context = tmp->data;
-		next = tmp->next;
-		
-		sn_launcher_context_get_last_active_time (sn_context,
-							  &tv_sec, &tv_usec);
-
-		elapsed =
-			((((double)now.tv_sec - tv_sec) * G_USEC_PER_SEC +
-			  (now.tv_usec - tv_usec))) / 1000.0;
-
-		if (elapsed >= STARTUP_TIMEOUT_LENGTH) {
-			std->contexts = g_slist_remove (std->contexts,
-							sn_context);
-			sn_launcher_context_complete (sn_context);
-			sn_launcher_context_unref (sn_context);
-		} else {
-			min_timeout = MIN (min_timeout, (STARTUP_TIMEOUT_LENGTH - elapsed));
-		}
-		
-		tmp = next;
-	}
-
-	if (std->contexts == NULL) {
-		std->timeout_id = 0;
-	} else {
-		std->timeout_id = g_timeout_add (min_timeout,
-						 startup_timeout,
-						 std);
-	}
-
-	/* always remove this one, but we may have reinstalled another one. */
-	return FALSE;
-}
-
-static void
-add_startup_timeout (GdkScreen         *screen,
-		     SnLauncherContext *sn_context)
-{
-	StartupTimeoutData *data;
-
-	data = g_object_get_data (G_OBJECT (screen), "nautilus-startup-data");
-	if (data == NULL) {
-		data = g_new (StartupTimeoutData, 1);
-		data->screen = screen;
-		data->contexts = NULL;
-		data->timeout_id = 0;
-		
-		g_object_set_data_full (G_OBJECT (screen),
-					"nautilus-startup-data",
-					data, free_startup_timeout);		
-	}
-
-	sn_launcher_context_ref (sn_context);
-	data->contexts = g_slist_prepend (data->contexts, sn_context);
-	
-	if (data->timeout_id == 0) {
-		data->timeout_id = g_timeout_add (STARTUP_TIMEOUT_LENGTH,
-						  startup_timeout,
-						  data);		
-	}
-}
-
 static gboolean
 totem_embedded_launch_player (TotemEmbedded *embedded,
 			      const char *uri,
@@ -763,8 +610,6 @@
 	GList *uris = NULL;
 	GdkScreen *screen;
 	GnomeVFSResult result;
-	SnLauncherContext *sn_context;
-	SnDisplay *sn_display;
 	char **envp;
 
 	g_return_val_if_fail (embedded->app != NULL, FALSE);
@@ -784,67 +629,10 @@
 	g_return_val_if_fail (screen != NULL, FALSE);
 	envp = my_gdk_spawn_make_environment_for_screen (screen, NULL);
 
-	sn_display = sn_display_new (gdk_display,
-				     sn_error_trap_push,
-				     sn_error_trap_pop);
-
-	if (gnome_vfs_mime_application_supports_startup_notification (embedded->app)) {
-		char *name;
-
-		sn_context = sn_launcher_context_new (sn_display,
-						      gdk_screen_get_number (screen));
-
-		name = g_filename_display_basename (uri);
-		if (name != NULL) {
-			char *description;
-
-			sn_launcher_context_set_name (sn_context, name);
-			description = g_strdup_printf (_("Opening %s"), name);
-			sn_launcher_context_set_description (sn_context,
-							     description);
-			g_free (name);
-			g_free (description);
-		}
 
-		if (!sn_launcher_context_get_initiated (sn_context)) {
-			const char *binary_name;
-			char **old_envp;
-
-			binary_name = gnome_vfs_mime_application_get_binary_name
-				(embedded->app);
-
-			sn_launcher_context_set_binary_name (sn_context,
-							     binary_name);
-
-			sn_launcher_context_initiate (sn_context,
-						      g_get_prgname (),
-						      binary_name,
-						      (Time) user_time);
-
-			old_envp = envp;
-			envp = make_spawn_environment_for_sn_context
-				(sn_context, envp);
-			g_strfreev (old_envp);
-		}
-	} else {
-		sn_context = NULL;
-  	}
-  
 	result = gnome_vfs_mime_application_launch_with_env (embedded->app,
 							     uris, envp);
 
-	if (sn_context != NULL) {
-		if (result != GNOME_VFS_OK) {
-			/* end sequence */
-			sn_launcher_context_complete (sn_context);
-		} else {
-			add_startup_timeout (screen, sn_context);
-		}
-		sn_launcher_context_unref (sn_context);
-	}
-
-	sn_display_unref (sn_display);
-
 	g_list_free (uris);
 	g_strfreev (envp);
 

totem-gtk-init-gst.patch:

--- NEW FILE totem-gtk-init-gst.patch ---
--- totem-2.18.1/src/totem.c.gtk-init-gst	2007-03-30 09:19:56.000000000 -0400
+++ totem-2.18.1/src/totem.c	2007-05-29 16:02:16.000000000 -0400
@@ -3444,6 +3444,8 @@
 	if (g_option_context_parse (context, &argc, &argv, &error) == FALSE) {
 		totem_action_error_and_exit (_("Totem could not parse the command-line options"), error->message, NULL);
 	}
+
+        bacon_video_widget_init_backend (&argc, &argv);        
 #else
 	program = gnome_program_init (PACKAGE, VERSION,
 			LIBGNOMEUI_MODULE,


Index: totem.spec
===================================================================
RCS file: /cvs/extras/rpms/totem/OLPC-2/totem.spec,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- totem.spec	20 May 2007 04:05:16 -0000	1.103
+++ totem.spec	18 Jun 2007 20:16:06 -0000	1.104
@@ -5,22 +5,24 @@
 Summary: Movie player for GNOME 2
 Name: totem
 Version: 2.18.2
-Release: 1%{?dist} 
+Release: 2%{?dist} 
 License: GPL
 Group: Applications/Multimedia
 URL: http://www.gnome.org/projects/totem/
 Source0: http://download.gnome.org/sources/totem/2.18/totem-%{version}.tar.bz2
+Patch0: totem-gtk-init-gst.patch
+Patch1: totem-2.18.1-remove-libsn.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 
-Requires(pre): GConf2 >= 2.14
-Requires(preun): GConf2 >= 2.14
-Requires(post): GConf2 >= 2.14
+Requires(pre): GConf2-dbus >= 2.14
+Requires(preun): GConf2-dbus >= 2.14
+Requires(post): GConf2-dbus >= 2.14
 Requires(post): desktop-file-utils
 Requires(post): scrollkeeper
 Requires(postun): desktop-file-utils
 Requires(postun): scrollkeeper
 
-Requires: gnome-desktop >= 2.6.0
 Requires: gstreamer >= %gstreamer_version
 Requires: gstreamer-plugins-base >= %gstreamer_plugins_base_version
 Requires: gstreamer-plugins-good >= %gstreamer_plugins_good_version
@@ -32,17 +34,15 @@
 BuildRequires: gstreamer-devel >= %gstreamer_version
 BuildRequires: gstreamer-plugins-base-devel >= %gstreamer_plugins_base_version
 BuildRequires: gstreamer-plugins-good >= %gstreamer_plugins_good_version
-BuildRequires: gnome-desktop-devel >= 2.6.0, gnome-vfs2-devel, libglade2-devel
+BuildRequires: gnome-vfs2-devel, libglade2-devel
 BuildRequires: perl-XML-Parser
 BuildRequires: iso-codes-devel
-BuildRequires: firefox-devel
+BuildRequires: xulrunner-devel
 BuildRequires: gnome-icon-theme
-BuildRequires: nautilus-devel
 BuildRequires: libXtst-devel
 BuildRequires: libXxf86vm-devel
 BuildRequires: libXt-devel
 BuildRequires: dbus-devel
-BuildRequires: control-center-devel >= 2.18.0
 BuildRequires: hal-devel
 BuildRequires: gnome-doc-utils
 
@@ -88,6 +88,8 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .gtk-init-gst
+%patch1 -p1 -b .remove-libsn
 
 %build
 # try to work around a problem where gst-inspect does 
@@ -99,9 +101,10 @@
 	--disable-lirc 		\
 	--disable-vanity 	\
 	--enable-mozilla 	\
-	--enable-nautilus	\
+	--disable-nautilus	\
 	--disable-scrollkeeper  \
-	--disable-nvtv
+	--disable-nvtv		\
+	--enable-gtk
 
 make %{?_smp_mflags}
 
@@ -203,6 +206,10 @@
 %{_libdir}/*so
 
 %changelog
+* Mon Jun 18 2007 John (J5) Palmieri <johnp at redhat.com> - 2.18.2-2
+- Build for OLPC-2
+- Remove dependencies on gnome libraries
+  
 * Sat May 19 2007 Matthias Clasen <mclasen at redhat.com> - 2.18.2-1
 - Update to 2.18.2
 




More information about the fedora-extras-commits mailing list