[mingw-gtk3] Fix the build (GNOME BZ #699690)
Erik van Pienbroek
epienbro at fedoraproject.org
Tue May 14 18:26:58 UTC 2013
commit 3fa3354330e47e5b9de898579c010ffd00f9de2f
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Tue May 14 20:25:47 2013 +0200
Fix the build (GNOME BZ #699690)
and bumped the BR: mingw{32,64}-filesystem to >= 98
because of the updated pkg-config behaviour
commit-914099dc.patch | 109 +++++++++++++++++++++++++++++++++++++++++++++++++
mingw-gtk3.spec | 15 +++++-
2 files changed, 121 insertions(+), 3 deletions(-)
---
diff --git a/commit-914099dc.patch b/commit-914099dc.patch
new file mode 100644
index 0000000..1838582
--- /dev/null
+++ b/commit-914099dc.patch
@@ -0,0 +1,109 @@
+From 914099dce1bfaef71754c312b2711989fe30929d Mon Sep 17 00:00:00 2001
+From: Hib Eris <hib at hiberis.nl>
+Date: Sat, 11 May 2013 14:57:39 +0000
+Subject: Build extract-strings tool for build system
+
+This fixes cross compiling where build system != host system.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=699690
+---
+diff --git a/configure.ac b/configure.ac
+index 9713015..9b90e38 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -684,6 +684,12 @@ AM_PATH_GLIB_2_0(glib_required_version, :,
+ *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
+ gobject gmodule-no-export)
+
++PKG_PROG_PKG_CONFIG_FOR_BUILD
++GLIB_CFLAGS_FOR_BUILD=`$PKG_CONFIG_FOR_BUILD --cflags glib-2.0 gobject-2.0 gmodule-no-export-2.0`
++GLIB_LIBS_FOR_BUILD=`$PKG_CONFIG_FOR_BUILD --libs glib-2.0 gobject-2.0 gmodule-no-export-2.0`
++AC_SUBST(GLIB_CFLAGS_FOR_BUILD)
++AC_SUBST(GLIB_LIBS_FOR_BUILD)
++
+ dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
+ dnl
+ gtk_save_LIBS=$LIBS
+diff --git a/gtk/Makefile.am b/gtk/Makefile.am
+index 296ef00..21ac74c 100644
+--- a/gtk/Makefile.am
++++ b/gtk/Makefile.am
+@@ -1128,8 +1128,8 @@ template_headers = $(COMPOSITE_TEMPLATES:.ui=.ui.h)
+
+ MAINTAINERCLEANFILES += $(template_headers)
+
+-%.ui.h: %.ui extract-strings$(EXEEXT)
+- $(AM_V_GEN) ./extract-strings$(EXEEXT) $< > $@
++%.ui.h: %.ui extract-strings$(BUILD_EXEEXT)
++ $(AM_V_GEN) ./extract-strings$(BUILD_EXEEXT) $< > $@
+
+ #
+ # rules to generate built sources
+@@ -1401,10 +1401,15 @@ endif
+ gtk_launch_LDADD = $(LDADDS)
+ gtk_launch_SOURCES = gtk-launch.c
+
+-noinst_PROGRAMS = extract-strings
+-
+-extract_strings_SOURCES = extract-strings.c
+-extract_strings_LDADD = $(GLIB_LIBS)
++# The extract_strings tool is a build utility that runs on the build system.
++extract_strings_sources = extract-strings.c
++extract_strings_cppflags =
++extract_strings_cflags = $(GLIB_CFLAGS_FOR_BUILD)
++extract_strings_ldadd = $(GLIB_LIBS_FOR_BUILD)
++extract-strings$(BUILD_EXEEXT): $(extract_strings_sources)
++ @rm -f extract-strings$(BUILD_EXEEXT)
++ $(AM_V_CCLD)$(CC_FOR_BUILD) $(extract_strings_cppflags) $(CPPFLAGS_FOR_BUILD) $(extract_strings_cflags) $(CFLAGS_FOR_BUILD) $^ $(LDFLAGS_FOR_BUILD) $(extract_strings_ldadd) $(LIBS_FOR_BUILD) -o $@
++EXTRA_DIST += $(extract_strings_sources)
+
+ .PHONY: files test test-debug
+
+diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4
+index 96cd98a..c2adede 100644
+--- a/m4/ax_prog_cc_for_build.m4
++++ b/m4/ax_prog_cc_for_build.m4
+@@ -57,6 +57,7 @@ pushdef([CPP], CPP_FOR_BUILD)dnl
+ pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
+ pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
+ pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
++pushdef([LIBS], LIBS_FOR_BUILD)dnl
+ pushdef([host], build)dnl
+ pushdef([host_alias], build_alias)dnl
+ pushdef([host_cpu], build_cpu)dnl
+@@ -98,6 +99,7 @@ popdef([host_vendor])dnl
+ popdef([host_cpu])dnl
+ popdef([host_alias])dnl
+ popdef([host])dnl
++popdef([LIBS])dnl
+ popdef([LDFLAGS])dnl
+ popdef([CPPFLAGS])dnl
+ popdef([CFLAGS])dnl
+diff --git a/m4/pkg_config_for_build.m4 b/m4/pkg_config_for_build.m4
+new file mode 100644
+index 0000000..0422f48
+--- /dev/null
++++ b/m4/pkg_config_for_build.m4
+@@ -0,0 +1,20 @@
++# PKG_PROG_PKG_CONFIG_FOR_BUILD([MIN-VERSION])
++# ----------------------------------
++AC_DEFUN([PKG_PROG_PKG_CONFIG_FOR_BUILD],
++[m4_pattern_allow([^PKG_CONFIG_FOR_BUILD$])
++AC_ARG_VAR([PKG_CONFIG_FOR_BUILD], [path to build system's pkg-config utility])
++
++if test "x$ac_cv_env_PKG_CONFIG_FOR_BUILD_set" != "xset"; then
++ AC_PATH_PROG([PKG_CONFIG_FOR_BUILD], [pkg-config])
++fi
++if test -n "$PKG_CONFIG_FOR_BUILD"; then
++ _pkg_for_build_min_version=m4_default([$1], [0.9.0])
++ AC_MSG_CHECKING([build system's pkg-config is at least version $_pkg_min_version])
++ if $PKG_CONFIG_FOR_BUILD --atleast-pkgconfig-version $_pkg_min_version; then
++ AC_MSG_RESULT([yes])
++ else
++ AC_MSG_RESULT([no])
++ PKG_CONFIG_FOR_BUILD=""
++ fi
++fi[]dnl
++])# PKG_PROG_PKG_CONFIG_FOR_BUILD
+--
+cgit v0.9.1
diff --git a/mingw-gtk3.spec b/mingw-gtk3.spec
index 61188fb..e9bdf2e 100644
--- a/mingw-gtk3.spec
+++ b/mingw-gtk3.spec
@@ -6,7 +6,7 @@
Name: mingw-gtk3
Version: 3.9.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MinGW Windows GTK+ library
License: LGPLv2+
@@ -34,10 +34,13 @@ Patch2: 0003-Don-t-use-AC_CANONICAL_TARGET.patch
# http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=revision&revision=5589
Patch3: gtk-dont-define-initguid.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=699690
+Patch4: commit-914099dc.patch
+
BuildArch: noarch
-BuildRequires: mingw32-filesystem >= 95
-BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw32-filesystem >= 98
+BuildRequires: mingw64-filesystem >= 98
BuildRequires: mingw32-gcc
BuildRequires: mingw64-gcc
BuildRequires: mingw32-binutils
@@ -121,6 +124,7 @@ This package contains the MinGW Windows cross compiled GTK+ 3 library.
%setup -q -n gtk+-%{version}
%patch2 -p1
%patch3 -p0
+%patch4 -p1
autoreconf -i --force
@@ -270,6 +274,11 @@ fi
%changelog
+* Sun May 12 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 3.9.0-2
+- Fix the build (GNOME BZ #699690)
+- Bumped the BR: mingw{32,64}-filesystem to >= 98 because of
+ the updated pkg-config behaviour
+
* Sun May 5 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 3.9.0-1
- Update to 3.9.0
More information about the scm-commits
mailing list