aboutsummaryrefslogtreecommitdiffstats
path: root/misc/wmwork
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2003-02-02 22:40:33 +0800
committernork <nork@FreeBSD.org>2003-02-02 22:40:33 +0800
commita04a92afa2882a0928799a430d07d4a027ff95e3 (patch)
tree2654e6a9e76786efbb9358f5298398b743038afd /misc/wmwork
parent7bd14ecfb079990cdd9869dbf8b55199e6fa4374 (diff)
downloadfreebsd-ports-gnome-a04a92afa2882a0928799a430d07d4a027ff95e3.tar.gz
freebsd-ports-gnome-a04a92afa2882a0928799a430d07d4a027ff95e3.tar.zst
freebsd-ports-gnome-a04a92afa2882a0928799a430d07d4a027ff95e3.zip
Conditionalize libgnugetopt dependencies.
PR: ports/47751 Submitted by: Ports Fury
Diffstat (limited to 'misc/wmwork')
-rw-r--r--misc/wmwork/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/misc/wmwork/Makefile b/misc/wmwork/Makefile
index c0475cc9edfc..6be4d10d9fd5 100644
--- a/misc/wmwork/Makefile
+++ b/misc/wmwork/Makefile
@@ -13,8 +13,6 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
MAINTAINER= ports@FreeBSD.org
-LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
-
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
USE_X_PREFIX= yes
@@ -22,9 +20,17 @@ USE_XPM= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib -lgnugetopt"
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
MAN1= wmwork.1
+CPPFLAGS+= -I${X11BASE}/include
+LDFLAGS+= -L${X11BASE}/lib
+
+.if !exists(/usr/include/getopt.h)
+LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
+CPPFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib -lgnugetopt
+.endif
+
.include <bsd.port.mk>