From nobody@FreeBSD.org  Mon May 26 23:44:42 2014
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 ESMTPS id 550206D6
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2014 23:44:42 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 359A9272E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2014 23:44:42 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QNigS4079497
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2014 23:44:42 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4QNigg4079496;
	Mon, 26 May 2014 23:44:42 GMT
	(envelope-from nobody)
Message-Id: <201405262344.s4QNigg4079496@cgiserv.freebsd.org>
Date: Mon, 26 May 2014 23:44:42 GMT
From: Joseph Benden <joe@thrallingpenguin.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Add staging support to www/ojs2
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: filiperocha@gmail.com

>Number:         190293
>Category:       ports
>Synopsis:       [patch] Add staging support to www/ojs2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    swills
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 26 23:50:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Tue May 27 00:00:00 UTC 2014
>Originator:     Joseph Benden
>Release:        FreeBSD 11
>Organization:
>Environment:
FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014     root@lucy:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Adds staging support to www/ojs2.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/www/ojs2/Makefile b/www/ojs2/Makefile
index 023fdd3..d187944 100644
--- a/www/ojs2/Makefile
+++ b/www/ojs2/Makefile
@@ -27,7 +27,6 @@ OPTIONS_DEFAULT=	MYSQL LDAP
 MEMCACHE_DESC=	memcached cache system
 DB_DESC=	DB backend
 
-NO_STAGE=	yes
 pre-install::
 	@${ECHO_MSG} "======================================================================"
 	@${ECHO_MSG} "If you are upgrading please refer to docs/UPGRADE or browse to"
@@ -71,24 +70,25 @@ PLIST_SUB+=	ECHO_MSG=${ECHO_MSG}
 SUB_FILES=	pkg-deinstall
 
 do-install:
-	@cd ${WRKSRC} && ${COPYTREE_SHARE} "${NONDOCS}" ${WWWDIR}
-	@cd ${WRKSRC} && ${CP} config.inc.php ${WWWDIR}/config.inc.php.sample
-	@${INSTALL} -d ${WWWDIR}/cache/_db
-	@${INSTALL} -d ${WWWDIR}/cache/t_cache
-	@${INSTALL} -d ${WWWDIR}/cache/t_compile
-	@${INSTALL} -d ${WWWDIR}/cache/t_config
-	@${INSTALL} -d ${WWWDIR}/locale/en_US/images
-	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
+	@cd ${WRKSRC} && ${COPYTREE_SHARE} "${NONDOCS}" ${STAGEDIR}${WWWDIR}
+	@cd ${WRKSRC} && ${CP} config.inc.php ${STAGEDIR}${WWWDIR}/config.inc.php.sample
+	${RM} ${STAGEDIR}${WWWDIR}/config.inc.php
+	@${INSTALL} -d ${STAGEDIR}${WWWDIR}/cache/_db
+	@${INSTALL} -d ${STAGEDIR}${WWWDIR}/cache/t_cache
+	@${INSTALL} -d ${STAGEDIR}${WWWDIR}/cache/t_compile
+	@${INSTALL} -d ${STAGEDIR}${WWWDIR}/cache/t_config
+	@${INSTALL} -d ${STAGEDIR}${WWWDIR}/locale/en_US/images
+	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR}
 	@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
 		${WWWDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
-	@${FIND} ${WWWDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
+	@${FIND} ${STAGEDIR}${WWWDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
 	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type f -print0 | \
 		${XARGS} -0 ${CHMOD} 644' >> ${TMPPLIST}
-	@${FIND} ${WWWDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
+	@${FIND} ${STAGEDIR}${WWWDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
 	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type d -print0 | \
 		${XARGS} -0 ${CHMOD} 755' >> ${TMPPLIST}
 .if ${PORT_OPTIONS:MDOCS}
-	@cd ${WRKSRC}/${DOCS} && ${COPYTREE_SHARE} . ${DOCSDIR}
+	@cd ${WRKSRC}/${DOCS} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
 .endif
 
 post-install:
diff --git a/www/ojs2/pkg-plist b/www/ojs2/pkg-plist
index 7c6b000..272fdeb 100644
--- a/www/ojs2/pkg-plist
+++ b/www/ojs2/pkg-plist
@@ -3204,6 +3204,11 @@
 %%WWWDIR%%/tools/rebuildSearchIndex.php
 %%WWWDIR%%/tools/runScheduledTasks.php
 %%WWWDIR%%/tools/upgrade.php
+%%WWWDIR%%/cache/fc-locale-list.php
+@dirrmtry %%WWWDIR%%/cache/_db
+@dirrmtry %%WWWDIR%%/cache/t_cache
+@dirrmtry %%WWWDIR%%/cache/t_compile
+@dirrmtry %%WWWDIR%%/cache/t_config
 @dirrm %%WWWDIR%%/tools/includes
 @dirrm %%WWWDIR%%/tools
 @dirrm %%WWWDIR%%/templates/user


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->swills 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon May 26 23:50:03 UTC 2014 
Responsible-Changed-Why:  
swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=190293 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon May 26 23:50:05 UTC 2014 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: filiperocha@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/190293: [patch] Add staging support to www/ojs2
Date: Mon, 26 May 2014 23:50:04 UT

 Maintainer of www/ojs2,
 
 Please note that PR ports/190293 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/190293
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
>Unformatted:
