automatic update by autodist [release 1.3.2-1mamba;Wed Feb 23 2011]

This commit is contained in:
Automatic Build System 2024-01-05 23:44:28 +01:00
parent 138c9a90ac
commit 402ddccf58
4 changed files with 86409 additions and 0 deletions

View File

@ -1,2 +1,11 @@
# hunspell
Hunspell is the default spell checker of OpenOffice.org office suite and expectant spell checker of Mozilla Firefox and Thunderbird.
Main features:
*Unicode support.
*Conditional and multiple affixes for languages with rich morphology.
*Extended compound word support.
*Morphological analysis (in custom item and arrangement style).
*Hunspell is based on MySpell and works also with MySpell dictionaries.
*GPL/LGPL/MPL tri-license.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,115 @@
diff -ru hunspell-1.2.8.orig/man/hunspell.1 hunspell-1.2.8/man/hunspell.1
--- hunspell-1.2.8.orig/man/hunspell.1 2008-06-12 09:50:43.000000000 +0100
+++ hunspell-1.2.8/man/hunspell.1 2009-05-01 09:05:15.000000000 +0100
@@ -309,9 +309,10 @@
.IP \fB\-p\ dict\fR
Set path of personal dictionary.
-Default dictionary depends from the locale settings.
-Without locale support, the default personal dictionary is
-the $HOME/.hunspell_default.
+The default dictionary depends on the locale settings. The
+following environment variables are searched: LANGUAGE, LC_ALL,
+LC_MESSAGES, and LANG. If none are set then the default personal
+dictionary is $HOME/.hunspell_default.
Setting
.I \-d
@@ -360,6 +361,11 @@
Equivalent to
.I \-p.
.SH FILES
+The default dictionary depends on the locale settings. The
+following environment variables are searched: LANGUAGE, LC_ALL,
+LC_MESSAGES, and LANG. If none are set then the following
+fallbacks are used:
+
.BI /usr/share/myspell/default.aff
Path of default affix file. See hunspell(4).
.PP
diff -ru hunspell-1.2.8.orig/src/tools/hunspell.cxx hunspell-1.2.8/src/tools/hunspell.cxx
--- hunspell-1.2.8.orig/src/tools/hunspell.cxx 2008-09-04 14:44:19.000000000 +0100
+++ hunspell-1.2.8/src/tools/hunspell.cxx 2009-05-01 09:15:33.000000000 +0100
@@ -168,7 +168,6 @@
int printgood = 0; // print only good words and lines
int showpath = 0; // show detected path of the dictionary
int checkurl = 0; // check URLs and mail addresses
-char * ui_lang = NULL; // locale for default dic_name
const char * ui_enc = NULL; // locale character encoding (default for I/O)
const char * io_enc = NULL; // I/O character encoding
@@ -1383,7 +1382,7 @@
#ifdef ENABLE_NLS
#ifdef HAVE_LOCALE_H
- ui_lang = setlocale(LC_ALL, "");
+ setlocale(LC_ALL, "");
textdomain("hunspell");
ui_enc = nl_langinfo(CODESET);
#endif
@@ -1515,13 +1514,26 @@
if (! dicname) {
if (! (dicname=getenv("DICTIONARY"))) {
- if ((dicname=ui_lang) || (dicname=getenv("LANG"))) {
- dicname = mystrdup(dicname);
- char * dot = strchr(dicname, '.');
- if (dot) *dot = '\0';
- char * at = strchr(dicname, '@');
- if (at) *at = '\0';
- } else {
+ /*
+ * Search in order of LANGUAGE, LC_ALL, LC_MESSAGES &
+ * LANG
+ */
+ const char *tests[] = { "LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG" };
+ for (int i = 0; i < sizeof(tests) / sizeof(const char*); ++i) {
+ if ((dicname=getenv(tests[i]))) {
+ dicname = mystrdup(dicname);
+ char * dot = strchr(dicname, '.');
+ if (dot) *dot = '\0';
+ char * at = strchr(dicname, '@');
+ if (at) *at = '\0';
+ break;
+ }
+ }
+
+ if (strcmp(dicname, "C") == 0)
+ dicname=mystrdup("en_US");
+
+ if (! dicname) {
dicname=mystrdup(DEFAULTDICNAME);
}
} else {
@@ -1535,6 +1544,12 @@
path = add(add(add(add(path, HOME), DIRSEP), USEROOODIR), PATHSEP);
path = add(path, OOODIR);
+ if (showpath) {
+ fprintf(stderr, gettext("SEARCH PATH:\n%s\n"), path);
+ fprintf(stderr, gettext("AVAILABLE DICTIONARIES (path is not mandatory for -d option):\n"));
+ search(path, NULL, NULL);
+ }
+
if (!privdicname) privdicname = mystrdup(getenv("WORDLIST"));
int diclen = strlen(dicname);
@@ -1544,9 +1559,6 @@
char * dic = search(path, dicname, ".dic");
if (aff && dic) {
if (showpath) {
- fprintf(stderr, gettext("SEARCH PATH:\n%s\n"), path);
- fprintf(stderr, gettext("AVAILABLE DICTIONARIES (path is not mandatory for -d option):\n"), path);
- search(path, NULL, NULL);
fprintf(stderr, gettext("LOADED DICTIONARY:\n%s\n%s\n"), aff, dic);
}
pMS[0] = new Hunspell(aff, dic, key);
@@ -1569,7 +1581,7 @@
} else if (dic) pMS[dmax-1]->add_dic(dic);
}
} else {
- fprintf(stderr,gettext("Can't open affix or dictionary files.\n"));
+ fprintf(stderr,gettext("Can't open affix or dictionary files for dictionary named \"%s\".\n"), dicname);
exit(1);
}

145
hunspell.spec Normal file
View File

@ -0,0 +1,145 @@
%define majver %(echo %version| cut -d. -f1-2)
Name: hunspell
Version: 1.3.2
Release: 1mamba
Summary: The default spell checker of OpenOffice.org office suite
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://hunspell.sourceforge.net/
Source: http://downloads.sourceforge.net/hunspell/hunspell-%{version}.tar.gz
Patch0: %{name}-1.1.11-lib_noversion.patch
Patch1: %{name}-1.2.8-defaultlanguage.patch
License: GPL, LGPL, MPL 1.1
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libncurses-devel
BuildRequires: libreadline-devel
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Hunspell is the default spell checker of OpenOffice.org office suite and expectant spell checker of Mozilla Firefox and Thunderbird.
Main features:
*Unicode support.
*Conditional and multiple affixes for languages with rich morphology.
*Extended compound word support.
*Morphological analysis (in custom item and arrangement style).
*Hunspell is based on MySpell and works also with MySpell dictionaries.
*GPL/LGPL/MPL tri-license.
%package -n libhunspell
Summary: Library for the default spell checker of OpenOffice.org office suite
Group: Development/Libraries
%description -n libhunspell
Hunspell is the default spell checker of OpenOffice.org office suite and expectant spell checker of Mozilla Firefox and Thunderbird.
Main features:
*Unicode support.
*Conditional and multiple affixes for languages with rich morphology.
*Extended compound word support.
*Morphological analysis (in custom item and arrangement style).
*Hunspell is based on MySpell and works also with MySpell dictionaries.
*GPL/LGPL/MPL tri-license.
%package -n libhunspell-devel
Summary: Devel package for %{name}
Group: Development/Libraries
Requires: libhunspell = %{?epoch:%epoch:}%{version}-%{release}
%description -n libhunspell-devel
Hunspell is the default spell checker of OpenOffice.org office suite and expectant spell checker of Mozilla Firefox and Thunderbird.
Main features:
*Unicode support.
*Conditional and multiple affixes for languages with rich morphology.
*Extended compound word support.
*Morphological analysis (in custom item and arrangement style).
*Hunspell is based on MySpell and works also with MySpell dictionaries.
*GPL/LGPL/MPL tri-license.
This package contains static libraries and header files need for development.
%prep
%setup -q -n %{name}-%{version}
#%patch0 -p1
#%patch1 -p1
%build
%configure \
--with-ui \
--with-readline
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%find_lang %{name}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/affixcompress
%{_bindir}/analyze
%{_bindir}/chmorph
%{_bindir}/hunspell
%{_bindir}/hunzip
%{_bindir}/hzip
%{_bindir}/ispellaff2myspell
%{_bindir}/makealias
%{_bindir}/munch
%{_bindir}/unmunch
%{_bindir}/wordforms
%{_bindir}/wordlist2hunspell
%{_mandir}/man1/hunspell.1.gz
%{_mandir}/man1/hunzip.1.gz
%{_mandir}/man1/hzip.1.gz
%{_mandir}/man4/hunspell.4.gz
%{_mandir}/hu/man1/hunspell.1.gz
%{_mandir}/hu/man4/hunspell.4.gz
%doc AUTHORS BUGS COPYING ChangeLog ChangeLog.O NEWS README README.myspell
%doc THANKS TODO
%files -n libhunspell -f %{name}.lang
%defattr(-,root,root)
%{_libdir}/libhunspell-%{majver}.so.*
%files -n libhunspell-devel
%defattr(-,root,root)
%dir %{_includedir}/hunspell
%{_includedir}/hunspell/*.h
%{_includedir}/hunspell/*.hxx
%{_libdir}/libhunspell-%{majver}.a
%{_libdir}/libhunspell-%{majver}.la
%{_libdir}/libhunspell-%{majver}.so
%{_libdir}/pkgconfig/hunspell.pc
%{_libdir}/libparsers.a
%{_mandir}/man3/hunspell.3.gz
%changelog
* Wed Feb 23 2011 Automatic Build System <autodist@mambasoft.it> 1.3.2-1mamba
- automatic update by autodist
* Mon Jan 03 2011 Automatic Build System <autodist@mambasoft.it> 1.2.13-1mamba
- automatic update by autodist
* Fri Jul 23 2010 Automatic Build System <autodist@mambasoft.it> 1.2.12-1mamba
- automatic update by autodist
* Sat May 29 2010 Automatic Build System <autodist@mambasoft.it> 1.2.11-1mamba
- automatic update by autodist
* Thu Jul 02 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.8-2mamba
- added defaultlanguage.patch
- added --with-ui and --with-readline configure options
* Tue Jan 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.8-1mamba
- update to 1.2.8
* Wed Aug 29 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2-1mamba
- package created by autospec