git: 515870affa55 - main - graphics/pgplot: Fix building with Flang
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 21 Nov 2025 08:19:49 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=515870affa559f662a18f33363b603d2adb0e27c
commit 515870affa559f662a18f33363b603d2adb0e27c
Author: Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-11-21 07:55:20 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-11-21 08:19:33 +0000
graphics/pgplot: Fix building with Flang
---
graphics/pgplot/Makefile | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/graphics/pgplot/Makefile b/graphics/pgplot/Makefile
index 51b6d081b5ca..a1f2bcb6b46b 100644
--- a/graphics/pgplot/Makefile
+++ b/graphics/pgplot/Makefile
@@ -24,8 +24,8 @@ MAKE_JOBS_UNSAFE= yes
MAKE_ENV= SSP_CFLAGS=
SHEBANG_FILES= makehtml maketex
-FFLAGS+= -std=legacy
SUFFIXES= flib clib bin
+CFLAGS= -Wno-implicit-function-declaration
WRKSRC= ${WRKDIR}/${PORTNAME}
# ld.bfd supports neither -z relro nor -z norelro on armv7
@@ -56,6 +56,12 @@ EXAMPLES= Makefile.demo cpg/cpgdemo.c examples/pgdemo*.f
PORTEXAMPLES= ${EXAMPLES:C|.*/||}
.endif
+.include <bsd.port.pre.mk>
+
+.if ${FORTRAN_DEFAULT} == gfortran
+FFLAGS+= -std=legacy
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|png_ptr->jmpbuf|png_jmpbuf(png_ptr)|' \
${WRKSRC}/drivers/pndriv.c
@@ -102,4 +108,4 @@ check test: build
PGPLOT_DIR="${WRKSRC}" PGPLOT_DEV="/xwin" ${WRKSRC}/${DEMO}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>