[Libreoffice-commits] .: 2 commits - glib/makefile.mk glib/prj liblangtag/liblangtag-0.2-0001-Fix-a-memory-leak.patch liblangtag/liblangtag-0.2-0002-Fix-invalid-memory-access.patch liblangtag/liblangtag-0.2-configure.patch liblangtag/liblangtag-0.2-msc-configure.patch liblangtag/makefile.mk liblangtag/prj liblangtag/README

Eike Rathke erack at kemper.freedesktop.org
Mon Jun 4 08:01:42 PDT 2012


 glib/makefile.mk                                               |    3 
 glib/prj/d.lst                                                 |    2 
 liblangtag/README                                              |    1 
 liblangtag/liblangtag-0.2-0001-Fix-a-memory-leak.patch         |   44 +++
 liblangtag/liblangtag-0.2-0002-Fix-invalid-memory-access.patch |   50 ++++
 liblangtag/liblangtag-0.2-configure.patch                      |   46 +++
 liblangtag/liblangtag-0.2-msc-configure.patch                  |  116 ++++++++++
 liblangtag/makefile.mk                                         |  112 +++++++++
 liblangtag/prj/build.lst                                       |    3 
 liblangtag/prj/d.lst                                           |   29 ++
 10 files changed, 406 insertions(+)

New commits:
commit 0fb770c4a86ef0b5e3740ab7078b6f36db7638e3
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jun 4 17:00:55 2012 +0200

    ported liblangtag build to wntmsci

diff --git a/glib/makefile.mk b/glib/makefile.mk
index 0180e1d..77ad4f0 100644
--- a/glib/makefile.mk
+++ b/glib/makefile.mk
@@ -163,6 +163,9 @@ OUT2LIB+=gobject/glib-genmarshal.lib
 OUT2LIB+=gobject/gobject-2.0.lib
 OUT2LIB+=gthread/gthread-2.0.lib
 
+.IF "$(OS)"=="WNT"
+OUT2INC+=build$/win32$/dirent.h
+.ENDIF
 OUT2INC+=build$/win32$/make.msc
 OUT2INC+=build$/win32$/module.defs
 
diff --git a/glib/prj/d.lst b/glib/prj/d.lst
index 7e4ab84..cb20723 100644
--- a/glib/prj/d.lst
+++ b/glib/prj/d.lst
@@ -29,6 +29,7 @@ symlink: %_DEST%\lib\libgobject-2.0.so.0 %_DEST%\lib\libgobject-2.0.so
 ..\%__SRC%\lib\gthread-2.0.lib %_DEST%\lib\gthread-2.0.lib
 ..\%__SRC%\lib\glib-2.0.lib %_DEST%\lib\glib-2.0.lib
 ..\%__SRC%\lib\gobject-2.0.lib %_DEST%\lib\gobject-2.0.lib
+..\%__SRC%\lib\dirent.lib %_DEST%\lib\dirent.lib
 
 mkdir: %_DEST%\inc\external\gio-unix-2.0
 mkdir: %_DEST%\inc\external\gio-unix-2.0\gio
@@ -50,6 +51,7 @@ mkdir: %_DEST%\inc\external\glib-2.0
 ..\%__SRC%\inc\gmodule.h %_DEST%\inc\external\glib-2.0\gmodule.h
 ..\%__SRC%\inc\make.msc %_DEST%\inc\external\glib-2.0\make.msc
 ..\%__SRC%\inc\module.defs %_DEST%\inc\external\glib-2.0\module.defs
+..\%__SRC%\inc\dirent.h %_DEST%\inc\external\glib-2.0\dirent.h
 
 mkdir: %_DEST%\inc\external\glib-2.0\gio
 ..\%__SRC%\inc\gaction.h %_DEST%\inc\external\glib-2.0\gio\gaction.h
