From nobody@FreeBSD.org  Sun Oct 27 16:53:41 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 263803B7
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 Oct 2013 16:53:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id EE3D120A8
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 Oct 2013 16:53:40 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9RGre2R022447
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 Oct 2013 16:53:40 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9RGreuo022444;
	Sun, 27 Oct 2013 16:53:40 GMT
	(envelope-from nobody)
Message-Id: <201310271653.r9RGreuo022444@oldred.freebsd.org>
Date: Sun, 27 Oct 2013 16:53:40 GMT
From: Kevin Zheng <kevinz5000@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [maintainer-update] Add STAGE support for www/cgit
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183369
>Category:       ports
>Synopsis:       [maintainer-update] Add STAGE support for www/cgit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 27 17:00:00 UTC 2013
>Closed-Date:    Sun Oct 27 20:39:59 UTC 2013
>Last-Modified:  Sun Oct 27 20:50:00 UTC 2013
>Originator:     Kevin Zheng
>Release:        9.2-RELEASE
>Organization:
>Environment:
FreeBSD sigma.local 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Give www/cgit STAGE support. The empty directory in "/var/cache/cgit" is required, but I'm not sure that this patch deals with it properly.

Tested to work on Redports.
>How-To-Repeat:

>Fix:
Apply the attached patch.

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 331780)
+++ Makefile	(working copy)
@@ -29,7 +29,6 @@
 SUB_LIST+=	PORTNAME=${PORTNAME}
 PLIST_SUB+=	PORTNAME=${PORTNAME} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 .include <bsd.port.pre.mk>
 
@@ -52,10 +51,9 @@
 post-install:
 	@${MKDIR} /var/cache/${PORTNAME}
 	@${CHOWN} ${WWWOWN}:${WWWGRP} /var/cache/${PORTNAME}
-	@${CAT} ${PKGMESSAGE}
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}rc.5.txt ${DOCSDIR}/
+	@${MKDIR} ${STAGEDIR}/${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}rc.5.txt ${STAGEDIR}/${DOCSDIR}/
 .endif
 
 .include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 331780)
+++ pkg-plist	(working copy)
@@ -1,8 +1,6 @@
 %%WWWDIR%%/cgit.cgi
 %%WWWDIR%%/cgit.css
 %%WWWDIR%%/cgit.png
-%%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
 lib/cgit/filters/about-formatting.sh
 lib/cgit/filters/commit-links.sh
 lib/cgit/filters/html-converters/man2html
@@ -13,11 +11,11 @@
 lib/cgit/filters/html-converters/txt2html
 lib/cgit/filters/syntax-highlighting.py
 lib/cgit/filters/syntax-highlighting.sh
+%%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm lib/cgit/filters/html-converters/resources
 @dirrm lib/cgit/filters/html-converters
 @dirrm lib/cgit/filters
 @dirrm lib/cgit
 @dirrm %%WWWDIR%%
-@exec mkdir -p /var/cache/%%PORTNAME%%
-@exec chown %%WWWOWN%%:%%WWWGRP%% /var/cache/%%PORTNAME%%
-@unexec rmdir /var/cache/%%PORTNAME%% 2>/dev/null || true
+@dirrmtry /var/cache/%%PORTNAME%%


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->wg 
Responsible-Changed-By: wg 
Responsible-Changed-When: Sun Oct 27 17:02:53 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183369 
State-Changed-From-To: open->closed 
State-Changed-By: wg 
State-Changed-When: Sun Oct 27 20:39:58 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/183369: commit references a PR
Date: Sun, 27 Oct 2013 20:40:04 +0000 (UTC)

 Author: wg
 Date: Sun Oct 27 20:39:56 2013
 New Revision: 331804
 URL: http://svnweb.freebsd.org/changeset/ports/331804
 
 Log:
   devel/cgit: allow staging
   
   - Allow staging [1] (based on)
   - Add DOCS option
   - Remove useless options.mk
   
   PR:		ports/183369
   Submitted by:	Kevin Zheng <kevinz5000 gmail.com> (maintainer)
 
 Modified:
   head/devel/cgit/Makefile
   head/devel/cgit/pkg-plist
 
 Modified: head/devel/cgit/Makefile
 ==============================================================================
 --- head/devel/cgit/Makefile	Sun Oct 27 20:27:20 2013	(r331803)
 +++ head/devel/cgit/Makefile	Sun Oct 27 20:39:56 2013	(r331804)
 @@ -29,8 +29,8 @@ SUB_FILES=	pkg-message
  SUB_LIST+=	PORTNAME=${PORTNAME}
  PLIST_SUB+=	PORTNAME=${PORTNAME} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
  
 -NO_STAGE=	yes
 -.include <bsd.port.options.mk>
 +OPTIONS_DEFINE=	DOCS
 +
  .include <bsd.port.pre.mk>
  
  post-extract:
 @@ -50,12 +50,7 @@ post-patch:
  .endif
  
  post-install:
 -	@${MKDIR} /var/cache/${PORTNAME}
 -	@${CHOWN} ${WWWOWN}:${WWWGRP} /var/cache/${PORTNAME}
 -	@${CAT} ${PKGMESSAGE}
 -.if ${PORT_OPTIONS:MDOCS}
 -	@${MKDIR} ${DOCSDIR}
 -	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}rc.5.txt ${DOCSDIR}/
 -.endif
 +	@${MKDIR} ${STAGEDIR}/${DOCSDIR}
 +	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}rc.5.txt ${STAGEDIR}/${DOCSDIR}/
  
  .include <bsd.port.post.mk>
 
 Modified: head/devel/cgit/pkg-plist
 ==============================================================================
 --- head/devel/cgit/pkg-plist	Sun Oct 27 20:27:20 2013	(r331803)
 +++ head/devel/cgit/pkg-plist	Sun Oct 27 20:39:56 2013	(r331804)
 @@ -1,8 +1,6 @@
  %%WWWDIR%%/cgit.cgi
  %%WWWDIR%%/cgit.css
  %%WWWDIR%%/cgit.png
 -%%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
 -%%PORTDOCS%%@dirrm %%DOCSDIR%%
  lib/cgit/filters/about-formatting.sh
  lib/cgit/filters/commit-links.sh
  lib/cgit/filters/html-converters/man2html
 @@ -13,6 +11,8 @@ lib/cgit/filters/html-converters/rst2htm
  lib/cgit/filters/html-converters/txt2html
  lib/cgit/filters/syntax-highlighting.py
  lib/cgit/filters/syntax-highlighting.sh
 +%%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
 +%%PORTDOCS%%@dirrm %%DOCSDIR%%
  @dirrm lib/cgit/filters/html-converters/resources
  @dirrm lib/cgit/filters/html-converters
  @dirrm lib/cgit/filters
 @@ -20,4 +20,3 @@ lib/cgit/filters/syntax-highlighting.sh
  @dirrm %%WWWDIR%%
  @exec mkdir -p /var/cache/%%PORTNAME%%
  @exec chown %%WWWOWN%%:%%WWWGRP%% /var/cache/%%PORTNAME%%
 -@unexec rmdir /var/cache/%%PORTNAME%% 2>/dev/null || true
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
