aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2003-02-02 22:44:32 +0800
committernork <nork@FreeBSD.org>2003-02-02 22:44:32 +0800
commit49dbd29b4c139a42863390c533ac7e6f8752cd9e (patch)
tree04d6c8115d75de31410057e79ccd4c5c88e83277 /print
parent98453ef756317a009c94c7375f334a0ccea1af98 (diff)
downloadfreebsd-ports-graphics-49dbd29b4c139a42863390c533ac7e6f8752cd9e.tar.gz
freebsd-ports-graphics-49dbd29b4c139a42863390c533ac7e6f8752cd9e.tar.zst
freebsd-ports-graphics-49dbd29b4c139a42863390c533ac7e6f8752cd9e.zip
Conditionalize libgnugetopt dependencies.
PR: ports/47753 Submitted by: Ports Fury
Diffstat (limited to 'print')
-rw-r--r--print/catdvi/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/print/catdvi/Makefile b/print/catdvi/Makefile
index 4c3e91446d0..211da3479c9 100644
--- a/print/catdvi/Makefile
+++ b/print/catdvi/Makefile
@@ -15,17 +15,23 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
BUILD_DEPENDS= ${LOCALBASE}/lib/libkpathsea.a:${PORTSDIR}/print/teTeX
-LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib -lgnugetopt"
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
MAKEFILE= GNUmakefile
ALL_TARGET= # empty
MAN1= catdvi.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
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/catdvi ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/catdvi.1 ${MANPREFIX}/man/man1