Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
82287bee9e
!33 Fix a leak in the tests
From: @dongjiao-joan 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-05-10 10:42:29 +00:00
dongjiao
bec8c4ce4e Fix a leak in the tests 2024-05-08 10:55:48 +08:00
openeuler-ci-bot
1ee66a9041
!32 [sync] PR-30: parament -h reture value be 0
From: @openeuler-sync-bot 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2024-04-25 06:10:45 +00:00
zhangxianting
29cd1b8f7a parament -h reture value be 0
(cherry picked from commit 23c7a540abe81f77e7938e0bb164efe7f0453d3e)
2024-04-25 11:30:48 +08:00
openeuler-ci-bot
82cc8e532f
!27 Add -with-hunspell-dir parameters
From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-04-02 09:14:36 +00:00
lyn1001
7297ebbeef Add -with-hunspell-dir parameters 2024-04-02 16:46:24 +08:00
openeuler-ci-bot
2ea323fadb
!24 Upgrade to 2.6.7
From: @lyn1001 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-02-22 02:19:48 +00:00
lyn1001
0c031ec685 Upgrade to 2.6.7 2024-02-21 16:19:01 +08:00
openeuler-ci-bot
9de01fbe20
!11 Update to 2.5.0
From: @wk333 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-06-19 01:08:40 +00:00
wk333
75e2ed74fe Update to 2.5.0 2023-06-16 16:03:18 +08:00
6 changed files with 111 additions and 5 deletions

View 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

View 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

View 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

Binary file not shown.

View File

@ -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