[Libreoffice-commits] .: liblangtag/liblangtag-0.4.0-msc-configure.patch liblangtag/liblangtag-0.4.0-windows2.patch liblangtag/makefile.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 6 12:14:41 PST 2012


 liblangtag/liblangtag-0.4.0-msc-configure.patch |   21 ++++
 liblangtag/liblangtag-0.4.0-windows2.patch      |  121 ++++++++++++++++++++++++
 liblangtag/makefile.mk                          |    4 
 3 files changed, 145 insertions(+), 1 deletion(-)

New commits:
commit f8961503e888b35071f151adf1904cb7b932e2f1
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Nov 6 21:14:14 2012 +0100

    More work trying to build this thing on windows
    
    Change-Id: I064ef350fa1b01642917a4797f3a6e0a810174d0

diff --git a/liblangtag/liblangtag-0.4.0-msc-configure.patch b/liblangtag/liblangtag-0.4.0-msc-configure.patch
index 41b7e58..db49ade 100644
--- a/liblangtag/liblangtag-0.4.0-msc-configure.patch
+++ b/liblangtag/liblangtag-0.4.0-msc-configure.patch
@@ -9,6 +9,27 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
  $as_echo "$ac_cv_prog_cc_g" >&6; }
  if test "$ac_test_CFLAGS" = set; then
+--- misc/liblangtag-0.4.0/Makefile.in	2012-10-22 04:47:24.000000000 +0100
++++ misc/build/liblangtag-0.4.0/Makefile.in	2012-11-06 20:03:08.906250000 +0000
+@@ -136,8 +136,7 @@
+ 	distdir dist dist-all distcheck
+ ETAGS = etags
+ CTAGS = ctags
+-DIST_SUBDIRS = liblangtag extensions data docs liblangtag-gobject \
+-	tests
++DIST_SUBDIRS = liblangtag extensions data docs liblangtag-gobject
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ distdir = $(PACKAGE)-$(VERSION)
+ top_distdir = $(distdir)
+@@ -339,7 +338,7 @@
+ NULL = 
+ AUTOMAKE_OPTIONS = dist-bzip2
+ #SUBDIRS += docs tests
+-SUBDIRS = liblangtag extensions data docs $(am__append_1) tests
++SUBDIRS = liblangtag extensions data docs $(am__append_1)
+ CONFIGURE_DEPENDENCIES = \
+ 	requires			\
+ 	$(NULL)
 --- misc/liblangtag-0.4.0/data/Makefile.in	2012-10-22 05:47:23.000000000 +0200
 +++ misc/build/liblangtag-0.4.0/data/Makefile.in	2012-11-06 14:47:23.173704887 +0100
 @@ -80,8 +80,8 @@
