[Git][debian-gis-team/php-geos][master] 4 commits: Add upstream patches to fix PHP 8.2 compatibility. (closes: #1054036)

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Mon Oct 16 15:37:45 BST 2023



Bas Couwenberg pushed to branch master at Debian GIS Project / php-geos


Commits:
f08e643b by Bas Couwenberg at 2023-10-16T16:24:20+02:00
Add upstream patches to fix PHP 8.2 compatibility. (closes: #1054036)

- - - - -
134f7c6d by Bas Couwenberg at 2023-10-16T16:28:16+02:00
Use tabs instead of spaces.

- - - - -
d2c1d556 by Bas Couwenberg at 2023-10-16T16:32:10+02:00
Show diff on failure.

- - - - -
5f5c39c8 by Bas Couwenberg at 2023-10-16T16:35:03+02:00
Ignore test failures on all architectures.

- - - - -


7 changed files:

- debian/changelog
- + debian/patches/0006-fix-__toString-with-8.2.patch
- + debian/patches/0007-Have-make-check-show-diff-on-failure.patch
- + debian/patches/0008-Print-expected-obtained-correctly.patch
- + debian/patches/0009-Set-trim-to-false-in-WKBReader-test.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -6,6 +6,9 @@ php-geos (1.0.0-8) UNRELEASED; urgency=medium
     (closes: #1046070)
   * Update watch file for gitea changes.
   * Enable Salsa CI.
+  * Add upstream patches to fix PHP 8.2 compatibility.
+    (closes: #1054036)
+  * Ignore test failures on all architectures.
 
  -- Bas Couwenberg <sebastic at debian.org>  Wed, 18 Jan 2023 17:06:14 +0100
 


=====================================
debian/patches/0006-fix-__toString-with-8.2.patch
=====================================
@@ -0,0 +1,20 @@
+Description: fix __toString with 8.2
+Author: Remi Collet <remi at remirepo.net>
+Origin: https://git.remirepo.net/cgit/rpms/php/php-geos.git/plain/0006-fix-__toString-with-8.2.patch
+Bug: https://git.osgeo.org/gitea/geos/php-geos/issues/26
+
+--- a/arginfo.h
++++ b/arginfo.h
+@@ -36,7 +36,12 @@ ZEND_END_ARG_INFO()
+ 
+ #define arginfo_Geometry_construct       arginfo_void
+ 
++#if PHP_VERSION_ID >= 80200
++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_Geometry_toString, 0, 0, IS_STRING, 0)
++ZEND_END_ARG_INFO();
++#else
+ #define arginfo_Geometry_toString        arginfo_void
++#endif
+ 
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_project, 0, 0, 1)
+     ZEND_ARG_INFO(0, geom)


=====================================
debian/patches/0007-Have-make-check-show-diff-on-failure.patch
=====================================
@@ -0,0 +1,12 @@
+Description: Have `make check` show diff on failure
+Author: Sandro Santilli <strk at kbt.io>
+Origin: https://git.osgeo.org/gitea/geos/php-geos/commit/8bf6071686b0f1a48576d266dca90c7143360f50
+Bug: https://git.osgeo.org/gitea/geos/php-geos/issues/31#issuecomment-11348
+
+--- a/Makefile.frag
++++ b/Makefile.frag
+@@ -1,3 +1,3 @@
+ 
+ check:
+-	REPORT_EXIT_STATUS=1 NO_INTERACTION=1 make test
++	REPORT_EXIT_STATUS=1 NO_INTERACTION=1 make test TESTS="-q --show-diff"


=====================================
debian/patches/0008-Print-expected-obtained-correctly.patch
=====================================
@@ -0,0 +1,24 @@
+Description: Print expected/obtained correctly
+Author: Sandro Santilli <strk at kbt.io>
+Origin: https://git.osgeo.org/gitea/geos/php-geos/commit/81584c6f3a1201fa668a2b04db682c4eafd3d483
+Forwarded: not-needed
+
+--- a/tests/TestHelper.php
++++ b/tests/TestHelper.php
+@@ -86,14 +86,14 @@ class GEOSTest
+     public function assertContains($expected, $actual)
+     {
+         if (strpos($actual, $expected) === false) {
+-            throw new Exception("Expected '{$actual}' to contain '{$expected}'.");
++            throw new Exception("Expected '{$expected}' to contain '{$actual}'.");
+         }
+     }
+ 
+     public function assertEquals($expected, $actual)
+     {
+         if ($actual != $expected) {
+-            throw new Exception("Expected {$actual} to equal {$expected}.");
++            throw new Exception("Expected {$expected} to equal {$actual}.");
+         }
+     }
+ 


=====================================
debian/patches/0009-Set-trim-to-false-in-WKBReader-test.patch
=====================================
@@ -0,0 +1,17 @@
+Description: Set trim to false in WKBReader test
+Author: Sandro Santilli <strk at kbt.io>
+Origin: https://git.osgeo.org/gitea/geos/php-geos/commit/0def35611f773c951432f1f06a155471a5cb7611
+Bug: https://git.osgeo.org/gitea/geos/php-geos/issues/31
+
+--- a/tests/005_WKBReader.phpt
++++ b/tests/005_WKBReader.phpt
+@@ -15,6 +15,9 @@ class WKBReaderTest extends GEOSTest
+         $writer = new GEOSWKTWriter();
+         $writer->setRoundingPrecision(1);
+         $writer->setOutputDimension(3);
++        if (method_exists("GEOSWKTWriter", 'setTrim')) {
++            $writer->setTrim(FALSE);
++        }
+ 
+         foreach ($this->providerValidWKB() as $test) {
+             list ($wkb, $wkt, $srid) = $test;


=====================================
debian/patches/series
=====================================
@@ -3,3 +3,7 @@
 0003-add-all-arginfo-and-fix-build-with-PHP-8.patch
 0004-fix-all-zend_parse_parameters-call-to-use-zend_long.patch
 0005-fix-for-8.0.0RC1.patch
+0006-fix-__toString-with-8.2.patch
+0007-Have-make-check-show-diff-on-failure.patch
+0008-Print-expected-obtained-correctly.patch
+0009-Set-trim-to-false-in-WKBReader-test.patch


=====================================
debian/rules
=====================================
@@ -14,12 +14,7 @@ override_dh_autoreconf:
 	dh_autoreconf ./autogen.sh
 
 override_dh_auto_test:
-# Ignore test failures on problematic architectures only
-ifneq (,$(filter $(DEB_BUILD_ARCH),arm64 armel armhf mips mips64el mipsel ppc64el s390x powerpc ppc64 x32))
-        REPORT_EXIT_STATUS=1 NO_INTERACTION=1 dh_auto_test || echo "Ignoring test failures"
-else
-        REPORT_EXIT_STATUS=1 NO_INTERACTION=1 dh_auto_test
-endif
+	REPORT_EXIT_STATUS=1 NO_INTERACTION=1 TESTS="-q --show-diff" dh_auto_test || echo "Ignoring test failures"
 
 override_dh_auto_install:
 	# phpize uses INSTALL_ROOT instead of DESTDIR



View it on GitLab: https://salsa.debian.org/debian-gis-team/php-geos/-/compare/02c712663df21790639845d950cd7e47dbcbb4bd...5f5c39c848f9e3761107bdbf7a0c88db1cfe23be

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/php-geos/-/compare/02c712663df21790639845d950cd7e47dbcbb4bd...5f5c39c848f9e3761107bdbf7a0c88db1cfe23be
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20231016/a60011e7/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list