Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] php: patch to use enchant2
@ 2021-10-08  0:29 mtboehlke
  2021-10-08 21:02 ` [PR PATCH] [Updated] " mtboehlke
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-08  0:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]

There is a new pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages php-enchant
https://github.com/void-linux/void-packages/pull/33416

[WIP] php: patch to use enchant2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
Motivation is #27710. I think this is the only thing stopping us from moving enchant to enchant2.

This still needs to be tested, and any help in that area would be appreciated.  I am also okay if someone wants to pick up this patch.

A patch file from https://github.com/void-linux/void-packages/pull/33416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-php-enchant-33416.patch --]
[-- Type: text/x-diff, Size: 5406 bytes --]

From a7ae9c25d956be6cdec7d4e8fd8db3b02aa2cca2 Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Thu, 7 Oct 2021 15:44:54 -0500
Subject: [PATCH] php: patch to use enchant2

---
 srcpkgs/php/patches/php-enchant2.patch | 103 +++++++++++++++++++++++++
 srcpkgs/php/template                   |   4 +-
 2 files changed, 105 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/php/patches/php-enchant2.patch

diff --git a/srcpkgs/php/patches/php-enchant2.patch b/srcpkgs/php/patches/php-enchant2.patch
new file mode 100644
index 000000000000..b82c41211123
--- /dev/null
+++ b/srcpkgs/php/patches/php-enchant2.patch
@@ -0,0 +1,103 @@
+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));
+ }
+ /* }}} */
+ 
diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index a1390b7e1ec2..6223351581cb 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,9 +1,9 @@
 # Template file for 'php'
 pkgname=php
 version=7.4.14
-revision=5
+revision=6
 hostmakedepends="bison pkg-config apache-devel"
-makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel
+makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
  gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel
  libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel
  postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
@ 2021-10-08 21:02 ` mtboehlke
  2021-10-12 19:38 ` ericonr
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-08 21:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages php-enchant
https://github.com/void-linux/void-packages/pull/33416

php: patch to use enchant2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
Motivation is #27710. I think this is the only thing stopping us from moving enchant to enchant2.

This still needs to be tested, and any help in that area would be appreciated.  I am also okay if someone wants to pick up this patch. @repk I see that you have some php changes in the pipeline, this may interest you.

A patch file from https://github.com/void-linux/void-packages/pull/33416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-php-enchant-33416.patch --]
[-- Type: text/x-diff, Size: 5406 bytes --]

From cd6975b9815e341be89f4fd97a79f092688d2fcc Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Thu, 7 Oct 2021 15:44:54 -0500
Subject: [PATCH] php: patch to use enchant2

---
 srcpkgs/php/patches/php-enchant2.patch | 103 +++++++++++++++++++++++++
 srcpkgs/php/template                   |   4 +-
 2 files changed, 105 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/php/patches/php-enchant2.patch

diff --git a/srcpkgs/php/patches/php-enchant2.patch b/srcpkgs/php/patches/php-enchant2.patch
new file mode 100644
index 000000000000..b82c41211123
--- /dev/null
+++ b/srcpkgs/php/patches/php-enchant2.patch
@@ -0,0 +1,103 @@
+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));
+ }
+ /* }}} */
+ 
diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index 927bbf8504f8..141f7fee310d 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,9 +1,9 @@
 # Template file for 'php'
 pkgname=php
 version=7.4.14
-revision=6
+revision=7
 hostmakedepends="bison pkg-config apache-devel"
-makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel
+makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
  gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel
  libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel
  postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
  2021-10-08 21:02 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-10-12 19:38 ` ericonr
  2021-10-12 20:07 ` mtboehlke
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-10-12 19:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941366494

Comment:
Did you work out the patch yourself or base off of upstream?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
  2021-10-08 21:02 ` [PR PATCH] [Updated] " mtboehlke
  2021-10-12 19:38 ` ericonr
@ 2021-10-12 20:07 ` mtboehlke
  2021-10-12 20:08 ` mtboehlke
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-12 20:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941436383

Comment:
I worked it out myself, but worked from [this](https://github.com/php/php-src/commit/66d42e98844de694c6f77c299a3dc045ac5a3261#diff-789f6706a103e50af5fe30c9e28540c510ee79a11d408f93e5fbb6957feb5345) upstream commit which shows the deprecated functions in enchant.c, and I did double check to see that my diff worked out the same as the [patch](https://github.com/archlinux/svntogit-packages/blob/packages/php7/trunk/enchant-2.patch) Arch does.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (2 preceding siblings ...)
  2021-10-12 20:07 ` mtboehlke
@ 2021-10-12 20:08 ` mtboehlke
  2021-10-12 20:09 ` mtboehlke
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-12 20:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941436383

