aboutsummaryrefslogtreecommitdiff
path: root/cad/gerbv/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'cad/gerbv/Makefile')
-rw-r--r--cad/gerbv/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/cad/gerbv/Makefile b/cad/gerbv/Makefile
index d8c446f5d702..e671fc5eef3d 100644
--- a/cad/gerbv/Makefile
+++ b/cad/gerbv/Makefile
@@ -14,18 +14,23 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
-LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
-
USE_GNOMENG= yes
USE_GNOME= gdkpixbuf
USE_REINPLACE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib -lgnugetopt"
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --enable-exportpng
MAN1= gerbv.1
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+.if !exists(/usr/include/getopt.h)
+LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
+LDFLAGS+= -lgnugetopt
+.endif
+
post-patch:
@${REINPLACE_CMD} -e "s|malloc.h|stdlib.h|g" ${WRKSRC}/src/amacro.c