Compare commits
10 Commits
474e752e06
...
82287bee9e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82287bee9e | ||
|
|
bec8c4ce4e | ||
|
|
1ee66a9041 | ||
|
|
29cd1b8f7a | ||
|
|
82cc8e532f | ||
|
|
7297ebbeef | ||
|
|
2ea323fadb | ||
|
|
0c031ec685 | ||
|
|
9de01fbe20 | ||
|
|
75e2ed74fe |
33
Add-with-hunspell-dir-parameters.patch
Normal file
33
Add-with-hunspell-dir-parameters.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff -Nur a/configure.ac b/configure.ac
|
||||
--- a/configure.ac 2024-02-09 01:11:48.000000000 +0800
|
||||
+++ b/configure.ac 2024-04-02 16:10:28.816672230 +0800
|
||||
@@ -155,7 +155,12 @@
|
||||
[enable the $1 provider @<:@default=provider_check@:>@]),
|
||||
[with_[]$1=$withval],
|
||||
[with_[]$1=provider_check])
|
||||
- $1[]_dir=${datadir}/$1])
|
||||
+ $1[]_dir=${datadir}/$1
|
||||
+ AC_ARG_WITH([$1[]-dir],
|
||||
+ AS_HELP_STRING([--with-[]$1-dir=PATH],
|
||||
+ [path to installed $1 dicts]))
|
||||
+ AS_IF([test "$with_[]$1_dir" != ""],
|
||||
+ [$1[]_dir=$with_[]$1_dir])])
|
||||
|
||||
AC_DEFUN([ENCHANT_CHECK_PKG_CONFIG_PROVIDER],
|
||||
[ENCHANT_CHECK_PROVIDER_SETUP([$1], [$4])
|
||||
diff -Nur a/providers/enchant_hunspell.cpp b/providers/enchant_hunspell.cpp
|
||||
--- a/providers/enchant_hunspell.cpp 2024-02-09 01:11:48.000000000 +0800
|
||||
+++ b/providers/enchant_hunspell.cpp 2024-04-02 16:13:02.628672230 +0800
|
||||
@@ -222,6 +222,12 @@
|
||||
free(enchant_prefix);
|
||||
g_free(tmp);
|
||||
}
|
||||
+
|
||||
+#ifdef ENCHANT_HUNSPELL_DICT_DIR
|
||||
+ config_dir = enchant_relocate (ENCHANT_HUNSPELL_DICT_DIR);
|
||||
+ dirs.push_back (config_dir);
|
||||
+ free(config_dir);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
27
Fix-a-leak-in-the-tests.patch
Normal file
27
Fix-a-leak-in-the-tests.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From baf95e6258125dc787363c9eb2e1e9f5686e399c Mon Sep 17 00:00:00 2001
|
||||
From: Reuben Thomas <rrt@sc3d.org>
|
||||
Date: Thu, 11 Apr 2024 22:48:29 +0200
|
||||
Subject: [PATCH] Fix a leak in the tests
|
||||
|
||||
---
|
||||
tests/EnchantTestFixture.h | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/EnchantTestFixture.h b/tests/EnchantTestFixture.h
|
||||
index 160256f..9909e58 100644
|
||||
--- a/tests/EnchantTestFixture.h
|
||||
+++ b/tests/EnchantTestFixture.h
|
||||
@@ -69,7 +69,9 @@ struct EnchantTestFixture
|
||||
{
|
||||
GSList *config_dirs = enchant_get_conf_dirs();
|
||||
const char *pkgdatadir = (char *)g_slist_nth(config_dirs, 0)->data;
|
||||
- return std::string(pkgdatadir);
|
||||
+ auto res = std::string(pkgdatadir);
|
||||
+ g_slist_free_full(config_dirs, g_free);
|
||||
+ return res;
|
||||
}
|
||||
|
||||
static void DeleteDirAndFiles(const std::string& dir)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
25
Parameter-h-correction.patch
Normal file
25
Parameter-h-correction.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 342825209d78399cfb5f1be72afc546aa4ba4d1a Mon Sep 17 00:00:00 2001
|
||||
From: zhangxianting <zhangxianting@uniontech.com>
|
||||
Date: Fri, 29 Mar 2024 15:45:52 +0800
|
||||
Subject: [PATCH] Parameter -h correction
|
||||
|
||||
---
|
||||
src/enchant.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/enchant.c b/src/enchant.c
|
||||
index 42151e8..41e545d 100644
|
||||
--- a/src/enchant.c
|
||||
+++ b/src/enchant.c
|
||||
@@ -428,7 +428,7 @@ int main (int argc, char ** argv)
|
||||
#endif
|
||||
|
||||
int optchar;
|
||||
- while ((optchar = getopt (argc, argv, ":d:p:alvLmB")) != -1) {
|
||||
+ while ((optchar = getopt (argc, argv, ":d:p:alvLmBh")) != -1) {
|
||||
switch (optchar) {
|
||||
case 'd':
|
||||
dictionary = optarg; /* Emacs calls ispell with '-d dictionary'. */
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
BIN
enchant-2.6.7.tar.gz
Normal file
BIN
enchant-2.6.7.tar.gz
Normal file
Binary file not shown.
@ -1,11 +1,13 @@
|
||||
Name: enchant2
|
||||
Version: 2.3.3
|
||||
Release: 1
|
||||
Version: 2.6.7
|
||||
Release: 4
|
||||
Summary: Generic spell checking library
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/AbiWord/enchant
|
||||
Source0: https://github.com/AbiWord/enchant/releases/download/v%{version}/enchant-%{version}.tar.gz
|
||||
|
||||
Patch0: Add-with-hunspell-dir-parameters.patch
|
||||
Patch1: Parameter-h-correction.patch
|
||||
Patch2: Fix-a-leak-in-the-tests.patch
|
||||
|
||||
BuildRequires: automake autoconf libtool gcc-c++ glib2-devel aspell-devel hunspell-devel libvoikko-devel
|
||||
|
||||
@ -57,7 +59,7 @@ This package contains some man help files for %{name}.
|
||||
autoreconf -ifv
|
||||
|
||||
%build
|
||||
%configure --with-aspell --with-hunspell-dir=%{_datadir}/myspell --disable-static
|
||||
%configure --with-aspell --with-hunspell-dir=%{_datadir}/myspell --disable-static --docdir=%{_defaultdocdir}/%{name}
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g;
|
||||
s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
|
||||
@ -77,7 +79,7 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g;
|
||||
%{_bindir}/{enchant-2,enchant-lsmod-2}
|
||||
%{_libdir}/libenchant-2.so.*
|
||||
%{_libdir}/enchant-2/enchant_hunspell.so
|
||||
%{_datadir}/enchant-2
|
||||
%{_datadir}/enchant-2-2
|
||||
|
||||
%files aspell
|
||||
%{_libdir}/enchant-2/enchant_aspell.so*
|
||||
@ -92,8 +94,27 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g;
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man5/enchant.5*
|
||||
%doc %{_defaultdocdir}/%{name}/enchant.html
|
||||
%doc %{_defaultdocdir}/%{name}/enchant-2.html
|
||||
%doc %{_defaultdocdir}/%{name}/enchant-lsmod-2.html
|
||||
|
||||
%changelog
|
||||
* Thu May 9 2024 dongjiao <dongjiao@kylinos.cn> - 2.6.7-4
|
||||
- Fix a leak in the tests
|
||||
|
||||
* Wed Apr 3 2024 zhangxianting <zhangxianting@uniontech.com> - 2.6.7-3
|
||||
- parament -h reture value be 0
|
||||
|
||||
* Tue Apr 2 2024 liyanan <liyanan61@h-partners.com> - 2.6.7-2
|
||||
- Add -with-hunspell-dir parameters
|
||||
|
||||
* Wed Feb 21 2024 liyanan <liyanan61@h-partners.com> - 2.6.7-1
|
||||
- Update to 2.6.7
|
||||
|
||||
* Fri Jun 16 2023 wangkai <13474090681@163.com> - 2.5.0-1
|
||||
- Update to 2.5.0
|
||||
|
||||
* Thu Sep 15 2022 lutcunpeng <lutkunpeng@163.com> - 2.3.3-1
|
||||
- DESC: update to 2.3.3
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user