Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Oct 2011 02:59:27 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/161601: Update port: security/openfwtk
Message-ID:  <20111015025927.c417d271.tkato432@yahoo.com>
Resent-Message-ID: <201110141850.p9EIoA4H051026@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         161601
>Category:       ports
>Synopsis:       Update port: security/openfwtk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 14 18:50:10 UTC 2011
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111015025927.c417d271.tkato432>