From e74aacb9278f595b7e74dd25667a4477c7b1aaf0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 27 Nov 2020 08:04:19 +0100 Subject: add upstream patches for PHP 8 --- REFLECTION | 16 ++++++++-------- php-pecl-mcrypt.spec | 25 ++++++++++++++++++------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/REFLECTION b/REFLECTION index b386af0..88979dc 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #60 mcrypt version 1.0.3 ] { +Extension [ extension #117 mcrypt version 1.0.3 ] { - INI { Entry [ mcrypt.algorithms_dir ] @@ -10,11 +10,11 @@ Extension [ extension #60 mcrypt version 1.0.3 ] { } - Constants [41] { - Constant [ integer MCRYPT_ENCRYPT ] { 0 } - Constant [ integer MCRYPT_DECRYPT ] { 1 } - Constant [ integer MCRYPT_DEV_RANDOM ] { 0 } - Constant [ integer MCRYPT_DEV_URANDOM ] { 1 } - Constant [ integer MCRYPT_RAND ] { 2 } + Constant [ int MCRYPT_ENCRYPT ] { 0 } + Constant [ int MCRYPT_DECRYPT ] { 1 } + Constant [ int MCRYPT_DEV_RANDOM ] { 0 } + Constant [ int MCRYPT_DEV_URANDOM ] { 1 } + Constant [ int MCRYPT_RAND ] { 2 } Constant [ string MCRYPT_3DES ] { tripledes } Constant [ string MCRYPT_ARCFOUR_IV ] { arcfour-iv } Constant [ string MCRYPT_ARCFOUR ] { arcfour } @@ -107,7 +107,7 @@ Extension [ extension #60 mcrypt version 1.0.3 ] { Parameter #1 [ $key ] Parameter #2 [ $data ] Parameter #3 [ $mode ] - Parameter #4 [ $iv ] + Parameter #4 [ $iv ] } } Function [ function mcrypt_decrypt ] { @@ -117,7 +117,7 @@ Extension [ extension #60 mcrypt version 1.0.3 ] { Parameter #1 [ $key ] Parameter #2 [ $data ] Parameter #3 [ $mode ] - Parameter #4 [ $iv ] + Parameter #4 [ $iv ] } } Function [ function mcrypt_module_open ] { diff --git a/php-pecl-mcrypt.spec b/php-pecl-mcrypt.spec index 6b828fe..1a323cc 100644 --- a/php-pecl-mcrypt.spec +++ b/php-pecl-mcrypt.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-mcrypt # -# Copyright (c) 2017-2019 Remi Collet +# Copyright (c) 2017-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -19,11 +19,14 @@ Summary: Bindings for the libmcrypt library Name: %{?scl_prefix}php-pecl-mcrypt Version: 1.0.3 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP -URL: http://pecl.php.net/package/mcrypt +URL: https://pecl.php.net/package/mcrypt -Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +Source: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz + +Patch0: https://github.com/php/pecl-encryption-mcrypt/commit/11de239f9ca99e852a4d94258edf1a9f64f96c8c.patch +Patch1: https://github.com/php/pecl-encryption-mcrypt/commit/78a19090593013021ffe6a331b95957d4eadcd23.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7.2 @@ -42,7 +45,7 @@ Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}-%{release} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}-%{release} -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} Obsoletes: php54u-%{pecl_name} < 7.2 Obsoletes: php54w-%{pecl_name} < 7.2 Obsoletes: php55u-%{pecl_name} < 7.2 @@ -61,7 +64,9 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -89,7 +94,10 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{version}%{?prever} NTS cd NTS -sed -e '/PHP_MCRYPT_VERSION/s/PHP_VERSION/"%{version}"/' -i php_mcrypt.h +%if "%{php_version}" > "8.0" +%patch0 -p1 -b .up0 +%endif +%patch1 -p1 -b .up1 # Sanity check, really often broken extver=$(sed -n '/#define PHP_MCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_mcrypt.h) @@ -223,6 +231,9 @@ fi %changelog +* Fri Nov 27 2020 Remi Collet - 1.0.3-4 +- add upstream patches for PHP 8 + * Wed Sep 18 2019 Remi Collet - 1.0.3-1 - update to 1.0.3 (no change) -- cgit