[Libreoffice-commits] .: 3 commits - gettext/gettext-0.18.1.1.patch gettext/prj glib/glib-2.28.1.patch glib/makefile.mk

Tor Lillqvist tml at kemper.freedesktop.org
Mon May 30 15:31:12 PDT 2011


 gettext/gettext-0.18.1.1.patch |   12 ++++++------
 gettext/prj/d.lst              |    1 +
 glib/glib-2.28.1.patch         |   17 +++++++++++++++++
 glib/makefile.mk               |   36 +++++++++++++++++++++++++++++++++---
 4 files changed, 57 insertions(+), 9 deletions(-)

New commits:
commit af2da2d462843e32a2540827db4d5c5891d2b28e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue May 31 01:25:03 2011 +0300

    Enable building glib for iOS
    
    Pass --build and --host options to the configure script. Pass a bunch
    of a priori cached test results for stuff that can't be determined
    when cross-compiling. Link with the CoreFoundation framework. Build
    static archives.
    
    Patch out the compile-time USE_LIBICONV_GNU and _LIBICONV_H test from
    gconvert.c as it for some reason fails for iOS.

diff --git a/glib/glib-2.28.1.patch b/glib/glib-2.28.1.patch
index cadcc4d..da99381 100644
--- a/glib/glib-2.28.1.patch
+++ b/glib/glib-2.28.1.patch
@@ -39,3 +39,20 @@
  #include "gthreadprivate.h"
  
  /**
+--- misc/glib-2.28.1/glib/gconvert.c
++++ misc/build/glib-2.28.1/glib/gconvert.c
+@@ -58,13 +58,6 @@
+ 
+ #include "glibintl.h"
+ 
+-#if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)
+-#error GNU libiconv in use but included iconv.h not from libiconv
+-#endif
+-#if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
+-#error GNU libiconv not in use but included iconv.h is from libiconv
+-#endif
+-
+ 
+ /**
+  * SECTION:conversions
+
diff --git a/glib/makefile.mk b/glib/makefile.mk
index 7e355d4..7d65bad 100644
--- a/glib/makefile.mk
+++ b/glib/makefile.mk
@@ -48,15 +48,32 @@ TARFILE_NAME=$(PRJNAME)-$(GLIBVERSION)
 TARFILE_MD5=9f6e85e1e38490c3956f4415bcd33e6e
 
 
-.IF "$(OS)"=="MACOSX"
+.IF "$(OS)"=="MACOSX" || "$(OS)"=="IOS"
 PATCH_FILES=glib-2.28.1.patch
 
-CONFIGURE_FLAGS=--prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC)
+.IF "$(OS)"=="IOS"
+CONFIGURE_FLAGS= \
+    glib_cv_stack_grows=no \
+    glib_cv_uscore=yes \
+    ac_cv_func_posix_getpwuid_r=yes \
+    ac_cv_func_posix_getgrgid_r=yes \
+    ac_cv_func__NSGetEnviron=no \
+    --disable-shared
+FRAMEWORK=-framework CoreFoundation
+.ELSE
+CONFIGURE_FLAGS=--disable-static
+.ENDIF
+
+CONFIGURE_FLAGS+=--prefix=$(SRC_ROOT)$/$(PRJNAME)$/$(MISC)
 CONFIGURE_FLAGS+=--disable-fam
 CONFIGURE_FLAGS+=CPPFLAGS="$(ARCH_FLAGS) $(EXTRA_CDEFS) -DBUILD_OS_APPLEOSX"
 CONFIGURE_FLAGS+=CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS) -I$(SOLARINCDIR)$/external"
-CONFIGURE_FLAGS+=LDFLAGS="-L$(SOLARLIBDIR) $(EXTRA_LINKFLAGS)"
+CONFIGURE_FLAGS+=LDFLAGS="-L$(SOLARLIBDIR) $(EXTRA_LINKFLAGS) $(FRAMEWORK)"
 
+.IF "$(CROSS_COMPILING)"!=""
+CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
+.ENDIF
+ 
 CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) ./configure
 
 .IF "$(VERBOSE)"!=""
@@ -66,6 +83,9 @@ VFLAG=V=1
 BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) $(VFLAG)
 
 EXTRPATH=LOADER
+
+.IF "$(OS)"=="MACOSX"
+
 OUT2LIB+=gio/.libs/libgio-2.0.0.dylib
 OUT2LIB+=glib/.libs/libglib-2.0.0.dylib
 OUT2LIB+=gmodule/.libs/libgmodule-2.0.0.dylib
@@ -76,6 +96,16 @@ OUT2BIN+=gobject/glib-mkenums
 OUT2BIN+=gobject/.libs/glib-genmarshal
 OUT2BIN+=gio/.libs/glib-compile-schemas
 
+.ELIF "$(OS)"=="IOS"
+
+OUT2LIB+=gio/.libs/libgio-2.0.a
+OUT2LIB+=glib/.libs/libglib-2.0.a
+OUT2LIB+=gmodule/.libs/libgmodule-2.0.a
+OUT2LIB+=gobject/.libs/libgobject-2.0.a
+OUT2LIB+=gthread/.libs/libgthread-2.0.a
+
+.ENDIF
+
 OUT2INC+=glib/glib.h
 OUT2INC+=glib/glib-object.h
 OUT2INC+=glib/glibconfig.h
commit d004399b4f1deeaff2a0f8dcead39012024de9e7
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue May 31 01:15:54 2011 +0300

    Improve gettext build for iOS

diff --git a/gettext/gettext-0.18.1.1.patch b/gettext/gettext-0.18.1.1.patch
index 72970b6..016b65d 100644
--- a/gettext/gettext-0.18.1.1.patch
+++ b/gettext/gettext-0.18.1.1.patch
@@ -2721,7 +2721,7 @@
 +#endif
 +
 +#include <locale.h>
-+#if (defined __APPLE__ && defined __MACH__) && HAVE_NEWLOCALE
++#if (defined __APPLE__ && defined __MACH__)
 +# include <xlocale.h>
 +#endif
 +
@@ -3016,7 +3016,7 @@
 +   or gettext() but for which the format string could be the return value
 +   of _() or gettext() need to add this #include.  Oh well.  */
 +
