glib/glib.patch

Fri, 03 Aug 2012 15:21:22 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 03 Aug 2012 15:21:22 +0200
changeset 455
eb5f1f7ac5ff
parent 454
e99334bd789c
child 769
a0926cc92e0c
permissions
-rw-r--r--

Correct various defects in the build configuration including:
Improve SVR5 portability, support nonpkgconfig libelf(3), debug
recently introduced upstream gresource code, and use parallel make.

     1 Index: Makefile.in
     2 --- Makefile.in.orig	2012-05-15 00:09:32.000000000 +0200
     3 +++ Makefile.in	2012-07-13 20:35:15.000000000 +0200
     4 @@ -426,7 +426,7 @@
     5  	gio-windows-2.0.pc.in
     6  TEST_PROGS = 
     7  ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
     8 -SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
     9 +SUBDIRS = . m4macros glib gmodule gthread gobject gio po
    10  DIST_SUBDIRS = $(SUBDIRS) build
    11  bin_SCRIPTS = glib-gettextize
    12  AM_CPPFLAGS = \
    13 Index: configure
    14 --- configure.orig	2012-05-15 00:09:26.000000000 +0200
    15 +++ configure	2012-07-13 20:35:26.000000000 +0200
    16 @@ -21276,12 +21276,6 @@
    20 -if test "x$GCC" = "xyes"; then
    21 -  case " $CFLAGS " in
    22 -  *[\ \	]-Wall[\ \	]*) ;;
    23 -  *) CFLAGS="$CFLAGS -Wall" ;;
    24 -  esac
    25 -fi
    27  if test "$glib_native_win32" = "yes"; then
    28    if test x$enable_static = xyes -a x$enable_shared = xyes; then
    29 Index: gio/Makefile.in
    30 --- gio/Makefile.in.orig	2012-05-15 00:09:29.000000000 +0200
    31 +++ gio/Makefile.in	2012-07-13 20:35:15.000000000 +0200
    32 @@ -482,7 +482,7 @@
    33  CTAGS = ctags
    34  am__tty_colors = \
    35  red=; grn=; lgn=; blu=; std=
    36 -DIST_SUBDIRS = gdbus-2.0/codegen xdgmime inotify fen win32 . fam tests
    37 +DIST_SUBDIRS = xdgmime inotify fen win32 . fam
    38  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    39  am__relativize = \
    40    dir0=`pwd`; \
    41 @@ -760,8 +760,8 @@
    42  	gschema.dtd gconstructor_as_data.h $(NULL) $(completion_DATA)
    43  TEST_PROGS = 
    44  NULL = 
    45 -SUBDIRS = gdbus-2.0/codegen $(am__append_1) $(am__append_4) \
    46 -	$(am__append_8) $(am__append_11) . $(am__append_14) tests
    47 +SUBDIRS = $(am__append_1) $(am__append_4) \
    48 +	$(am__append_8) $(am__append_11) . $(am__append_14)
    49  @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = gio-2.0.lib
    50  @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
    51  @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
    52 Index: gio/glib-compile-schemas.c
    53 --- gio/glib-compile-schemas.c.orig	2012-04-13 15:39:41.000000000 +0200
    54 +++ gio/glib-compile-schemas.c	2012-07-13 20:35:15.000000000 +0200
    55 @@ -1530,7 +1530,7 @@
    56  }
    57  /* Text {{{2 */
    58  static void
    59 -text (GMarkupParseContext  *context,
    60 +XXXtext (GMarkupParseContext  *context,
    61        const gchar          *text,
    62        gsize                 text_len,
    63        gpointer              user_data,
    64 @@ -1695,7 +1695,7 @@
    65  parse_gschema_files (gchar    **files,
    66                       gboolean   strict)
    67  {
    68 -  GMarkupParser parser = { start_element, end_element, text };
    69 +  GMarkupParser parser = { start_element, end_element, XXXtext };
    70    ParseState state = { 0, };
    71    const gchar *filename;
    72    GError *error = NULL;
    73 Index: gio/tests/gdbus-peer.c
    74 --- gio/tests/gdbus-peer.c.orig	2012-05-14 23:58:01.000000000 +0200
    75 +++ gio/tests/gdbus-peer.c	2012-07-13 20:35:15.000000000 +0200
    76 @@ -39,6 +39,8 @@
    77  #include <gio/gunixsocketaddress.h>
    78  #include <gio/gunixfdlist.h>
    80 +#include <sys/socket.h>
    81 +
    82  /* used in test_overflow */
    83  #ifdef G_OS_UNIX
    84  #include <gio/gunixconnection.h>
    85 Index: gio/xdgmime/xdgmimecache.h
    86 --- gio/xdgmime/xdgmimecache.h.orig	2011-08-16 02:51:30.000000000 +0200
    87 +++ gio/xdgmime/xdgmimecache.h	2012-07-13 20:35:15.000000000 +0200
    88 @@ -46,6 +46,9 @@
    89  #define _xdg_mime_cache_get_icon                      XDG_RESERVED_ENTRY(cache_get_icon)
    90  #define _xdg_mime_cache_get_generic_icon              XDG_RESERVED_ENTRY(cache_get_generic_icon)
    91  #define _xdg_mime_cache_glob_dump                     XDG_RESERVED_ENTRY(cache_glob_dump)
    92 +#define _xdg_mime_cache_is_valid_mime_type            XDG_RESERVED_ENTRY(cache_is_valid_mime_type)
    93 +#define _xdg_mime_cache_mime_type_equal               XDG_RESERVED_ENTRY(cache_mime_type_equal)
    94 +#define _xdg_mime_cache_media_type_equal              XDG_RESERVED_ENTRY(cache_media_type_equal)
    95  #endif
    97  extern XdgMimeCache **_caches;
    98 Index: glib/gatomic.c
    99 --- glib/gatomic.c.orig	2012-03-12 01:42:41.000000000 +0100
   100 +++ glib/gatomic.c	2012-07-13 20:35:15.000000000 +0200
   101 @@ -21,6 +21,7 @@
   103  #include "config.h"
   105 +#include "gthread.h"
   106  #include "gatomic.h"
   108  /**
   109 Index: glib/gregex.c
   110 --- glib/gregex.c.orig	2012-04-02 05:08:41.000000000 +0200
   111 +++ glib/gregex.c	2012-07-13 20:35:15.000000000 +0200
   112 @@ -228,8 +228,10 @@
   113      case PCRE_ERROR_DFA_RECURSE:
   114      case PCRE_ERROR_RECURSIONLIMIT:
   115        return _("recursion limit reached");
   116 +#ifdef PCRE_ERROR_NULLWSLIMIT
   117      case PCRE_ERROR_NULLWSLIMIT:
   118        return _("workspace limit for empty substrings reached");
   119 +#endif
   120      case PCRE_ERROR_BADNEWLINE:
   121        return _("invalid combination of newline flags");
   122      case PCRE_ERROR_BADOFFSET:
   123 Index: gmodule/gmodule-dl.c
   124 --- gmodule/gmodule-dl.c.orig	2011-08-16 02:51:30.000000000 +0200
   125 +++ gmodule/gmodule-dl.c	2012-07-13 20:35:15.000000000 +0200
   126 @@ -107,6 +107,7 @@
   127  static gpointer
   128  _g_module_self (void)
   129  {
   130 +#ifndef __FreeBSD__
   131    gpointer handle;
   133    /* to query symbols from the program itself, special link options
   134 @@ -118,6 +119,9 @@
   135      g_module_set_error (fetch_dlerror (TRUE));
   137    return handle;
   138 +#else
   139 +  return RTLD_DEFAULT;
   140 +#endif
   141  }
   143  static void
   144 diff -Nau gio/gsocket.c.orig gio/gsocket.c
   145 Index: gio/gsocket.c
   146 --- gio/gsocket.c.orig	2012-08-03 11:38:08.419548195 +0200
   147 +++ gio/gsocket.c	2012-08-03 11:38:11.307357875 +0200
   148 @@ -48,6 +48,10 @@
   149  #include <sys/uio.h>
   150  #endif
   152 +#if defined (__SVR4) && defined (__sun)
   153 +#include <sys/filio.h>
   154 +#endif
   155 +
   156  #include "gcancellable.h"
   157  #include "gioenumtypes.h"
   158  #include "ginetaddress.h"
   159 diff -Nau gio/gresource-tool.c.orig gio/gresource-tool.c
   160 Index: gio/gresource-tool.c
   161 --- gio/gresource-tool.c.orig	2012-08-03 11:25:31.632225248 +0200
   162 +++ gio/gresource-tool.c	2012-08-03 11:38:12.657797557 +0200
   163 @@ -31,6 +31,11 @@
   164  #include <locale.h>
   166  #ifdef HAVE_LIBELF
   167 +/* Solaris libelf does not support largefile in 32-bit mode */
   168 +#if defined (__SVR4) && defined (__sun) && defined (__i386)
   169 +#undef  _FILE_OFFSET_BITS
   170 +#define _FILE_OFFSET_BITS   32
   171 +#endif
   172  #include <libelf.h>
   173  #include <gelf.h>
   174  #include <sys/mman.h>

mercurial