From 0ecb8a8fff2895b1de4e5254e986253536bfce43 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 15 Oct 2024 14:49:56 +0200 Subject: update to 1.0.3 --- PHPINFO | 2 +- REFLECTION | 138 ++++++++++++++++++++++++++--------------------------- php-pecl-imap.spec | 88 +++++++--------------------------- upstream.patch | 48 ------------------- 4 files changed, 87 insertions(+), 189 deletions(-) delete mode 100644 upstream.patch diff --git a/PHPINFO b/PHPINFO index 92bc782..b867371 100644 --- a/PHPINFO +++ b/PHPINFO @@ -1,7 +1,7 @@ imap -IMAP extension Version => 1.0.2 +IMAP extension Version => 1.0.3 IMAP c-Client Version => 2007f SSL Support => enabled Kerberos Support => enabled diff --git a/REFLECTION b/REFLECTION index b8936e8..9be78c5 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #49 imap version 1.0.2 ] { +Extension [ extension #48 imap version 1.0.3 ] { - Dependencies { Dependency [ standard (Required) ] @@ -11,74 +11,74 @@ Extension [ extension #49 imap version 1.0.2 ] { } - Constants [68] { - Constant [ int NIL ] { 0 } - Constant [ int IMAP_OPENTIMEOUT ] { 1 } - Constant [ int IMAP_READTIMEOUT ] { 2 } - Constant [ int IMAP_WRITETIMEOUT ] { 3 } - Constant [ int IMAP_CLOSETIMEOUT ] { 4 } - Constant [ int OP_DEBUG ] { 1 } - Constant [ int OP_READONLY ] { 2 } - Constant [ int OP_ANONYMOUS ] { 4 } - Constant [ int OP_SHORTCACHE ] { 8 } - Constant [ int OP_SILENT ] { 16 } - Constant [ int OP_PROTOTYPE ] { 32 } - Constant [ int OP_HALFOPEN ] { 64 } - Constant [ int OP_EXPUNGE ] { 128 } - Constant [ int OP_SECURE ] { 256 } - Constant [ int CL_EXPUNGE ] { 32768 } - Constant [ int FT_UID ] { 1 } - Constant [ int FT_PEEK ] { 2 } - Constant [ int FT_NOT ] { 4 } - Constant [ int FT_INTERNAL ] { 8 } - Constant [ int FT_PREFETCHTEXT ] { 32 } - Constant [ int ST_UID ] { 1 } - Constant [ int ST_SILENT ] { 2 } - Constant [ int ST_SET ] { 4 } - Constant [ int CP_UID ] { 1 } - Constant [ int CP_MOVE ] { 2 } - Constant [ int SE_UID ] { 1 } - Constant [ int SE_FREE ] { 2 } - Constant [ int SE_NOPREFETCH ] { 4 } - Constant [ int SO_FREE ] { 8 } - Constant [ int SO_NOSERVER ] { 8 } - Constant [ int SA_MESSAGES ] { 1 } - Constant [ int SA_RECENT ] { 2 } - Constant [ int SA_UNSEEN ] { 4 } - Constant [ int SA_UIDNEXT ] { 8 } - Constant [ int SA_UIDVALIDITY ] { 16 } - Constant [ int SA_ALL ] { 31 } - Constant [ int LATT_NOINFERIORS ] { 1 } - Constant [ int LATT_NOSELECT ] { 2 } - Constant [ int LATT_MARKED ] { 4 } - Constant [ int LATT_UNMARKED ] { 8 } - Constant [ int LATT_REFERRAL ] { 16 } - Constant [ int LATT_HASCHILDREN ] { 32 } - Constant [ int LATT_HASNOCHILDREN ] { 64 } - Constant [ int SORTDATE ] { 0 } - Constant [ int SORTARRIVAL ] { 1 } - Constant [ int SORTFROM ] { 2 } - Constant [ int SORTSUBJECT ] { 3 } - Constant [ int SORTTO ] { 4 } - Constant [ int SORTCC ] { 5 } - Constant [ int SORTSIZE ] { 6 } - Constant [ int TYPETEXT ] { 0 } - Constant [ int TYPEMULTIPART ] { 1 } - Constant [ int TYPEMESSAGE ] { 2 } - Constant [ int TYPEAPPLICATION ] { 3 } - Constant [ int TYPEAUDIO ] { 4 } - Constant [ int TYPEIMAGE ] { 5 } - Constant [ int TYPEVIDEO ] { 6 } - Constant [ int TYPEMODEL ] { 7 } - Constant [ int TYPEOTHER ] { 8 } - Constant [ int ENC7BIT ] { 0 } - Constant [ int ENC8BIT ] { 1 } - Constant [ int ENCBINARY ] { 2 } - Constant [ int ENCBASE64 ] { 3 } - Constant [ int ENCQUOTEDPRINTABLE ] { 4 } - Constant [ int ENCOTHER ] { 5 } - Constant [ int IMAP_GC_ELT ] { 1 } - Constant [ int IMAP_GC_ENV ] { 2 } - Constant [ int IMAP_GC_TEXTS ] { 4 } + Constant [ int NIL ] { 0 } + Constant [ int IMAP_OPENTIMEOUT ] { 1 } + Constant [ int IMAP_READTIMEOUT ] { 2 } + Constant [ int IMAP_WRITETIMEOUT ] { 3 } + Constant [ int IMAP_CLOSETIMEOUT ] { 4 } + Constant [ int OP_DEBUG ] { 1 } + Constant [ int OP_READONLY ] { 2 } + Constant [ int OP_ANONYMOUS ] { 4 } + Constant [ int OP_SHORTCACHE ] { 8 } + Constant [ int OP_SILENT ] { 16 } + Constant [ int OP_PROTOTYPE ] { 32 } + Constant [ int OP_HALFOPEN ] { 64 } + Constant [ int OP_EXPUNGE ] { 128 } + Constant [ int OP_SECURE ] { 256 } + Constant [ int CL_EXPUNGE ] { 32768 } + Constant [ int FT_UID ] { 1 } + Constant [ int FT_PEEK ] { 2 } + Constant [ int FT_NOT ] { 4 } + Constant [ int FT_INTERNAL ] { 8 } + Constant [ int FT_PREFETCHTEXT ] { 32 } + Constant [ int ST_UID ] { 1 } + Constant [ int ST_SILENT ] { 2 } + Constant [ int ST_SET ] { 4 } + Constant [ int CP_UID ] { 1 } + Constant [ int CP_MOVE ] { 2 } + Constant [ int SE_UID ] { 1 } + Constant [ int SE_FREE ] { 2 } + Constant [ int SE_NOPREFETCH ] { 4 } + Constant [ int SO_FREE ] { 8 } + Constant [ int SO_NOSERVER ] { 8 } + Constant [ int SA_MESSAGES ] { 1 } + Constant [ int SA_RECENT ] { 2 } + Constant [ int SA_UNSEEN ] { 4 } + Constant [ int SA_UIDNEXT ] { 8 } + Constant [ int SA_UIDVALIDITY ] { 16 } + Constant [ int SA_ALL ] { 31 } + Constant [ int LATT_NOINFERIORS ] { 1 } + Constant [ int LATT_NOSELECT ] { 2 } + Constant [ int LATT_MARKED ] { 4 } + Constant [ int LATT_UNMARKED ] { 8 } + Constant [ int LATT_REFERRAL ] { 16 } + Constant [ int LATT_HASCHILDREN ] { 32 } + Constant [ int LATT_HASNOCHILDREN ] { 64 } + Constant [ int SORTDATE ] { 0 } + Constant [ int SORTARRIVAL ] { 1 } + Constant [ int SORTFROM ] { 2 } + Constant [ int SORTSUBJECT ] { 3 } + Constant [ int SORTTO ] { 4 } + Constant [ int SORTCC ] { 5 } + Constant [ int SORTSIZE ] { 6 } + Constant [ int TYPETEXT ] { 0 } + Constant [ int TYPEMULTIPART ] { 1 } + Constant [ int TYPEMESSAGE ] { 2 } + Constant [ int TYPEAPPLICATION ] { 3 } + Constant [ int TYPEAUDIO ] { 4 } + Constant [ int TYPEIMAGE ] { 5 } + Constant [ int TYPEVIDEO ] { 6 } + Constant [ int TYPEMODEL ] { 7 } + Constant [ int TYPEOTHER ] { 8 } + Constant [ int ENC7BIT ] { 0 } + Constant [ int ENC8BIT ] { 1 } + Constant [ int ENCBINARY ] { 2 } + Constant [ int ENCBASE64 ] { 3 } + Constant [ int ENCQUOTEDPRINTABLE ] { 4 } + Constant [ int ENCOTHER ] { 5 } + Constant [ int IMAP_GC_ELT ] { 1 } + Constant [ int IMAP_GC_ENV ] { 2 } + Constant [ int IMAP_GC_TEXTS ] { 4 } } - Functions { diff --git a/php-pecl-imap.spec b/php-pecl-imap.spec index ca58e0b..7e1493e 100644 --- a/php-pecl-imap.spec +++ b/php-pecl-imap.spec @@ -11,21 +11,18 @@ %bcond_without tests -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name imap %global ini_name 30-%{pecl_name}.ini %global sources %{pecl_name}-%{version} -%global _configure ../%{sources}/configure Summary: Extension to operate with the IMAP protocol Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 1.0.2 -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 1.0.3 +Release: 1%{?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/%{sources}.tgz -Patch0: upstream.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -64,8 +61,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd %{sources} -%patch -P0 -p1 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_IMAP_VERSION/{s/.* "//;s/".*$//;p}' php_imap.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -80,56 +75,36 @@ cat >%{ini_name} << 'EOF' extension=%{pecl_name} EOF -mkdir NTS -%if %{with_zts} -mkdir ZTS -%endif - %build -%{?dtsenable} +cd %{sources} +%{__phpize} +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global -peclconf() { %configure \ --with-imap \ --with-kerberos \ --with-imap-ssl \ --with-libdir=%{_lib} \ - --with-php-config=$1 -} -cd %{sources} -%{__phpize} -sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global - -cd ../NTS -peclconf %{__phpconfig} - -%make_build - -%if %{with_zts} -cd ../ZTS -peclconf %{__ztsphpconfig} + --with-php-config=%{__phpconfig} %make_build -%endif %install %{?dtsenable} -%make_install -C NTS +: Install configuration install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} -# Install XML package description +: Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml -%if %{with_zts} -%make_install -C ZTS -install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} -%endif - -# Documentation +: Install the extension cd %{sources} +%make_install + +: Install the Documentation for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -137,7 +112,7 @@ done %check cd %{sources} -: minimal load test of NTS extension +: minimal load test of the extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' @@ -145,39 +120,12 @@ cd %{sources} OPT="%{?_smp_mflags} -q --show-diff" %if %{with tests} -: upstream test suite for NTS extension +: upstream test suite for the extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ %{__php} -n run-tests.php $OPT %endif -%if %{with_zts} -: minimal load test of ZTS extension -%{__ztsphp} --no-php-ini \ - --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep '^%{pecl_name}$' -%endif - - -%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 - %files %license %{sources}/LICENSE @@ -187,13 +135,11 @@ fi %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so -%if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%{php_ztsextdir}/%{pecl_name}.so -%endif - %changelog +* Tue Oct 15 2024 Remi Collet - 1.0.3-1 +- update to 1.0.3 + * Tue Sep 24 2024 Remi Collet - 1.0.2-4 - rebuild for 8.4.0RC1 diff --git a/upstream.patch b/upstream.patch deleted file mode 100644 index 866cdd3..0000000 --- a/upstream.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4fc9970a29c205ec328f36edc8c119c158129324 Mon Sep 17 00:00:00 2001 -From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> -Date: Sun, 4 Feb 2024 19:59:07 +0100 -Subject: [PATCH] Fix #5: Build with php-src master is broken - ---- - php_imap.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/php_imap.c b/php_imap.c -index 38b11b8..df2f8dd 100644 ---- a/php_imap.c -+++ b/php_imap.c -@@ -806,8 +806,13 @@ PHP_FUNCTION(imap_append) - } - - zend_string_release(regex); -+#if PHP_VERSION_ID >= 80400 -+ php_pcre_match_impl(pce, internal_date, return_value, subpats, global, -+ Z_L(0), Z_L(0)); -+#else - php_pcre_match_impl(pce, internal_date, return_value, subpats, global, - 0, Z_L(0), Z_L(0)); -+#endif - - if (!Z_LVAL_P(return_value)) { - // TODO Promoto to error? -From 65de3c0c338642a88edf82335a78bb521c8d123a Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 4 Jan 2024 11:35:52 +0100 -Subject: [PATCH] Report extension version in phpinfo() output - ---- - php_imap.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/php_imap.c b/php_imap.c -index 22ad1b0..38b11b8 100644 ---- a/php_imap.c -+++ b/php_imap.c -@@ -571,6 +571,7 @@ PHP_RSHUTDOWN_FUNCTION(imap) - PHP_MINFO_FUNCTION(imap) - { - php_info_print_table_start(); -+ php_info_print_table_row(2, "IMAP extension Version", PHP_IMAP_VERSION); - php_info_print_table_row(2, "IMAP c-Client Version", CCLIENTVERSION); - #ifdef HAVE_IMAP_SSL - php_info_print_table_row(2, "SSL Support", "enabled"); -- cgit