summarylogtreecommitdiffstats
path: root/enchant-php7.4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'enchant-php7.4.patch')
-rw-r--r--enchant-php7.4.patch301
1 files changed, 0 insertions, 301 deletions
diff --git a/enchant-php7.4.patch b/enchant-php7.4.patch
deleted file mode 100644
index d3f0c74ed75b..000000000000
--- a/enchant-php7.4.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-diff -ur php-7.4.26.orig/ext/enchant/config.m4 php-7.4.26/ext/enchant/config.m4
---- php-7.4.26.orig/ext/enchant/config.m4 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/config.m4 2021-12-14 10:38:53.318024515 +0200
-@@ -4,26 +4,38 @@
- [Include Enchant support])])
-
- if test "$PHP_ENCHANT" != "no"; then
-- PKG_CHECK_MODULES([ENCHANT], [enchant])
-+ PKG_CHECK_MODULES([ENCHANT2], [enchant-2], [found_enchant_2=yes], [found_enchant_2=no])
-
-- PHP_EVAL_INCLINE($ENCHANT_CFLAGS)
-- PHP_EVAL_LIBLINE($ENCHANT_LIBS, ENCHANT_SHARED_LIBADD)
-+ if test "$found_enchant_2" = "yes"; then
-
-- AC_DEFINE(HAVE_ENCHANT, 1, [ ])
-+ PHP_EVAL_INCLINE($ENCHANT2_CFLAGS)
-+ PHP_EVAL_LIBLINE($ENCHANT2_LIBS, ENCHANT_SHARED_LIBADD)
-+
-+ AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ enchant_get_version since 1.6.0 ])
-
-- PHP_CHECK_LIBRARY(enchant, enchant_get_version,
-- [
-- AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ ])
-- ], [ ], [
-- $ENCHANT_LIBS
-- ])
--
-- PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param,
-- [
-- AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ ])
-- ], [ ], [
-- $ENCHANT_LIBS
-- ])
-+ else
-+ AC_MSG_WARN([libenchant-2 not found trying with old libenchant])
-+ PKG_CHECK_MODULES([ENCHANT], [enchant >= 1.4.2])
-+
-+ PHP_EVAL_INCLINE($ENCHANT_CFLAGS)
-+ PHP_EVAL_LIBLINE($ENCHANT_LIBS, ENCHANT_SHARED_LIBADD)
-+
-+ PHP_CHECK_LIBRARY(enchant, enchant_get_version,
-+ [
-+ AC_DEFINE(HAVE_ENCHANT_GET_VERSION, 1, [ enchant_get_version since 1.6.0 ])
-+ ], [ ], [
-+ $ENCHANT_LIBS
-+ ])
-+
-+ PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param,
-+ [
-+ AC_DEFINE(HAVE_ENCHANT_BROKER_SET_PARAM, 1, [ enchant_broker_set_param since 1.5.0 and removed in 2.x ])
-+ ], [ ], [
-+ $ENCHANT_LIBS
-+ ])
-+ fi
-+
-+ AC_DEFINE(HAVE_ENCHANT, 1, [ ])
-
- PHP_NEW_EXTENSION(enchant, enchant.c, $ext_shared)
- PHP_SUBST(ENCHANT_SHARED_LIBADD)
-diff -ur php-7.4.26.orig/ext/enchant/enchant.c php-7.4.26/ext/enchant/enchant.c
---- php-7.4.26.orig/ext/enchant/enchant.c 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/enchant.c 2021-12-14 10:38:53.318024515 +0200
-@@ -135,9 +135,10 @@
- PHP_FE(enchant_broker_describe, arginfo_enchant_broker_free)
- PHP_FE(enchant_dict_check, arginfo_enchant_dict_check)
- PHP_FE(enchant_dict_suggest, arginfo_enchant_dict_check)
-- PHP_FE(enchant_dict_add_to_personal, arginfo_enchant_dict_check)
-+ PHP_FE(enchant_dict_add, arginfo_enchant_dict_check)
-+ PHP_FALIAS(enchant_dict_add_to_personal, enchant_dict_add, arginfo_enchant_dict_check)
- PHP_FE(enchant_dict_add_to_session, arginfo_enchant_dict_check)
-- PHP_FE(enchant_dict_is_in_session, arginfo_enchant_dict_check)
-+ PHP_FE(enchant_dict_is_added, arginfo_enchant_dict_check)
- PHP_FE(enchant_dict_store_replacement, arginfo_enchant_dict_store_replacement)
- PHP_FE(enchant_dict_get_error, arginfo_enchant_broker_free_dict)
- PHP_FE(enchant_dict_describe, arginfo_enchant_broker_free_dict)
-@@ -285,6 +286,9 @@
- le_enchant_dict = zend_register_list_destructors_ex(php_enchant_dict_free, NULL, "enchant_dict", module_number);
- REGISTER_LONG_CONSTANT("ENCHANT_MYSPELL", PHP_ENCHANT_MYSPELL, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("ENCHANT_ISPELL", PHP_ENCHANT_ISPELL, CONST_CS | CONST_PERSISTENT);
-+#ifdef HAVE_ENCHANT_GET_VERSION
-+ REGISTER_STRING_CONSTANT("LIBENCHANT_VERSION", enchant_get_version(), CONST_CS | CONST_PERSISTENT);
-+#endif
- return SUCCESS;
- }
- /* }}} */
-@@ -392,7 +396,7 @@
- {
- zval *broker;
- enchant_broker *pbroker;
-- char *msg;
-+ const char *msg;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &broker) == FAILURE) {
- RETURN_FALSE;
-@@ -738,7 +742,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,14 +797,14 @@
- add_next_index_string(return_value, suggs[i]);
- }
-
-- enchant_dict_free_suggestions(pdict->pdict, suggs);
-+ enchant_dict_free_string_list(pdict->pdict, suggs);
- }
- }
- /* }}} */
-
--/* {{{ proto void enchant_dict_add_to_personal(resource dict, string word)
-+/* {{{ proto void enchant_dict_add(resource dict, string word)
- add 'word' to personal word list */
--PHP_FUNCTION(enchant_dict_add_to_personal)
-+PHP_FUNCTION(enchant_dict_add)
- {
- zval *dict;
- char *word;
-@@ -813,7 +817,7 @@
-
- PHP_ENCHANT_GET_DICT;
-
-- enchant_dict_add_to_personal(pdict->pdict, word, wordlen);
-+ enchant_dict_add(pdict->pdict, word, wordlen);
- }
- /* }}} */
-
-@@ -836,9 +840,9 @@
- }
- /* }}} */
-
--/* {{{ proto bool enchant_dict_is_in_session(resource dict, string word)
-+/* {{{ proto bool enchant_dict_is_added(resource dict, string word)
- whether or not 'word' exists in this spelling-session */
--PHP_FUNCTION(enchant_dict_is_in_session)
-+PHP_FUNCTION(enchant_dict_is_added)
- {
- zval *dict;
- char *word;
-@@ -851,7 +855,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));
- }
- /* }}} */
-
-@@ -884,7 +888,7 @@
- {
- zval *dict;
- enchant_dict *pdict;
-- char *msg;
-+ const char *msg;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &dict) == FAILURE) {
- RETURN_FALSE;
-diff -ur php-7.4.26.orig/ext/enchant/php_enchant.h php-7.4.26/ext/enchant/php_enchant.h
---- php-7.4.26.orig/ext/enchant/php_enchant.h 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/php_enchant.h 2021-12-14 10:38:53.318024515 +0200
-@@ -53,9 +53,9 @@
-
- PHP_FUNCTION(enchant_dict_check);
- PHP_FUNCTION(enchant_dict_suggest);
--PHP_FUNCTION(enchant_dict_add_to_personal);
-+PHP_FUNCTION(enchant_dict_add);
- PHP_FUNCTION(enchant_dict_add_to_session);
--PHP_FUNCTION(enchant_dict_is_in_session);
-+PHP_FUNCTION(enchant_dict_is_added);
- PHP_FUNCTION(enchant_dict_store_replacement);
- PHP_FUNCTION(enchant_dict_get_error);
- PHP_FUNCTION(enchant_dict_describe);
-diff -ur php-7.4.26.orig/ext/enchant/tests/broker_free_02.phpt php-7.4.26/ext/enchant/tests/broker_free_02.phpt
---- php-7.4.26.orig/ext/enchant/tests/broker_free_02.phpt 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/tests/broker_free_02.phpt 2021-12-14 10:38:53.318024515 +0200
-@@ -21,7 +21,7 @@
- if ($requestDict) {
- echo("OK\n");
- for($x=0;$x<count($newWord);$x++) {
-- $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord[$x]);
-+ $AddtoPersonalDict = enchant_dict_add($requestDict,$newWord[$x]);
- }
-
- if (NULL === $AddtoPersonalDict) {
-diff -ur php-7.4.26.orig/ext/enchant/tests/broker_free_dict.phpt php-7.4.26/ext/enchant/tests/broker_free_dict.phpt
---- php-7.4.26.orig/ext/enchant/tests/broker_free_dict.phpt 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/tests/broker_free_dict.phpt 2021-12-14 10:38:53.318024515 +0200
-@@ -19,7 +19,7 @@
-
- if ($requestDict) {
- echo("OK\n");
-- $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict, $newWord);
-+ $AddtoPersonalDict = enchant_dict_add($requestDict, $newWord);
-
- if (NULL === $AddtoPersonalDict) {
- var_dump($AddtoPersonalDict);
-diff -ur php-7.4.26.orig/ext/enchant/tests/bug53070.phpt php-7.4.26/ext/enchant/tests/bug53070.phpt
---- php-7.4.26.orig/ext/enchant/tests/bug53070.phpt 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/tests/bug53070.phpt 2021-12-14 10:38:53.318024515 +0200
-@@ -4,6 +4,7 @@
- <?php
- if(!extension_loaded('enchant')) die('skip, enchant not loader');
- if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
-+if (defined("LIBENCHANT_VERSION") && version_compare(LIBENCHANT_VERSION, "2", ">")) die('skip libenchant v1 only');
- ?>
- --FILE--
- <?php
-@@ -12,8 +13,12 @@
- var_dump(enchant_broker_get_dict_path($broker, ENCHANT_ISPELL));
- ?>
- --EXPECTF--
-+Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s
-+
- Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d
- bool(false)
-
-+Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s
-+
- Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d
- bool(false)
-diff -ur php-7.4.26.orig/ext/enchant/tests/dict_add_to_personal.phpt php-7.4.26/ext/enchant/tests/dict_add_to_personal.phpt
---- php-7.4.26.orig/ext/enchant/tests/dict_add_to_personal.phpt 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/tests/dict_add_to_personal.phpt 2021-12-14 10:38:53.318024515 +0200
-@@ -1,5 +1,5 @@
- --TEST--
--enchant_dict_add_to_personal() function
-+enchant_dict_add() function
- --CREDITS--
- marcosptf - <marcosptf@yahoo.com.br>
- --SKIPIF--
-@@ -20,7 +20,7 @@
-
- if ($requestDict) {
- echo("OK\n");
-- $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord);
-+ $AddtoPersonalDict = enchant_dict_add($requestDict,$newWord);
-
- if (NULL === $AddtoPersonalDict) {
- var_dump($AddtoPersonalDict);
-diff -ur php-7.4.26.orig/ext/enchant/tests/dict_check.phpt php-7.4.26/ext/enchant/tests/dict_check.phpt
---- php-7.4.26.orig/ext/enchant/tests/dict_check.phpt 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/tests/dict_check.phpt 2021-12-14 10:38:53.318024515 +0200
-@@ -20,7 +20,7 @@
-
- if ($requestDict) {
- echo("OK\n");
-- enchant_dict_add_to_personal($requestDict, $newWord);
-+ enchant_dict_add($requestDict, $newWord);
-
- if (enchant_dict_check($requestDict, $newWord)) {
- echo("OK\n");
-diff -ur php-7.4.26.orig/ext/enchant/tests/dict_is_in_session.phpt php-7.4.26/ext/enchant/tests/dict_is_in_session.phpt
---- php-7.4.26.orig/ext/enchant/tests/dict_is_in_session.phpt 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/tests/dict_is_in_session.phpt 2021-12-14 10:38:53.318024515 +0200
-@@ -20,10 +20,10 @@
-
- if ($requestDict) {
- echo("OK\n");
-- $AddtoPersonalDict = enchant_dict_add_to_personal($requestDict,$newWord);
-+ $AddtoPersonalDict = enchant_dict_add($requestDict,$newWord);
-
- if (NULL === $AddtoPersonalDict) {
-- var_dump(enchant_dict_is_in_session($requestDict,$newWord));
-+ var_dump(enchant_dict_is_added($requestDict,$newWord));
- } else {
- echo("dict add to personal failed\n");
- }
-diff -ur php-7.4.26.orig/ext/enchant/tests/enchant_broker_set_dict_path.phpt php-7.4.26/ext/enchant/tests/enchant_broker_set_dict_path.phpt
---- php-7.4.26.orig/ext/enchant/tests/enchant_broker_set_dict_path.phpt 2021-11-16 17:31:31.000000000 +0200
-+++ php-7.4.26/ext/enchant/tests/enchant_broker_set_dict_path.phpt 2021-12-14 10:38:53.318024515 +0200
-@@ -7,7 +7,8 @@
- <?php
- if(!extension_loaded('enchant')) die('skip, enchant not loader');
- if (!is_resource(enchant_broker_init())) {die("skip, resource dont load\n");}
--if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, dont has dictionary install in this machine! \n");}
-+if (!is_array(enchant_broker_list_dicts(enchant_broker_init()))) {die("skip, no dictionary installed on this machine! \n");}
-+if (defined("LIBENCHANT_VERSION") && version_compare(LIBENCHANT_VERSION, "2", ">")) die('skip libenchant v1 only');
- ?>
- --FILE--
- <?php
-@@ -46,8 +47,16 @@
- echo("broker is not a resource; failed; \n");
- }
- ?>
----EXPECT--
-+--EXPECTF--
- OK
-+
-+Deprecated: Function enchant_broker_set_dict_path() is deprecated in %s
- OK
-+
-+Deprecated: Function enchant_broker_set_dict_path() is deprecated in %s
- OK
-+
-+Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s
-+
-+Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s
- OK