From tkato432@yahoo.com  Fri Oct 14 18:44:10 2011
Return-Path: <tkato432@yahoo.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C6C4106564A
	for <FreeBSD-gnats-submit@FreeBSD.org>; Fri, 14 Oct 2011 18:43:59 +0000 (UTC)
	(envelope-from tkato432@yahoo.com)
Received: from msa102lp.auone-net.jp (msa102lp.auone-net.jp [222.3.140.165])
	by mx1.freebsd.org (Postfix) with ESMTP id E59118FC17
	for <FreeBSD-gnats-submit@FreeBSD.org>; Fri, 14 Oct 2011 18:43:58 +0000 (UTC)
Received: from msa102lp.auone-net.jp (MSA102lp [172.27.12.180])
	by msa102lp.auone-net.jp (au one net msa) with ESMTP id C2AA978264
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sat, 15 Oct 2011 03:35:24 +0900 (JST)
Received: from localhost.localdomain (ZT046175.ppp.dion.ne.jp [59.128.46.175])
	by msa102lp.auone-net.jp (au one net msa) with ESMTP id 26ED64AC036
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sat, 15 Oct 2011 03:35:21 +0900 (JST)
Message-Id: <20111015025927.c417d271.tkato432@yahoo.com>
Date: Sat, 15 Oct 2011 02:59:27 +0900
From: KATO Tsuguru <tkato432@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: Update port: security/openfwtk

>Number:         161601
>Category:       ports
>Synopsis:       Update port: security/openfwtk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ehaupt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 14 18:50:10 UTC 2011
>Closed-Date:    Tue Oct 18 15:13:53 CEST 2011
>Last-Modified:  Tue Oct 18 15:13:53 CEST 2011
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
- Add LICENSE
- Support OPTIONS
- Support USE_TK_WRAPPER
- Support ECHO_CMD
- Support MAKE_JOBS_UNSAFE

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/security/openfwtk/Makefile security/openfwtk/Makefile
--- /usr/ports/security/openfwtk/Makefile	2010-03-21 02:53:10.000000000 +0900
+++ security/openfwtk/Makefile	2011-09-17 04:54:21.000000000 +0900
@@ -6,66 +6,75 @@
 
 PORTNAME=	openfwtk
 PORTVERSION=	2.0
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/Release%20${PORTVERSION}
-DISTNAME=${PORTNAME}${PORTVERSION}
+DISTNAME=	${PORTNAME}${PORTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Application proxy toolkit which inherits the ideology of TIS fwtk
 
-WRKSRC=	${WRKDIR}/fwtk
+LICENSE=	BSD
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+OPTIONS=	WATCH "Install fw-watch GUI (require TCL/TK!)" off
+
+WRKSRC=		${WRKDIR}/fwtk
 WRKSRC_WATCH=	${WRKDIR}/fw_watch
 WRKSRC_MILTER=	${WRKDIR}/libci_milter
 
-OPTIONS=	WATCH "Install fw-watch GUI (require TCL/TK!)" off
+MAKE_JOBS_UNSAFE=yes
 
 SUB_FILES=	pkg-message
 MANCOMPRESSED=	no
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} > 900007
-BROKEN=		fails to build with new utmpx
-.endif
+.include <bsd.port.options.mk>
 
 .if defined(WITH_WATCH)
+USE_TK_WRAPPER=	yes
 PLIST_SUB+=	WATCH=""
-RUN_DEPENDS+=	wish8.4:${PORTSDIR}/x11-toolkits/tk84
 .else
 PLIST_SUB+=	WATCH="@comment "
 .endif
 
-BUILD_DIRS=	${WRKSRC_MILTER} ${WRKSRC}
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} > 900007
+BROKEN=		fails to build with new utmpx
+.endif
 
