git: 3d14040d7bc8 - main - sysutils/pecl-proctitle: Fix warnings with php8.2

From: Florian Smeets <flo_at_FreeBSD.org>
Date: Tue, 13 Dec 2022 18:54:25 UTC
The branch main has been updated by flo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3d14040d7bc8b4556c32609a02b4d403ab6561f8

commit 3d14040d7bc8b4556c32609a02b4d403ab6561f8
Author:     Florian Smeets <flo@FreeBSD.org>
AuthorDate: 2022-12-13 18:51:42 +0000
Commit:     Florian Smeets <flo@FreeBSD.org>
CommitDate: 2022-12-13 18:51:42 +0000

    sysutils/pecl-proctitle: Fix warnings with php8.2
    
    Obtained from:  https://github.com/mtorromeo/php-pecl-proctitle/commit/05e7c3e368fae981f6132c1f2979ef9a42b56d78
---
 sysutils/pecl-proctitle/Makefile                   |  2 +-
 .../pecl-proctitle/files/patch-php__proctitle.h    |  5 +--
 sysutils/pecl-proctitle/files/patch-proctitle.c    | 49 +++++++++++-----------
 3 files changed, 27 insertions(+), 29 deletions(-)

diff --git a/sysutils/pecl-proctitle/Makefile b/sysutils/pecl-proctitle/Makefile
index 978071c96307..6089aeba85a8 100644
--- a/sysutils/pecl-proctitle/Makefile
+++ b/sysutils/pecl-proctitle/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	proctitle
 PORTVERSION=	0.1.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	sysutils pear
 
 MAINTAINER=	flo@FreeBSD.org
diff --git a/sysutils/pecl-proctitle/files/patch-php__proctitle.h b/sysutils/pecl-proctitle/files/patch-php__proctitle.h
index 7d00c6c4feb4..ce3608746f87 100644
--- a/sysutils/pecl-proctitle/files/patch-php__proctitle.h
+++ b/sysutils/pecl-proctitle/files/patch-php__proctitle.h
@@ -1,10 +1,9 @@
---- php_proctitle.h.orig	2012-05-11 08:49:30 UTC
+--- php_proctitle.h.orig	2022-12-11 12:46:56 UTC
 +++ php_proctitle.h
-@@ -21,6 +21,15 @@
+@@ -21,6 +21,14 @@
  #ifndef PHP_PROCTITLE_H
  #define PHP_PROCTITLE_H
  
-+
 +#if PHP_MAJOR_VERSION >= 8
 +#define TSRMLS_CC
 +#define TSRMLS_C
diff --git a/sysutils/pecl-proctitle/files/patch-proctitle.c b/sysutils/pecl-proctitle/files/patch-proctitle.c
index 9def23082503..774288650ecd 100644
--- a/sysutils/pecl-proctitle/files/patch-proctitle.c
+++ b/sysutils/pecl-proctitle/files/patch-proctitle.c
@@ -1,30 +1,29 @@
---- proctitle.c.orig	2012-05-11 08:49:30 UTC
+--- proctitle.c.orig	2022-12-11 12:38:30 UTC
 +++ proctitle.c
-@@ -23,6 +23,7 @@
+@@ -69,7 +69,11 @@ PHP_MINIT_FUNCTION(proctitle)
+ }
  #endif
  
- #include <php.h>
-+#include "ext/standard/info.h"
- #include <SAPI.h>
- #include <dlfcn.h>
- #include <string.h>
-@@ -138,9 +139,7 @@ PHP_MINFO_FUNCTION(proctitle)
- /* {{{ proctitle_module_entry
+-/* {{{ proto void setproctitle(string title)
++ZEND_BEGIN_ARG_INFO_EX(arginfo_title, 0, 0, 1)
++    ZEND_ARG_INFO(0, title)
++ZEND_END_ARG_INFO()
++
++/*
+  * Changes the current process' title in system's list of processes
   */
- zend_module_entry proctitle_module_entry = {
--#if ZEND_MODULE_API_NO >= 20010901
- 	STANDARD_MODULE_HEADER,
--#endif
- 	"proctitle",
- 	proctitle_functions,
- #ifndef PHP_SYSTEM_PROVIDES_SETPROCTITLE
-@@ -152,9 +151,7 @@ zend_module_entry proctitle_module_entry = {
- 	NULL,
- 	NULL,
- 	PHP_MINFO(proctitle),
--#if ZEND_MODULE_API_NO >= 20010901
- 	PHP_PROCTITLE_VERSION,
--#endif
- 	STANDARD_MODULE_PROPERTIES
+ PHP_FUNCTION(setproctitle)
+@@ -117,10 +121,10 @@ PHP_FUNCTION(setthreadtitle)
+  *
+  * Every user visible function must have an entry in proctitle_functions[].
+  */
+-static zend_function_entry proctitle_functions[] = {
+-	PHP_FE(setproctitle,	NULL)
++static const zend_function_entry proctitle_functions[] = {
++	PHP_FE(setproctitle, arginfo_title)
+ #if HAVE_PRCTL
+-	PHP_FE(setthreadtitle,	NULL)
++	PHP_FE(setthreadtitle, arginfo_title)
+ #endif
+ 	{NULL, NULL, NULL}	/* Must be the last line in proctitle_functions[] */
  };
- /* }}} */