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 332DC37B401
	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 99F7043F75
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Jan 2003 09:06:17 -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 100D8643
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  1 Feb 2003 02:06:12 +0900 (JST)
Message-Id: <20030201020407.2cc39255.tkato@prontomail.com>
Date: Sat, 1 Feb 2003 02:04:07 +0900
From: KATO Tsuguru <tkato@prontomail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Update port: games/wmpuzzle

>Number:         47744
>Category:       ports
>Synopsis:       Update port: games/wmpuzzle
>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:13 PST 2003
>Closed-Date:    Sun Feb 02 06:17:02 PST 2003
>Last-Modified:  Sun Feb 02 06:17:02 PST 2003
>Originator:     KATO Tsuguru
>Release:        FreeBSD 4.7-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
- Conditionalize libgnugetopt dependencies

New file:
files/patch-Makefile.in

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/wmpuzzle/Makefile games/wmpuzzle/Makefile
--- /usr/ports/games/wmpuzzle/Makefile	Mon Nov 11 18:59:39 2002
+++ games/wmpuzzle/Makefile	Fri Jan 24 04:56:48 2003
@@ -18,27 +18,31 @@
 
 MAINTAINER=	ports@FreeBSD.org
 
-LIB_DEPENDS=	gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
-
-GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	CFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
-		LIBS="-L${LOCALBASE}/lib -lgnugetopt"
-USE_GMAKE=	yes
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
+
 USE_X_PREFIX=	yes
 USE_XPM=	yes
+USE_GMAKE=	yes
+GNU_CONFIGURE=	yes
+CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 
 MAN6=		wmpuzzle.6
 
 BSDIMAGES=	daemon.xpm
 
+CPPFLAGS=	-I${X11BASE}/include 
+LDFLAGS=	-L${X11BASE}/lib
+
+.if !exists(/usr/include/getopt.h)
+LIB_DEPENDS+=	gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
+CPPFLAGS+=	-I${LOCALBASE}/include 
+LDFLAGS+=	-L${LOCALBASE}/lib -lgnugetopt
+.endif
+
 post-extract:
 .for i in ${BSDIMAGES}
-	${CP} ${DISTDIR}/${DIST_SUBDIR}/$i ${WRKSRC}/
+	${CP} ${DISTDIR}/${DIST_SUBDIR}/${i} ${WRKSRC}/
 .endfor
-
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/wmpuzzle ${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/wmpuzzle.6 ${PREFIX}/man/man6
 
 .include <bsd.port.mk>
diff -urN /usr/ports/games/wmpuzzle/files/patch-Makefile.in games/wmpuzzle/files/patch-Makefile.in
--- /usr/ports/games/wmpuzzle/files/patch-Makefile.in	Thu Jan  1 09:00:00 1970
+++ games/wmpuzzle/files/patch-Makefile.in	Fri Jan 24 04:56:06 2003
@@ -0,0 +1,27 @@
+--- Makefile.in.orig	Tue Oct 22 04:56:02 2002
++++ Makefile.in	Fri Jan 24 03:36:00 2003
+@@ -8,10 +8,13 @@
+ mandir      = @mandir@
+ 
+ CC          = @CC@
++CPPFLAGS    = @CPPFLAGS@
+ CFLAGS      = -I. -Wall @CFLAGS@
+ LDFLAGS     = @LDFLAGS@
+ LIBS        = @LIBS@
+ INSTALL     = @INSTALL@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_DATA    = @INSTALL_DATA@
+ LN_S        = @LN_S@
+ 
+ all: wmpuzzle
+@@ -23,8 +26,8 @@
+ wmgeneral.o: wmgeneral.c wmgeneral.h
+ 
+ install: wmpuzzle wmpuzzle.6
+-	$(INSTALL) -D -s -m 755 wmpuzzle $(DESTDIR)$(bindir)/wmpuzzle
+-	$(INSTALL) -D -m 644 wmpuzzle.6 $(DESTDIR)$(mandir)/man6/wmpuzzle.6
++	$(INSTALL_PROGRAM) wmpuzzle $(DESTDIR)$(bindir)/wmpuzzle
++	$(INSTALL_DATA) wmpuzzle.6 $(DESTDIR)$(mandir)/man6/wmpuzzle.6
+ 
+ uninstall:
+ 	rm -f $(DESTDIR)$(bindir)/wmpuzzle
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nork 
State-Changed-When: Sun Feb 2 06:16:53 PST 2003 
State-Changed-Why:  
Committed, thanks! 

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