summaryrefslogtreecommitdiff
path: root/print/pnm2ppa/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'print/pnm2ppa/Makefile')
-rw-r--r--print/pnm2ppa/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/print/pnm2ppa/Makefile b/print/pnm2ppa/Makefile
index 353db969c425..201fa05ad05e 100644
--- a/print/pnm2ppa/Makefile
+++ b/print/pnm2ppa/Makefile
@@ -13,12 +13,19 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
-LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript-gnu \
enscript:${PORTSDIR}/print/enscript-letter
+MAKE_ENV= LDFLAGS="${LDFLAGS}"
+
MAN1= pnm2ppa.1
+.if !exists(/usr/include/getopt.h)
+LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lgnugetopt
+.endif
+
post-patch:
@${SED} -e "s:%%PREFIX%%:${PREFIX}:g" \
${WRKSRC}/pnm2ppa.conf > ${WRKSRC}/pnm2ppa.conf.sample