diff --git a/liblangtag/liblangtag-0.4.0-windows2.patch b/liblangtag/liblangtag-0.4.0-windows2.patch
new file mode 100644
index 0000000..29b45c6
--- /dev/null
+++ b/liblangtag/liblangtag-0.4.0-windows2.patch
@@ -0,0 +1,121 @@
+--- misc/liblangtag-0.4.0/data/reg2xml.c	2012-11-06 19:22:52.734375000 +0000
++++ misc/build/liblangtag-0.4.0/data/reg2xml.c	2012-11-06 19:12:34.765625000 +0000
+@@ -19,6 +19,31 @@
+ #include "lt-messages.h"
+ #include "lt-utils.h"
+ 
++#ifdef _WIN32
++static char *
++strndup(const char *string,size_t s)
++{
++	const char *p;
++	char *r;
++	if (!string)
++		return NULL;
++	p = string;
++	while (s) {
++		if (!*p)
++			break;
++		p++;
++		s--;
++	}
++	s = (p - string);
++	r = malloc(1+s);
++	if (r) {
++		strncpy(r,string,s);
++		r[s] = 0;
++	}
++	return r;
++}
++#endif
++
+ /*< private >*/
+ static char *
+ _drop_crlf(char *string)
+--- misc/liblangtag-0.4.0/extensions/lt-ext-ldml-u.c	2012-10-16 08:25:15.000000000 +0100
++++ misc/build/liblangtag-0.4.0/extensions/lt-ext-ldml-u.c	2012-11-06 19:02:45.328125000 +0000
+@@ -14,7 +14,11 @@
+ #include "config.h"
+ #endif
+ 
++#ifndef _WIN32
+ #include <stdint.h>
++#else
++typedef unsigned __int64 uint64_t;
++#endif
+ #include <string.h>
+ #include <libxml/xpath.h>
+ #include "lt-error.h"
+@@ -136,7 +140,11 @@
+ 							if (!strchr(hexdigit, subtag[j]))
+ 								goto bail2;
+ 						}
++#ifdef _WIN32
++						x = _strtoui64(subtag, &p, 16);
++#else
+ 						x = strtoull(subtag, &p, 16);
++#endif
+ 						if (p && p[0] == 0 && x <= 0x10ffff) {
+ 							retval = TRUE;
+ 							xmlFree(name);
+--- misc/liblangtag-0.4.0/liblangtag-gobject.pc	2012-10-22 04:47:28.000000000 +0100
++++ misc/build/liblangtag-0.4.0/liblangtag-gobject.pc	2012-11-06 18:42:59.625000000 +0000
+@@ -1,6 +1,6 @@
+-prefix=/usr
++prefix=/install-liblangtag
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=/install-liblangtag/lib
+ includedir=${prefix}/include
+ 
+ Name: liblangtag-gobject
+--- misc/liblangtag-0.4.0/liblangtag.pc	2012-10-22 04:47:28.000000000 +0100
++++ misc/build/liblangtag-0.4.0/liblangtag.pc	2012-11-06 18:42:59.171875000 +0000
+@@ -1,6 +1,6 @@
+-prefix=/usr
++prefix=/install-liblangtag
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=/install-liblangtag/lib
+ includedir=${prefix}/include
+ 
+ Name: liblangtag
+--- misc/liblangtag-0.4.0/liblangtag/lt-messages.c	2012-11-06 19:22:52.703125000 +0000
++++ misc/build/liblangtag-0.4.0/liblangtag/lt-messages.c	2012-11-06 19:20:22.671875000 +0000
+@@ -83,13 +83,21 @@
+ 	clen = strlen(cs);
+ 	if (clen > 0) {
+ 		catstring = malloc(sizeof (char) * (clen + 6));
++#ifdef _WIN32
++		_snprintf(catstring, clen + 6, "[%s]: ", cs);
++#else
+ 		snprintf(catstring, clen + 6, "[%s]: ", cs);
++#endif
+ 		clen = strlen(catstring);
+ 	}
+ 	len = tlen + clen + 1;
+ 	retval = malloc(sizeof (char) * len);
+ 	if (retval) {
+-		snprintf(retval, len, "%s%s ", ts, catstring ? catstring : "");
++#ifdef _WIN32
++	_snprintf(retval, len, "%s%s ", ts, catstring ? catstring : "");
++#else
++	snprintf(retval, len, "%s%s ", ts, catstring ? catstring : "");
++#endif
+ 	}
+ 	if (catstring)
+ 		free(catstring);
+--- misc/liblangtag-0.4.0/liblangtag/lt-utils.c	2012-10-03 07:05:59.000000000 +0100
++++ misc/build/liblangtag-0.4.0/liblangtag/lt-utils.c	2012-11-06 19:16:07.640625000 +0000
+@@ -126,7 +126,11 @@
+ 
+ 	lt_return_val_if_fail (format != NULL, NULL);
+ 
++#ifdef _WIN32
++	ap = args;
++#else
+ 	va_copy(ap, args);
++#endif
+ 
+ 	size = vsnprintf(&c, 1, format, ap) + 1;
+ 
diff --git a/liblangtag/makefile.mk b/liblangtag/makefile.mk
index f4cfc51..b267872 100644
--- a/liblangtag/makefile.mk
+++ b/liblangtag/makefile.mk
@@ -37,12 +37,13 @@ TARFILE_MD5=54e578c91b1b68e69c72be22adcb2195
 PATCH_FILES=liblangtag-0.4.0-msvc-warning.patch
 PATCH_FILES+=liblangtag-0.4.0-windows.patch
 PATCH_FILES+=liblangtag-0.4.0-reg2xml-encoding-problem.patch
+PATCH_FILES+=liblangtag-0.4.0-windows2.patch
 .IF "$(OS)" == "MACOSX"
 PATCH_FILES=liblangtag-0.4.0-mac.patch
 .END
 CONFIGURE_DIR=.
 BUILD_DIR=$(CONFIGURE_DIR)
-CONFIGURE_FLAGS= --disable-modules
+CONFIGURE_FLAGS= --disable-modules --disable-test
 
 .IF "$(OS)" == "MACOSX"
 my_prefix = @.__________________________________________________$(EXTRPATH)
@@ -100,6 +101,7 @@ PATCH_FILES+=liblangtag-0.4.0-mingw.patch
 .ELSE	# "$(COM)"=="GCC"
 
 PATCH_FILES+=liblangtag-0.4.0-msc-configure.patch
+PATCH_FILES+=liblangtag-0.4.0-cross.patch
 
 .ENDIF	# "$(COM)"=="GCC"
 .ENDIF	# "$(GUI)"=="WNT"


More information about the Libreoffice-commits mailing list