summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2009-05-04 22:06:51 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2009-05-04 22:06:51 +0000
commitc4d986d93e57f540cf83235426c8581cbd46ddc8 (patch)
tree35ea6bd8b540455a05a334cbdfac938f8df1275d /dev-libs/glib
parentmerkaartor: sync live ebuild with latest version ebuild (diff)
downloadhistorical-c4d986d93e57f540cf83235426c8581cbd46ddc8.tar.gz
historical-c4d986d93e57f540cf83235426c8581cbd46ddc8.tar.bz2
historical-c4d986d93e57f540cf83235426c8581cbd46ddc8.zip
Fix gio unref, bug #260301. Fix compilation of glib-2.18 with gcc 4.4, bug #264686.
Package-Manager: portage-2.2_rc31/cvs/Linux x86_64
Diffstat (limited to 'dev-libs/glib')
-rw-r--r--dev-libs/glib/ChangeLog11
-rw-r--r--dev-libs/glib/Manifest12
-rw-r--r--dev-libs/glib/files/glib-2.18.4-gcc44.patch607
-rw-r--r--dev-libs/glib/files/glib-2.20.1-gio-unref.patch27
-rw-r--r--dev-libs/glib/glib-2.18.4-r2.ebuild95
-rw-r--r--dev-libs/glib/glib-2.20.1-r1.ebuild94
6 files changed, 841 insertions, 5 deletions
diff --git a/dev-libs/glib/ChangeLog b/dev-libs/glib/ChangeLog
index 740a99d558fc..6299b260e390 100644
--- a/dev-libs/glib/ChangeLog
+++ b/dev-libs/glib/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-libs/glib
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/ChangeLog,v 1.367 2009/05/04 21:24:07 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/ChangeLog,v 1.368 2009/05/04 22:06:50 eva Exp $
+
+*glib-2.20.1-r1 (04 May 2009)
+*glib-2.18.4-r2 (04 May 2009)
+
+ 04 May 2009; Gilles Dartiguelongue <eva@gentoo.org>
+ +files/glib-2.18.4-gcc44.patch, +files/glib-2.20.1-gio-unref.patch,
+ +glib-2.18.4-r2.ebuild, +glib-2.20.1-r1.ebuild:
+ Fix gio unref, bug #260301. Fix compilation of glib-2.18 with gcc 4.4, bug
+ #264686.
*glib-2.20.1 (04 May 2009)
diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 36ac7a8293d7..dc37b5aed2e9 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -9,6 +9,8 @@ AUX glib-2.10.3-ia64-atomic-ops.patch 1058 RMD160 066e63a99739dc412fbed7f7731183
AUX glib-2.12.12-fbsd.patch 668 RMD160 d8bf399b7e0b417c4622b278282086418c1d3363 SHA1 b7a0f4d67083f2c9b4bbecd84a6d597dd0f0f9ed SHA256 23b0dc406d3d45fe125268b731af67147e83f6e38a63c7892828bdbfe1c31e8d
AUX glib-2.18.1-gdesktopappinfo-memleak-fix.patch 923 RMD160 d2faf5b5e56cbd18964a6ff9e16c9ab4a293b291 SHA1 3cc525ae5a72a136e6a6865fd798a8a243f62954 SHA256 4da338e3e1406a8a6097990173abe1ba56a3440df35f610524bcf243f69afafe
AUX glib-2.18.1-workaround-gio-test-failure-without-userpriv.patch 616 RMD160 dd06abe9298d6e3e4d3eda0d5d155f1545dfd1aa SHA1 92164aa1b29f49cf62fc366231f2046b8b3def52 SHA256 e64ad4fbd67f142f5a19b29eab323bf18856309ed064e7a9f838b6c1c38a8adb
+AUX glib-2.18.4-gcc44.patch 19924 RMD160 1367b6688763c563dec522ed38c10ed3c0b0a59a SHA1 4cb3712f3e2aed7584e056855dfffff6bb32b2e5 SHA256 ca32d2fd0fa6874507e5316af84ee0bbc26ef28bb76eadb00cbc9155cc7d0515
+AUX glib-2.20.1-gio-unref.patch 984 RMD160 0268578b38d0fd8ce5a0cb600e9eba4d177b8ddc SHA1 9b7093d195d404e57449075433458b7005fb4515 SHA256 d1af209ca3c4151a909059dc2d9c40ed02e3e78bfb5e34509253e3d97b7f051a
AUX glib-2.6.3-testglib-ssp.patch 344 RMD160 6709acf85c52e39553e2e5ee93637f7e9cc7eca6 SHA1 403b249a460a9700669e754a562fb6974f3d6898 SHA256 c2ece3d7b4533e3bfbe8100df5d0824176d9dfa0b18697a8919162956c8ebfa8
AUX glib2-CVE-2008-4316.patch 2692 RMD160 3143c4df4f1063f8177a545d8cb5678a68c2980f SHA1 f89222a8f09e4e841480bbfbd4defd1e3d402e91 SHA256 c249ef6513c2490e9efe836e9d41a4a5f1056979748e2535b8ec7d13a71b1bf0
DIST glib-1.2.10-r1-as-needed.patch.bz2 9099 RMD160 5b7a21da6dc10112409bd885501a6976a2eb894d SHA1 468a7947b7d1688c2e7d61da80d40ca59422fbec SHA256 3bb8c45706f97b526da851061c89618bc258fa61f9100802c1340548e4bb2731
@@ -19,13 +21,15 @@ DIST glib-2.20.1.tar.bz2 5000484 RMD160 b2f1b23c8db482b335e7fa5f1c2fbb3165d43e9a
EBUILD glib-1.2.10-r5.ebuild 1764 RMD160 dc6544841f2acb73d5951100ce9c9182f4d9560e SHA1 e6649f70934720527f69995ab0b8c845032cfb0f SHA256 24442b44089e15432a4f1411d2d59dff9d5c2fbfb91c801b96087588ff71373b
EBUILD glib-2.16.6-r1.ebuild 2502 RMD160 c209350ec44cb1289cb1f07738c97be79f91ab30 SHA1 4f8fd4134d331774a9cd7053ed85ad26e80e678e SHA256 586877a1ab275ebaca61bf58c2884711629b386c63465a9854a6e9ba54ef223b
EBUILD glib-2.18.4-r1.ebuild 2552 RMD160 064211c357cab6429e6fb2f02711f9db5ab3682d SHA1 70f546b98cf0f8a1be389e5ca442d529eee5dfc8 SHA256 b698695ef88300974051b63549b4ee4c3ddad94027d110fb8de2ec14c3399c8c
+EBUILD glib-2.18.4-r2.ebuild 2777 RMD160 fe9fe4d460e8a8f66522ed80289339551c2d7550 SHA1 8f0c23e2dfbfa345e49db045143b97c5b772f194 SHA256 7ba89f6538dbdb32dcfc02ad506ed825bd7dae580061a423f6698bae891379e2
+EBUILD glib-2.20.1-r1.ebuild 2681 RMD160 a59a0ac5646ad239e8a6949dee76d29e4be14bcc SHA1 15e3675782ff69ed580b0019a2927279f034f1cf SHA256 ac003b813c3dd2fa8fd4b633c0dda09f31eac44cb8d9615c72a95000dc10a660
EBUILD glib-2.20.1.ebuild 2599 RMD160 a41df5162459a1688bd701bd96981310074b6d50 SHA1 c04209ff65fb07f22a7e017e1520fcf953a5c52c SHA256 740fa80baee38085f43ca5f079781487abe379c00157017c62b42a5b79cb1cf2
-MISC ChangeLog 44848 RMD160 728c2230da7101432b4d56bc890eb5641b47f422 SHA1 eeeb8f7c0853211a61c8eb9eda1e0276291fa493 SHA256 aa2181e569f802dd67162bc9cb9eb33fa994478a0f5b12c257137e3b1c77f6f8
+MISC ChangeLog 45172 RMD160 e0e6ab2d875778ea03a1bbbb07a3f27eeead161e SHA1 216ee743a0bba4e837f3316ea49c082962c929e3 SHA256 d593acb53c5f3ff48ab6e8333e4508c3ae4deaa4385d9099bc942b1a8b344af1
MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
-iEYEARECAAYFAkn/XP0ACgkQ1fmVwcYIWAbOYACfWIYR7HVHXF5eII6KJitbxU0/
-tDgAoMy4jfY1kBw2kGFLLG811czu32Os
-=RDtE
+iEYEARECAAYFAkn/ZwIACgkQ1fmVwcYIWAZFrQCeN8A9Nwmd+LlGahsA4/G7QXs4
+/B0AoNyRyLCFMqtBSUFJw35M+SQTxdVB
+=1ClX
-----END PGP SIGNATURE-----
diff --git a/dev-libs/glib/files/glib-2.18.4-gcc44.patch b/dev-libs/glib/files/glib-2.18.4-gcc44.patch
new file mode 100644
index 000000000000..6ad10a0a8173
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.18.4-gcc44.patch
@@ -0,0 +1,607 @@
+diff -Naur glib-2.18.4-orig/glib/gatomic.c glib-2.18.4/glib/gatomic.c
+--- glib-2.18.4-orig/glib/gatomic.c 2009-04-02 15:20:51.000000000 -0400
++++ glib-2.18.4/glib/gatomic.c 2009-04-02 15:36:21.000000000 -0400
+@@ -36,7 +36,7 @@
+ /* Adapted from CVS version 1.10 of glibc's sysdeps/i386/i486/bits/atomic.h
+ */
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -48,7 +48,7 @@
+ }
+
+ void
+-g_atomic_int_add (volatile gint *atomic,
++g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ __asm__ __volatile__ ("lock; addl %1,%0"
+@@ -57,7 +57,7 @@
+ }
+
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -75,7 +75,7 @@
+ * arguments and calling the former function */
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -103,7 +103,7 @@
+
+ # if GLIB_SIZEOF_VOID_P == 4 /* 32-bit system */
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -116,7 +116,7 @@
+ }
+ # elif GLIB_SIZEOF_VOID_P == 8 /* 64-bit system */
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -162,7 +162,7 @@
+ })
+ # if GLIB_SIZEOF_VOID_P == 4 /* 32-bit system */
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -188,7 +188,7 @@
+ }
+ # elif GLIB_SIZEOF_VOID_P == 8 /* 64-bit system */
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -220,7 +220,7 @@
+ /* Adapted from CVS version 1.9 of glibc's sysdeps/x86_64/bits/atomic.h
+ */
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -232,7 +232,7 @@
+ }
+
+ void
+-g_atomic_int_add (volatile gint *atomic,
++g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ __asm__ __volatile__ ("lock; addl %1,%0"
+@@ -241,7 +241,7 @@
+ }
+
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -255,7 +255,7 @@
+ }
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -277,7 +277,7 @@
+ /* Non-optimizing compile bails on the following two asm statements
+ * for reasons unknown to the author */
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result, temp;
+@@ -303,7 +303,7 @@
+
+ /* The same as above, to save a function call repeated here */
+ void
+-g_atomic_int_add (volatile gint *atomic,
++g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result, temp;
+@@ -327,7 +327,7 @@
+ }
+ # else /* !__OPTIMIZE__ */
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -339,7 +339,7 @@
+ }
+
+ void
+-g_atomic_int_add (volatile gint *atomic,
++g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -351,7 +351,7 @@
+
+ # if GLIB_SIZEOF_VOID_P == 4 /* 32-bit system */
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -383,7 +383,7 @@
+ }
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -415,7 +415,7 @@
+ }
+ # elif GLIB_SIZEOF_VOID_P == 8 /* 64-bit system */
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -449,7 +449,7 @@
+ }
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -489,7 +489,7 @@
+ /* Adapted from CVS version 1.8 of glibc's sysdeps/ia64/bits/atomic.h
+ */
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ return __sync_fetch_and_add (atomic, val);
+@@ -503,7 +503,7 @@
+ }
+
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -511,7 +511,7 @@
+ }
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -534,7 +534,7 @@
+
+ # if GLIB_SIZEOF_VOID_P == 4 /* 32-bit system */
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -546,7 +546,7 @@
+ }
+ # elif GLIB_SIZEOF_VOID_P == 8 /* 64-bit system */
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -590,7 +590,7 @@
+ }
+
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -604,7 +604,7 @@
+ }
+
+ void
+-g_atomic_int_add (volatile gint *atomic,
++g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ atomic_spin_lock();
+@@ -613,7 +613,7 @@
+ }
+
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -633,7 +633,7 @@
+ }
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -675,21 +675,21 @@
+ # endif
+
+ gint32
+-g_atomic_int_exchange_and_add (volatile gint32 *atomic,
++g_atomic_int_exchange_and_add (volatile gint32 G_GNUC_MAY_ALIAS *atomic,
+ gint32 val)
+ {
+ return InterlockedExchangeAdd (atomic, val);
+ }
+
+ void
+-g_atomic_int_add (volatile gint32 *atomic,
++g_atomic_int_add (volatile gint32 G_GNUC_MAY_ALIAS *atomic,
+ gint32 val)
+ {
+ InterlockedExchangeAdd (atomic, val);
+ }
+
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint32 *atomic,
++g_atomic_int_compare_and_exchange (volatile gint32 G_GNUC_MAY_ALIAS *atomic,
+ gint32 oldval,
+ gint32 newval)
+ {
+@@ -705,7 +705,7 @@
+ }
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -726,7 +726,7 @@
+ static GMutex *g_atomic_mutex;
+
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -741,7 +741,7 @@
+
+
+ void
+-g_atomic_int_add (volatile gint *atomic,
++g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ g_mutex_lock (g_atomic_mutex);
+@@ -750,7 +750,7 @@
+ }
+
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -770,7 +770,7 @@
+ }
+
+ gboolean
+-g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval)
+ {
+@@ -791,7 +791,7 @@
+
+ #ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
+ gint
+-g_atomic_int_get (volatile gint *atomic)
++g_atomic_int_get (volatile gint G_GNUC_MAY_ALIAS *atomic)
+ {
+ gint result;
+
+@@ -803,7 +803,7 @@
+ }
+
+ void
+-g_atomic_int_set (volatile gint *atomic,
++g_atomic_int_set (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint newval)
+ {
+ g_mutex_lock (g_atomic_mutex);
+@@ -812,7 +812,7 @@
+ }
+
+ gpointer
+-g_atomic_pointer_get (volatile gpointer *atomic)
++g_atomic_pointer_get (volatile gpointer G_GNUC_MAY_ALIAS *atomic)
+ {
+ gpointer result;
+
+@@ -824,7 +824,7 @@
+ }
+
+ void
+-g_atomic_pointer_set (volatile gpointer *atomic,
++g_atomic_pointer_set (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer newval)
+ {
+ g_mutex_lock (g_atomic_mutex);
+@@ -834,14 +834,14 @@
+ #endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
+ #elif defined (G_ATOMIC_OP_MEMORY_BARRIER_NEEDED)
+ gint
+-g_atomic_int_get (volatile gint *atomic)
++g_atomic_int_get (volatile gint G_GNUC_MAY_ALIAS *atomic)
+ {
+ G_ATOMIC_MEMORY_BARRIER;
+ return *atomic;
+ }
+
+ void
+-g_atomic_int_set (volatile gint *atomic,
++g_atomic_int_set (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint newval)
+ {
+ *atomic = newval;
+@@ -849,14 +849,14 @@
+ }
+
+ gpointer
+-g_atomic_pointer_get (volatile gpointer *atomic)
++g_atomic_pointer_get (volatile gpointer G_GNUC_MAY_ALIAS *atomic)
+ {
+ G_ATOMIC_MEMORY_BARRIER;
+ return *atomic;
+ }
+
+ void
+-g_atomic_pointer_set (volatile gpointer *atomic,
++g_atomic_pointer_set (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer newval)
+ {
+ *atomic = newval;
+@@ -866,7 +866,7 @@
+
+ #ifdef ATOMIC_INT_CMP_XCHG
+ gboolean
+-g_atomic_int_compare_and_exchange (volatile gint *atomic,
++g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval)
+ {
+@@ -874,7 +874,7 @@
+ }
+
+ gint
+-g_atomic_int_exchange_and_add (volatile gint *atomic,
++g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -886,7 +886,7 @@
+ }
+
+ void
+-g_atomic_int_add (volatile gint *atomic,
++g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val)
+ {
+ gint result;
+@@ -906,26 +906,26 @@
+
+ #ifndef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
+ gint
+-(g_atomic_int_get) (volatile gint *atomic)
++(g_atomic_int_get) (volatile gint G_GNUC_MAY_ALIAS *atomic)
+ {
+ return g_atomic_int_get (atomic);
+ }
+
+ void
+-(g_atomic_int_set) (volatile gint *atomic,
++(g_atomic_int_set) (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint newval)
+ {
+ g_atomic_int_set (atomic, newval);
+ }
+
+ gpointer
+-(g_atomic_pointer_get) (volatile gpointer *atomic)
++(g_atomic_pointer_get) (volatile gpointer G_GNUC_MAY_ALIAS *atomic)
+ {
+ return g_atomic_pointer_get (atomic);
+ }
+
+ void
+-(g_atomic_pointer_set) (volatile gpointer *atomic,
++(g_atomic_pointer_set) (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer newval)
+ {
+ g_atomic_pointer_set (atomic, newval);
+diff -Naur glib-2.18.4-orig/glib/gatomic.h glib-2.18.4/glib/gatomic.h
+--- glib-2.18.4-orig/glib/gatomic.h 2009-04-02 15:20:51.000000000 -0400
++++ glib-2.18.4/glib/gatomic.h 2009-04-02 15:40:20.000000000 -0400
+@@ -38,29 +38,42 @@
+
+ G_BEGIN_DECLS
+
+-gint g_atomic_int_exchange_and_add (volatile gint *atomic,
++gint g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val);
+-void g_atomic_int_add (volatile gint *atomic,
++void g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint val);
+-gboolean g_atomic_int_compare_and_exchange (volatile gint *atomic,
++gboolean g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint oldval,
+ gint newval);
+-gboolean g_atomic_pointer_compare_and_exchange (volatile gpointer *atomic,
++gboolean g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer oldval,
+ gpointer newval);
+
+-gint g_atomic_int_get (volatile gint *atomic);
+-void g_atomic_int_set (volatile gint *atomic,
++gint g_atomic_int_get (volatile gint G_GNUC_MAY_ALIAS *atomic);
++void g_atomic_int_set (volatile gint G_GNUC_MAY_ALIAS *atomic,
+ gint newval);
+-gpointer g_atomic_pointer_get (volatile gpointer *atomic);
+-void g_atomic_pointer_set (volatile gpointer *atomic,
++gpointer g_atomic_pointer_get (volatile gpointer G_GNUC_MAY_ALIAS *atomic);
++void g_atomic_pointer_set (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
+ gpointer newval);
+
+ #ifndef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
+-# define g_atomic_int_get(atomic) (*(atomic))
++# define g_atomic_int_get(atomic) ((gint)*(atomic))
+ # define g_atomic_int_set(atomic, newval) ((void) (*(atomic) = (newval)))
+-# define g_atomic_pointer_get(atomic) (*(atomic))
++# define g_atomic_pointer_get(atomic) ((gpointer)*(atomic))
+ # define g_atomic_pointer_set(atomic, newval) ((void) (*(atomic) = (newval)))
++#else
++# define g_atomic_int_get(atomic) \
++ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \
++ (g_atomic_int_get) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic)))
++# define g_atomic_int_set(atomic, newval) \
++ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \
++ (g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval)))
++# define g_atomic_pointer_get(atomic) \
++ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
++ (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) (atomic)))
++# define g_atomic_pointer_set(atomic, newval) \
++ ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
++ (g_atomic_pointer_set) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval)))
+ #endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
+
+ #define g_atomic_int_inc(atomic) (g_atomic_int_add ((atomic), 1))
+diff -Naur glib-2.18.4-orig/glib/gdataset.c glib-2.18.4/glib/gdataset.c
+--- glib-2.18.4-orig/glib/gdataset.c 2009-04-02 15:20:51.000000000 -0400
++++ glib-2.18.4/glib/gdataset.c 2009-04-02 15:40:38.000000000 -0400
+@@ -44,7 +44,7 @@
+
+ /* datalist pointer accesses have to be carried out atomically */
+ #define G_DATALIST_GET_POINTER(datalist) \
+- ((GData*) ((gsize) g_atomic_pointer_get ((gpointer*) datalist) & ~(gsize) G_DATALIST_FLAGS_MASK))
++ ((GData*) ((gsize) g_atomic_pointer_get (datalist) & ~(gsize) G_DATALIST_FLAGS_MASK))
+
+ #define G_DATALIST_SET_POINTER(datalist, pointer) G_STMT_START { \
+ gpointer _oldv, _newv; \
+@@ -505,7 +505,7 @@
+ {
+ g_return_if_fail (datalist != NULL);
+
+- g_atomic_pointer_set ((gpointer*) datalist, NULL);
++ g_atomic_pointer_set (datalist, NULL);
+ }
+
+ /**
+diff -Naur glib-2.18.4-orig/glib/gdatasetprivate.h glib-2.18.4/glib/gdatasetprivate.h
+--- glib-2.18.4-orig/glib/gdatasetprivate.h 2009-04-02 15:20:51.000000000 -0400
++++ glib-2.18.4/glib/gdatasetprivate.h 2009-04-02 15:40:44.000000000 -0400
+@@ -36,7 +36,7 @@
+ * barriers to take effect without acquiring the global dataset mutex.
+ */
+ #define G_DATALIST_GET_FLAGS(datalist) \
+- ((gsize) g_atomic_pointer_get ((gpointer*) datalist) & G_DATALIST_FLAGS_MASK)
++ ((gsize) g_atomic_pointer_get (datalist) & G_DATALIST_FLAGS_MASK)
+
+
+ G_END_DECLS
+diff -Naur glib-2.18.4-orig/glib/gthread.c glib-2.18.4/glib/gthread.c
+--- glib-2.18.4-orig/glib/gthread.c 2009-04-02 15:20:51.000000000 -0400
++++ glib-2.18.4/glib/gthread.c 2009-04-02 15:40:51.000000000 -0400
+@@ -204,7 +204,7 @@
+ {
+ gboolean need_init = FALSE;
+ g_mutex_lock (g_once_mutex);
+- if (g_atomic_pointer_get ((void**) value_location) == NULL)
++ if (g_atomic_pointer_get (value_location) == NULL)
+ {
+ if (!g_slist_find (g_once_init_list, (void*) value_location))
+ {
+@@ -224,11 +224,11 @@
+ g_once_init_leave (volatile gsize *value_location,
+ gsize initialization_value)
+ {
+- g_return_if_fail (g_atomic_pointer_get ((void**) value_location) == NULL);
++ g_return_if_fail (g_atomic_pointer_get (value_location) == NULL);
+ g_return_if_fail (initialization_value != 0);
+ g_return_if_fail (g_once_init_list != NULL);
+
+- g_atomic_pointer_set ((void**) value_location, (void*) initialization_value);
++ g_atomic_pointer_set (value_location, (void*) initialization_value);
+ g_mutex_lock (g_once_mutex);
+ g_once_init_list = g_slist_remove (g_once_init_list, (void*) value_location);
+ g_cond_broadcast (g_once_cond);
+@@ -256,7 +256,7 @@
+ g_mutex_lock (g_once_mutex);
+
+ if (!(*mutex))
+- g_atomic_pointer_set ((void**) mutex, g_mutex_new());
++ g_atomic_pointer_set (mutex, g_mutex_new());
+
+ g_mutex_unlock (g_once_mutex);
+
+diff -Naur glib-2.18.4-orig/glib/gthread.h glib-2.18.4/glib/gthread.h
+--- glib-2.18.4-orig/glib/gthread.h 2009-04-02 15:20:51.000000000 -0400
++++ glib-2.18.4/glib/gthread.h 2009-04-02 15:40:56.000000000 -0400
+@@ -145,7 +145,7 @@
+ GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
+
+ #define g_static_mutex_get_mutex_impl_shortcut(mutex) \
+- (g_atomic_pointer_get ((gpointer*)(void*)mutex) ? *(mutex) : \
++ (g_atomic_pointer_get (mutex) ? *(mutex) : \
+ g_static_mutex_get_mutex_impl (mutex))
+
+ /* shorthands for conditional and unconditional function calls */
+@@ -336,7 +336,7 @@
+ G_INLINE_FUNC gboolean
+ g_once_init_enter (volatile gsize *value_location)
+ {
+- if G_LIKELY (g_atomic_pointer_get ((void*volatile*) value_location) != NULL)
++ if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL)
+ return FALSE;
+ else
+ return g_once_init_enter_impl (value_location);
diff --git a/dev-libs/glib/files/glib-2.20.1-gio-unref.patch b/dev-libs/glib/files/glib-2.20.1-gio-unref.patch
new file mode 100644
index 000000000000..6fb8916e4cfa
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.20.1-gio-unref.patch
@@ -0,0 +1,27 @@
+From 76439bd5d31019a449bac938c325990bc2a54400 Mon Sep 17 00:00:00 2001
+From: Paul Pogonyshev <pogonyshev@gmx.net>
+Date: Mon, 4 May 2009 22:32:35 +0300
+Subject: [PATCH] Don't try to ref NULL pointer in g_desktop_app_info_dup()
+
+Fixes bug #573246.
+---
+ gio/gdesktopappinfo.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
+index fcd7737..fea0761 100644
+--- a/gio/gdesktopappinfo.c
++++ b/gio/gdesktopappinfo.c
+@@ -417,7 +417,8 @@ g_desktop_app_info_dup (GAppInfo *appinfo)
+ new_info->comment = g_strdup (info->comment);
+ new_info->nodisplay = info->nodisplay;
+ new_info->icon_name = g_strdup (info->icon_name);
+- new_info->icon = g_object_ref (info->icon);
++ if (info->icon)
++ new_info->icon = g_object_ref (info->icon);
+ new_info->only_show_in = g_strdupv (info->only_show_in);
+ new_info->not_show_in = g_strdupv (info->not_show_in);
+ new_info->try_exec = g_strdup (info->try_exec);
+--
+1.6.2.4
+
diff --git a/dev-libs/glib/glib-2.18.4-r2.ebuild b/dev-libs/glib/glib-2.18.4-r2.ebuild
new file mode 100644
index 000000000000..0a8919f9ae59
--- /dev/null
+++ b/dev-libs/glib/glib-2.18.4-r2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.18.4-r2.ebuild,v 1.1 2009/05/04 22:06:50 eva Exp $
+
+EAPI="2"
+
+inherit gnome.org libtool eutils flag-o-matic
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="http://www.gtk.org/"
+
+LICENSE="LGPL-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="debug doc fam hardened selinux xattr"
+
+RDEPEND="virtual/libc
+ virtual/libiconv
+ xattr? ( sys-apps/attr )
+ fam? ( virtual/fam )"
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.16
+ >=sys-devel/gettext-0.11
+ doc? (
+ >=dev-libs/libxslt-1.0
+ >=dev-util/gtk-doc-1.8
+ ~app-text/docbook-xml-dtd-4.1.2 )"
+
+src_prepare() {
+ if use ppc64 && use hardened ; then
+ replace-flags -O[2-3] -O1
+ epatch "${FILESDIR}/glib-2.6.3-testglib-ssp.patch"
+ fi
+
+ if use ia64 ; then
+ # Only apply for < 4.1
+ local major=$(gcc-major-version)
+ local minor=$(gcc-minor-version)
+ if (( major < 4 || ( major == 4 && minor == 0 ) )); then
+ epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
+ fi
+ fi
+
+ # Don't fail gio tests when ran without userpriv, upstream bug 552912
+ # This is only a temporary workaround, remove as soon as possible
+ epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
+
+ # Fix gmodule issues on fbsd; bug #184301
+ epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
+
+ # Fix g_base64 overruns. bug #249214
+ epatch "${FILESDIR}"/glib2-CVE-2008-4316.patch
+
+ # Fix compilation with gcc 4.4, bug #264686
+ epatch "${FILESDIR}/${P}-gcc44.patch"
+
+ # Fix GIO null unref, bug #260301
+ epatch "${FILESDIR}/${PN}-2.20.1-gio-unref.patch"
+
+ [[ ${CHOST} == *-freebsd* ]] && elibtoolize
+}
+
+src_configure() {
+ local myconf
+
+ epunt_cxx
+
+ # Building with --disable-debug highly unrecommended. It will build glib in
+ # an unusable form as it disables some commonly used API. Please do not
+ # convert this to the use_enable form, as it results in a broken build.
+ # -- compnerd (3/27/06)
+ use debug && myconf="--enable-debug"
+
+ # Always build static libs, see #153807
+ # Always use internal libpcre, bug #254659
+ econf ${myconf} \
+ $(use_enable xattr) \
+ $(use_enable doc man) \
+ $(use_enable doc gtk-doc) \
+ $(use_enable fam) \
+ $(use_enable selinux) \
+ --enable-static \
+ --enable-regex \
+ --with-pcre=internal \
+ --with-threads=posix
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ # Do not install charset.alias even if generated, leave it to libiconv
+ rm -f "${D}/usr/lib/charset.alias"
+
+ dodoc AUTHORS ChangeLog* NEWS* README || die "dodoc failed"
+}
diff --git a/dev-libs/glib/glib-2.20.1-r1.ebuild b/dev-libs/glib/glib-2.20.1-r1.ebuild
new file mode 100644
index 000000000000..c8c706373147
--- /dev/null
+++ b/dev-libs/glib/glib-2.20.1-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.20.1-r1.ebuild,v 1.1 2009/05/04 22:06:50 eva Exp $
+
+EAPI="2"
+
+inherit gnome.org libtool eutils flag-o-matic
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="http://www.gtk.org/"
+
+LICENSE="LGPL-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="debug doc fam hardened selinux xattr"
+
+RDEPEND="virtual/libc
+ virtual/libiconv
+ xattr? ( sys-apps/attr )
+ fam? ( virtual/fam )"
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.16
+ >=sys-devel/gettext-0.11
+ doc? (
+ >=dev-libs/libxslt-1.0
+ >=dev-util/gtk-doc-1.11
+ ~app-text/docbook-xml-dtd-4.1.2 )"
+
+src_prepare() {
+ if use ppc64 && use hardened ; then
+ replace-flags -O[2-3] -O1
+ epatch "${FILESDIR}/glib-2.6.3-testglib-ssp.patch"
+ fi
+
+ if use ia64 ; then
+ # Only apply for < 4.1
+ local major=$(gcc-major-version)
+ local minor=$(gcc-minor-version)
+ if (( major < 4 || ( major == 4 && minor == 0 ) )); then
+ epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
+ fi
+ fi
+
+ # Don't fail gio tests when ran without userpriv, upstream bug 552912
+ # This is only a temporary workaround, remove as soon as possible
+ epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
+
+ # Fix gmodule issues on fbsd; bug #184301
+ epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
+
+ # Fix GIO null unref, bug #260301
+ epatch "${FILESDIR}/${P}-gio-unref.patch"
+
+ [[ ${CHOST} == *-freebsd* ]] && elibtoolize
+}
+
+src_configure() {
+ local myconf
+
+ epunt_cxx
+
+ # Building with --disable-debug highly unrecommended. It will build glib in
+ # an unusable form as it disables some commonly used API. Please do not
+ # convert this to the use_enable form, as it results in a broken build.
+ # -- compnerd (3/27/06)
+ use debug && myconf="--enable-debug"
+
+ # Always build static libs, see #153807
+ # Always use internal libpcre, bug #254659
+ econf ${myconf} \
+ $(use_enable xattr) \
+ $(use_enable doc man) \
+ $(use_enable doc gtk-doc) \
+ $(use_enable fam) \
+ $(use_enable selinux) \
+ --enable-static \
+ --enable-regex \
+ --with-pcre=internal \
+ --with-threads=posix
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Installation failed"
+
+ # Do not install charset.alias even if generated, leave it to libiconv
+ rm -f "${D}/usr/lib/charset.alias"
+
+ dodoc AUTHORS ChangeLog* NEWS* README || die "dodoc failed"
+}
+
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+ emake check || die "tests failed"
+}