Sync from SUSE:SLFO:Main nuspell revision 1dadddb1024f95b535a7317e93f2aa60

This commit is contained in:
Adrian Schröter 2024-05-03 17:09:42 +02:00
commit 84333e85c1
4 changed files with 340 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
nuspell-5.1.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

169
nuspell.changes Normal file
View File

@ -0,0 +1,169 @@
-------------------------------------------------------------------
Sat Dec 3 22:29:51 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to v5.1.2:
* Rewrite internal testing tool verify and improve it to support testing
suggestions.
* Greatly improve the speed of suggestions in certain edge cases. See #45.
* Fix minor encoding issue in the CLI tool on Windows when reading from
file(s) instead of the standard input. UTF-8 is now the default encoding
in that case and not the one of the console.
-------------------------------------------------------------------
Sat Oct 8 05:20:22 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 5.1.1:
* Add configuration option BUILD_TOOLS that can be used to
disable building the CLI tool (gh#nuspell/nuspell#122).
* Made error reporting more detailed and robust
(gh#nuspell/nuspell#123).
* Fix compiler warnings regarding usage of deprecated functions.
- Changes from version 5.1.0:
* Add new API for finding dictionaries on the filesystem that
uses facilities from C++17 std::filesystem.
* Simplify CLI tool and removed some unused features from it.
* Deprecate old API for finding dictionaries on the filesystem
that used strings for paths.
* Remove man-page for CLI tool and dependency on pandoc.
- BuildRequires: pkgconfig(catch2) < 3 instead of unversioned
Catch2-devel, since package is not yet compatible with Catch2
version 3 and higher.
- Require gcc-c++ >= 10 for successful builds, i.e. BuildRequires:
gcc10-c++ for openSUSE < 1550.
- Fix building of API documentation and install it as part of
new doc package; BuildRequires: fdupes, graphviz (for dot).
- Spec file cleanups:
* Install license with every package.
* Remove any doc files from shared lib and install as part of
%{name}: shared lib should contain nothing more than the shared
object(s) and license.
* Move all %libname.so.* files to shared lib package, devel pkg
should contain just the %libname.so symlink amidst other devel
files.
* %{name}-devel pkg dependencies: Add shared lib, drop %{name}.
-------------------------------------------------------------------
Thu Jun 17 07:27:33 UTC 2021 - andy great <andythe_great@pm.me>
- Update to version 5.0.0.
* Fixed
* Greatly reduce memory usage.
* Increase speed of spellchecking.
* Fix long lagging when generating suggestions in edge cases.
* Fix building on OS Haiku.
* Changed
* Split file dictionary.hxx/cxx into multiple files. The other
files are implementation details and the public header
dictionary.hxx is now clean of private details.
* Removed
* Remove functions and classes that were deprecated in v4.x.
-------------------------------------------------------------------
Tue Jan 12 21:07:52 UTC 2021 - andy great <andythe_great@pm.me>
- Update to version 4.2.0.
* Deprecate functions that allowed non-Unicode encoding. In
particular, Dictionary::imbue() and Dictionary::imbue_utf8().
* Completely remove dependency on Boost. The CLI tools were
refactored to use ICU directly.
-------------------------------------------------------------------
Thu Nov 26 08:42:53 UTC 2020 - andy great <andythe_great@pm.me>
- Update to version 4.1.0.
* Added: Add new API for finding dictionaries on the file-system.
It is a set of free functions located in the file finder.hxx.
* Fixed: Improve searching for dictionaries on the file-system.
Fix finding them on
Fedora.
* Deprecated: Deprecate the old API for finding dictionaries,
i.e. the class Finder in the file finder.hxx.
- Updates since 3.1.2.
* Fix handling CRLF line endings in .dic. Fixes #89.
* Fix CMake scripts for unusual install prefixes.
* Improve hash-table insertion, avoid temporaries. This improves
loading times.
* Switch man-page generator from Ronn to Pandoc. This changes the
dependencies for building. See the README.
* Fix lifetime issue (segmentation fault) in ngram-based
suggestions.
* Fix internal usage of std::codecvt in edge case in function
to_wide() and to_narrow()
* Fix not propagating recursion depth in spell_break(), which
caused hangup.
* Fix overwriting of PDB files when compiling with Visual Studio.
This prevented debugging nuspell.dll.
* Fix output of CLI tool to be more compatible to ispell and
hunspell.
* Boost is no longer a dependency of the library at all. It is
still a dependency of the CLI tool.
* Use std::string_view in the public API instead of const
std::string&. Also use it internally at various places.
* Build as shared library by default. Building as static is still
possible via the CMake's variable BUILD_SHARED_LIBS.
* The public API is annotated with dll-export/visibility
attributes, and also some private functions are annotated needed
for testing. This reduces the file size.
* Use Unicode text segmentation by default in the CLI tool.
Simple segmentation on white-space is still available via CLI
option.
* Delete deprecated functions in the class Finder.
* Drop under-designed and undocumented feature in the CLI tool
about personal dictionaries.
-------------------------------------------------------------------
Sat Jul 11 17:52:37 UTC 2020 - andy great <andythe_great@pm.me>
- Update to version 3.1.2.
* Fixed: Internal refactorings that reduce function templates in
utils and finder.
* Changed: File utils.hxx is not installed any more. It is a
private header.
* Deprecated: Some functions for searching dictionaries in class
Finder are deprecated as they were searching in directories that
no longer contain dictionaries.
-------------------------------------------------------------------
Sat Jul 11 17:49:40 UTC 2020 - andy great <andythe_great@pm.me>
- Fix build for leap by enabling cmake rpath flag.
-------------------------------------------------------------------
Thu Jun 4 15:48:03 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Trim redundancies from description.
- Drop redundant (autodetected) pkgconfig require.
-------------------------------------------------------------------
Sat May 30 16:37:30 UTC 2020 - andy great <andythe_great@pm.me>
- Add doxygen dependency, and build documentation.
-------------------------------------------------------------------
Mon May 25 20:30:56 UTC 2020 - andy great <andythe_great@pm.me>
- Add Catch2 dependeny for test.
-------------------------------------------------------------------
Mon May 25 14:12:39 UTC 2020 - andy great <andythe_great@pm.me>
- Enable build for share library.
-------------------------------------------------------------------
Mon May 25 11:18:53 UTC 2020 - andy great <andythe_great@pm.me>
- Update to version 3.1.1.
* Updated description in README.
* Moved Hunspell files from the directory "src" into the
directory named "external" to clarify that it is third-party
dependency.
-------------------------------------------------------------------
Mon May 25 11:05:16 UTC 2020 - andy great <andythe_great@pm.me>
- Enable testing.
-------------------------------------------------------------------
Sat Apr 11 22:50:29 UTC 2020 - andy great <andythe_great@pm.me>
- Initial package release.

145
nuspell.spec Normal file
View File

@ -0,0 +1,145 @@
#
# spec file for package nuspell
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sonum 5
%define libname libnuspell
# Due to std::filesystem and std::charconv used by code, at least gcc-c++ >= 10 and std=c++17 is required
%if 0%{?suse_version} < 1550
%define gcc_ver 10
%endif
Name: nuspell
Version: 5.1.2
Release: 0
Summary: A spell checker library and command-line tool
License: LGPL-3.0-or-later
Group: Productivity/Office/Other
URL: https://nuspell.github.io/
Source: https://github.com/nuspell/nuspell/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc%{?gcc_ver}-c++
BuildRequires: graphviz
BuildRequires: libicu-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(catch2) < 3
BuildRequires: rubygem(%{rb_default_ruby_abi}:ronn)
Requires: hunspell
%description
Nuspell is a spell checker written in C++. It supports languages with
rich morphology and complex word compounding.
Main features are:
- Full unicode support backed by ICU
- Backward compatibility with Hunspell dictionary file format
- Twofold affix stripping (for agglutinative languages, like Azeri,
Basque, Estonian, Finnish, Hungarian, Turkish, etc.)
- Support complex compounds (for example, Hungarian, Germand and Dutch)
- Support language specific features (for example, special casing of
Azeri and Turkish dotted i, or German sharp s)
- Handle conditional affixes, circumfixes, fogemorphemes, forbidden
words, pseudoroots and homonyms.
%package -n %{libname}%{sonum}
Summary: A spell checker library and command-line tool
Group: System/Libraries
%description -n %{libname}%{sonum}
Nuspell is a spell checker written in C++. It supports languages with
rich morphology and complex word compounding.
Main features are:
- Full unicode support backed by ICU
- Backward compatibility with Hunspell dictionary file format
- Twofold affix stripping (for agglutinative languages, like Azeri,
Basque, Estonian, Finnish, Hungarian, Turkish, etc.)
- Support complex compounds (for example, Hungarian, Germand and Dutch)
- Support language specific features (for example, special casing of
Azeri and Turkish dotted i, or German sharp s)
- Handle conditional affixes, circumfixes, fogemorphemes, forbidden
words, pseudoroots and homonyms.
%package devel
Summary: Files for developing with Nuspell
Group: Development/Libraries/C and C++
Requires: %{libname}%{sonum} = %{version}
Recommends: %{name}-doc = %{version}
%description devel
Header files and definitions for developing with Nuspell.
%package doc
Summary: API documentation for Nuspell
BuildArch: noarch
%description doc
This package provides API documentation for Nuspell.
%prep
%autosetup
%build
%cmake -DBUILD_SHARED_LIBS:BOOL=ON \
%if 0%{?suse_version} < 1550
-DCMAKE_CXX_COMPILER:STRING=g++-%{?gcc_ver} \
-DCMAKE_CXX_FLAGS:STRING="%{optflags} -std=c++17" \
%endif
-DBUILD_TESTING:BOOL=ON \
-DCMAKE_SKIP_RPATH:BOOL=OFF
%cmake_build
cd ../
doxygen
%install
%cmake_install
# Install API doc manually so we can run fdupes on buildroot
mkdir -p %{buildroot}%{_docdir}/%{name}
cp -pR doxygen/html %{buildroot}%{_docdir}/%{name}-doc/
%fdupes %{buildroot}%{_docdir}/%{name}-doc/
%post -n %{libname}%{sonum} -p /sbin/ldconfig
%postun -n %{libname}%{sonum} -p /sbin/ldconfig
%check
%ctest
%files -n %{name}
%doc README.md CHANGELOG.md AUTHORS
%license COPYING.LESSER COPYING
%{_bindir}/nuspell
%files -n %{libname}%{sonum}
%license COPYING.LESSER COPYING
%{_libdir}/%{libname}.so.*
%exclude %{_datadir}/doc/nuspell/README.md
%files devel
%license COPYING.LESSER COPYING
%{_includedir}/%{name}
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/nuspell.pc
%{_libdir}/cmake/%{name}
%files doc
%license COPYING.LESSER COPYING
%doc %{_docdir}/%{name}-doc/
%changelog