summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Gathoye2018-02-01 12:49:45 +0100
committerWilliam Gathoye2018-02-01 12:49:45 +0100
commit13d6560cdb713e842de659d7e811678f51265a1b (patch)
tree2757082e7ebfd1b487ef3cae252556fd241256ee
parent82eada985ddc85de163641a66738d275f37832ab (diff)
downloadaur-13d6560cdb713e842de659d7e811678f51265a1b.tar.gz
Backport fix for enchant 2 from php 7.2
-rw-r--r--PKGBUILD6
-rw-r--r--enchant-2.patch84
2 files changed, 88 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index db002c3fc0fc..fcca276fe057 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -35,13 +35,13 @@ license=('PHP')
url='http://www.php.net'
-makedepends=('apache' 'aspell' 'db' 'enchant' 'gd' 'gmp' 'icu'
+makedepends=('apache' 'aspell' 'db' 'enchant' 'gd' 'gmp' 'icu'
'libmcrypt' 'libxslt' 'libzip' 'net-snmp'
'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl'
'libtool' 'freetds' 'pcre' 'c-client')
source=("https://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz"{,.asc}
- 'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch'
+ 'apache.patch' 'apache.conf' 'enchant-2.patch' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch'
)
sha256sums=('4b2bc823e806dbf7b62fe0b92b0d14b0c6e03f88c3fc5d96278416c54ce11f6c'
'SKIP'
@@ -50,6 +50,7 @@ sha256sums=('4b2bc823e806dbf7b62fe0b92b0d14b0c6e03f88c3fc5d96278416c54ce11f6c'
'75322f9b38c5961faddcb4f5333fbcb5ea5955e4f54f1eec223fc4367eb3b247'
'b6b7f3ced56b75bf95513a46f43cde41fc28da714f5e0ed181caf2266f2f0c27'
'2f678d039313ee613d59c8b4bf9f48068085df0fa8ac7ca4cf807e168061a8c9'
+ 'da784a8fc52285e64d88ca40cd9d71b31074a5644827fcabd33dcc1f8da5ed3f'
)
# keys from http://php.net/downloads.php#gpg-7.0
#
@@ -76,6 +77,7 @@ prepare() {
patch -p0 -i ${srcdir}/apache.patch
patch -p0 -i ${srcdir}/php-fpm.patch
patch -p0 -i ${srcdir}/php.ini.patch
+ patch -p0 -i ${srcdir}/enchant-2.patch
}
diff --git a/enchant-2.patch b/enchant-2.patch
new file mode 100644
index 000000000000..e582e54458fe
--- /dev/null
+++ b/enchant-2.patch
@@ -0,0 +1,84 @@
+--- ext/enchant/config.m4 2018-01-02 09:50:14.000000000 +0100
++++ ext/enchant/config.m4.new 2018-02-01 12:13:28.801708953 +0100
+@@ -14,9 +14,9 @@
+ ENCHANT_SEARCH_DIRS="/usr/local /usr"
+ fi
+ for i in $ENCHANT_SEARCH_DIRS; do
+- if test -f $i/include/enchant/enchant.h; then
++ if test -f $i/include/enchant-2/enchant.h; then
+ ENCHANT_DIR=$i
+- ENCHANT_INCDIR=$i/include/enchant
++ ENCHANT_INCDIR=$i/include/enchant-2
+ elif test -f $i/include/enchant.h; then
+ ENCHANT_DIR=$i
+ ENCHANT_INCDIR=$i/include
+@@ -31,7 +31,7 @@
+
+ AC_DEFINE(HAVE_ENCHANT,1,[ ])
+ PHP_SUBST(ENCHANT_SHARED_LIBADD)
+- PHP_ADD_LIBRARY_WITH_PATH(enchant, $ENCHANT_LIBDIR, ENCHANT_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(enchant-2, $ENCHANT_LIBDIR, ENCHANT_SHARED_LIBADD)
+ PHP_ADD_INCLUDE($ENCHANT_INCDIR)
+ PHP_CHECK_LIBRARY(enchant, enchant_broker_set_param,
+ [
+--- configure 2018-01-02 09:51:27.000000000 +0100
++++ configure.new 2018-02-01 12:16:17.950382811 +0100
+@@ -29838,9 +29838,9 @@
+ ENCHANT_SEARCH_DIRS="/usr/local /usr"
+ fi
+ for i in $ENCHANT_SEARCH_DIRS; do
+- if test -f $i/include/enchant/enchant.h; then
++ if test -f $i/include/enchant-2/enchant.h; then
+ ENCHANT_DIR=$i
+- ENCHANT_INCDIR=$i/include/enchant
++ ENCHANT_INCDIR=$i/include/enchant-2
+ elif test -f $i/include/enchant.h; then
+ ENCHANT_DIR=$i
+ ENCHANT_INCDIR=$i/include
+@@ -29862,7 +29862,7 @@
+
+
+ if test "$ext_shared" = "yes"; then
+- ENCHANT_SHARED_LIBADD="-lenchant $ENCHANT_SHARED_LIBADD"
++ ENCHANT_SHARED_LIBADD="-lenchant-2 $ENCHANT_SHARED_LIBADD"
+ if test -n "$ENCHANT_LIBDIR"; then
+
+ if test "$ENCHANT_LIBDIR" != "/usr/$PHP_LIBDIR" && test "$ENCHANT_LIBDIR" != "/usr/lib"; then
+--- ext/enchant/enchant.c 2018-01-02 09:50:14.000000000 +0100
++++ ext/enchant/enchant.c.new 2018-02-01 12:19:00.228985343 +0100
+@@ -745,7 +745,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);
+ }
+
+
+@@ -802,7 +802,7 @@
+ add_next_index_string(return_value, suggs[i]);
+ }
+
+- enchant_dict_free_suggestions(pdict->pdict, suggs);
++ enchant_dict_free_string_list(pdict->pdict, suggs);
+ }
+ }
+ /* }}} */
+@@ -822,7 +822,7 @@
+
+ PHP_ENCHANT_GET_DICT;
+
+- enchant_dict_add_to_personal(pdict->pdict, word, wordlen);
++ enchant_dict_add(pdict->pdict, word, wordlen);
+ }
+ /* }}} */
+
+@@ -860,7 +860,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));
+ }
+ /* }}} */
+