changeset 722:dc0a01dbbcd6

ensure that the native glib-genmarshal build with libiconv always succeeds
author Volker Grabsch <vog@notjusthosting.com>
date Thu, 11 Feb 2010 23:55:39 +0100
parents bc69ccf2503c
children 1d0d78bf2dd2
files src/glib.mk
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/glib.mk	Thu Feb 11 09:17:28 2010 +0100
+++ b/src/glib.mk	Thu Feb 11 23:55:39 2010 +0100
@@ -21,9 +21,17 @@
 endef
 
 define $(PKG)_BUILD
-    # native build for glib-genmarshal, without pkg-config, gettext and zlib
     cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,glib)
     mv '$(1)/$(glib_SUBDIR)' '$(1).native'
+
+    # native build of libiconv (used by glib-genmarshal)
+    cd '$(1).native' && $(call UNPACK_PKG_ARCHIVE,libiconv)
+    cd '$(1).native/$(libiconv_SUBDIR)' && ./configure \
+        --disable-shared \
+        --disable-nls
+    $(MAKE) -C '$(1).native/$(libiconv_SUBDIR)' -j '$(JOBS)'
+
+    # native build for glib-genmarshal, without pkg-config, gettext and zlib
     $(SED) 's,gt_cv_have_gettext=yes,gt_cv_have_gettext=no,'     -i '$(1).native/configure'
     $(SED) '/You must.*have gettext/,/exit 1;/ s,.*exit 1;.*,},' -i '$(1).native/configure'
     $(SED) 's,found_zlib=no,found_zlib=yes,'                     -i '$(1).native/configure'
@@ -34,7 +42,10 @@
         --disable-threads \
         --disable-selinux \
         --disable-fam \
-        --disable-xattr
+        --disable-xattr \
+        --with-libiconv=gnu \
+        CPPFLAGS='-I$(1).native/$(libiconv_SUBDIR)/include' \
+        LDFLAGS='-L$(1).native/$(libiconv_SUBDIR)/lib/.libs'
     $(SED) 's,#define G_ATOMIC.*,,' -i '$(1).native/config.h'
     $(MAKE) -C '$(1).native/glib'    -j '$(JOBS)'
     $(MAKE) -C '$(1).native/gthread' -j '$(JOBS)'