diff --git a/liblangtag/liblangtag-0.2-configure.patch b/liblangtag/liblangtag-0.2-configure.patch
new file mode 100644
index 0000000..d78f4dd
--- /dev/null
+++ b/liblangtag/liblangtag-0.2-configure.patch
@@ -0,0 +1,46 @@
+--- misc/liblangtag-0.2/configure	2012-02-02 11:04:11.000000000 +0100
++++ misc/build/liblangtag-0.2/configure	2012-05-24 22:50:18.991459556 +0200
+@@ -13514,7 +13514,9 @@
+   no_glib=""
+ 
+   if test "x$PKG_CONFIG" = x ; then
+-    no_glib=yes
++      if test "x$LIBO_GLIB_CHEAT" = x ; then
++          no_glib=yes
++      fi
+     PKG_CONFIG=no
+   fi
+ 
+@@ -13537,18 +13539,20 @@
+   fi
+ 
+   if test x"$no_glib" = x ; then
+-    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+-    GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
+-    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+-
+-    GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+-    GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+-    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
+-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+-    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
+-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+-    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
+-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
++      if test "x$LIBO_GLIB_CHEAT" = x ; then
++          GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
++          GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
++          GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
++
++          GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
++          GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
++          glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
++              sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
++          glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
++              sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
++          glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
++              sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
++      fi
+     if test "x$enable_glibtest" = "xyes" ; then
+       ac_save_CFLAGS="$CFLAGS"
+       ac_save_LIBS="$LIBS"
diff --git a/liblangtag/liblangtag-0.2-msc-configure.patch b/liblangtag/liblangtag-0.2-msc-configure.patch
new file mode 100644
index 0000000..df75941
--- /dev/null
+++ b/liblangtag/liblangtag-0.2-msc-configure.patch
@@ -0,0 +1,116 @@
+--- misc/liblangtag-0.2/configure	2012-06-03 03:21:20.513755000 +0200
++++ misc/build/liblangtag-0.2/configure	2012-06-02 23:04:17.742605700 +0200
+@@ -3751,6 +3751,8 @@
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_c_werror_flag=$ac_save_c_werror_flag
+ fi
++# MSVC displays only " Command line warning D9002 : ignoring unknown option '-g'", explicitly set to no.
++ac_cv_prog_cc_g=no
+ { $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.2/data/Makefile.in	2012-02-02 11:04:10.000000000 +0100
++++ misc/build/liblangtag-0.2/data/Makefile.in	2012-06-03 03:20:28.045005000 +0200
+@@ -59,7 +59,7 @@
+ reg2xml_OBJECTS = $(am_reg2xml_OBJECTS)
+ reg2xml_LDADD = $(LDADD)
+ reg2xml_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+-	--mode=link $(CCLD) $(reg2xml_CFLAGS) $(CFLAGS) \
++	--mode=link $(CCLD) \
+ 	$(reg2xml_LDFLAGS) $(LDFLAGS) -o $@
+ DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+@@ -70,9 +70,9 @@
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-CCLD = $(CC)
++CCLD = link
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++	--mode=link $(CCLD) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
+ SOURCES = $(reg2xml_SOURCES)
+ DIST_SOURCES = $(reg2xml_SOURCES)
+@@ -422,18 +422,18 @@
+ @am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+ 
+ reg2xml-reg2xml.o: reg2xml.c
+- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -MT reg2xml-reg2xml.o -MD -MP -MF $(DEPDIR)/reg2xml-reg2xml.Tpo -c -o reg2xml-reg2xml.o `test -f 'reg2xml.c' || echo '$(srcdir)/'`reg2xml.c
++ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -MT reg2xml-reg2xml.o -MD -MP -MF $(DEPDIR)/reg2xml-reg2xml.Tpo -c -Foreg2xml-reg2xml.o `test -f 'reg2xml.c' || echo '$(srcdir)/'`reg2xml.c
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/reg2xml-reg2xml.Tpo $(DEPDIR)/reg2xml-reg2xml.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='reg2xml.c' object='reg2xml-reg2xml.o' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -c -o reg2xml-reg2xml.o `test -f 'reg2xml.c' || echo '$(srcdir)/'`reg2xml.c
++ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -c -Foreg2xml-reg2xml.o `test -f 'reg2xml.c' || echo '$(srcdir)/'`reg2xml.c
+ 
+ reg2xml-reg2xml.obj: reg2xml.c
+- at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -MT reg2xml-reg2xml.obj -MD -MP -MF $(DEPDIR)/reg2xml-reg2xml.Tpo -c -o reg2xml-reg2xml.obj `if test -f 'reg2xml.c'; then $(CYGPATH_W) 'reg2xml.c'; else $(CYGPATH_W) '$(srcdir)/reg2xml.c'; fi`
++ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -MT reg2xml-reg2xml.obj -MD -MP -MF $(DEPDIR)/reg2xml-reg2xml.Tpo -c -Foreg2xml-reg2xml.obj `if test -f 'reg2xml.c'; then $(CYGPATH_W) 'reg2xml.c'; else $(CYGPATH_W) '$(srcdir)/reg2xml.c'; fi`
+ @am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/reg2xml-reg2xml.Tpo $(DEPDIR)/reg2xml-reg2xml.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='reg2xml.c' object='reg2xml-reg2xml.obj' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+- at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -c -o reg2xml-reg2xml.obj `if test -f 'reg2xml.c'; then $(CYGPATH_W) 'reg2xml.c'; else $(CYGPATH_W) '$(srcdir)/reg2xml.c'; fi`
++ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reg2xml_CFLAGS) $(CFLAGS) -c -Foreg2xml-reg2xml.obj `if test -f 'reg2xml.c'; then $(CYGPATH_W) 'reg2xml.c'; else $(CYGPATH_W) '$(srcdir)/reg2xml.c'; fi`
+ 
+ mostlyclean-libtool:
+ 	-rm -f *.lo
+--- misc/liblangtag-0.2/liblangtag/Makefile.in	2012-02-02 11:04:10.000000000 +0100
++++ misc/build/liblangtag-0.2/liblangtag/Makefile.in	2012-06-02 23:04:17.757766800 +0200
+@@ -97,8 +97,8 @@
+ am_liblangtag_la_OBJECTS = $(am__objects_3) $(am__objects_1)
+ liblangtag_la_OBJECTS = $(am_liblangtag_la_OBJECTS)
+ liblangtag_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(liblangtag_la_CFLAGS) \
+-	$(CFLAGS) $(liblangtag_la_LDFLAGS) $(LDFLAGS) -o $@
++	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
++	$(liblangtag_la_LDFLAGS) $(LDFLAGS) -o $@
+ DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -108,9 +108,9 @@
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-CCLD = $(CC)
++CCLD = link
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++	--mode=link $(CCLD) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
+ SOURCES = $(liblangtag_la_SOURCES)
+ DIST_SOURCES = $(liblangtag_la_SOURCES)
+--- misc/liblangtag-0.2/ltmain.sh	2011-12-27 11:43:05.000000000 +0100
++++ misc/build/liblangtag-0.2/ltmain.sh	2012-06-02 23:04:17.772927900 +0200
+@@ -8969,7 +8969,7 @@
+       fi
+ 
+       # Replace the output file specification.
+-      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
++      link_command=`$ECHO "$link_command" | $SED 's%-o \+ at OUTPUT@%/OUT:'"$output_objdir/$outputname"'%g'`
+ 
+       # Delete the old output files.
+       $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+--- misc/liblangtag-0.2/tests/Makefile.in	2012-02-02 11:04:10.000000000 +0100
++++ misc/build/liblangtag-0.2/tests/Makefile.in	2012-06-03 03:21:02.982505000 +0200
+@@ -149,9 +149,9 @@
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-CCLD = $(CC)
++CCLD = link
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++	--mode=link $(CCLD) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
+ SOURCES = $(check_extlang_SOURCES) $(check_grandfathered_SOURCES) \
+ 	$(check_lang_SOURCES) $(check_region_SOURCES) \
+@@ -286,6 +286,8 @@
+ 	@LDFLAGS@					\
+ 	$(top_builddir)/liblangtag/liblangtag.la	\
+ 	$(CHECK_LIBS)					\
++	$(LIBXML2_LIBS) \
++	$(GLIB_LIBS) \
+ 	$(NULL)
+ 
+ LIBTOOL = @LIBTOOL@
diff --git a/liblangtag/makefile.mk b/liblangtag/makefile.mk
index 335ce75..977eca7 100644
--- a/liblangtag/makefile.mk
+++ b/liblangtag/makefile.mk
@@ -35,11 +35,37 @@ TARFILE_MD5=fa6a2f85bd28baab035b2c95e722713f
 PATCH_FILES=liblangtag-0.2-0001-Fix-a-memory-leak.patch
 # liblangtag cf8dfcf1604e534f4c9eccbd9a05571c8a9dc74d
 PATCH_FILES+=liblangtag-0.2-0002-Fix-invalid-memory-access.patch