Comment:
It is based from [this](https://github.com/php/php-src/commit/66d42e98844de694c6f77c299a3dc045ac5a3261#diff-789f6706a103e50af5fe30c9e28540c510ee79a11d408f93e5fbb6957feb5345) upstream commit which shows the deprecated functions in enchant.c, and I did double check to see that my diff worked out the same as the [patch](https://github.com/archlinux/svntogit-packages/blob/packages/php7/trunk/enchant-2.patch) Arch does.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (3 preceding siblings ...)
  2021-10-12 20:08 ` mtboehlke
@ 2021-10-12 20:09 ` mtboehlke
  2021-10-12 20:22 ` mtboehlke
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-12 20:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941436383

Comment:
It is based from [this](https://github.com/php/php-src/commit/66d42e98844de694c6f77c299a3dc045ac5a3261#diff-789f6706a103e50af5fe30c9e28540c510ee79a11d408f93e5fbb6957feb5345) upstream commit which shows the deprecated functions in enchant.c, and I did double check to see that my diff worked out the same as the [patch](https://github.com/archlinux/svntogit-packages/blob/packages/php7/trunk/enchant-2.patch) Arch does, but reworked to patch configure directly.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (4 preceding siblings ...)
  2021-10-12 20:09 ` mtboehlke
@ 2021-10-12 20:22 ` mtboehlke
  2021-10-13  0:59 ` ericonr
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-12 20:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941436383

Comment:
It is based from [this](https://github.com/php/php-src/commit/66d42e98844de694c6f77c299a3dc045ac5a3261#diff-789f6706a103e50af5fe30c9e28540c510ee79a11d408f93e5fbb6957feb5345) upstream commit which shows the deprecated functions in enchant.c, and I did double check to see that my diff worked out the same as the [patch](https://github.com/archlinux/svntogit-packages/blob/packages/php7/trunk/enchant-2.patch) Arch does, but reworked to patch configure directly.  I am only changing the function calls like the Arch patch does, not the php function names.  So, mostly, it's based on Arch's patch.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (5 preceding siblings ...)
  2021-10-12 20:22 ` mtboehlke
@ 2021-10-13  0:59 ` ericonr
  2021-10-13  4:43 ` [PR PATCH] [Updated] " mtboehlke
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-10-13  0:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941809696

Comment:
I'd appreciate if you included the provenance in the commit message, both a link to the upstream commit and that it was compared to arch's patch in https://github.com/archlinux/svntogit-packages/blob/10e873a1e11e7911f9e5e7ba604fe53c44d48c6c/trunk/enchant-2.patch (permalink)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (6 preceding siblings ...)
  2021-10-13  0:59 ` ericonr
@ 2021-10-13  4:43 ` mtboehlke
  2021-10-13  4:45 ` mtboehlke
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-13  4:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages php-enchant
https://github.com/void-linux/void-packages/pull/33416

php: patch to use enchant2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
Motivation is #27710. I think this is the only thing stopping us from moving enchant to enchant2.

This still needs to be tested, and any help in that area would be appreciated.

A patch file from https://github.com/void-linux/void-packages/pull/33416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-php-enchant-33416.patch --]
[-- Type: text/x-diff, Size: 5685 bytes --]

From ec3bfe324c0ae2f85611cc5deb08ffd06ad142da Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Thu, 7 Oct 2021 15:44:54 -0500
Subject: [PATCH] php: patch to use enchant2

Upstream commit which documents change for enchant2:
https://github.com/php/php-src/commit/66d42e98844de694c6f77c299a3dc045ac5a3261

This patch is based in part by
https://github.com/archlinux/svntogit-packages/blob/10e873a1e11e7911f9e5e7ba604fe53c44d48c6c/trunk/enchant-2.patch
---
 srcpkgs/php/patches/php-enchant2.patch | 103 +++++++++++++++++++++++++
 srcpkgs/php/template                   |   4 +-
 2 files changed, 105 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/php/patches/php-enchant2.patch

diff --git a/srcpkgs/php/patches/php-enchant2.patch b/srcpkgs/php/patches/php-enchant2.patch
new file mode 100644
index 000000000000..b82c41211123
--- /dev/null
+++ b/srcpkgs/php/patches/php-enchant2.patch
@@ -0,0 +1,103 @@
+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));
+ }
+ /* }}} */
+ 
diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index 927bbf8504f8..141f7fee310d 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,9 +1,9 @@
 # Template file for 'php'
 pkgname=php
 version=7.4.14
-revision=6
+revision=7
 hostmakedepends="bison pkg-config apache-devel"
-makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel
+makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
  gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel
  libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel
  postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (7 preceding siblings ...)
  2021-10-13  4:43 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-10-13  4:45 ` mtboehlke
  2021-10-13  4:49 ` mtboehlke
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-13  4:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages php-enchant
https://github.com/void-linux/void-packages/pull/33416

