From tkato@prontomail.com  Fri Jan 31 09:06:25 2003
Return-Path: <tkato@prontomail.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5AC2D37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Jan 2003 09:06:25 -0800 (PST)
Received: from socigeog.hmt.toyama-u.ac.jp (socigeog.hmt.toyama-u.ac.jp [160.26.63.48])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 579C143FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Jan 2003 09:06:22 -0800 (PST)
	(envelope-from tkato@prontomail.com)
Received: from localhost (localhost [127.0.0.1])
	by socigeog.hmt.toyama-u.ac.jp (Postfix) with SMTP id 0D89E7C1
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  1 Feb 2003 02:06:16 +0900 (JST)
Message-Id: <20030201020524.10a55185.tkato@prontomail.com>
Date: Sat, 1 Feb 2003 02:05:24 +0900
From: KATO Tsuguru <tkato@prontomail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Update port: print/pnm2ppa

>Number:         47754
>Category:       ports
>Synopsis:       Update port: print/pnm2ppa
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 31 09:10:18 PST 2003
>Closed-Date:    Sun Feb 02 06:46:34 PST 2003
>Last-Modified:  Sun Feb 02 06:46:34 PST 2003
>Originator:     KATO Tsuguru
>Release:        FreeBSD 4.7-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
- Conditionalize libgnugetopt dependencies

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/print/pnm2ppa/Makefile print/pnm2ppa/Makefile
--- /usr/ports/print/pnm2ppa/Makefile	Mon Nov 25 22:19:38 2002
+++ print/pnm2ppa/Makefile	Sun Jan 26 14:17:04 2003
@@ -13,11 +13,18 @@
 
 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" \
diff -urN /usr/ports/print/pnm2ppa/files/patch-aa print/pnm2ppa/files/patch-aa
--- /usr/ports/print/pnm2ppa/files/patch-aa	Tue Nov 19 22:32:01 2002
+++ print/pnm2ppa/files/patch-aa	Sun Jan 26 14:16:05 2003
@@ -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
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nork 
State-Changed-When: Sun Feb 2 06:46:26 PST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47754 
>Unformatted:
