summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--composer.json4
l---------makesrc.sh1
-rw-r--r--php-simplepie-tests.patch23
-rw-r--r--php-simplepie.spec45
5 files changed, 57 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/composer.json b/composer.json
index dd13461..d76ee7d 100644
--- a/composer.json
+++ b/composer.json
@@ -12,8 +12,8 @@
"role": "Creator, alumnus developer"
},
{
- "name": "Geoffrey Sneddon",
- "homepage": "http://gsnedders.com/",
+ "name": "Sam Sneddon",
+ "homepage": "https://gsnedders.com/",
"role": "Alumnus developer"
},
{
diff --git a/makesrc.sh b/makesrc.sh
new file mode 120000
index 0000000..a8d5ab3
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1 @@
+php-simplepie-makesrc.sh \ No newline at end of file
diff --git a/php-simplepie-tests.patch b/php-simplepie-tests.patch
new file mode 100644
index 0000000..622a22d
--- /dev/null
+++ b/php-simplepie-tests.patch
@@ -0,0 +1,23 @@
+diff -up ./tests/CacheTest.php.php8 ./tests/CacheTest.php
+--- ./tests/CacheTest.php.php8 2021-03-23 16:04:28.360182642 +0100
++++ ./tests/CacheTest.php 2021-03-23 16:04:50.771096776 +0100
+@@ -76,6 +76,7 @@ class CacheTest extends PHPUnit\Framewor
+ {
+ /**
+ * @expectedException Exception_Success
++ * @requires PHP < 8
+ */
+ public function testDirectOverrideLegacy()
+ {
+diff -up ./tests/EncodingTest.php.php8 ./tests/EncodingTest.php
+--- ./tests/EncodingTest.php.php8 2021-03-23 16:06:41.482672604 +0100
++++ ./tests/EncodingTest.php 2021-03-23 16:06:46.003655284 +0100
+@@ -182,7 +182,7 @@ class EncodingTest extends PHPUnit\Frame
+ $this->assertFalse(SimplePie_Misc::change_encoding('', 'TESTENC', 'UTF-8'));
+ }
+
+- public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
++ public static function assertEquals($expected, $actual, string $message = '', float $delta = 0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void
+ {
+ if (is_string($expected))
+ {
diff --git a/php-simplepie.spec b/php-simplepie.spec
index e60947d..6b62067 100644
--- a/php-simplepie.spec
+++ b/php-simplepie.spec
@@ -7,12 +7,12 @@
#
# Please preserve changelog entries
#
-%global gh_commit 0e8fe72132dad765d25db4cabc69a91139af1263
+%global gh_commit 1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner simplepie
%global gh_project simplepie
-%global gh_version 1.5.2
-%global with_tests 0%{!?_without_tests:1}
+%global gh_version 1.5.6
+%bcond_without tests
Name: php-%{gh_project}
Version: %{gh_version}
@@ -30,20 +30,15 @@ Source1: %{name}-makesrc.sh
# Adapt autoloader for installation tree
Patch0: %{name}-rpm.patch
+# Adpat to phpunit7 and php 8
+Patch1: %{name}-tests.patch
BuildArch: noarch
-%if %{with_tests}
+%if %{with tests}
# From composer.json, "require-dev"
# "phpunit/phpunit": "~5.4.3 || ~6.5"
-# remirepo:1
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: phpunit6 >= 6.5
-%global phpunit %{_bindir}/phpunit6
-# remirepo:4
-%else
-BuildRequires: php-phpunit-PHPUnit
-%global phpunit %{_bindir}/phpunit
-%endif
+BuildRequires: phpunit7
+%global phpunit %{_bindir}/phpunit7
%endif
# from composer.json, "require"
@@ -89,6 +84,7 @@ Autoloader: %{_datadir}/php/%{name}/autoloader.php
%setup -qn %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
+%patch1 -p1 -b .php8
# fix rpmlint warnings
find . -type f -exec chmod -x {} \;
@@ -108,16 +104,16 @@ install -pm 644 autoloader.php \
%{buildroot}/%{_datadir}/php/%{name}/autoloader.php
-%if %{with_tests}
+%if %{with tests}
%check
sed -e 's:@PATH@:%{buildroot}/%{_datadir}/php/%{name}:' \
-i tests/bootstrap.php
ret=0
-for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72 php73; do
+for cmdarg in "php %{phpunit}" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
- $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
+ $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1
fi
done
exit $ret
@@ -125,6 +121,7 @@ exit $ret
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE.txt
%doc composer.json
@@ -134,6 +131,22 @@ exit $ret
%changelog
+* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 1.5.6-1
+- update to 1.5.6
+- switch to phpunit7 and fix FTBFS with PHP 8
+
+* Wed Jul 1 2020 Remi Collet <remi@remirepo.net> - 1.5.5-1
+- update to 1.5.5
+
+* Wed Dec 18 2019 Remi Collet <remi@remirepo.net> - 1.5.4-1
+- update to 1.5.4
+- drop patch merged upstream
+
+* Wed Oct 9 2019 Remi Collet <remi@remirepo.net> - 1.5.3-1
+- update to 1.5.3
+- add patch for PHP 7.4 from
+ https://github.com/simplepie/simplepie/pull/628
+
* Tue Oct 2 2018 Remi Collet <remi@remirepo.net> - 1.5.2-1
- update to 1.5.2
- raise dependency on PHP 5.6