git: 7fc7654e769d - main - biology/psi88: Fix building with Flang

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Wed, 10 Dec 2025 16:16:30 UTC
The branch main has been updated by arrowd:

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

commit 7fc7654e769d35b7b5daa5a44271f229c02df006
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-12-10 16:14:40 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-12-10 16:14:40 +0000

    biology/psi88: Fix building with Flang
---
 biology/psi88/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/biology/psi88/Makefile b/biology/psi88/Makefile
index c0853aae6941..606673d13b20 100644
--- a/biology/psi88/Makefile
+++ b/biology/psi88/Makefile
@@ -11,7 +11,6 @@ WWW=		http://zarbi.chem.yale.edu/products/psi88/index.shtml
 
 USES=		fortran tar:Z
 MAKE_ARGS=	BIN=${STAGEDIR}${PREFIX}/bin
-FFLAGS+=	-std=legacy
 
 PLIST_FILES=	bin/PSI1 bin/PSICON bin/PSI2CT bin/PSI2HP bin/PSI2PS bin/PSI2 \
 		bin/PREPLOT bin/preplot bin/rpsi1 bin/rpsi2 bin/rpsicon
@@ -20,6 +19,12 @@ PORTEXAMPLES=	*
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
+.include <bsd.port.pre.mk>
+
+.if ${FORTRAN_DEFAULT} == gfortran
+FFLAGS+=       -std=legacy
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's/f77/$${FC}/' -e 's/LFLAGS/LDFLAGS/' \
 		${WRKSRC}/src/makefile
@@ -42,4 +47,4 @@ post-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>