summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2003-02-02 14:46:15 +0000
committernork <nork@FreeBSD.org>2003-02-02 14:46:15 +0000
commitd86d372ffc2e785e3f7f3011e2d7818e649d4617 (patch)
tree297b07ef55850e5276ca426c06c59486b4c78916
parent49dbd29b4c139a42863390c533ac7e6f8752cd9e (diff)
downloadFreeBSD-ports-d86d372ffc2e785e3f7f3011e2d7818e649d4617.zip
FreeBSD-ports-d86d372ffc2e785e3f7f3011e2d7818e649d4617.tar.gz
Conditionalize libgnugetopt dependencies.
PR: ports/47754 Submitted by: Ports Fury
-rw-r--r--print/pnm2ppa/Makefile9
-rw-r--r--print/pnm2ppa/files/patch-aa4
2 files changed, 10 insertions, 3 deletions
diff --git a/print/pnm2ppa/Makefile b/print/pnm2ppa/Makefile
index 353db96..201fa05 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
diff --git a/print/pnm2ppa/files/patch-aa b/print/pnm2ppa/files/patch-aa
index c0d7c51..8813af5 100644
--- a/print/pnm2ppa/files/patch-aa
+++ b/print/pnm2ppa/files/patch-aa
@@ -16,8 +16,8 @@
-CFLAGS=-Wall -pedantic -O2
-LDFLAGS=-lm
+CC?=gcc
-+CFLAGS+=-DCONFDIR=\"$(CONFDIR)\" -I${LOCALBASE}/include
-+LDFLAGS=-lm -L${LOCALBASE}/lib -lgnugetopt
++CFLAGS+=-DCONFDIR=\"$(CONFDIR)\"
++LDFLAGS+=-lm
INSTALL=install
# Install under Linux and other versions with the -b (backup) option
OpenPOWER on IntegriCloud