+PATCH_FILES+=liblangtag-0.2-configure.patch
 
 CONFIGURE_DIR=.
+BUILD_DIR=$(CONFIGURE_DIR)
+
+.IF "$(SYSTEM_LIBXML)"!="YES"
+CONFIGURE_FLAGS+= LIBXML2_CFLAGS='-I$(SOLARINCDIR)/external/libxml'
+.IF "$(GUI)"=="WNT" && "$(COM)"!="GCC"
+CONFIGURE_FLAGS+= LIBXML2_LIBS='$(SOLARLIBDIR)$/libxml2.lib'
+.ELSE
+CONFIGURE_FLAGS+= LIBXML2_LIBS='-L$(SOLARLIBDIR) -lxml2'
+.ENDIF
+.ENDIF
+
+.IF "$(SYSTEM_GLIB)"!="YES"
+# we're cheating here.. pkg-config wouldn't find anything useful, see configure patch
+CONFIGURE_FLAGS+= LIBO_GLIB_CHEAT=YES
+CONFIGURE_FLAGS+= GLIB_CFLAGS='-I$(SOLARINCDIR)/external/glib-2.0'
+.IF "$(GUI)"=="WNT" && "$(COM)"!="GCC"
+CONFIGURE_FLAGS+= GLIB_LIBS='$(SOLARLIBDIR)$/gio-2.0.lib $(SOLARLIBDIR)$/gobject-2.0.lib $(SOLARLIBDIR)$/gthread-2.0.lib $(SOLARLIBDIR)$/gmodule-2.0.lib $(SOLARLIBDIR)$/glib-2.0.lib'
+.ELSE
+CONFIGURE_FLAGS+= GLIB_LIBS='-L$(SOLARLIBDIR) -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0'
+.ENDIF
+CONFIGURE_FLAGS+= GLIB_GENMARSHAL=glib-genmarshal
+CONFIGURE_FLAGS+= GLIB_MKENUMS=glib-mkenums
+CONFIGURE_FLAGS+= GOBJECT_QUERY=gobject-query
+CONFIGURE_FLAGS+= --disable-glibtest
+.ENDIF
+
 CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) .$/configure
 