php: patch to use enchant2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
Motivation is #27710. I think this is the only thing stopping us from moving enchant to enchant2.

This still needs to be tested, and any help in that area would be appreciated.

A patch file from https://github.com/void-linux/void-packages/pull/33416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-php-enchant-33416.patch --]
[-- Type: text/x-diff, Size: 5685 bytes --]

From e79858c8b8453f72d5d9475c811b7c0da4ebb08b Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Thu, 7 Oct 2021 15:44:54 -0500
Subject: [PATCH] php: patch to use enchant2

Upstream commit which documents change for enchant2:
https://github.com/php/php-src/commit/66d42e98844de694c6f77c299a3dc045ac5a3261

This patch is based in part on
https://github.com/archlinux/svntogit-packages/blob/10e873a1e11e7911f9e5e7ba604fe53c44d48c6c/trunk/enchant-2.patch
---
 srcpkgs/php/patches/php-enchant2.patch | 103 +++++++++++++++++++++++++
 srcpkgs/php/template                   |   4 +-
 2 files changed, 105 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/php/patches/php-enchant2.patch

diff --git a/srcpkgs/php/patches/php-enchant2.patch b/srcpkgs/php/patches/php-enchant2.patch
new file mode 100644
index 000000000000..b82c41211123
--- /dev/null
+++ b/srcpkgs/php/patches/php-enchant2.patch
@@ -0,0 +1,103 @@
+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));
+ }
+ /* }}} */
+ 
diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index 927bbf8504f8..141f7fee310d 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,9 +1,9 @@
 # Template file for 'php'
 pkgname=php
 version=7.4.14
-revision=6
+revision=7
 hostmakedepends="bison pkg-config apache-devel"
-makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel
+makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
  gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel
  libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel
  postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (8 preceding siblings ...)
  2021-10-13  4:45 ` mtboehlke
@ 2021-10-13  4:49 ` mtboehlke
  2021-10-13  4:56 ` [PR PATCH] [Updated] " mtboehlke
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-13  4:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941918954

Comment:
Thanks, I have added the references.  I should have documented them in the first place.

Do you think I should mention something in the patch file header as well?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (9 preceding siblings ...)
  2021-10-13  4:49 ` mtboehlke
@ 2021-10-13  4:56 ` mtboehlke
  2021-10-13  5:32 ` ericonr
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-13  4:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]

There is an updated pull request by mtboehlke against master on the void-packages repository

https://github.com/mtboehlke/void-packages php-enchant
https://github.com/void-linux/void-packages/pull/33416

php: patch to use enchant2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
Motivation is #27710. I think this is the only thing stopping us from moving enchant to enchant2.

This still needs to be tested, and any help in that area would be appreciated.

A patch file from https://github.com/void-linux/void-packages/pull/33416.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-php-enchant-33416.patch --]
[-- Type: text/x-diff, Size: 5677 bytes --]

From ede2d37729c3a0be0fdf54291a39d20ea640459b Mon Sep 17 00:00:00 2001
From: Mat Boehlke <mtboehlke@gmail.com>
Date: Thu, 7 Oct 2021 15:44:54 -0500
Subject: [PATCH] php: patch to use enchant2

Upstream commit which documents change for enchant2:
https://github.com/php/php-src/commit/66d42e98844de694c6f77c299a3dc045ac5a3261

This patch is based on
https://github.com/archlinux/svntogit-packages/blob/10e873a1e11e7911f9e5e7ba604fe53c44d48c6c/trunk/enchant-2.patch
---
 srcpkgs/php/patches/php-enchant2.patch | 103 +++++++++++++++++++++++++
 srcpkgs/php/template                   |   4 +-
 2 files changed, 105 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/php/patches/php-enchant2.patch

diff --git a/srcpkgs/php/patches/php-enchant2.patch b/srcpkgs/php/patches/php-enchant2.patch
new file mode 100644
index 000000000000..b82c41211123
--- /dev/null
+++ b/srcpkgs/php/patches/php-enchant2.patch
@@ -0,0 +1,103 @@
+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));
+ }
+ /* }}} */
+ 
diff --git a/srcpkgs/php/template b/srcpkgs/php/template
index 927bbf8504f8..141f7fee310d 100644
--- a/srcpkgs/php/template
+++ b/srcpkgs/php/template
@@ -1,9 +1,9 @@
 # Template file for 'php'
 pkgname=php
 version=7.4.14
-revision=6
+revision=7
 hostmakedepends="bison pkg-config apache-devel"
