From takefu@airport.fm  Thu Feb  2 10:12:27 2012
Return-Path: <takefu@airport.fm>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2E1F1106564A;
	Thu,  2 Feb 2012 10:12:27 +0000 (UTC)
	(envelope-from takefu@airport.fm)
Received: from ae-osaka.co.jp (unknown [IPv6:2001:3e0:4ec:a000::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 8DB0A8FC14;
	Thu,  2 Feb 2012 10:12:26 +0000 (UTC)
Received: from ae-osaka.co.jp (localhost.ae-osaka.co.jp [127.0.0.1])
	by ae-osaka.co.jp (Postfix) with ESMTP id 15C5311450;
	Thu,  2 Feb 2012 19:12:25 +0900 (JST)
Received: from [IPv6:2001:3e0:4ec:a011:4dbd:11f9:ef7c:277e] (unknown [IPv6:2001:3e0:4ec:a011:4dbd:11f9:ef7c:277e])
	by ae-osaka.co.jp (Postfix) with ESMTPSA id B82011144A;
	Thu,  2 Feb 2012 19:12:24 +0900 (JST)
Message-Id: <4F2A6188.3030304@airport.fm>
Date: Thu, 02 Feb 2012 19:12:24 +0900
From: Takefu <takefu@airport.fm>
Reply-To: takefu@airport.fm
To: freebsd-gnats-submit@freebsd.org
Cc: garga@FreeBSD.org
In-Reply-To: <201202020954.q129shHG052990@localhost.local.ae-osaka.co.jp>
Subject: [PATCH] www/sarg: add PHP script install switch
References: <201202020954.q129shHG052990@localhost.local.ae-osaka.co.jp>

>Number:         164706
>Category:       ports
>Synopsis:       [PATCH] www/sarg: add PHP script install switch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    garga
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 02 10:20:07 UTC 2012
>Closed-Date:    Sat Feb 18 13:16:23 UTC 2012
>Last-Modified:  Sat Feb 18 13:20:09 UTC 2012
>Originator:     Takefu
>Release:        FreeBSD 8.2-RELEASE-p5 amd64
>Organization:
FOX Amateur Radio Club
>Environment:
>Description:
- add PHP script install switch
- mod ${PREFIX}/etc/${PORTNAME} -> ${ETCDIR}

Port maintainer (garga@FreeBSD.org) is cc'd.

>How-To-Repeat:
>Fix:
--- sarg.patch begins here ---
diff -ruN /usr/ports/www/sarg/Makefile www/sarg/Makefile
--- /usr/ports/www/sarg/Makefile	2012-01-24 11:32:10.000000000 +0900
+++ www/sarg/Makefile	2012-02-02 19:02:49.000000000 +0900
@@ -17,17 +17,17 @@
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE

-OPTIONS=	GD "Enable GD support" on
+OPTIONS=	GD "Enable GD support" on\
+		PHP "Install PHP for reporting generating" on

 USE_AUTOTOOLS=	autoconf aclocal
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 MAKE_JOBS_SAFE=	yes
 LDFLAGS+=	-L${LOCALBASE}/lib
-CONFIGURE_ARGS=	--sysconfdir="${PREFIX}/etc/${PORTNAME}" \
-		--enable-sargphp="${PREFIX}/etc/${PORTNAME}" \
-		--enable-fontdir="${PREFIX}/etc/${PORTNAME}/fonts" \
-		--enable-imagedir="${PREFIX}/etc/${PORTNAME}/images"
+CONFIGURE_ARGS=	--sysconfdir="${ETCDIR}" \
+		--enable-fontdir="${ETCDIR}/fonts" \
+		--enable-imagedir="${ETCDIR}/images"

 MAN1=		sarg.1

@@ -46,8 +46,13 @@
 LIB_DEPENDS+=	gd.4:${PORTSDIR}/graphics/gd
 .endif

-pre-install:
-	${STRIP_CMD} ${WRKSRC}/sarg
+.if !defined(WITHOUT_PHP)
+CONFIGURE_ARGS+=	--enable-sargphp="${ETCDIR}"
+PLIST_SUB+=	PHP=""
+.else
+CONFIGURE_ARGS+=	--disable-sargphp
+PLIST_SUB+=	PHP="@comment "
+.endif

 post-extract:
 	@${FIND} ${WRKSRC} -type d -exec ${CHMOD} 0755 {} \;
diff -ruN /usr/ports/www/sarg/files/patch-Makefile.in www/sarg/files/patch-Makefile.in
--- /usr/ports/www/sarg/files/patch-Makefile.in	2011-12-30 10:49:26.000000000 +0900
+++ www/sarg/files/patch-Makefile.in	2012-02-02 18:06:14.000000000 +0900
@@ -1,11 +1,25 @@
---- Makefile.in.orig	2011-06-19 16:12:39.000000000 -0300
-+++ Makefile.in	2011-12-28 10:50:42.000000000 -0200
-@@ -93,12 +93,11 @@
+--- Makefile.in.orig	2011-06-20 04:12:39.000000000 +0900
++++ Makefile.in	2012-02-02 18:04:28.000000000 +0900
+@@ -27,9 +27,9 @@
+ LIBS        = @LIBS@ -lm
+ SRCDIR      = .
+ VPATH       = .
+-INSTALL     = cp
++INSTALL     = @INSTALL@ -m 644 -S
+
+-INSTALL_PROGRAM = $(INSTALL)
++INSTALL_PROGRAM = @INSTALL@ -m 755 -S -s
+
+ SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \
+        index.c getconf.c usage.c decomp.c ip2name.c \
+@@ -91,14 +91,11 @@
+ 		mkdir -p $(DESTDIR)$(IMAGEDIR); \
+ 	fi
  	$(INSTALL_PROGRAM) sarg $(DESTDIR)$(bindir)/sarg
- 	chmod 755 $(DESTDIR)$(bindir)/sarg
- 	$(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
+-	chmod 755 $(DESTDIR)$(bindir)/sarg
+-	$(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
 -	chmod 755 $(DESTDIR)$(man1dir)/sarg.1
-+	chmod 644 $(DESTDIR)$(man1dir)/sarg.1
++	$(INSTALL) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
 +	cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf.default
  	@if test ! -f $(DESTDIR)$(sysconfdir)/sarg.conf; then \
  		echo "cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
diff -ruN /usr/ports/www/sarg/pkg-plist www/sarg/pkg-plist
--- /usr/ports/www/sarg/pkg-plist	2011-12-30 10:49:26.000000000 +0900
+++ www/sarg/pkg-plist	2012-02-02 17:06:11.000000000 +0900
@@ -12,24 +12,24 @@
 etc/sarg/images/graph.png
 etc/sarg/images/sarg-squidguard-block.png
 etc/sarg/images/sarg.png
-etc/sarg/sarg-php/COPYING
-etc/sarg/sarg-php/INSTALL
-etc/sarg/sarg-php/LANGUAGES
-etc/sarg/sarg-php/language.php
-etc/sarg/sarg-php/locale/en_EN/LC_MESSAGES/messages.mo
-etc/sarg/sarg-php/locale/en_EN/LC_MESSAGES/messages.po
-etc/sarg/sarg-php/locale/fr/LC_MESSAGES/messages.mo
-etc/sarg/sarg-php/locale/fr/LC_MESSAGES/messages.po
-etc/sarg/sarg-php/locale/pt_BR/LC_MESSAGES/messages.mo
-etc/sarg/sarg-php/locale/pt_BR/LC_MESSAGES/messages.po
-etc/sarg/sarg-php/locale/ru/LC_MESSAGES/messages.mo
-etc/sarg/sarg-php/locale/ru/LC_MESSAGES/messages.po
-etc/sarg/sarg-php/sarg-block-it.php
-etc/sarg/sarg-php/sarg-realtime.php
-etc/sarg/sarg-php/sarg-squidguard-block.php
-etc/sarg/sarg-php/sarg-squidguard-block2.php
-etc/sarg/sarg-php/style.php
-etc/sarg/sarg-php/translate.this
+%%PHP%%etc/sarg/sarg-php/COPYING
+%%PHP%%etc/sarg/sarg-php/INSTALL
+%%PHP%%etc/sarg/sarg-php/LANGUAGES
+%%PHP%%etc/sarg/sarg-php/language.php
+%%PHP%%etc/sarg/sarg-php/locale/en_EN/LC_MESSAGES/messages.mo
+%%PHP%%etc/sarg/sarg-php/locale/en_EN/LC_MESSAGES/messages.po
+%%PHP%%etc/sarg/sarg-php/locale/fr/LC_MESSAGES/messages.mo
+%%PHP%%etc/sarg/sarg-php/locale/fr/LC_MESSAGES/messages.po
+%%PHP%%etc/sarg/sarg-php/locale/pt_BR/LC_MESSAGES/messages.mo
+%%PHP%%etc/sarg/sarg-php/locale/pt_BR/LC_MESSAGES/messages.po
+%%PHP%%etc/sarg/sarg-php/locale/ru/LC_MESSAGES/messages.mo
+%%PHP%%etc/sarg/sarg-php/locale/ru/LC_MESSAGES/messages.po
+%%PHP%%etc/sarg/sarg-php/sarg-block-it.php
+%%PHP%%etc/sarg/sarg-php/sarg-realtime.php
+%%PHP%%etc/sarg/sarg-php/sarg-squidguard-block.php
+%%PHP%%etc/sarg/sarg-php/sarg-squidguard-block2.php
+%%PHP%%etc/sarg/sarg-php/style.php
+%%PHP%%etc/sarg/sarg-php/translate.this
 etc/sarg/user_limit_block
 %%NLS%%share/locale/bg/LC_MESSAGES/sarg.mo
 %%NLS%%share/locale/ca/LC_MESSAGES/sarg.mo
@@ -55,16 +55,16 @@
 %%NLS%%share/locale/tr/LC_MESSAGES/sarg.mo
 %%NLS%%share/locale/uk/LC_MESSAGES/sarg.mo
 %%NLS%%share/locale/zh_CN/LC_MESSAGES/sarg.mo
-@dirrm etc/sarg/sarg-php/locale/ru/LC_MESSAGES
-@dirrm etc/sarg/sarg-php/locale/ru
-@dirrm etc/sarg/sarg-php/locale/pt_BR/LC_MESSAGES
-@dirrm etc/sarg/sarg-php/locale/pt_BR
-@dirrm etc/sarg/sarg-php/locale/fr/LC_MESSAGES
-@dirrm etc/sarg/sarg-php/locale/fr
-@dirrm etc/sarg/sarg-php/locale/en_EN/LC_MESSAGES
-@dirrm etc/sarg/sarg-php/locale/en_EN
-@dirrm etc/sarg/sarg-php/locale
-@dirrm etc/sarg/sarg-php
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/ru/LC_MESSAGES
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/ru
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/pt_BR/LC_MESSAGES
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/pt_BR
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/fr/LC_MESSAGES
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/fr
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/en_EN/LC_MESSAGES
+%%PHP%%@dirrm etc/sarg/sarg-php/locale/en_EN
+%%PHP%%@dirrm etc/sarg/sarg-php/locale
+%%PHP%%@dirrm etc/sarg/sarg-php
 @dirrm etc/sarg/images
 @dirrm etc/sarg/fonts
 @dirrmtry etc/sarg
--- sarg.patch ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Feb 2 10:20:17 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164706 
State-Changed-From-To: open->closed 
State-Changed-By: garga 
State-Changed-When: Sat Feb 18 13:16:22 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164706 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/164706: commit references a PR
Date: Sat, 18 Feb 2012 13:11:29 +0000 (UTC)

 garga       2012-02-18 13:11:17 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/sarg             Makefile pkg-plist 
     www/sarg/files       patch-Makefile.in 
   Log:
   - Add a new OPTION, to control if php files will be or not installed. Since
     it's on by default, no PORTREVISION bump is necessary
   - Use ETCDIR instead of complete path
   
   PR:             ports/164706
   Submitted by:   Takefu <takefu@airport.fm>
   
   Revision  Changes    Path
   1.53      +12 -7     ports/www/sarg/Makefile
   1.6       +20 -6     ports/www/sarg/files/patch-Makefile.in
   1.17      +28 -28    ports/www/sarg/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
