With this PERMIT_* I'm not sure if it's really worth bothering with.
Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/agrep/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- Makefile 17 Mar 2016 21:14:46 -0000 1.24
+++ Makefile 11 Apr 2017 13:39:54 -0000
@@ -13,10 +13,15 @@ EXTRACT_SUFX= .tar.Z
PERMIT_PACKAGE_FTP= may not modify
PERMIT_PACKAGE_CDROM= no fee
PERMIT_DISTFILES_FTP= Yes
+
WANTLIB= c
-MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS}"
+.include <bsd.port.arch.mk>
+.if ${PROPERTIES:Mclang}
+CFLAGS+= -Wno-return-type --std=gnu89
+.endif
+MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS}"
ALL_TARGET=
NO_TEST= Yes