summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2012-07-06 09:07:56 +0000
committerAndre Fischer <af@apache.org>2012-07-06 09:07:56 +0000
commit2cede59569e9f86848f6e193e323caaa106a0985 (patch)
tree3b63408f99e994d20c2078a03a75b92583a0af30
parentcb4019e9c52ae7f89a6b63c738c4bc4e670a9666 (diff)
#i116680# Update of hunspell from 1.2.9 to 1.3.2
Notes
Notes: ignore: obsolete
-rw-r--r--external_deps.lst6
-rw-r--r--hunspell/hunspell-1.2.8-thesfix.patch28
-rw-r--r--hunspell/hunspell-mingw.patch12
-rw-r--r--hunspell/hunspell-solaris.patch12
-rw-r--r--hunspell/hunspell-stacksmash.patch28
-rw-r--r--hunspell/hunspell-wntconfig.patch4
-rw-r--r--hunspell/hunspell.patch8
-rw-r--r--hunspell/makefile.mk104
-rw-r--r--hunspell/prj/build.lst3
-rw-r--r--hunspell/prj/d.lst5
-rw-r--r--lingucomponent/source/spellcheck/spell/makefile.mk5
-rwxr-xr-xsolenv/bin/download_external_dependencies.pl29
-rw-r--r--solenv/inc/libs.mk2
13 files changed, 27 insertions, 219 deletions
diff --git a/external_deps.lst b/external_deps.lst
index 4a53099b0b38..6a0d41a2e6f9 100644
--- a/external_deps.lst
+++ b/external_deps.lst
@@ -304,9 +304,9 @@ if (ENABLE_CATEGORY_B==YES && WITH_CATB_FONTS==YES)
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)
diff --git a/hunspell/hunspell-1.2.8-thesfix.patch b/hunspell/hunspell-1.2.8-thesfix.patch
deleted file mode 100644
index c41fde45050f..000000000000
--- a/hunspell/hunspell-1.2.8-thesfix.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- misc/hunspell-1.2.8/src/hunspell/hunspell.cxx 2010-03-16 14:37:36.998879385 +0100
-+++ misc/build/hunspell-1.2.8/src/hunspell/hunspell.cxx 2010-03-16 14:37:10.416222464 +0100
-@@ -1666,7 +1666,7 @@
- if (!q2) return 0; // bad XML input
- if (check_xml_par(q, "type=", "analyze")) {
- int n = 0, s = 0;
-- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) n = analyze(slst, cw);
-+ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) n = analyze(slst, cw);
- if (n == 0) return 0;
- // convert the result to <code><a>ana1</a><a>ana2</a></code> format
- for (int i = 0; i < n; i++) s+= strlen((*slst)[i]);
-@@ -1687,13 +1687,13 @@
- (*slst)[0] = r;
- return 1;
- } else if (check_xml_par(q, "type=", "stem")) {
-- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) return stem(slst, cw);
-+ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw);
- } else if (check_xml_par(q, "type=", "generate")) {
-- int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN);
-+ int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1);
- if (n == 0) return 0;
- char * q3 = strstr(q2 + 1, "<word");
- if (q3) {
-- if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN)) {
-+ if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN - 1)) {
- return generate(slst, cw, cw2);
- }
- } else {
diff --git a/hunspell/hunspell-mingw.patch b/hunspell/hunspell-mingw.patch
deleted file mode 100644
index 0120e01ddba1..000000000000
--- a/hunspell/hunspell-mingw.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- misc/hunspell-1.2.9/src/tools/hunspell.cxx 2010-02-27 23:37:14.000000000 +0900
-+++ misc/build/hunspell-1.2.9/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 \
diff --git a/hunspell/hunspell-solaris.patch b/hunspell/hunspell-solaris.patch
deleted file mode 100644
index 37c5101364b4..000000000000
--- a/hunspell/hunspell-solaris.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- misc/hunspell-1.2.9.orig/src/tools/hunspell.cxx 2010-02-27 23:42:05.000000000 +0000
-+++ misc/build/hunspell-1.2.9/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
diff --git a/hunspell/hunspell-stacksmash.patch b/hunspell/hunspell-stacksmash.patch
deleted file mode 100644
index 8765b6d784d3..000000000000
--- a/hunspell/hunspell-stacksmash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- misc/hunspell-1.2.9/src/hunspell/hunspell.cxx 2010-03-04 10:25:06.000000000 +0000
-+++ misc/build/hunspell-1.2.9/src/hunspell/hunspell.cxx 2010-03-04 10:25:38.000000000 +0000
-@@ -1665,7 +1665,7 @@
- if (!q2) return 0; // bad XML input
- if (check_xml_par(q, "type=", "analyze")) {
- int n = 0, s = 0;
-- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) n = analyze(slst, cw);
-+ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) n = analyze(slst, cw);
- if (n == 0) return 0;
- // convert the result to <code><a>ana1</a><a>ana2</a></code> format
- for (int i = 0; i < n; i++) s+= strlen((*slst)[i]);
-@@ -1686,13 +1686,13 @@
- (*slst)[0] = r;
- return 1;
- } else if (check_xml_par(q, "type=", "stem")) {
-- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) return stem(slst, cw);
-+ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw);
- } else if (check_xml_par(q, "type=", "generate")) {
-- int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN);
-+ int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1);
- if (n == 0) return 0;
- char * q3 = strstr(q2 + 1, "<word");
- if (q3) {
-- if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN)) {
-+ if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN - 1)) {
- return generate(slst, cw, cw2);
- }
- } else {
diff --git a/hunspell/hunspell-wntconfig.patch b/hunspell/hunspell-wntconfig.patch
deleted file mode 100644
index 9b6bc9c3fbb2..000000000000
--- a/hunspell/hunspell-wntconfig.patch
+++ /dev/null
@@ -1,4 +0,0 @@
---- 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
diff --git a/hunspell/hunspell.patch b/hunspell/hunspell.patch
deleted file mode 100644
index abbbe1ef0167..000000000000
--- a/hunspell/hunspell.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- misc/hunspell-1.2.9/tests/test.sh 2010-02-23 21:18:50.000000000 +0900
-+++ misc/build/hunspell-1.2.9/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 () {
diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk
deleted file mode 100644
index baf3ebd21530..000000000000
--- a/hunspell/makefile.mk
+++ /dev/null
@@ -1,104 +0,0 @@
-#**************************************************************
-#
-# 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.2.9
-TARFILE_MD5=68dd2e8253d9a7930e9fd50e2d7220d0
-ADDITIONAL_FILES+=config.h
-
-PATCH_FILES=\
- hunspell-wntconfig.patch \
- hunspell-solaris.patch \
- hunspell-stacksmash.patch \
- hunspell.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.2.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=make
-OUT2LIB=$(BUILD_DIR)$/src$/hunspell$/.libs$/libhunspell-1.2.a
-.ELSE
-BUILD_ACTION=cd src/hunspell && dmake
-.ENDIF
-.ENDIF # "$(GUI)"=="WNT"
-
-.IF "$(GUI)"=="OS2"
-BUILD_ACTION=cd src/hunspell && dmake
-.ENDIF # "$(GUI)"=="OS2"
-
-OUT2INC= \
- $(BUILD_DIR)$/src$/hunspell$/*.hxx
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
-.ENDIF
diff --git a/hunspell/prj/build.lst b/hunspell/prj/build.lst
deleted file mode 100644
index ea87500d1d6d..000000000000
--- a/hunspell/prj/build.lst
+++ /dev/null
@@ -1,3 +0,0 @@
-hun hunspell : solenv ICU:icu NULL
-hun hunspell usr1 - all hun_mkout NULL
-hun hunspell nmake - all hun_hunspell NULL
diff --git a/hunspell/prj/d.lst b/hunspell/prj/d.lst
deleted file mode 100644
index a323ce9f6344..000000000000
--- a/hunspell/prj/d.lst
+++ /dev/null
@@ -1,5 +0,0 @@
-..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
-..\%__SRC%\slb\libhunspell.lib %_DEST%\lib%_EXT%\libhunspell.lib
-
-mkdir: %_DEST%\inc%_EXT%\hunspell
-..\%__SRC%\inc\*.hxx %_DEST%\inc%_EXT%\hunspell\*.hxx
diff --git a/lingucomponent/source/spellcheck/spell/makefile.mk b/lingucomponent/source/spellcheck/spell/makefile.mk
index 03840145ca6e..049733b94929 100644
--- a/lingucomponent/source/spellcheck/spell/makefile.mk
+++ b/lingucomponent/source/spellcheck/spell/makefile.mk
@@ -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
diff --git a/solenv/bin/download_external_dependencies.pl b/solenv/bin/download_external_dependencies.pl
index 0939635e0036..1854f78df974 100755
--- a/solenv/bin/download_external_dependencies.pl
+++ b/solenv/bin/download_external_dependencies.pl
@@ -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);
diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk
index aef6ae3a1f62..af9d5dc31f1a 100644
--- a/solenv/inc/libs.mk
+++ b/solenv/inc/libs.mk
@@ -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)