From 4124a48ae45a2256dc5c9c8bef1ed43f895e9ded Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] - Rebase to native Fedora version 2.19.5. - Use _smp_mflags. - Use find_lang. - Don't build static libraries. --- glib2/gio-2.16-only-pass-uri-to-gio-apps.patch | 117 ------------------------- glib2/glib-i386-atomic.patch | 15 ++++ glib2/mingw32-glib2.spec | 32 +++++-- 3 files changed, 38 insertions(+), 126 deletions(-) delete mode 100644 glib2/gio-2.16-only-pass-uri-to-gio-apps.patch create mode 100644 glib2/glib-i386-atomic.patch diff --git a/glib2/gio-2.16-only-pass-uri-to-gio-apps.patch b/glib2/gio-2.16-only-pass-uri-to-gio-apps.patch deleted file mode 100644 index 8f3715b..0000000 --- a/glib2/gio-2.16-only-pass-uri-to-gio-apps.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff -up glib-2.17.3/gio/gdesktopappinfo.c.only-pass-uri-to-gio-apps glib-2.17.3/gio/gdesktopappinfo.c ---- glib-2.17.3/gio/gdesktopappinfo.c.only-pass-uri-to-gio-apps 2008-07-02 17:13:13.000000000 -0400 -+++ glib-2.17.3/gio/gdesktopappinfo.c 2008-07-03 13:21:42.000000000 -0400 -@@ -1,3 +1,5 @@ -+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -+ - /* GIO - GLib Input, Output and Streaming Library - * - * Copyright (C) 2006-2007 Red Hat, Inc. -@@ -89,6 +91,7 @@ struct _GDesktopAppInfo - char *exec; - char *binary; - char *path; -+ char *vfs_system; - - guint nodisplay : 1; - guint hidden : 1; -@@ -151,6 +154,7 @@ g_desktop_app_info_finalize (GObject *ob - g_free (info->try_exec); - g_free (info->exec); - g_free (info->binary); -+ g_free (info->vfs_system); - g_free (info->path); - - G_OBJECT_CLASS (g_desktop_app_info_parent_class)->finalize (object); -@@ -254,6 +258,7 @@ g_desktop_app_info_new_from_keyfile (GKe - info->terminal = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TERMINAL, NULL) != FALSE; - info->startup_notify = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY, NULL) != FALSE; - info->hidden = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL) != FALSE; -+ info->vfs_system = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-Gnome-Vfs-System", NULL); - - info->icon = NULL; - if (info->icon_name) -@@ -392,6 +397,7 @@ g_desktop_app_info_dup (GAppInfo *appinf - new_info->exec = g_strdup (info->exec); - new_info->binary = g_strdup (info->binary); - new_info->path = g_strdup (info->path); -+ new_info->vfs_system = g_strdup (info->vfs_system); - new_info->hidden = info->hidden; - new_info->terminal = info->terminal; - new_info->startup_notify = info->startup_notify; -@@ -517,9 +523,35 @@ expand_macro (char macro, - { - GList *uris = *uri_list; - char *expanded; -- -+ gboolean force_file_uri; -+ char force_file_uri_macro; -+ - g_return_if_fail (exec != NULL); -- -+ -+ /* On %u and %U, only pass gio URI's if the desktop file has the -+ * X-Gnome-Vfs-System key set to 'gio' or if FUSE is not available. -+ * Otherwise we pass in a POSIX file path pointing to the URI via -+ * the FUSE mount in ~/.gvfs. -+ */ -+ force_file_uri = FALSE; -+ if (macro == 'u' || macro == 'U') -+ { -+ if (info->vfs_system == NULL || strcmp (info->vfs_system, "gio") != 0) -+ { -+ switch (macro) -+ { -+ case 'u': -+ force_file_uri_macro = 'f'; -+ force_file_uri = TRUE; -+ break; -+ case 'U': -+ force_file_uri_macro = 'F'; -+ force_file_uri = TRUE; -+ break; -+ } -+ } -+ } -+ - switch (macro) - { - case 'u': -@@ -528,7 +560,17 @@ expand_macro (char macro, - case 'n': - if (uris) - { -- expanded = expand_macro_single (macro, uris->data); -+ if (!force_file_uri || g_str_has_prefix (uris->data, "http")) -+ { -+ expanded = expand_macro_single (macro, uris->data); -+ } -+ else -+ { -+ expanded = expand_macro_single (force_file_uri_macro, uris->data); -+ if (expanded == NULL) -+ expanded = expand_macro_single (macro, uris->data); -+ } -+ - if (expanded) - { - g_string_append (exec, expanded); -@@ -545,7 +587,17 @@ expand_macro (char macro, - case 'N': - while (uris) - { -- expanded = expand_macro_single (macro, uris->data); -+ if (!force_file_uri || g_str_has_prefix (uris->data, "http")) -+ { -+ expanded = expand_macro_single (macro, uris->data); -+ } -+ else -+ { -+ expanded = expand_macro_single (force_file_uri_macro, uris->data); -+ if (expanded == NULL) -+ expanded = expand_macro_single (macro, uris->data); -+ } -+ - if (expanded) - { - g_string_append (exec, expanded); diff --git a/glib2/glib-i386-atomic.patch b/glib2/glib-i386-atomic.patch new file mode 100644 index 0000000..01495c0 --- /dev/null +++ b/glib2/glib-i386-atomic.patch @@ -0,0 +1,15 @@ +diff -up glib-2.16.6/configure.atomic glib-2.16.6/configure +--- glib-2.16.6/configure.atomic 2008-10-27 18:24:20.000000000 -0400 ++++ glib-2.16.6/configure 2008-10-27 18:24:31.000000000 -0400 +@@ -42742,11 +42742,6 @@ $as_echo_n "checking whether to use asse + + if test x"$GCC" = xyes; then + case $host_cpu in +- i386) +- { $as_echo "$as_me:$LINENO: result: none" >&5 +-$as_echo "none" >&6; } +- glib_memory_barrier_needed=no +- ;; + i?86) + { $as_echo "$as_me:$LINENO: result: i486" >&5 + $as_echo "i486" >&6; } diff --git a/glib2/mingw32-glib2.spec b/glib2/mingw32-glib2.spec index 869e716..7b71077 100644 --- a/glib2/mingw32-glib2.spec +++ b/glib2/mingw32-glib2.spec @@ -5,19 +5,19 @@ %define __find_provides %{_mingw32_findprovides} Name: mingw32-glib2 -Version: 2.18.1 -Release: 2%{?dist} +Version: 2.19.5 +Release: 1%{?dist} Summary: MinGW Windows GLib2 library License: LGPLv2+ Group: Development/Libraries URL: http://www.gtk.org -Source0: http://download.gnome.org/sources/glib/2.18/glib-%{version}.tar.bz2 +Source0: http://download.gnome.org/sources/glib/2.19/glib-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Patch2: gio-2.16-only-pass-uri-to-gio-apps.patch +Patch0: glib-i386-atomic.patch BuildRequires: mingw32-filesystem >= 23 BuildRequires: mingw32-gcc @@ -30,18 +30,25 @@ BuildRequires: gettext # Native version required for glib-genmarshal BuildRequires: glib2-devel +# These are required for the glib-i386-atomic patch. +BuildRequires: autoconf, automake, libtool, gettext-devel, gtk-doc + %description MinGW Windows Glib2 library. %prep %setup -q -n glib-%{version} -%patch2 -p1 +%patch0 -p1 -b .i386-atomic + +# Required for the glib-i386-atomic patch. +libtoolize --force --copy +autoreconf %build -%{_mingw32_configure} -make +%{_mingw32_configure} --disable-static +make %{?_smp_mflags} %install @@ -54,12 +61,14 @@ rm -f $RPM_BUILD_ROOT/%{_mingw32_libdir}/charset.alias # Remove manpages which duplicate Fedora native. rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir} +%find_lang glib20 + %clean rm -rf $RPM_BUILD_ROOT -%files +%files -f glib20.lang %defattr(-,root,root) %{_mingw32_bindir}/glib-genmarshal.exe %{_mingw32_bindir}/glib-gettextize @@ -103,10 +112,15 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_datadir}/gtk-doc/html/gio/ %{_mingw32_datadir}/gtk-doc/html/glib/ %{_mingw32_datadir}/gtk-doc/html/gobject/ -%{_mingw32_datadir}/locale/*/LC_MESSAGES/glib20.mo %changelog +* Fri Jan 23 2009 Richard W.M. Jones - 2.19.5-1 +- Rebase to native Fedora version 2.19.5. +- Use _smp_mflags. +- Use find_lang. +- Don't build static libraries. + * Wed Sep 24 2008 Richard W.M. Jones - 2.18.1-2 - Rename mingw -> mingw32. -- 1.8.3.1