aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2003-02-02 22:46:15 +0800
committernork <nork@FreeBSD.org>2003-02-02 22:46:15 +0800
commitd86d372ffc2e785e3f7f3011e2d7818e649d4617 (patch)
tree297b07ef55850e5276ca426c06c59486b4c78916 /print
parent49dbd29b4c139a42863390c533ac7e6f8752cd9e (diff)
downloadfreebsd-ports-gnome-d86d372ffc2e785e3f7f3011e2d7818e649d4617.tar.gz
freebsd-ports-gnome-d86d372ffc2e785e3f7f3011e2d7818e649d4617.tar.zst
freebsd-ports-gnome-d86d372ffc2e785e3f7f3011e2d7818e649d4617.zip
Conditionalize libgnugetopt dependencies.
PR: ports/47754 Submitted by: Ports Fury
Diffstat (limited to 'print')
-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 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
diff --git a/print/pnm2ppa/files/patch-aa b/print/pnm2ppa/files/patch-aa
index c0d7c51074f0..8813af595200 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