-makedepends="apache-devel enchant-devel freetds-devel freetype-devel gdbm-devel
+makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
  gmp-devel libcurl-devel libjpeg-turbo-devel libmariadbclient-devel
  libsodium-devel libtidy5-devel libxslt-devel libzip-devel net-snmp-devel
  postgresql-libs-devel readline-devel sqlite-devel unixodbc-devel pcre2-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (10 preceding siblings ...)
  2021-10-13  4:56 ` [PR PATCH] [Updated] " mtboehlke
@ 2021-10-13  5:32 ` ericonr
  2021-10-14 17:00 ` mtboehlke
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-10-13  5:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-941936873

Comment:
Patch name + commit message is clear enough to me, at least.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (11 preceding siblings ...)
  2021-10-13  5:32 ` ericonr
@ 2021-10-14 17:00 ` mtboehlke
  2021-10-14 17:01 ` mtboehlke
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-14 17:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-943546166

Comment:
I did some some minimal testing.  I was able to run [this](https://www.php.net/manual/en/enchant.examples.php) test from the php documentation website successfully.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (12 preceding siblings ...)
  2021-10-14 17:00 ` mtboehlke
@ 2021-10-14 17:01 ` mtboehlke
  2021-10-14 17:06 ` mtboehlke
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-14 17:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-943546166

Comment:
I did some some minimal testing.  I was able to run [this](https://www.php.net/manual/en/enchant.examples.php) test from the php documentation website successfully after enabling the enchant module.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (13 preceding siblings ...)
  2021-10-14 17:01 ` mtboehlke
@ 2021-10-14 17:06 ` mtboehlke
  2021-10-14 17:13 ` mtboehlke
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-14 17:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-943546166

Comment:
I did some some minimal testing.  I was able to run [this](https://www.php.net/manual/en/enchant.examples.php) test from the php documentation website successfully after enabling the enchant module, and it correctly shows that it is using enchant2 with its various backends.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (14 preceding siblings ...)
  2021-10-14 17:06 ` mtboehlke
@ 2021-10-14 17:13 ` mtboehlke
  2021-10-14 17:50 ` mtboehlke
  2021-10-30 18:59 ` [PR PATCH] [Merged]: " ericonr
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-14 17:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-943546166

Comment:
I did some some minimal testing.  I was able to run [this](https://www.php.net/manual/en/enchant.examples.php) test from the php documentation website successfully after enabling the enchant module, and it correctly shows that it is using enchant2 with its various backends.  Tester a couple of words, and the spelling suggestions seem to come through as expected.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (15 preceding siblings ...)
  2021-10-14 17:13 ` mtboehlke
@ 2021-10-14 17:50 ` mtboehlke
  2021-10-30 18:59 ` [PR PATCH] [Merged]: " ericonr
  17 siblings, 0 replies; 19+ messages in thread
From: mtboehlke @ 2021-10-14 17:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

New comment by mtboehlke on void-packages repository

https://github.com/void-linux/void-packages/pull/33416#issuecomment-943546166

Comment:
I did some some minimal testing.  I was able to run [this](https://www.php.net/manual/en/enchant.examples.php) test from the php documentation website successfully after enabling the enchant module, and it correctly shows that it is using enchant2 with its various backends.  Tested a couple of words, and the spelling suggestions come through as expected.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Merged]: php: patch to use enchant2
  2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
                   ` (16 preceding siblings ...)
  2021-10-14 17:50 ` mtboehlke
@ 2021-10-30 18:59 ` ericonr
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2021-10-30 18:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

There's a merged pull request on the void-packages repository

php: patch to use enchant2
https://github.com/void-linux/void-packages/pull/33416

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
Motivation is #27710. I think this is the only thing stopping us from moving enchant to enchant2.

~~This still needs to be tested~~, I have briefly tested this, but any help in that area is still appreciated.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-10-30 18:59 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  0:29 [PR PATCH] [WIP] php: patch to use enchant2 mtboehlke
2021-10-08 21:02 ` [PR PATCH] [Updated] " mtboehlke
2021-10-12 19:38 ` ericonr
2021-10-12 20:07 ` mtboehlke
2021-10-12 20:08 ` mtboehlke
2021-10-12 20:09 ` mtboehlke
2021-10-12 20:22 ` mtboehlke
2021-10-13  0:59 ` ericonr
2021-10-13  4:43 ` [PR PATCH] [Updated] " mtboehlke
2021-10-13  4:45 ` mtboehlke
2021-10-13  4:49 ` mtboehlke
2021-10-13  4:56 ` [PR PATCH] [Updated] " mtboehlke
2021-10-13  5:32 ` ericonr
2021-10-14 17:00 ` mtboehlke
2021-10-14 17:01 ` mtboehlke
2021-10-14 17:06 ` mtboehlke
2021-10-14 17:13 ` mtboehlke
2021-10-14 17:50 ` mtboehlke
2021-10-30 18:59 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).