You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2012/07/06 12:07:56 UTC

svn commit: r1358102 - in /incubator/ooo/trunk: ext_libraries/hunspell/ ext_libraries/hunspell/prj/ main/ main/hunspell/ main/lingucomponent/source/spellcheck/spell/ main/solenv/bin/ main/solenv/inc/

Author: af
Date: Fri Jul  6 10:07:56 2012
New Revision: 1358102

URL: http://svn.apache.org/viewvc?rev=1358102&view=rev
Log:
#i116680# Update of hunspell from 1.2.9 to 1.3.2

Added:
    incubator/ooo/trunk/ext_libraries/hunspell/
    incubator/ooo/trunk/ext_libraries/hunspell/hunspell-bash.patch
    incubator/ooo/trunk/ext_libraries/hunspell/hunspell-mingw.patch
    incubator/ooo/trunk/ext_libraries/hunspell/hunspell-solaris.patch
    incubator/ooo/trunk/ext_libraries/hunspell/hunspell-wntconfig.patch
    incubator/ooo/trunk/ext_libraries/hunspell/makefile.mk
    incubator/ooo/trunk/ext_libraries/hunspell/prj/
    incubator/ooo/trunk/ext_libraries/hunspell/prj/build.lst
    incubator/ooo/trunk/ext_libraries/hunspell/prj/d.lst
Removed:
    incubator/ooo/trunk/main/hunspell/
Modified:
    incubator/ooo/trunk/main/external_deps.lst
    incubator/ooo/trunk/main/lingucomponent/source/spellcheck/spell/makefile.mk
    incubator/ooo/trunk/main/solenv/bin/download_external_dependencies.pl
    incubator/ooo/trunk/main/solenv/inc/libs.mk

