summaryrefslogtreecommitdiff
path: root/user/php7/enchant-2.patch
blob: 709345cf07dc254590729534c7f4683d1d962cc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- php-7.4.4/ext/enchant/config.m4	2020-03-17 10:40:22.000000000 +0000
+++ php-7.4.4/ext/enchant/config.m4	2020-03-27 21:25:27.754470703 +0000
@@ -4,21 +4,21 @@ PHP_ARG_WITH([enchant],
     [Include Enchant support])])
 
 if test "$PHP_ENCHANT" != "no"; then
-  PKG_CHECK_MODULES([ENCHANT], [enchant])
+  PKG_CHECK_MODULES([ENCHANT], [enchant-2])
 
   PHP_EVAL_INCLINE($ENCHANT_CFLAGS)
   PHP_EVAL_LIBLINE($ENCHANT_LIBS, ENCHANT_SHARED_LIBADD)
 
   AC_DEFINE(HAVE_ENCHANT, 1, [ ])
 
-  PHP_CHECK_LIBRARY(enchant, enchant_get_version,
+  PHP_CHECK_LIBRARY(enchant-2, enchant_get_version,
   [
     AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ ])
   ], [ ], [
     $ENCHANT_LIBS
   ])
 
-  PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param,
+  PHP_CHECK_LIBRARY(enchant-2, enchant_broker_set_param,
   [
     AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ ])
   ], [ ], [
--- a/ext/enchant/enchant.c.orig
+++ b/ext/enchant/enchant.c
@@ -738,7 +738,7 @@
 			for (i = 0; i < n_sugg; i++) {
 				add_next_index_string(sugg, suggs[i]);
 			}
-			enchant_dict_free_suggestions(pdict->pdict, suggs);
+			enchant_dict_free_string_list(pdict->pdict, suggs);
 		}
 
 
@@ -793,7 +793,7 @@
 			add_next_index_string(return_value, suggs[i]);
 		}
 
-		enchant_dict_free_suggestions(pdict->pdict, suggs);
+		enchant_dict_free_string_list(pdict->pdict, suggs);
 	}
 }
 /* }}} */
@@ -813,7 +813,7 @@
 
 	PHP_ENCHANT_GET_DICT;
 
-	enchant_dict_add_to_personal(pdict->pdict, word, wordlen);
+	enchant_dict_add(pdict->pdict, word, wordlen);
 }
 /* }}} */
 
@@ -851,7 +851,7 @@
 
 	PHP_ENCHANT_GET_DICT;
 
-	RETURN_BOOL(enchant_dict_is_in_session(pdict->pdict, word, wordlen));
+	RETURN_BOOL(enchant_dict_is_added(pdict->pdict, word, wordlen));
 }
 /* }}} */