From 0045710cc9e2b8c939aabd6ef87e64274ca98240 Mon Sep 17 00:00:00 2001 From: nork Date: Sun, 2 Feb 2003 13:54:17 +0000 Subject: Conditionalize libgnugetopt dependencies. PR: ports/47737 Submitted by: Ports Fury --- cad/gerbv/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'cad') 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 -- cgit