[glib2] fix headers

Matthias Clasen mclasen at fedoraproject.org
Wed Jan 18 03:34:06 UTC 2012


commit 82360d4174aa5c7bce12a50e0ffdb6b3e2de3d9b
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Tue Jan 17 22:34:03 2012 -0500

    fix headers

 glib-mscver.patch |   12 ++++++++++++
 glib2.spec        |    9 ++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/glib-mscver.patch b/glib-mscver.patch
new file mode 100644
index 0000000..5036844
--- /dev/null
+++ b/glib-mscver.patch
@@ -0,0 +1,12 @@
+diff -up glib-2.31.10/glib/gmacros.h.mscver glib-2.31.10/glib/gmacros.h
+--- glib-2.31.10/glib/gmacros.h.mscver	2012-01-17 22:31:58.016213434 -0500
++++ glib-2.31.10/glib/gmacros.h	2012-01-17 22:32:36.884214017 -0500
+@@ -343,7 +343,7 @@
+ #define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
+ #define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
+ 
+-#elif _MSC_VER >= 1500
++#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
+ /* Visual studio 2008 and later has _Pragma */
+ 
+ #define G_HAS_CONSTRUCTORS 1
diff --git a/glib2.spec b/glib2.spec
index 9c51563..95f28eb 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -3,13 +3,16 @@
 Summary: A library of handy utility functions
 Name: glib2
 Version: 2.31.10
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
 #VCS: git:git://git.gnome.org/glib
 Source: http://download.gnome.org/sources/glib/2.31/glib-%{version}.tar.xz
 
+# upstream fix
+Patch0: glib-mscver.patch
+
 BuildRequires: pkgconfig
 BuildRequires: gamin-devel
 BuildRequires: gettext
@@ -57,6 +60,7 @@ The glib2-static package includes static libraries of the GLib library.
 
 %prep
 %setup -q -n glib-%{version}
+%patch0 -p1
 
 %build
 # Support builds of both git snapshots and tarballs packed with autogoo
@@ -160,6 +164,9 @@ gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules
 
 
 %changelog
+* Tue Jan 17 2012 Matthias Clasen <mclasen at redhat.com> 2.31.10-2
+- Fix a header problem that was causing build failures
+
 * Mon Jan 16 2012 Matthias Clasen <mclasen at redhat.com> - 2.31.10-1
 - Update to 2.31.10
 


More information about the scm-commits mailing list