From 69e314c9c5c48c51ee805c3e3fc62250a2e46963 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 31 Aug 2023 16:28:46 +0200 Subject: build out of sources tree --- REFLECTION | 482 ++++++++++++++++++++++++++++++++++++++++----------- php-pecl-crypto.spec | 92 ++++------ 2 files changed, 417 insertions(+), 157 deletions(-) diff --git a/REFLECTION b/REFLECTION index a868d35..0b06cc4 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,7 +1,7 @@ -Extension [ extension #119 crypto version 0.3.2 ] { +Extension [ extension #125 crypto version 0.3.2 ] { - Classes [17] { - Class [ class Crypto\CryptoException extends Exception implements Throwable ] { + Class [ class Crypto\CryptoException extends Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -13,52 +13,87 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class Crypto\CipherException extends Crypto\CryptoException implements Throwable ] { + Class [ class Crypto\CipherException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [30] { Constant [ public int ALGORITHM_NOT_FOUND ] { 1 } @@ -100,47 +135,82 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -165,8 +235,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { Method [ static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ $aliases ] - Parameter #1 [ $prefix ] + Parameter #0 [ $aliases = ] + Parameter #1 [ $prefix = ] } } @@ -194,7 +264,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [1] { - Property [ protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [18] { @@ -202,8 +272,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [3] { Parameter #0 [ $algorithm ] - Parameter #1 [ $mode ] - Parameter #2 [ $key_size ] + Parameter #1 [ $mode = ] + Parameter #2 [ $key_size = ] } } @@ -217,7 +287,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [2] { Parameter #0 [ $key ] - Parameter #1 [ $iv ] + Parameter #1 [ $iv = ] } } @@ -239,7 +309,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [3] { Parameter #0 [ $data ] Parameter #1 [ $key ] - Parameter #2 [ $iv ] + Parameter #2 [ $iv = ] } } @@ -247,7 +317,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [2] { Parameter #0 [ $key ] - Parameter #1 [ $iv ] + Parameter #1 [ $iv = ] } } @@ -269,7 +339,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [3] { Parameter #0 [ $data ] Parameter #1 [ $key ] - Parameter #2 [ $iv ] + Parameter #2 [ $iv = ] } } @@ -338,8 +408,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { Method [ static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ $aliases ] - Parameter #1 [ $prefix ] + Parameter #0 [ $aliases = ] + Parameter #1 [ $prefix = ] } } @@ -360,7 +430,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [1] { - Property [ protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -410,7 +480,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } } - Class [ class Crypto\HashException extends Crypto\CryptoException implements Throwable ] { + Class [ class Crypto\HashException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [7] { Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } @@ -429,47 +499,82 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -486,8 +591,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { Method [ static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ $aliases ] - Parameter #1 [ $prefix ] + Parameter #0 [ $aliases = ] + Parameter #1 [ $prefix = ] } } @@ -508,7 +613,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [1] { - Property [ protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -559,7 +664,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } } - Class [ class Crypto\MACException extends Crypto\HashException implements Throwable ] { + Class [ class Crypto\MACException extends Crypto\HashException implements Throwable, Stringable ] { - Constants [9] { Constant [ public int HASH_ALGORITHM_NOT_FOUND ] { 1 } @@ -580,47 +685,82 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -637,8 +777,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { Method [ static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ $aliases ] - Parameter #1 [ $prefix ] + Parameter #0 [ $aliases = ] + Parameter #1 [ $prefix = ] } } @@ -659,7 +799,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [1] { - Property [ protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -722,8 +862,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { Method [ static public method getAlgorithms ] { - Parameters [2] { - Parameter #0 [ $aliases ] - Parameter #1 [ $prefix ] + Parameter #0 [ $aliases = ] + Parameter #1 [ $prefix = ] } } @@ -744,7 +884,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [1] { - Property [ protected $algorithm ] + Property [ protected $algorithm = NULL ] } - Methods [7] { @@ -857,7 +997,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } } - Class [ class Crypto\Base64Exception extends Crypto\CryptoException implements Throwable ] { + Class [ class Crypto\Base64Exception extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [6] { Constant [ public int ENCODE_UPDATE_FORBIDDEN ] { 1 } @@ -875,47 +1015,82 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -933,8 +1108,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [3] { Parameter #0 [ $num ] - Parameter #1 [ $must_be_strong ] - Parameter #2 [ &$returned_strong_result ] + Parameter #1 [ $must_be_strong = ] + Parameter #2 [ &$returned_strong_result = ] } } @@ -942,7 +1117,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [2] { Parameter #0 [ $buf ] - Parameter #1 [ $entropy ] + Parameter #1 [ $entropy = ] } } @@ -956,7 +1131,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [2] { Parameter #0 [ $filename ] - Parameter #1 [ $max_bytes ] + Parameter #1 [ $max_bytes = ] } } @@ -975,7 +1150,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } } - Class [ class Crypto\RandException extends Crypto\CryptoException implements Throwable ] { + Class [ class Crypto\RandException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [4] { Constant [ public int GENERATE_PREDICTABLE ] { 1 } @@ -991,47 +1166,82 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -1055,7 +1265,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [2] { Parameter #0 [ $length ] - Parameter #1 [ $salt ] + Parameter #1 [ $salt = ] } } @@ -1094,7 +1304,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } } - Class [ class Crypto\KDFException extends Crypto\CryptoException implements Throwable ] { + Class [ class Crypto\KDFException extends Crypto\CryptoException implements Stringable, Throwable ] { - Constants [5] { Constant [ public int KEY_LENGTH_LOW ] { 1 } @@ -1111,47 +1321,82 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -1176,8 +1421,8 @@ Extension [ extension #119 crypto version 0.3.2 ] { - Parameters [4] { Parameter #0 [ $hashAlgorithm ] Parameter #1 [ $length ] - Parameter #2 [ $salt ] - Parameter #3 [ $iterations ] + Parameter #2 [ $salt = ] + Parameter #3 [ $iterations = ] } } @@ -1242,7 +1487,7 @@ Extension [ extension #119 crypto version 0.3.2 ] { } } - Class [ class Crypto\PBKDF2Exception extends Crypto\KDFException implements Throwable ] { + Class [ class Crypto\PBKDF2Exception extends Crypto\KDFException implements Throwable, Stringable ] { - Constants [7] { Constant [ public int KEY_LENGTH_LOW ] { 1 } @@ -1261,47 +1506,82 @@ Extension [ extension #119 crypto version 0.3.2 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } diff --git a/php-pecl-crypto.spec b/php-pecl-crypto.spec index cea2879..c82beed 100644 --- a/php-pecl-crypto.spec +++ b/php-pecl-crypto.spec @@ -1,36 +1,32 @@ # remirepo spec file for php-pecl-crypto # -# Copyright (c) 2013-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2013-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%{?scl:%scl_package php-pecl-crypto} -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-crypto -%endif - -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global pecl_name crypto -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name crypto %if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini +%global ini_name %{pecl_name}.ini %else -%global ini_name 40-%{pecl_name}.ini +%global ini_name 40-%{pecl_name}.ini %endif +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Wrapper for OpenSSL Crypto Library -Name: %{?sub_prefix}php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 0.3.2 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: BSD +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -41,28 +37,11 @@ BuildRequires: openssl-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -73,14 +52,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_CRYPTO_VERSION/{s/.* "//;s/".*$//;p}' php_crypto.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -89,9 +67,9 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -104,19 +82,20 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --with-crypto \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-crypto \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -140,7 +119,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -165,41 +144,39 @@ fi %check -cd NTS +cd %{sources} + : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %endif %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}//%{pecl_name}.so \ --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="-n -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %endif %endif %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -213,6 +190,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu Aug 31 2023 Remi Collet - 0.3.2-2 +- build out of sources tree + * Mon Mar 8 2021 Remi Collet - 0.3.2-1 - update to 0.3.2 -- cgit