void-packages/srcpkgs/php/patches/php-enchant2.patch
Mat Boehlke afde904f6d php: patch to use enchant2
Upstream commit which documents change for enchant2:
66d42e9884

This patch is based on
10e873a1e1/trunk/enchant-2.patch
2021-10-30 15:59:40 -03:00

103 lines
3.9 KiB
Diff

diff --git a/configure b/configure
index 3ece7a4..b832a68 100755
--- a/configure
+++ b/configure
@@ -28123,19 +28123,19 @@ $as_echo "$ext_output" >&6; }
if test "$PHP_ENCHANT" != "no"; then
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for enchant" >&5
-$as_echo_n "checking for enchant... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for enchant-2" >&5
+$as_echo_n "checking for enchant-2... " >&6; }
if test -n "$ENCHANT_CFLAGS"; then
pkg_cv_ENCHANT_CFLAGS="$ENCHANT_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant\""; } >&5
- ($PKG_CONFIG --exists --print-errors "enchant") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant-2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "enchant-2") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_ENCHANT_CFLAGS=`$PKG_CONFIG --cflags "enchant" 2>/dev/null`
+ pkg_cv_ENCHANT_CFLAGS=`$PKG_CONFIG --cflags "enchant-2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -28147,12 +28147,12 @@ if test -n "$ENCHANT_LIBS"; then
pkg_cv_ENCHANT_LIBS="$ENCHANT_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant\""; } >&5
- ($PKG_CONFIG --exists --print-errors "enchant") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"enchant-2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "enchant-2") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_ENCHANT_LIBS=`$PKG_CONFIG --libs "enchant" 2>/dev/null`
+ pkg_cv_ENCHANT_LIBS=`$PKG_CONFIG --libs "enchant-2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -28173,14 +28173,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- ENCHANT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "enchant" 2>&1`
+ ENCHANT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "enchant-2" 2>&1`
else
- ENCHANT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "enchant" 2>&1`
+ ENCHANT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "enchant-2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$ENCHANT_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (enchant) were not met:
+ as_fn_error $? "Package requirements (enchant-2) were not met:
$ENCHANT_PKG_ERRORS
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 6ce9d4b..1923726 100644
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -738,7 +738,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
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 @@ PHP_FUNCTION(enchant_dict_suggest)
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_FUNCTION(enchant_dict_add_to_personal)
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_FUNCTION(enchant_dict_is_in_session)
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));
}
/* }}} */