git: 3fbf0a24f9d5 - main - www/phpmyfaq: actually make this work with PHP >= 8.0

From: Florian Smeets <flo_at_FreeBSD.org>
Date: Mon, 07 Feb 2022 21:54:16 UTC
The branch main has been updated by flo:

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

commit 3fbf0a24f9d5666561c3ef5e908f4e5c25c7227e
Author:     Florian Smeets <flo@FreeBSD.org>
AuthorDate: 2022-02-07 21:48:08 +0000
Commit:     Florian Smeets <flo@FreeBSD.org>
CommitDate: 2022-02-07 21:48:08 +0000

    www/phpmyfaq: actually make this work with PHP >= 8.0
    
    I used the wrong poudriere script to test these changes, it builds
    with my production settings, where PHP is still set to 7.4, so it
    didn't catch the build error.
    
    PR:             261617
---
 www/phpmyfaq/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/www/phpmyfaq/Makefile b/www/phpmyfaq/Makefile
index 6364d6a93d76..0e3644fe86c2 100644
--- a/www/phpmyfaq/Makefile
+++ b/www/phpmyfaq/Makefile
@@ -13,7 +13,7 @@ LICENSE=	MPL20
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
 USES=		cpe php:web
-USE_PHP=	filter json mysqli pcre pdf session xml xmlrpc xmlwriter zlib
+USE_PHP=	filter json mysqli pcre session xml xmlrpc xmlwriter zlib
 FAQ_DIR=	attachments data images inc pdf xml
 NO_BUILD=	YES
 NO_ARCH=	YES
@@ -25,4 +25,10 @@ do-install:
 	@${MKDIR} ${STAGEDIR}${WWWDIR}/${i}
 .endfor
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${PHP_VER} < 80
+USE_PHP+=	pdf
+.endif
+
+.include <bsd.port.post.mk>