diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PHPINFO | 9 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | apfd-php81.patch | 38 | ||||
-rw-r--r-- | php-pecl-apfd.spec | 140 |
5 files changed, 69 insertions, 122 deletions
@@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc @@ -1,4 +1,11 @@ apfd -apfd support => enabled +APFD Support => enabled +Extension Version => 1.0.3 + +Content type => Reader => Handler +multipart/form-data => default => custom +application/x-www-form-urlencoded => default => default +text/json => default => custom +application/json => default => custom @@ -1,3 +1,3 @@ -Extension [ <persistent> extension #119 apfd version 1.0.2 ] { +Extension [ <persistent> extension #125 apfd version 1.0.3 ] { } diff --git a/apfd-php81.patch b/apfd-php81.patch deleted file mode 100644 index 9b897d4..0000000 --- a/apfd-php81.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 3b75b75ca2c8fde273b244052bb60f9cb4a56072 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Wed, 9 Jun 2021 11:46:36 +0200 -Subject: [PATCH] ignore new "full_path" member in 8.1 - ---- - tests/002.phpt | 3 +++ - tests/003.phpt | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/tests/002.phpt b/tests/002.phpt -index e46df77..50ca235 100644 ---- a/tests/002.phpt -+++ b/tests/002.phpt -@@ -70,6 +70,9 @@ mike - --FILE-- - <?php - -+foreach($_FILES as $i => $v) { -+ unset($_FILES[$i]['full_path']); // only in 8.1 -+} - var_dump($_POST, $_FILES); - - ?> -diff --git a/tests/003.phpt b/tests/003.phpt -index 7cfd9ca..94b8989 100644 ---- a/tests/003.phpt -+++ b/tests/003.phpt -@@ -70,6 +70,9 @@ mike - --FILE-- - <?php - -+foreach($_FILES as $i => $v) { -+ unset($_FILES[$i]['full_path']); // only in 8.1 -+} - var_dump($_POST, $_FILES); - - ?> diff --git a/php-pecl-apfd.spec b/php-pecl-apfd.spec index 2a7c354..5572f15 100644 --- a/php-pecl-apfd.spec +++ b/php-pecl-apfd.spec @@ -3,49 +3,42 @@ # # Fedora spec file for php-pecl-apfd # -# Copyright (c) 2015-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2015-2024 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-apfd} -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-apfd -%endif +%bcond_without tests %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name apfd -%global with_tests %{?_without_tests:0}%{!?_without_tests:1} -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else %global ini_name 40-%{pecl_name}.ini -%endif #global prever RC1 +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Always Populate Form Data -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.0.2 -Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: BSD +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 1.0.3 +Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: BSD-2-Clause URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz -Patch0: %{pecl_name}-php81.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: make BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear +%if %{with tests} +BuildRequires: %{?scl_prefix}php-pecl-json-post +%endif 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} @@ -54,19 +47,6 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} # Split off pecl/http Conflicts: %{?scl_prefix}php-pecl(http) < 2.4 -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif -%endif - %description This tiny extension lets PHP's post handler parse `multipart/form-data` and @@ -80,16 +60,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version}%{?prever} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml -cd NTS -%patch0 -p1 - +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_APFD_VERSION/{s/.* "//;s/".*$//;p}' php_apfd.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -98,9 +75,9 @@ if test "x${extver}" != "x%{version}%{?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 @@ -113,27 +90,32 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL + +cd ../NTS %configure \ --enable-apfd \ - --with-php-config=%{_bindir}/php-config -make %{?_smp_mflags} + --with-php-config=%{__phpconfig} + +%make_build %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --enable-apfd \ - --with-php-config=%{_bindir}/zts-php-config -make %{?_smp_mflags} + --with-php-config=%{__ztsphpconfig} + +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -142,51 +124,35 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # 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 -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %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} + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : Upstream test suite for NTS extension +OPT="-n" +[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so" +[ -f %{php_extdir}/json_post.so ] && OPT="$OPT -d extension=json_post.so" + TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="$OPT -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} @@ -194,17 +160,13 @@ 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} -: Upstream test suite skipped as zts-php-cgi not available -%endif + --modules | grep '^%{pecl_name}$' %endif %files +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} -%{?_licensedir:%license NTS/LICENSE} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -217,6 +179,20 @@ cd ../ZTS %changelog +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.0.3-4 +- rebuild for PHP 8.3.0RC1 + +* Tue Aug 22 2023 Remi Collet <remi@remirepo.net> - 1.0.3-3 +- enable json extension for 7.4 + +* Fri Jul 7 2023 Remi Collet <remi@remirepo.net> - 1.0.3-2 +- build out of sources tree +- enable json_post for test suite + +* Tue Oct 5 2021 Remi Collet <remi@remirepo.net> - 1.0.3-1 +- update to 1.0.3 +- drop patch merged upstream + * Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 1.0.2-5 - rebuild for 8.1.0RC1 |