From 86f1fc6978c6e831af5904f79744145390b43a24 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 4 Jan 2024 16:35:55 +0100 Subject: add upstream patch to report extension version --- PHPINFO | 1 + REFLECTION | 2 +- php-pecl-imap.spec | 8 +++++++- upstream.patch | 21 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 upstream.patch diff --git a/PHPINFO b/PHPINFO index 77444d9..92bc782 100644 --- a/PHPINFO +++ b/PHPINFO @@ -1,6 +1,7 @@ imap +IMAP extension Version => 1.0.2 IMAP c-Client Version => 2007f SSL Support => enabled Kerberos Support => enabled diff --git a/REFLECTION b/REFLECTION index 6acad30..b8936e8 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #18 imap version 1.0.2 ] { +Extension [ extension #49 imap version 1.0.2 ] { - Dependencies { Dependency [ standard (Required) ] diff --git a/php-pecl-imap.spec b/php-pecl-imap.spec index 666e926..06c1dc1 100644 --- a/php-pecl-imap.spec +++ b/php-pecl-imap.spec @@ -20,11 +20,12 @@ Summary: Extension to operate with the IMAP protocol Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.0.2 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +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/%{sources}.tgz +Patch0: upstream.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -63,6 +64,8 @@ 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 @@ -190,6 +193,9 @@ fi %changelog +* Thu Jan 4 2024 Remi Collet - 1.0.2-2 +- add upstream patch to report extension version + * Thu Jan 4 2024 Remi Collet - 1.0.2-1 - update to 1.0.2 diff --git a/upstream.patch b/upstream.patch new file mode 100644 index 0000000..36f1b29 --- /dev/null +++ b/upstream.patch @@ -0,0 +1,21 @@ +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