-BUILD_DIR=$(CONFIGURE_DIR)
 BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) -j$(EXTMAXPROCESS)
 
 .IF "$(GUI)"=="UNX"
@@ -49,11 +75,36 @@ OUT2LIB= \
     $(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST).$(LIBLANGTAG_MAJOR) \
     $(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST)
 
-.ENDIF
+.ENDIF	# "$(GUI)"=="UNX"
+
 
 .IF "$(GUI)"=="WNT"
+
+.IF "$(COM)"=="GCC"
+
+CONFIGURE_FLAGS+= LDFLAGS=-Wl,--enable-runtime-pseudo-reloc-v2
+
+.IF "$(CROSS_COMPILING)"=="YES"
+CONFIGURE_FLAGS+= --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
 .ENDIF
 
+OUT2LIB= \
+	$(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST).$(LIBLANGTAG_MAJOR).$(LIBLANGTAG_LIBMINOR).$(LIBLANGTAG_MICRO) \
+    $(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST).$(LIBLANGTAG_MAJOR) \
+    $(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST)
+
+.ELSE	# "$(COM)"=="GCC"
+
+PATCH_FILES+=liblangtag-0.2-msc-configure.patch
+
+OUT2LIB= \
+	$(BUILD_DIR)$/liblangtag/.libs$/langtag.lib
+
+.ENDIF	# "$(COM)"=="GCC"
+
+.ENDIF	# "$(GUI)"=="WNT"
+
+
 # --- Targets ------------------------------------------------------
 
 .INCLUDE : set_ext.mk
commit 9d559ea8c96c36eb086ede9bca36dd32c2b5a692
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jun 4 16:58:51 2012 +0200

    added liblangtag for BCP 47 language tags

diff --git a/liblangtag/README b/liblangtag/README
new file mode 100644
index 0000000..f48958d
--- /dev/null
+++ b/liblangtag/README
@@ -0,0 +1 @@
+From [https://github.com/tagoh/liblangtag/]. An interface for BCP47 language tags.
diff --git a/liblangtag/liblangtag-0.2-0001-Fix-a-memory-leak.patch b/liblangtag/liblangtag-0.2-0001-Fix-a-memory-leak.patch
new file mode 100644
index 0000000..985a7ad
--- /dev/null
+++ b/liblangtag/liblangtag-0.2-0001-Fix-a-memory-leak.patch
@@ -0,0 +1,44 @@
+From 132170753ea9cbd63cda8f3a80498c144f75b8ba Mon Sep 17 00:00:00 2001
+Message-Id: <132170753ea9cbd63cda8f3a80498c144f75b8ba.1337190143.git.erack at redhat.com>
+From: Akira TAGOH <akira at tagoh.org>
+Date: Mon, 6 Feb 2012 16:38:37 +0900
+Subject: [PATCH] Fix a memory leak
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
+
+This is a multi-part message in MIME format.
+--------------erAck-patch-parts
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+---
+ liblangtag/lt-extension.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+
+--------------erAck-patch-parts
+Content-Type: text/x-patch; name="0001-Fix-a-memory-leak.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-Fix-a-memory-leak.patch"
+
+diff --git a/liblangtag/lt-extension.c b/liblangtag/lt-extension.c
+index eb84b12..466ebce 100644
+--- a/liblangtag/lt-extension.c
++++ misc/build/liblangtag-0.2/liblangtag/lt-extension.c
+@@ -231,8 +231,11 @@ lt_extension_copy(lt_extension_t *extension)
+ 				       (lt_destroy_func_t)lt_ext_module_unref);
+ 			retval->singleton = extension->singleton;
+ 			for (i = 0; i < LT_MAX_EXT_MODULES; i++) {
+-				if (extension->extensions[i])
++				if (extension->extensions[i]) {
+ 					retval->extensions[i] = lt_ext_module_data_ref(extension->extensions[i]);
++					lt_mem_add_ref(&retval->parent, retval->extensions[i],
++						       (lt_destroy_func_t)lt_ext_module_data_unref);
++				}
+ 			}
+ 		}
+ 	}
+
+--------------erAck-patch-parts--
+
+
diff --git a/liblangtag/liblangtag-0.2-0002-Fix-invalid-memory-access.patch b/liblangtag/liblangtag-0.2-0002-Fix-invalid-memory-access.patch
new file mode 100644
index 0000000..b3b0ff3
--- /dev/null
+++ b/liblangtag/liblangtag-0.2-0002-Fix-invalid-memory-access.patch
@@ -0,0 +1,50 @@
+From cf8dfcf1604e534f4c9eccbd9a05571c8a9dc74d Mon Sep 17 00:00:00 2001
+Message-Id: <cf8dfcf1604e534f4c9eccbd9a05571c8a9dc74d.1337190149.git.erack at redhat.com>
+From: Akira TAGOH <akira at tagoh.org>
+Date: Mon, 5 Mar 2012 18:10:10 +0900
+Subject: [PATCH] Fix invalid memory access
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
+
+This is a multi-part message in MIME format.
+--------------erAck-patch-parts
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+---
+ liblangtag/lt-extension.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+
+--------------erAck-patch-parts
+Content-Type: text/x-patch; name="0001-Fix-invalid-memory-access.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-Fix-invalid-memory-access.patch"
+
+diff --git a/liblangtag/lt-extension.c b/liblangtag/lt-extension.c
+index 806712e..502bfd5 100644
+--- a/liblangtag/lt-extension.c
++++ misc/build/liblangtag-0.2/liblangtag/lt-extension.c
+@@ -196,6 +196,8 @@ lt_extension_cancel_tag(lt_extension_t *extension)
+ 				if (ll->prev)
+ 					ll->prev->next = NULL;
+ 				ll->prev = NULL;
++				if (ll == l)
++					l = NULL;
+ 				g_list_free(ll);
+ 				break;
+ 			}
+@@ -204,7 +206,8 @@ lt_extension_cancel_tag(lt_extension_t *extension)
+ 			else
+ 				g_string_append(extension->cached_tag, ll->data);
+ 		}
+-		g_list_free(l);
++		if (l)
++			g_list_free(l);
+ 		g_strfreev(tags);
+ 	}
+ }
+
+--------------erAck-patch-parts--
+
+
diff --git a/liblangtag/makefile.mk b/liblangtag/makefile.mk
new file mode 100644
index 0000000..335ce75
--- /dev/null
+++ b/liblangtag/makefile.mk
@@ -0,0 +1,61 @@
+#
+# Copyright 2012 LibreOffice contributors.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+PRJ=.
+
+PRJNAME=liblangtag
+TARGET=liblangtag
+
+LIBLANGTAG_MAJOR=0
+LIBLANGTAG_MINOR=2
+LIBLANGTAG_MICRO=0
+# currently liblangtag.so.0.1.0 is generated, presumably a bug?
+LIBLANGTAG_LIBMINOR=1
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE :	settings.mk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(SYSTEM_LIBLANGTAG)" == "YES"
+ at all:
+    @echo "Using system liblangtag."
+.ENDIF
+
+TARFILE_NAME=liblangtag-$(LIBLANGTAG_MAJOR).$(LIBLANGTAG_MINOR)
+TARFILE_MD5=fa6a2f85bd28baab035b2c95e722713f
+
+# liblangtag 132170753ea9cbd63cda8f3a80498c144f75b8ba
+PATCH_FILES=liblangtag-0.2-0001-Fix-a-memory-leak.patch
+# liblangtag cf8dfcf1604e534f4c9eccbd9a05571c8a9dc74d
+PATCH_FILES+=liblangtag-0.2-0002-Fix-invalid-memory-access.patch
+
+CONFIGURE_DIR=.
+CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) .$/configure
+
+BUILD_DIR=$(CONFIGURE_DIR)
+BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) -j$(EXTMAXPROCESS)
+
+.IF "$(GUI)"=="UNX"
+
+OUT2LIB= \
+	$(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST).$(LIBLANGTAG_MAJOR).$(LIBLANGTAG_LIBMINOR).$(LIBLANGTAG_MICRO) \
+    $(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST).$(LIBLANGTAG_MAJOR) \
+    $(BUILD_DIR)$/liblangtag/.libs$/$(TARGET)$(DLLPOST)
+
+.ENDIF
+
+.IF "$(GUI)"=="WNT"
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE :	target.mk
+.INCLUDE :	tg_ext.mk
diff --git a/liblangtag/prj/build.lst b/liblangtag/prj/build.lst
new file mode 100644
index 0000000..8e388c2
--- /dev/null
+++ b/liblangtag/prj/build.lst
@@ -0,0 +1,3 @@
+lt	liblangtag	: soltools GLIB:glib LIBXML2:libxml2 NULL
+lt	liblangtag	usr1	-	all	lt_mkout NULL
+lt	liblangtag	nmake	-	all	lt_liblangtag NULL
diff --git a/liblangtag/prj/d.lst b/liblangtag/prj/d.lst
new file mode 100644
index 0000000..d07e0a8
--- /dev/null
+++ b/liblangtag/prj/d.lst
@@ -0,0 +1,29 @@
+mkdir: %_DEST%\inc\liblangtag
+
+..\%__SRC%\misc\build\liblangtag*\liblangtag\langtag.h              %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-database.h          %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-error.h             %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-extension.h         %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-extlang-db.h        %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-extlang.h           %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-ext-module-data.h   %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-ext-module.h        %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-gobject.h           %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-grandfathered-db.h  %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-grandfathered.h     %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-lang-db.h           %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-lang.h              %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-redundant-db.h      %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-redundant.h         %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-region-db.h         %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-region.h            %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-script-db.h         %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-script.h            %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-tag.h               %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-variant-db.h        %_DEST%\inc\liblangtag\
+..\%__SRC%\misc\build\liblangtag*\liblangtag\lt-variant.h           %_DEST%\inc\liblangtag\
+
+..\%__SRC%\lib\* %_DEST%\lib\
+..\%__SRC%\bin\* %_DEST%\bin\
+
+linklib: liblangtag.*.*.*
diff --git a/liblangtag/prj/dmake b/liblangtag/prj/dmake
new file mode 100644
index 0000000..e69de29


More information about the Libreoffice-commits mailing list