-+#if !0
++#if !(defined __APPLE__ && defined __MACH__)
 +
 +#include <stdio.h>
 +#include <stddef.h>
@@ -3138,7 +3138,7 @@
 +#define setlocale libintl_setlocale
 +extern LIBINTL_DLL_EXPORTED char *setlocale (int, const char *);
 +
-+#if HAVE_NEWLOCALE
++#if (defined __APPLE__ && defined __MACH__)
 +
 +#undef newlocale
 +#define newlocale libintl_newlocale
@@ -3194,7 +3194,7 @@
 +#define _LIBINTL_H 1
 +
 +#include <locale.h>
-+#if (defined __APPLE__ && defined __MACH__) && 0
++#if (defined __APPLE__ && defined __MACH__)
 +# include <xlocale.h>
 +#endif
 +
@@ -3485,7 +3485,7 @@
 +   or gettext() but for which the format string could be the return value
 +   of _() or gettext() need to add this #include.  Oh well.  */
 +
-+#if !0
++#if !(defined __APPLE__ && defined __MACH__)
 +
 +#include <stdio.h>
 +#include <stddef.h>
@@ -3607,7 +3607,7 @@
 +#define setlocale libintl_setlocale
 +extern char *setlocale (int, const char *);
 +
-+#if 0
++#if (defined __APPLE__ && defined __MACH__)
 +
 +#undef newlocale
 +#define newlocale libintl_newlocale
commit 837d07b0b13d6c725b56ff8e63dc25e0b9db2278
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon May 30 03:11:48 2011 +0300

    Deliver a static libintl.a, too

diff --git a/gettext/prj/d.lst b/gettext/prj/d.lst
index 09e9ea1..205abac 100644
--- a/gettext/prj/d.lst
+++ b/gettext/prj/d.lst
@@ -10,6 +10,7 @@ symlink: %_DEST%\lib%_EXT%\libgettextsrc-0.18.1.dylib %_DEST%\lib%_EXT%\libgette
 symlink: %_DEST%\lib%_EXT%\libintl.8.dylib %_DEST%\lib%_EXT%\libintl.dylib
 ..\%__SRC%\lib\libgettextlib-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextlib-0.18.1.dylib
 symlink: %_DEST%\lib%_EXT%\libgettextlib-0.18.1.dylib %_DEST%\lib%_EXT%\libgettextlib.dylib
+..\%__SRC%\lib\libintl.a %_DEST%\lib%_EXT%\libintl.a
 ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%
 ..\%__SRC%\bin\msgattrib %_DEST%\bin%_EXT%\msgattrib
 ..\%__SRC%\bin\msgcat %_DEST%\bin%_EXT%\msgcat


More information about the Libreoffice-commits mailing list