Added: incubator/ooo/trunk/ext_libraries/hunspell/hunspell-bash.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_libraries/hunspell/hunspell-bash.patch?rev=1358102&view=auto
==============================================================================
--- incubator/ooo/trunk/ext_libraries/hunspell/hunspell-bash.patch (added)
+++ incubator/ooo/trunk/ext_libraries/hunspell/hunspell-bash.patch Fri Jul  6 10:07:56 2012
@@ -0,0 +1,8 @@
+--- misc/hunspell-1.3.2/tests/test.sh	2010-02-23 21:18:50.000000000 +0900
++++ misc/build/hunspell-1.3.2/tests/test.sh	2010-05-05 13:01:42.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ export LC_ALL="C"
+ 
+ function check_valgrind_log () {

Added: incubator/ooo/trunk/ext_libraries/hunspell/hunspell-mingw.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_libraries/hunspell/hunspell-mingw.patch?rev=1358102&view=auto
==============================================================================
--- incubator/ooo/trunk/ext_libraries/hunspell/hunspell-mingw.patch (added)
+++ incubator/ooo/trunk/ext_libraries/hunspell/hunspell-mingw.patch Fri Jul  6 10:07:56 2012
@@ -0,0 +1,12 @@
+--- misc/hunspell-1.3.2/src/tools/hunspell.cxx	2010-02-27 23:37:14.000000000 +0900
++++ misc/build/hunspell-1.3.2/src/tools/hunspell.cxx	2010-04-25 07:57:39.233875000 +0900
+@@ -27,7 +27,9 @@
+ 
+ #ifdef WIN32
+ 
++#ifndef __MINGW32__
+ #define gettext
++#endif
+ #define LIBDIR "C:\\Hunspell\\"
+ #define USEROOODIR "Application Data\\OpenOffice.org 2\\user\\wordbook"
+ #define OOODIR \

Added: incubator/ooo/trunk/ext_libraries/hunspell/hunspell-solaris.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_libraries/hunspell/hunspell-solaris.patch?rev=1358102&view=auto
==============================================================================
--- incubator/ooo/trunk/ext_libraries/hunspell/hunspell-solaris.patch (added)
+++ incubator/ooo/trunk/ext_libraries/hunspell/hunspell-solaris.patch Fri Jul  6 10:07:56 2012
@@ -0,0 +1,12 @@
+--- misc/hunspell-1.3.2.orig/src/tools/hunspell.cxx	2010-02-27 23:42:05.000000000 +0000
++++ misc/build/hunspell-1.3.2/src/tools/hunspell.cxx	2010-02-27 23:43:02.000000000 +0000
+@@ -10,6 +10,9 @@
+ #include "hunspell.hxx"
+ #include "csutil.hxx"
+ 
++// switch off iconv support for tests (fixing Solaris problems)
++#undef HAVE_ICONV
++
+ #ifndef HUNSPELL_EXTRA
+ #define suggest_auto suggest
+ #endif

Added: incubator/ooo/trunk/ext_libraries/hunspell/hunspell-wntconfig.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_libraries/hunspell/hunspell-wntconfig.patch?rev=1358102&view=auto
==============================================================================
--- incubator/ooo/trunk/ext_libraries/hunspell/hunspell-wntconfig.patch (added)
+++ incubator/ooo/trunk/ext_libraries/hunspell/hunspell-wntconfig.patch Fri Jul  6 10:07:56 2012
@@ -0,0 +1,4 @@
+--- misc/hunspell-1.2.9/config.h	2010-02-25 14:38:38.000000000 +0000
++++ misc/build/hunspell-1.2.9/config.h	2010-02-25 14:38:42.000000000 +0000
+@@ -1 +0,0 @@
+-dummy

Added: incubator/ooo/trunk/ext_libraries/hunspell/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_libraries/hunspell/makefile.mk?rev=1358102&view=auto
==============================================================================
--- incubator/ooo/trunk/ext_libraries/hunspell/makefile.mk (added)
+++ incubator/ooo/trunk/ext_libraries/hunspell/makefile.mk Fri Jul  6 10:07:56 2012
@@ -0,0 +1,103 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+PRJ=.
+
+PRJNAME=hunspell
+TARGET=hunspell
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE :	settings.mk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(ENABLE_HUNSPELL)" != "YES"
+
+all:
+	@echo "hunspell is disabled"
+
+.ELSE
+
+TARFILE_NAME=hunspell-1.3.2
+TARFILE_MD5=3121aaf3e13e5d88dfff13fb4a5f1ab8
+
+PATCH_FILES=					\
+    hunspell-solaris.patch		\
+    hunspell-bash.patch
+
+.IF "$(GUI)"=="UNX"
+
+#relative to CONFIGURE_DIR
+CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) configure
+CONFIGURE_FLAGS= --disable-shared --with-pic
+.IF "$(COMNAME)"=="sunpro5"
+CONFIGURE_FLAGS+= CFLAGS=-xc99=none
+.ENDIF                  # "$(COMNAME)"=="sunpro5"
+
+.IF "$(SYSBASE)"!=""
+.IF "$(EXTRA_CFLAGS)"!=""
+CONFIGURE_FLAGS+= CFLAGS="$(EXTRA_CFLAGS)" CXXFLAGS="$(EXTRA_CFLAGS)"
+.ENDIF # "$(EXTRA_CFLAGS)"!=""
+.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
+CONFIGURE_FLAGS+=CPPFLAGS="$(EXTRA_CDEFS)"
+.ELIF "$(OS)"=="FREEBSD" # "$(SYSBASE)"!=""
+CONFIGURE_FLAGS+=CPPFLAGS="-I$(LIBINTL_PREFIX)/include" --with-libintl-prefix="$(LIBINTL_PREFIX)"
+.ENDIF
+
+BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
+
+OUT2LIB=$(BUILD_DIR)$/src$/hunspell$/.libs$/libhunspell-1.3.a
+
+.ENDIF # "$(GUI)"=="UNX"
+
+
+.IF "$(GUI)"=="WNT"
+.IF "$(COM)"=="GCC"
+PATCH_FILES=\
+    hunspell-mingw.patch
+
+CONFIGURE_ACTION=configure
+CONFIGURE_FLAGS= --disable-shared --with-pic
+# LDFLAGS=-Wl,--enable-runtime-pseudo-reloc-v2
+BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
+OUT2LIB=$(BUILD_DIR)$/src$/hunspell$/.libs$/libhunspell-1.3.a
+.ELSE # GCC
+BUILD_ACTION= cd src/hunspell && cp ../win_api/config.h . && CDEFS_PRESET=-DBUILDING_LIBHUNSPELL dmake
+.ENDIF # GCC
+.ENDIF # "$(GUI)"=="WNT"
+
+.IF "$(GUI)"=="OS2"
+BUILD_ACTION=cd src/hunspell && dmake
+.ENDIF # "$(GUI)"=="OS2"
+
+OUT2INC=									\
+	$(BUILD_DIR)$/src$/hunspell$/*.hxx		\
+	$(BUILD_DIR)$/src$/hunspell$/hunvisapi.h
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE : target.mk
+.INCLUDE : tg_ext.mk
+.ENDIF

Added: incubator/ooo/trunk/ext_libraries/hunspell/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_libraries/hunspell/prj/build.lst?rev=1358102&view=auto
==============================================================================
--- incubator/ooo/trunk/ext_libraries/hunspell/prj/build.lst (added)
+++ incubator/ooo/trunk/ext_libraries/hunspell/prj/build.lst Fri Jul  6 10:07:56 2012
@@ -0,0 +1,3 @@
+hun     hunspell        :       solenv ICU:icu NULL
+hun     hunspell              usr1    -       all hun_mkout NULL
+hun     hunspell              nmake   -       all hun_hunspell NULL

Added: incubator/ooo/trunk/ext_libraries/hunspell/prj/d.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/ext_libraries/hunspell/prj/d.lst?rev=1358102&view=auto
==============================================================================
--- incubator/ooo/trunk/ext_libraries/hunspell/prj/d.lst (added)
+++ incubator/ooo/trunk/ext_libraries/hunspell/prj/d.lst Fri Jul  6 10:07:56 2012
@@ -0,0 +1,6 @@
+..\%__SRC%\lib\lib*.*           %_DEST%\lib%_EXT%\lib*.*
+..\%__SRC%\slb\lib*.*           %_DEST%\lib%_EXT%\lib*.*
+
+mkdir: %_DEST%\inc%_EXT%\hunspell
+..\%__SRC%\inc\*.hxx            %_DEST%\inc%_EXT%\hunspell\*.hxx
+..\%__SRC%\inc\hunvisapi.h      %_DEST%\inc%_EXT%\hunspell\hunvisapi.h

Modified: incubator/ooo/trunk/main/external_deps.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/external_deps.lst?rev=1358102&r1=1358101&r2=1358102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/external_deps.lst (original)
+++ incubator/ooo/trunk/main/external_deps.lst Fri Jul  6 10:07:56 2012
@@ -304,9 +304,9 @@ if (ENABLE_CATEGORY_B==YES && WITH_CATB_
     URL2 = $(SVN_TRUNK)$(MD5)-$(name)
 
 if (ENABLE_CATEGORY_B==YES && ENABLE_HUNSPELL==YES)
-    name = hunspell-1.2.9.tar.gz
-    MD5 = 68dd2e8253d9a7930e9fd50e2d7220d0
-    URL1 = http://sourceforge.net/projects/hunspell/files/Hunspell/1.2.9/hunspell-1.2.9.tar.gz/download
+    name = hunspell-1.3.2.tar.gz
+    MD5 = 3121aaf3e13e5d88dfff13fb4a5f1ab8
+    URL1 = http://sourceforge.net/projects/hunspell/files/Hunspell/1.3.2/hunspell-1.3.2.tar.gz/download
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
     URL3 = $(SVN_TRUNK)$(MD5)-$(name)
 

Modified: incubator/ooo/trunk/main/lingucomponent/source/spellcheck/spell/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/lingucomponent/source/spellcheck/spell/makefile.mk?rev=1358102&r1=1358101&r2=1358102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/lingucomponent/source/spellcheck/spell/makefile.mk (original)
+++ incubator/ooo/trunk/main/lingucomponent/source/spellcheck/spell/makefile.mk Fri Jul  6 10:07:56 2012
@@ -73,6 +73,11 @@ SHL1IMPLIB=		i$(REALNAME)
 SHL1DEPN=		$(SHL1LIBS)
 SHL1DEF=		$(MISC)$/$(SHL1TARGET).def
 
+# Hunspell is a static library.  Avoid the definition
+#     LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport)
+#
+CDEFS+=-DHUNSPELL_STATIC
+
 SHL1VERSIONMAP=$(SOLARENV)/src/component.map
 
 # build DEF file

Modified: incubator/ooo/trunk/main/solenv/bin/download_external_dependencies.pl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/download_external_dependencies.pl?rev=1358102&r1=1358101&r2=1358102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/download_external_dependencies.pl (original)
+++ incubator/ooo/trunk/main/solenv/bin/download_external_dependencies.pl Fri Jul  6 10:07:56 2012
@@ -159,11 +159,7 @@ sub ProcessLastBlock ()
         my $name = GetValue('name');
         my $checksum = GetChecksum();
 
-        if ( ! defined $checksum)
-        {
-            die "no checksum given for $name";
-        }
-        elsif ( ! IsPresent($name, $checksum))
+        if ( ! IsPresent($name, $checksum))
         {
             AddDownloadRequest($name, $checksum);
         }
@@ -263,7 +259,7 @@ sub SubstituteVariables ($)
     {
         my ($head,$name,$tail) = ($1,$2,$3);
         my $value = GetValue($name);
-        die "can evaluate variable $name" if ! defined $value;
+        die "can not evaluate variable $name" if ! defined $value;
         $text = $head.$value.$tail;
 
         die "(probably) detected an infinite recursion in variable definitions" if --$infinite_recursion_guard<=0;
@@ -387,7 +383,12 @@ sub IsPresent ($$)
 
     # File exists.  Check if its checksum is correct.
     my $checksum;
-    if ($given_checksum->{'type'} eq "MD5")
+    if ( ! defined $given_checksum)
+    {
+        print "no checksum given, can not verify\n";
+        return 1;
+    }
+    elsif ($given_checksum->{'type'} eq "MD5")
     {
         my $md5 = Digest::MD5->new();
         open my $in, $filename;
@@ -410,7 +411,7 @@ sub IsPresent ($$)
     {
         # Checksum does not match.  Delete the file.
         print "$name exists, but checksum does not match => deleting\n";
-        #unlink($filename);
+        unlink($filename);
         return 0;
     }
     else
@@ -455,7 +456,12 @@ sub Download ()
 
         foreach my $url (@$urls)
         {
-            last if DownloadFile($checksum->{'value'}."-".$name, $url, $checksum);
+            last if DownloadFile(
+                defined $checksum
+                    ? $checksum->{'value'}."-".$name
+                    : $name,
+                $url,
+                $checksum);
         }
     }
 }
@@ -480,7 +486,8 @@ sub DownloadFile ($$$)
     my $temporary_filename = $filename . ".part";
 
     print "downloading to $temporary_filename\n";
-    open my $out, ">$temporary_filename";
+    my $out;
+    open $out, ">$temporary_filename";
     binmode($out);
 
     # Prepare checksum
@@ -516,7 +523,7 @@ sub DownloadFile ($$$)
                             {
                                 $last_was_redirect = 0;
                                 # Throw away the data we got so far.
-                                $checksum->reset();
+                                $digest->reset();
                                 close $out;
                                 open $out, ">$temporary_filename";
                                 binmode($out);

Modified: incubator/ooo/trunk/main/solenv/inc/libs.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/inc/libs.mk?rev=1358102&r1=1358101&r2=1358102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/inc/libs.mk (original)
+++ incubator/ooo/trunk/main/solenv/inc/libs.mk Fri Jul  6 10:07:56 2012
@@ -344,7 +344,7 @@ ULINGULIB=-lulingu
 .IF "$(SYSTEM_HUNSPELL)" == "YES"
 HUNSPELLLIB=$(HUNSPELL_LIBS)
 .ELSE
-HUNSPELLLIB=-lhunspell-1.2
+HUNSPELLLIB=-lhunspell-1.3
 .ENDIF
 .IF "$(SYSTEM_MYTHES)" == "YES"
 MYTHESLIB=$(MYTHES_LIBS)