From tkato@prontomail.com  Fri Jan 31 09:06:21 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 7027537B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Jan 2003 09:06:21 -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 4EF9F43F9B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Jan 2003 09:06:19 -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 A00006F1
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  1 Feb 2003 02:06:13 +0900 (JST)
Message-Id: <20030201020436.739dd055.tkato@prontomail.com>
Date: Sat, 1 Feb 2003 02:04:36 +0900
From: KATO Tsuguru <tkato@prontomail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Update port: japanese/ebview

>Number:         47747
>Category:       ports
>Synopsis:       Update port: japanese/ebview
>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:15 PST 2003
>Closed-Date:    Sun Feb 02 06:29:35 PST 2003
>Last-Modified:  Sun Feb 02 06:29:35 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/japanese/ebview/Makefile japanese/ebview/Makefile
--- /usr/ports/japanese/ebview/Makefile	Mon Jan  6 15:59:36 2003
+++ japanese/ebview/Makefile	Fri Jan 24 03:42:33 2003
@@ -13,8 +13,7 @@
 
 MAINTAINER=	ports@FreeBSD.org
 
-LIB_DEPENDS=	gnugetopt.1:${PORTSDIR}/devel/libgnugetopt \
-		eb.6:${PORTSDIR}/japanese/eb
+LIB_DEPENDS=	eb.6:${PORTSDIR}/japanese/eb
 
 USE_GNOMENG=	yes
 USE_GNOME=	imlib
@@ -22,10 +21,17 @@
 USE_GMAKE=	yes
 USE_AUTOMAKE_VER=	14
 USE_AUTOCONF_VER=	253
-CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
-		LDFLAGS="-L${LOCALBASE}/lib -lgnugetopt"
+CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 MAKE_ARGS=	ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
 		AUTOHEADER="${TRUE}"
+
+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-install:
 .if !defined(NOPORTDOCS)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nork 
State-Changed-When: Sun Feb 2 06:29:26 PST 2003 
State-Changed-Why:  
Committed, thanks! 

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