git: fae3508a1697 - main - mail/pecl-mailparse: Fix build with php85

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sat, 02 Aug 2025 00:46:51 UTC
The branch main has been updated by bofh:

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

commit fae3508a169786194f1d39ad8850025bdc757b68
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2025-08-02 00:34:59 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2025-08-02 00:46:05 +0000

    mail/pecl-mailparse: Fix build with php85
    
    - Switch to DISTVERSION while I am here
    
    Approved by:    portmgr (blanket)
---
 mail/pecl-mailparse/Makefile | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/mail/pecl-mailparse/Makefile b/mail/pecl-mailparse/Makefile
index 4532555b394a..609dc326ecfa 100644
--- a/mail/pecl-mailparse/Makefile
+++ b/mail/pecl-mailparse/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	mailparse
-PORTVERSION=	3.1.8
+DISTVERSION=	3.1.8
 CATEGORIES=	mail www
 
 MAINTAINER=	dbaio@FreeBSD.org
@@ -12,4 +12,14 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 USES=		php:pecl
 USE_PHP=	mbstring:build
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+post-patch:
+.if ${PHP_VER} >= 85
+	@${REINPLACE_CMD} -e 's|ext/standard/php_smart_string|Zend/zend_smart_string|' \
+		${WRKSRC}/php_mailparse_mime.h \
+		${WRKSRC}/php_mailparse_rfc822.c \
+		${WRKSRC}/php_mailparse_rfc822.re
+.endif
+
+.include <bsd.port.post.mk>