-do-build:
-.for i in ${BUILD_DIRS}
-	(cd ${WRKDIR}/${i}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
+post-patch:
+.for conf in auth/authadduser.sh reports/summ_resources.sh \
+	reports/daily_report reports/frequentcheck \
+	reports/frequentcheck.sh squid-gw/squid-gw.restart
+	@${REINPLACE_CMD} -e \
+		's|/etc/openfwtk.conf|${PREFIX}/etc/openfwtk.conf|g' ${WRKSRC}/${conf}
 .endfor
+.for wish in fileselect.tcl fw_watch
+	@${REINPLACE_CMD} -e \
+		's|/usr/bin/|${LOCALBASE}/bin/|g' ${WRKSRC_WATCH}/${wish}
+.endfor
+	@${REINPLACE_CMD} -e \
+		'/^CC/s|=.*|= ${CC}|g ; \
+		 /^COPT/s|=.*|= ${CFLAGS}|g' ${WRKSRC_MILTER}/Makefile
+	@${REINPLACE_CMD} -e \
+		'/^CC/s|=.*|= ${CC}|g ; \
+		 /^COPT/s|-std=c99|${CFLAGS}|g' ${WRKSRC}/configs/FreeBSD
+
+pre-build:
+	@(cd ${WRKSRC_MILTER}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
 
-post-build:
-	@${REINPLACE_CMD} -e 's|/etc/openfwtk.conf|${PREFIX}/etc/openfwtk.conf|g' \
-		${WRKSRC}/reports/summ_resources.sh ${WRKSRC}/reports/daily_report \
-		${WRKSRC}/reports/frequentcheck.sh ${WRKSRC}/reports/frequentcheck \
-		${WRKSRC}/auth/authadduser.sh ${WRKSRC}/squid-gw/squid-gw.restart \
-		${WRKSRC}/reports/daily_report ${WRKSRC}/reports/frequentcheck
 pre-install:
-	${MKDIR} ${ETCDIR}
+	@${MKDIR} ${ETCDIR}
+
 post-install:
 .if defined(WITH_WATCH)
-	${MKDIR} ${PREFIX}/share/fw_watch
-	@${REINPLACE_CMD} -e 's|/usr/bin/wish|${PREFIX}/bin/wish8.4|g' \
-		${WRKSRC_WATCH}/fileselect.tcl \
-		${WRKSRC_WATCH}/fw_watch \
-		${WRKSRC_WATCH}/newsb.tcl \
-		${WRKSRC_WATCH}/searchbox.tcl \
-		${WRKSRC_WATCH}/taputils.tcl
-	${CP} ${WRKSRC_WATCH}/fileselect.tcl ${PREFIX}/share/fw_watch/
-	${CP} ${WRKSRC_WATCH}/fw_watch ${PREFIX}/share/fw_watch/
-	${CP} ${WRKSRC_WATCH}/newsb.tcl ${PREFIX}/share/fw_watch/
-	${CP} ${WRKSRC_WATCH}/searchbox.tcl ${PREFIX}/share/fw_watch/
-	${CP} ${WRKSRC_WATCH}/taputils.tcl ${PREFIX}/share/fw_watch/
+	@${MKDIR} ${PREFIX}/share/fw_watch
+.for data in fileselect.tcl fw_watch newsb.tcl searchbox.tcl taputils.tcl
+	${INSTALL_DATA} ${WRKSRC_WATCH}/${data} ${PREFIX}/share/fw_watch
+.endfor
 .endif
-	${ECHO} "root@`hostname`" > ${ETCDIR}/admin
+	${ECHO_CMD} "root@`hostname`" > ${ETCDIR}/admin
 	@${CAT} ${PKGMESSAGE}
 
 .include "Makefile.man"
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ehaupt 
Responsible-Changed-By: ehaupt 
Responsible-Changed-When: Mon Oct 17 20:16:27 CEST 2011 
Responsible-Changed-Why:  
I will take care of it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161601 
State-Changed-From-To: open->closed 
State-Changed-By: ehaupt 
State-Changed-When: Tue Oct 18 15:13:52 CEST 2011 
State-Changed-Why:  
Committed, thanks! 

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