aboutsummaryrefslogtreecommitdiffstats
path: root/cad/gerbv/Makefile
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2003-02-02 21:54:17 +0800
committernork <nork@FreeBSD.org>2003-02-02 21:54:17 +0800
commit0045710cc9e2b8c939aabd6ef87e64274ca98240 (patch)
treefa90d8401b892ab7691a470d9a4f5a9913be15f4 /cad/gerbv/Makefile
parentbc4c4ecb80d5a62f2f377449f88dae97867435e9 (diff)
downloadfreebsd-ports-gnome-0045710cc9e2b8c939aabd6ef87e64274ca98240.tar.gz
freebsd-ports-gnome-0045710cc9e2b8c939aabd6ef87e64274ca98240.tar.zst
freebsd-ports-gnome-0045710cc9e2b8c939aabd6ef87e64274ca98240.zip
Conditionalize libgnugetopt dependencies.
PR: ports/47737 Submitted by: Ports Fury
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