From 2de69d0a5ede0dce4009600a1772e903bdff693c Mon Sep 17 00:00:00 2001 From: Norikatsu Shigemura Date: Sun, 2 Feb 2003 14:44:32 +0000 Subject: [PATCH] Conditionalize libgnugetopt dependencies. PR: ports/47753 Submitted by: Ports Fury --- print/catdvi/Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/print/catdvi/Makefile b/print/catdvi/Makefile index 4c3e91446d00..211da3479c9b 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