From 7eee243aff122a994aea01b34f39a56fb46e361e Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Tue, 22 Nov 2022 22:51:26 +0100 Subject: [PATCH] Add glib2 2.22.4 as versioned package --- .../finkinfo/gnome/glib2-shlibs-2.22.4.info | 287 +++++++++ .../finkinfo/gnome/glib2-shlibs-2.22.4.patch | 575 ++++++++++++++++++ 2 files changed, 862 insertions(+) create mode 100644 10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.info create mode 100644 10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.patch diff --git a/10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.info b/10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.info new file mode 100644 index 00000000000..bc954369a71 --- /dev/null +++ b/10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.info @@ -0,0 +1,287 @@ +Package: glib2-shlibs + +#2.22.5 fails self-test; do not update. See: +#https://bugzilla.gnome.org/show_bug.cgi?id=613060 +Version: 2.22.4 + +Revision: 9 +BuildDepends: << + gettext-bin, + gettext-tools, + libgettext8-dev, + libiconv-dev, + pkgconf +<< +Depends: << + libgettext8-shlibs, + libiconv, + xdg-base +<< +Recommends: << + desktop-file-utils (>= 0.22-1), + shared-mime-info (>= 1.3-1) +<< +Replaces: glib2 (<< 2.12.0-1) +Source: mirror:gnome:sources/glib/2.22/glib-%v.tar.bz2 +Source-MD5: d91bcbe27556430ddecce65086355708 +PatchFile: %n-%v.patch +PatchFile-MD5: d24962ccbe831bb0ce4a4389a1303a84 +PatchScript: << + sed 's,@PREFIX@,%p,g' < %{PatchFile} | patch -p1 + + # 2.22.4 tarball contains generated docs that include leakage + # from overly-public entries in libcamel + perl -pi -e 's,(gettext\(\)),\1,g' docs/reference/*/html/*.html + # Regenerating gtk-doc files The Right Way (--enable-gtk-doc) + # is very slow, so just patch the prefix in the bad URLs in + # the existing generated files. (and other manual fixes) + perl -pi -e 's,/usr/share/gtk-doc/html,%p/share/gtk-doc/html,g' docs/reference/*/html/*.html + # Work hard to avoid using gtk-doc even if present because + # it would cause a (Build)Depends cycle + perl -pi -e 's/-version-info/-no-undefined -version-info/' */Makefile.in + # Patch configure to not link like Puma on Yosemite + perl -pi.bak -e 's|10\.\[012\]\*|10.[012][,.]*|g' configure +<< +SetCFLAGS: -Os +ConfigureParams: --mandir=%p/share/man --disable-gtk-doc ac_cv_path_GTKDOC_REBASE=true --disable-dependency-tracking --disable-fam --disable-visibility --enable-man --with-xml-catalog=%p/etc/xml/catalog +CompileScript: << + PERL_PATH=/usr/bin/perl PERL=/usr/bin/perl ./configure %c + perl -pi -e '$_="#define BROKEN_POLL 1\n" if /BROKEN_POLL/' config.h + make +<< +InfoTest: << + TestDepends: << + desktop-file-utils (>= 0.22-1), + shared-mime-info (>= 1.3-1) + << + TestScript: LANG=C make check || exit 2 +<< +InstallScript: << + make install DESTDIR=%d + rm -rf %i/share/gdb %i/share/glib-2.0/gdb + + perl -ni -e 'print unless /Libs.private:/' %i/lib/pkgconfig/*.pc + + mkdir -p %i/lib/glib-2.0/pkgconfig-strict + perl -p -e 's/-lintl//g' %i/lib/pkgconfig/glib-2.0.pc > %i/lib/glib-2.0/pkgconfig-strict/glib-2.0.pc +<< +Shlibs: << + %p/lib/libgio-2.0.0.dylib 2201.0.0 %n (>= 2.22.4-1) + %p/lib/libglib-2.0.0.dylib 2201.0.0 %n (>= 2.22.4-1) + %p/lib/libgmodule-2.0.0.dylib 2201.0.0 %n (>= 2.22.4-1) + %p/lib/libgobject-2.0.0.dylib 2201.0.0 %n (>= 2.22.4-1) + %p/lib/libgthread-2.0.0.dylib 2201.0.0 %n (>= 2.22.4-1) +<< +DocFiles: << + AUTHORS + docs/reference/AUTHORS:AUTHORS.docs.reference + gmodule/AUTHORS:AUTHORS.gmodule + ChangeLog* + docs/reference/ChangeLog:ChangeLog.docs.reference + gio/ChangeLog:ChangeLog.gio + gmodule/ChangeLog:ChangeLog.gmodule + gobject/ChangeLog:ChangeLog.gobject + gthread/ChangeLog:ChangeLog.gthread + po/ChangeLog:ChangeLog.po + COPYING NEWS README +<< +SplitOff: << + Package: glib2-dev + Depends: << + dpkg-base-files, + glib2-shlibs (= %v-%r), + libgettext8-shlibs, + libiconv + << + Description: Handy library of utility functions + Replaces: glib2 (<< 2.18.4-2) + BuildDependsOnly: True + Files: << + bin + include + lib/glib-2.0 + lib/lib*-2.0.{dylib,la} + lib/pkgconfig + share/aclocal + share/glib-2.0 + share/gtk-doc + share/man + << + DocFiles: << + AUTHORS + docs/reference/AUTHORS:AUTHORS.docs.reference + gmodule/AUTHORS:AUTHORS.gmodule + ChangeLog* + docs/reference/ChangeLog:ChangeLog.docs.reference + gio/ChangeLog:ChangeLog.gio + gmodule/ChangeLog:ChangeLog.gmodule + gobject/ChangeLog:ChangeLog.gobject + gthread/ChangeLog:ChangeLog.gthread + po/ChangeLog:ChangeLog.po + COPYING NEWS README + << + DescUsage: << +Other packages may need to pass explicit -lintl when linking. glib2 +used to publish this flag via .pc and .la, so others' sloppiness +previously had no visible effect. As of 2.22.4-2, the default +glib-2.0.pc does still contain that flag whereas the one in +%p/lib/glib-2.0/pkgconfig-strict does not. Packages should test with +that path in their PKG_CONFIG_PATH and add explicit flag-passing if it +fails in order to prepare for the future when the default .pc may not +have that flag. + << +<< +Description: Handy library of utility functions +DescPort: << + glib2 provides etc/glib-2.0/charset.alias for darwin because there's + no system-wide charset.alias. + See also: http://bugzilla.gnome.org/show_bug.cgi?id=346816 + Can we figure out how to generate this (gettext-tools config.charset + for host=darwin5?)or import it from an authoritative upstream source + instead of dragging along a legacy file in %N.patch? + + check uses some C++ but it doesn't leak out into the installed + package + + Patch child-test.c for our location of `true`. See: + http://bugzilla.gnome.org/show_bug.cgi?id=495690 + + We need to set LANG=C when doing 'make check', else a previously + installed glib2 will trigger a crash caused by a bug in the old + de.po. See http://bugzilla.gnome.org/show_bug.cgi?id=310731 + Need to figure out how to patch tests/Makefile to use the nascent + gettext dictionaries in preference to installed ones. + + poll() is broken on 10.4 but not 10.3; force internal emulation + to regardless of config result so that lib builds the same everywhere + and is portable. + + Need to patch gutils.h for inline semantics of gcc on OS X >= 10.5. + gcc version is not sufficient to determine it (appears to be xcode- + specific patches to gcc), so test Apple gcc build number. See: + http://bugzilla.gnome.org/show_bug.cgi?id=315437 (patch #96366 does + not work...not __GNUC_PREREQ). No idea a portable solution, but + msachs says "static inline" is right for this case, so hardcode it. + 2.14.5 does it "differently" but still looks like the same wrong + patch, so leaving our existing "static inline" hard-coding patch. + + Fix paths in glib-gettextize. See: + http://bugzilla.gnome.org/show_bug.cgi?id=518309 + + Fix glib/gslice.c clobbering of errno. + See: http://bugzilla.gnome.org/show_bug.cgi?id=554092 + (patch from comments #14) + + Safer -framework flag to avoid future munging in .la. See: + http://bugzilla.gnome.org/show_bug.cgi?id=566994 + Flag is not passed at all via .la now, but okay because we + don't have static libs and the shared libs get what they need + via dyld. + + Not fixing RTLD_GLOBAL configure test. See: + http://bugzilla.gnome.org/show_bug.cgi?id=583010 + + libgio needs libresolv to get _res_9_* symbols. See: + https://bugzilla.gnome.org/show_bug.cgi?id=606857 + + Hidden-visibility is only partially supported on non-ELF and + causes problems on 10.7 due to use of weak aliases. Removed in + future glib upstream, so scrap it here too. See: + http://permalink.gmane.org/gmane.os.apple.fink.gnome/2592 + + String sorting ("collation") is broken on x86_64. See: + https://bugzilla.gnome.org/show_bug.cgi?id=612019 + https://bugzilla.gnome.org/show_bug.cgi?id=673047 +<< +DescPackaging: << + Library contains some C symbols whose real name looks like C++ + munges. This should not be construed to mean that glib2 is C++ nor + that it needs to obey Fink C++ packaging rules. C++ is also + used in some self-tests. + + Prior to 2.12.0-1, %N contained the gettext catalogs and the + charset.alias file, which are used by the %N-shlibs files. Starting + in 2.12.0-1, they are all now in the %N-shlibs package, and %N is a + dummy for compatibility and upgrades. + More recently, %N was nuked entirely. + + Builds with included pcre instead of external lib to avoid need to + cascade deps on pcre packages + + gtester-report claims to require python >= 2.4, but it appears + to run with 2.3. Adjust to allow that version so can use + Apple's on OS X < 10.5 also (py2.5 comes with OS X 10.5). See: + http://bugzilla.gnome.org/show_bug.cgi?id=553716 + + The following are newly deprecated in glib2 2.18.1 since 2.14.6: + g_assert_warning + G_GNUC_FUNCTION + G_GNUC_PRETTY_FUNCTION + And in 2.20: + g_volume_monitor_adopt_orphan_mount + And in 2.22: + g_drive_eject + g_drive_eject_finish + g_file_unmount_mountable + g_file_unmount_mountable_finish + g_file_eject_mountable + g_file_eject_mountable_finish + g_mount_unmount + g_mount_unmount_finish + g_volume_eject + g_volume_eject_finish + External packages and out-of-sync gnome core might still be + using them, so may as well leave them undeprecated until jump + to glib3. + + Leaving G_DISABLE_SINGLE_INCLUDES undefined in most places, + though in the future it will become defined... + + Disable the FAM plugin for gio. Darwin doesn't have libfam. + Fink has gamin, a third-party implementation available in + fink, has a dependency on glib. Eventually package gio-fam + separately to avoid circular dependency. But even if compiled + and installed, gio-directory-monitoring doesn't work (does not + detect dir creation/renaming/deletion or contained-file + creation/deletion) so better to leave it out--gives runtime + "Unable to find default local directory monitor type" + diagnostic rather than silent non-workingness. Really should + get a native file/directory monitor implementation, maybe + using kqueue or FSEvents. See: + https://bugzilla.gnome.org/show_bug.cgi?id=543148 + + libgio sometimes runs %p/bin/update-desktop-database from the + desktop-file-utils package or %p/bin/update-mime-database from + the shared-mime-info package, but those programs link against + libglib. Leave it as %N-shlibs:Recommends:... to break the + circular dependency. Ick. Required for self-test, so would + need to build (but not test) glib2, then build d-f-u & s-m-i + against it, then rebuild glib2 with testing enabled. Ick^2. + + Make sure the update-*-database programs can be found even if + run from a non-fink'ed shell: explicit path and fink XDG vars. + + Don't install gdb files. They aren't named correctly and it's + not clear they are usable on darwin. See: + https://bugzilla.gnome.org/show_bug.cgi?id=606877 + Also, they don't even get installed in the correct location. + See: https://bugzilla.gnome.org/show_bug.cgi?id=606872 + + All libs are shared-only and all symbols are resolved via dyld + so do not export dependencies' -l flags in via pkg-config. + Reduces BuildDepends inheritance of things that are not in + public interface. + + Upstream doc upgrade to gconvert.c for compatibility with + newer gtk-doc. + https://git.gnome.org/browse/glib/commit/glib/gconvert.c?id=b5fb6b4bbfe5903be06a515449a07cf1f1119c26 + + Using pkgconf instead of pkg-config at build-time to break + dependency loop. The compiled pkg-config program uses glib, so + it's better to have it use fink's actual (patched, tested, + etc.) one than embedding its own cloned code fragments from + glib upstream. +<< +License: LGPL +Maintainer: The Gnome Core Team +Homepage: http://www.gtk.org diff --git a/10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.patch b/10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.patch new file mode 100644 index 00000000000..6d7d9b09859 --- /dev/null +++ b/10.9-libcxx/stable/main/finkinfo/gnome/glib2-shlibs-2.22.4.patch @@ -0,0 +1,575 @@ +diff -Nurd -x'*~' glib-2.22.4.orig/configure glib-2.22.4/configure +--- glib-2.22.4.orig/configure 2010-01-06 19:48:41.000000000 -0500 ++++ glib-2.22.4/configure 2010-01-13 08:56:35.000000000 -0500 +@@ -4801,7 +4801,7 @@ + #define HAVE_CARBON 1 + _ACEOF + +- LDFLAGS="$LDFLAGS -framework Carbon" ++ LDFLAGS="$LDFLAGS -Wl,-framework,Carbon" + fi + + +@@ -8323,13 +8323,13 @@ + + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. +- { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.4" >&5 +-$as_echo_n "checking whether $PYTHON version >= 2.4... " >&6; } ++ { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.3" >&5 ++$as_echo_n "checking whether $PYTHON version >= 2.3... " >&6; } + prog="import sys + # split strings by '.' and convert to numeric. Append some zeros + # because we need at least 4 digits for the hex conversion. + # map returns an iterator in Python 3.0 and a list in 2.x +-minver = list(map(int, '2.4'.split('.'))) + [0, 0, 0] ++minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0] + minverhex = 0 + # xrange is not present in Python 3.0 and range returns an iterator + for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +@@ -40056,6 +40056,9 @@ + G_THREAD_CFLAGS="-D_THREAD_SAFE" + fi + ;; ++ *-darwin*) ++ # Nothing needed. ++ ;; + *-dg-dgux*) # DG/UX + G_THREAD_CFLAGS="-D_REENTRANT -D_POSIX4A_DRAFT10_SOURCE" + ;; +diff -Nurd -x'*~' glib-2.22.4.orig/gio/Makefile.in glib-2.22.4/gio/Makefile.in +--- glib-2.22.4.orig/gio/Makefile.in 2010-01-06 19:48:36.000000000 -0500 ++++ glib-2.22.4/gio/Makefile.in 2010-01-13 09:57:06.000000000 -0500 +@@ -677,6 +677,7 @@ + $(SELINUX_LIBS) \ + $(GLIB_LIBS) \ + $(XATTR_LIBS) \ ++ -lresolv \ + $(NULL) + + @PLATFORM_WIN32_TRUE@no_undefined = -no-undefined +diff -Nurd -x'*~' glib-2.22.4.orig/gio/gdesktopappinfo.c glib-2.22.4/gio/gdesktopappinfo.c +--- glib-2.22.4.orig/gio/gdesktopappinfo.c 2010-01-06 19:24:28.000000000 -0500 ++++ glib-2.22.4/gio/gdesktopappinfo.c 2010-01-13 08:35:24.000000000 -0500 +@@ -1396,7 +1396,7 @@ + g_file_set_contents (filename, contents, -1, NULL); + g_free (contents); + +- run_update_command ("update-mime-database", "mime"); ++ run_update_command ("@PREFIX@/bin/update-mime-database", "mime"); + } + g_free (filename); + +@@ -1527,7 +1527,7 @@ + info->filename = filename; + info->desktop_id = desktop_id; + +- run_update_command ("update-desktop-database", "applications"); ++ run_update_command ("@PREFIX@/bin/update-desktop-database", "applications"); + + return TRUE; + } +diff -Nurd -x'*~' glib-2.22.4.orig/gio/gdrive.h glib-2.22.4/gio/gdrive.h +--- glib-2.22.4.orig/gio/gdrive.h 2009-08-28 22:52:22.000000000 -0400 ++++ glib-2.22.4/gio/gdrive.h 2010-01-13 09:13:20.000000000 -0500 +@@ -164,7 +164,7 @@ + gboolean g_drive_is_media_check_automatic (GDrive *drive); + gboolean g_drive_can_poll_for_media (GDrive *drive); + gboolean g_drive_can_eject (GDrive *drive); +-#ifndef G_DISABLE_DEPRECATED ++#if 1 + void g_drive_eject (GDrive *drive, + GMountUnmountFlags flags, + GCancellable *cancellable, +diff -Nurd -x'*~' glib-2.22.4.orig/gio/gfile.h glib-2.22.4/gio/gfile.h +--- glib-2.22.4.orig/gio/gfile.h 2010-01-06 19:19:12.000000000 -0500 ++++ glib-2.22.4/gio/gfile.h 2010-01-13 09:13:13.000000000 -0500 +@@ -867,7 +867,7 @@ + GFile * g_file_mount_mountable_finish (GFile *file, + GAsyncResult *result, + GError **error); +-#ifndef G_DISABLE_DEPRECATED ++#if 1 + void g_file_unmount_mountable (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, +@@ -886,7 +886,7 @@ + gboolean g_file_unmount_mountable_with_operation_finish (GFile *file, + GAsyncResult *result, + GError **error); +-#ifndef G_DISABLE_DEPRECATED ++#if 1 + void g_file_eject_mountable (GFile *file, + GMountUnmountFlags flags, + GCancellable *cancellable, +diff -Nurd -x'*~' glib-2.22.4.orig/gio/gmount.h glib-2.22.4/gio/gmount.h +--- glib-2.22.4.orig/gio/gmount.h 2010-01-06 19:19:12.000000000 -0500 ++++ glib-2.22.4/gio/gmount.h 2010-01-13 09:12:58.000000000 -0500 +@@ -167,7 +167,7 @@ + gboolean g_mount_can_unmount (GMount *mount); + gboolean g_mount_can_eject (GMount *mount); + +-#ifndef G_DISABLE_DEPRECATED ++#if 1 + void g_mount_unmount (GMount *mount, + GMountUnmountFlags flags, + GCancellable *cancellable, +diff -Nurd -x'*~' glib-2.22.4.orig/gio/gunixmounts.c glib-2.22.4/gio/gunixmounts.c +--- glib-2.22.4.orig/gio/gunixmounts.c 2009-03-31 19:04:20.000000000 -0400 ++++ glib-2.22.4/gio/gunixmounts.c 2010-01-13 08:39:56.000000000 -0500 +@@ -243,6 +243,7 @@ + "/proc", + "/sbin", + "/net", ++ "@PERFIX@", + NULL + }; + +diff -Nurd -x'*~' glib-2.22.4.orig/gio/gvolume.h glib-2.22.4/gio/gvolume.h +--- glib-2.22.4.orig/gio/gvolume.h 2009-08-28 22:52:23.000000000 -0400 ++++ glib-2.22.4/gio/gvolume.h 2010-01-13 09:12:51.000000000 -0500 +@@ -180,7 +180,7 @@ + gboolean g_volume_mount_finish (GVolume *volume, + GAsyncResult *result, + GError **error); +-#ifndef G_DISABLE_DEPRECATED ++#if 1 + void g_volume_eject (GVolume *volume, + GMountUnmountFlags flags, + GCancellable *cancellable, +diff -Nurd -x'*~' glib-2.22.4.orig/gio/gvolumemonitor.h glib-2.22.4/gio/gvolumemonitor.h +--- glib-2.22.4.orig/gio/gvolumemonitor.h 2009-08-28 22:52:23.000000000 -0400 ++++ glib-2.22.4/gio/gvolumemonitor.h 2010-01-13 09:11:16.000000000 -0500 +@@ -142,7 +142,7 @@ + GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor, + const char *uuid); + +-#ifndef G_DISABLE_DEPRECATED ++#if 1 + GVolume * g_volume_monitor_adopt_orphan_mount (GMount *mount); + #endif + +diff -Nurd -x'*~' glib-2.22.4.orig/gio/xdgmime/xdgmime.c glib-2.22.4/gio/xdgmime/xdgmime.c +--- glib-2.22.4.orig/gio/xdgmime/xdgmime.c 2009-10-06 16:07:59.000000000 -0400 ++++ glib-2.22.4/gio/xdgmime/xdgmime.c 2010-01-13 08:35:09.000000000 -0500 +@@ -257,7 +257,7 @@ + + xdg_data_dirs = getenv ("XDG_DATA_DIRS"); + if (xdg_data_dirs == NULL) +- xdg_data_dirs = "/usr/local/share/:/usr/share/"; ++ xdg_data_dirs = "@PREFIX@/share:/usr/local/share/:/usr/share/"; + + ptr = xdg_data_dirs; + +diff -Nurd -x'*~' glib-2.22.4.orig/glib/gconvert.c glib-2.22.4/glib/gconvert.c +--- glib-2.22.4.orig/glib/gconvert.c 2009-11-01 15:01:21.000000000 -0500 ++++ glib-2.22.4/glib/gconvert.c 2014-02-21 12:28:25.000000000 -0500 +@@ -539,7 +539,9 @@ + * g_convert_with_iconv: + * @str: the string to convert + * @len: the length of the string, or -1 if the string is +- * nul-terminated. ++ * nul-terminated (Note that some encodings may allow nul ++ * bytes to occur inside strings. In that case, using -1 ++ * for the @len parameter is unsafe) + * @converter: conversion descriptor from g_iconv_open() + * @bytes_read: location to store the number of bytes in the + * input string that were successfully converted, or %NULL. +@@ -556,20 +558,15 @@ + * + * Converts a string from one character set to another. + * +- * Note that you should use g_iconv() for streaming +- * conversions +- * ++ * Note that you should use g_iconv() for streaming conversions. + * Despite the fact that @byes_read can return information about partial +- * characters, the g_convert_... functions +- * are not generally suitable for streaming. If the underlying converter +- * being used maintains internal state, then this won't be preserved +- * across successive calls to g_convert(), g_convert_with_iconv() or +- * g_convert_with_fallback(). (An example of this is the GNU C converter +- * for CP1255 which does not emit a base character until it knows that +- * the next character is not a mark that could combine with the base +- * character.) +- * +- * . ++ * characters, the g_convert_... functions are not generally suitable ++ * for streaming. If the underlying converter maintains internal state, ++ * then this won't be preserved across successive calls to g_convert(), ++ * g_convert_with_iconv() or g_convert_with_fallback(). (An example of ++ * this is the GNU C converter for CP1255 which does not emit a base ++ * character until it knows that the next character is not a mark that ++ * could combine with the base character.) + * + * Return value: If the conversion was successful, a newly allocated + * nul-terminated string, which must be freed with +@@ -697,13 +694,9 @@ + * g_convert: + * @str: the string to convert + * @len: the length of the string, or -1 if the string is +- * nul-terminated +- +- Note that some encodings may allow nul bytes to +- occur inside strings. In that case, using -1 for +- the @len parameter is unsafe. +- +- . ++ * nul-terminated (Note that some encodings may allow nul ++ * bytes to occur inside strings. In that case, using -1 ++ * for the @len parameter is unsafe) + * @to_codeset: name of character set into which to convert @str + * @from_codeset: character set of @str. + * @bytes_read: location to store the number of bytes in the +@@ -721,8 +714,15 @@ + * + * Converts a string from one character set to another. + * +- * Note that you should use g_iconv() for streaming +- * conversions. ++ * Note that you should use g_iconv() for streaming conversions. ++ * Despite the fact that @byes_read can return information about partial ++ * characters, the g_convert_... functions are not generally suitable ++ * for streaming. If the underlying converter maintains internal state, ++ * then this won't be preserved across successive calls to g_convert(), ++ * g_convert_with_iconv() or g_convert_with_fallback(). (An example of ++ * this is the GNU C converter for CP1255 which does not emit a base ++ * character until it knows that the next character is not a mark that ++ * could combine with the base character.) + * + * Return value: If the conversion was successful, a newly allocated + * nul-terminated string, which must be freed with +@@ -770,7 +770,9 @@ + * g_convert_with_fallback: + * @str: the string to convert + * @len: the length of the string, or -1 if the string is +- * nul-terminated. ++ * nul-terminated (Note that some encodings may allow nul ++ * bytes to occur inside strings. In that case, using -1 ++ * for the @len parameter is unsafe) + * @to_codeset: name of character set into which to convert @str + * @from_codeset: character set of @str. + * @fallback: UTF-8 string to use in place of character not +@@ -796,8 +798,15 @@ + * to @to_codeset in their iconv() functions, + * in which case GLib will simply return that approximate conversion. + * +- * Note that you should use g_iconv() for streaming +- * conversions. ++ * Note that you should use g_iconv() for streaming conversions. ++ * Despite the fact that @byes_read can return information about partial ++ * characters, the g_convert_... functions are not generally suitable ++ * for streaming. If the underlying converter maintains internal state, ++ * then this won't be preserved across successive calls to g_convert(), ++ * g_convert_with_iconv() or g_convert_with_fallback(). (An example of ++ * this is the GNU C converter for CP1255 which does not emit a base ++ * character until it knows that the next character is not a mark that ++ * could combine with the base character.) + * + * Return value: If the conversion was successful, a newly allocated + * nul-terminated string, which must be freed with +@@ -1055,7 +1064,9 @@ + * @opsysstring: a string in the encoding of the current locale. On Windows + * this means the system codepage. + * @len: the length of the string, or -1 if the string is +- * nul-terminated. ++ * nul-terminated (Note that some encodings may allow nul ++ * bytes to occur inside strings. In that case, using -1 ++ * for the @len parameter is unsafe) + * @bytes_read: location to store the number of bytes in the + * input string that were successfully converted, or %NULL. + * Even if the conversion was successful, this may be +@@ -1096,7 +1107,9 @@ + * g_locale_from_utf8: + * @utf8string: a UTF-8 encoded string + * @len: the length of the string, or -1 if the string is +- * nul-terminated. ++ * nul-terminated (Note that some encodings may allow nul ++ * bytes to occur inside strings. In that case, using -1 ++ * for the @len parameter is unsafe) + * @bytes_read: location to store the number of bytes in the + * input string that were successfully converted, or %NULL. + * Even if the conversion was successful, this may be +@@ -1308,7 +1321,9 @@ + * g_filename_to_utf8: + * @opsysstring: a string in the encoding for filenames + * @len: the length of the string, or -1 if the string is +- * nul-terminated. ++ * nul-terminated (Note that some encodings may allow nul ++ * bytes to occur inside strings. In that case, using -1 ++ * for the @len parameter is unsafe) + * @bytes_read: location to store the number of bytes in the + * input string that were successfully converted, or %NULL. + * Even if the conversion was successful, this may be +diff -Nurd -x'*~' glib-2.22.4.orig/glib/gmacros.h glib-2.22.4/glib/gmacros.h +--- glib-2.22.4.orig/glib/gmacros.h 2009-03-31 19:04:20.000000000 -0400 ++++ glib-2.22.4/glib/gmacros.h 2010-01-13 09:11:26.000000000 -0500 +@@ -120,7 +120,8 @@ + #define G_GNUC_WARN_UNUSED_RESULT + #endif /* __GNUC__ */ + +-#ifndef G_DISABLE_DEPRECATED ++#if 1 ++/* don't supress (if G_DISABLE_DEPRECATED) for fink yet */ + /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with + * macros, so we can refer to them as strings unconditionally. + * usage not-recommended since gcc-3.0 +diff -Nurd -x'*~' glib-2.22.4.orig/glib/gmessages.h glib-2.22.4/glib/gmessages.h +--- glib-2.22.4.orig/glib/gmessages.h 2009-08-28 22:52:23.000000000 -0400 ++++ glib-2.22.4/glib/gmessages.h 2010-01-13 09:11:36.000000000 -0500 +@@ -121,7 +121,8 @@ + int line, + const char *func, + const char *warnexpr); +-#ifndef G_DISABLE_DEPRECATED ++#if 1 ++/* don't supress (if G_DISABLE_DEPRECATED) for fink yet */ + void g_assert_warning (const char *log_domain, + const char *file, + const int line, +diff -Nurd -x'*~' glib-2.22.4.orig/glib/gslice.c glib-2.22.4/glib/gslice.c +--- glib-2.22.4.orig/glib/gslice.c 2009-03-31 19:04:20.000000000 -0400 ++++ glib-2.22.4/glib/gslice.c 2010-01-13 09:06:27.000000000 -0500 +@@ -1131,19 +1131,18 @@ + gsize memsize) + { + gpointer aligned_memory = NULL; +- gint err = ENOMEM; + #if HAVE_COMPLIANT_POSIX_MEMALIGN ++ gint err; + err = posix_memalign (&aligned_memory, alignment, memsize); ++ if (!aligned_memory) ++ errno = err; + #elif HAVE_MEMALIGN +- errno = 0; + aligned_memory = memalign (alignment, memsize); +- err = errno; + #elif HAVE_VALLOC +- errno = 0; + aligned_memory = valloc (memsize); +- err = errno; + #else + /* simplistic non-freeing page allocator */ ++ gint err = ENOMEM; + mem_assert (alignment == sys_page_size); + mem_assert (memsize <= sys_page_size); + if (!compat_valloc_trash) +@@ -1162,9 +1161,9 @@ + } + } + aligned_memory = g_trash_stack_pop (&compat_valloc_trash); +-#endif + if (!aligned_memory) + errno = err; ++#endif + return aligned_memory; + } + +diff -Nurd -x'*~' glib-2.22.4.orig/glib/gutils.c glib-2.22.4/glib/gutils.c +--- glib-2.22.4.orig/glib/gutils.c 2009-12-21 09:20:17.000000000 -0500 ++++ glib-2.22.4/glib/gutils.c 2010-01-13 08:34:24.000000000 -0500 +@@ -2779,7 +2779,7 @@ + gchar *data_dirs = (gchar *) g_getenv ("XDG_DATA_DIRS"); + + if (!data_dirs || !data_dirs[0]) +- data_dirs = "/usr/local/share/:/usr/share/"; ++ data_dirs = "@PREFIX@/share:/usr/local/share/:/usr/share/"; + + data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif +@@ -2833,7 +2833,7 @@ + conf_dirs = (gchar *) g_getenv ("XDG_CONFIG_DIRS"); + + if (!conf_dirs || !conf_dirs[0]) +- conf_dirs = "/etc/xdg"; ++ conf_dirs = "@PREFIX@/etc/xdg"; + + conf_dir_vector = g_strsplit (conf_dirs, G_SEARCHPATH_SEPARATOR_S, 0); + #endif +diff -Nurd -x'*~' glib-2.22.4.orig/glib/gutils.h glib-2.22.4/glib/gutils.h +--- glib-2.22.4.orig/glib/gutils.h 2010-01-06 19:19:20.000000000 -0500 ++++ glib-2.22.4/glib/gutils.h 2010-01-13 08:33:50.000000000 -0500 +@@ -101,7 +101,11 @@ + # define G_INLINE_FUNC + # undef G_CAN_INLINE + #elif defined (__GNUC__) ++#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 5400) ++# define G_INLINE_FUNC static inline ++#else + # define G_INLINE_FUNC static __inline __attribute__ ((unused)) ++#endif + #elif defined (G_CAN_INLINE) + # define G_INLINE_FUNC static inline + #else /* can't inline */ +diff -Nurd -x'*~' glib-2.22.4.orig/glib/libcharset/Makefile.in glib-2.22.4/glib/libcharset/Makefile.in +--- glib-2.22.4.orig/glib/libcharset/Makefile.in 2010-01-06 19:48:38.000000000 -0500 ++++ glib-2.22.4/glib/libcharset/Makefile.in 2010-01-13 08:33:32.000000000 -0500 +@@ -310,7 +310,7 @@ + codeset.m4 update.sh make-patch.sh libcharset-glib.patch + TEST_PROGS = + INCLUDES = \ +- -DLIBDIR=\"$(libdir)\" -I$(top_srcdir) ++ -DLIBDIR=\"$(sysconfdir)/glib-2.0\" -I$(top_srcdir) + + noinst_LTLIBRARIES = libcharset.la + libcharset_la_SOURCES = \ +@@ -318,8 +318,8 @@ + localcharset.h \ + localcharset.c + +-charset_alias = $(DESTDIR)$(libdir)/charset.alias +-charset_tmp = $(DESTDIR)$(libdir)/charset.tmp ++charset_alias = $(DESTDIR)$(sysconfdir)/glib-2.0/charset.alias ++charset_tmp = $(DESTDIR)$(sysconfdir)/glib-2.0/charset.tmp + SUFFIXES = .sed .sin + CLEANFILES = charset.alias ref-add.sed ref-del.sed + all: all-am +@@ -658,7 +658,7 @@ + # run make test as part of make check + check-local: test + install-exec-local: all-local +- $(mkinstalldirs) $(DESTDIR)$(libdir) ++ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/glib-2.0 + if test -f $(charset_alias); then \ + sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ +diff -Nurd -x'*~' glib-2.22.4.orig/glib/libcharset/charset.alias glib-2.22.4/glib/libcharset/charset.alias +--- glib-2.22.4.orig/glib/libcharset/charset.alias 1969-12-31 19:00:00.000000000 -0500 ++++ glib-2.22.4/glib/libcharset/charset.alias 2010-01-13 08:32:49.000000000 -0500 +@@ -0,0 +1,111 @@ ++# This file contains a table of character encoding aliases, ++# suitable for operating system 'darwin'. ++C ASCII ++bg_BG UTF-8 ++bg_BG.CP1251 CP1251 ++cs_CZ UTF-8 ++cs_CZ.ISO8859-2 ISO-8859-2 ++da_DK UTF-8 ++da_DK.ISO8859-1 ISO-8859-1 ++da_DK.ISO8859-15 ISO-8859-15 ++de_AT UTF-8 ++de_AT.ISO8859-1 ISO-8859-1 ++de_AT.ISO8859-15 ISO-8859-15 ++de_CH UTF-8 ++de_CH.ISO8859-1 ISO-8859-1 ++de_CH.ISO8859-15 ISO-8859-15 ++de_DE UTF-8 ++de_DE.ISO8859-1 ISO-8859-1 ++de_DE.ISO8859-15 ISO-8859-15 ++en_AU UTF-8 ++en_AU.ISO8859-1 ISO-8859-1 ++en_AU.ISO8859-15 ISO-8859-15 ++en_AU.US-ASCII ASCII ++en_CA UTF-8 ++en_CA.ISO8859-1 ISO-8859-1 ++en_CA.ISO8859-15 ISO-8859-15 ++en_CA.US-ASCII ASCII ++en_GB UTF-8 ++en_GB.ISO8859-1 ISO-8859-1 ++en_GB.ISO8859-15 ISO-8859-15 ++en_GB.US-ASCII ASCII ++en_US UTF-8 ++en_US.ISO8859-1 ISO-8859-1 ++en_US.ISO8859-15 ISO-8859-15 ++en_US.US-ASCII ASCII ++es_ES UTF-8 ++es_ES.ISO8859-1 ISO-8859-1 ++es_ES.ISO8859-15 ISO-8859-15 ++fi_FI UTF-8 ++fi_FI.ISO8859-1 ISO-8859-1 ++fi_FI.ISO8859-15 ISO-8859-15 ++fr_BE UTF-8 ++fr_BE.ISO8859-1 ISO-8859-1 ++fr_BE.ISO8859-15 ISO-8859-15 ++fr_CA UTF-8 ++fr_CA.ISO8859-1 ISO-8859-1 ++fr_CA.ISO8859-15 ISO-8859-15 ++fr_CH UTF-8 ++fr_CH.ISO8859-1 ISO-8859-1 ++fr_CH.ISO8859-15 ISO-8859-15 ++fr_FR UTF-8 ++fr_FR.ISO8859-1 ISO-8859-1 ++fr_FR.ISO8859-15 ISO-8859-15 ++hr_HR UTF-8 ++hr_HR.ISO8859-2 ISO-8859-2 ++hu_HU UTF-8 ++hu_HU.ISO8859-2 ISO-8859-2 ++is_IS UTF-8 ++is_IS.ISO8859-1 ISO-8859-1 ++is_IS.ISO8859-15 ISO-8859-15 ++it_CH UTF-8 ++it_CH.ISO8859-1 ISO-8859-1 ++it_CH.ISO8859-15 ISO-8859-15 ++it_IT UTF-8 ++it_IT.ISO8859-1 ISO-8859-1 ++it_IT.ISO8859-15 ISO-8859-15 ++ja_JP UTF-8 ++ja_JP.EUC EUC-JP ++ja_JP.SJIS SHIFT_JIS ++ko_KR UTF-8 ++ko_KR.EUC EUC-KR ++la_LN UTF-8 ++la_LN.ISO8859-1 ISO-8859-1 ++la_LN.ISO8859-2 ISO-8859-2 ++la_LN.ISO8859-4 ISO-8859-4 ++la_LN.ISO8859-15 ISO-8859-15 ++la_LN.US-ASCII ASCII ++lt_LT UTF-8 ++lt_LT.ISO8859-4 ISO-8859-4 ++nl_BE UTF-8 ++nl_BE.ISO8869-1 ISO-8859-1 ++nl_BE.ISO8869-15 ISO-8859-15 ++nl_NL UTF-8 ++nl_NL.ISO8869-1 ISO-8859-1 ++nl_NL.ISO8869-15 ISO-8859-15 ++no_NO UTF-8 ++no_NO.ISO8869-1 ISO-8859-1 ++no_NO.ISO8869-15 ISO-8859-15 ++pl_PL UTF-8 ++pl_PL.ISO8859-2 ISO-8859-2 ++pt_PT UTF-8 ++pt_PT.ISO8859-1 ISO-8859-1 ++pt_PT.ISO8859-15 ISO-8859-15 ++ru_RU UTF-8 ++ru_RU.CP866 CP866 ++ru_RU.ISO8859-5 ISO-8859-5 ++ru_RU.KOI8-R KOI8-R ++ru_RU.cp1251 CP1251 ++ru_RU.koi8r KOI8-R ++sl_SI UTF-8 ++sl_SI.ISO8859-2 ISO-8859-2 ++sv_SE UTF-8 ++sv_SE.ISO8859-1 ISO-8859-1 ++sv_SE.ISO8859-15 ISO-8859-15 ++uk_UA UTF-8 ++uk_UA.KOI8-U KOI8-U ++uk_UA.cp1251 CP1251 ++zh_CN UTF-8 ++zh_CN.EUC GB2312 ++zh_TW UTF-8 ++zh_TW.Big5 BIG5 +diff -Nurd -x'*~' glib-2.22.4.orig/glib-gettextize.in glib-2.22.4/glib-gettextize.in +--- glib-2.22.4.orig/glib-gettextize.in 2009-03-31 19:04:20.000000000 -0400 ++++ glib-2.22.4/glib-gettextize.in 2010-01-13 08:31:30.000000000 -0500 +@@ -49,8 +49,8 @@ + ;; + esac + +-datadir=@datadir@ + datarootdir=@datarootdir@ ++datadir=@datadir@ + + gettext_dir=$prefix/share/glib-2.0/gettext + +diff -Nurd -x'*~' glib-2.22.4.orig/tests/child-test.c glib-2.22.4/tests/child-test.c +--- glib-2.22.4.orig/tests/child-test.c 2009-03-31 19:04:20.000000000 -0400 ++++ glib-2.22.4/tests/child-test.c 2010-01-13 08:30:21.000000000 -0500 +@@ -175,7 +175,7 @@ + #ifdef G_OS_WIN32 + system ("ipconfig /all"); + #else +- system ("/bin/true"); ++ system ("/usr/bin/true"); + #endif + + alive = 2;