From nobody@FreeBSD.org  Tue May 20 17:23:07 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 967A1C92
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 May 2014 17:23:07 +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 83F662C81
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 May 2014 17:23:07 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4KHN7CJ007878
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 May 2014 17:23:07 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4KHN7Fu007875;
	Tue, 20 May 2014 17:23:07 GMT
	(envelope-from nobody)
Message-Id: <201405201723.s4KHN7Fu007875@cgiserv.freebsd.org>
Date: Tue, 20 May 2014 17:23:07 GMT
From: Joseph Benden <joe@thrallingpenguin.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Add staging support to www/cakephp21
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: theis@gmx.at

>Number:         190021
>Category:       ports
>Synopsis:       [patch] Add staging support to www/cakephp21
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    swills
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 20 17:30:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Thu May 22 15:00:02 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/cakephp21.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/www/cakephp21/Makefile b/www/cakephp21/Makefile
index 2128ec9..e88013e 100644
--- a/www/cakephp21/Makefile
+++ b/www/cakephp21/Makefile
@@ -26,7 +26,7 @@ NO_BUILD=	yes
 USES=		gettext
 USE_PHP=	ctype session
 WANT_PHP_WEB=	yes
-DEFAULT_PHP_VER=5
+DEFAULT_VERSIONS=	php=5
 
 CAKE_CONF_FILES=	\
 		app/Config/acl.php \
@@ -51,7 +51,6 @@ MEMCACHE_DESC=	Enable Memcached caching engine client
 CONFDIR=	${PREFIX}/${CONFDIR_REL}
 CONFDIR_REL=	${APACHEETCDIR}/Includes
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 WITH_PHP_CGI?=	/cgi-bin/php
@@ -141,43 +140,44 @@ post-patch:
 
 do-install:
 	@cd ${WRKSRC} && ${COPYTREE_SHARE} \
-		".htaccess app lib index.php plugins vendors" ${WWWDIR}
+		".htaccess app lib index.php plugins vendors" ${STAGEDIR}${WWWDIR}
 
 .if ! ${PORT_OPTIONS:MPROD}
 # If installed in development mode, get rid of .htaccess files,
 # as noted by:
 # http://book.cakephp.org/view/42/The-Configuration-Class#CakePHP-Core-Configuration-Variables-44
-	@${FIND} ${WWWDIR} -type f -name .htaccess -exec ${RM} {} \;
+	@${FIND} ${STAGEDIR}${WWWDIR} -type f -name .htaccess -exec ${RM} {} \;
 	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name .htaccess -exec ${RM} {} \;' >> ${TMPPLIST}
 .endif
 
 # Get rid of the empty placeholder files
-	@${FIND} ${WWWDIR} -type f -name empty -size 0 -exec ${RM} {} \;
+	@${FIND} ${STAGEDIR}${WWWDIR} -type f -name empty -size 0 -exec ${RM} {} \;
 	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name empty -size 0 -exec ${RM} {} \;' >> ${TMPPLIST}
 
-	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
+	@${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}
 
 # Fix the permissions of the Cake console script
-	@${CHMOD} 755 ${WWWDIR}/${CAKE_CONSOLE}
+	@${CHMOD} 755 ${STAGEDIR}${WWWDIR}/${CAKE_CONSOLE}
 	@${ECHO_CMD} '@exec ${CHMOD} 755 ${WWWDIR}/${CAKE_CONSOLE}' >> ${TMPPLIST}
 
 post-install:
 	@for i in ${CAKE_CONF_FILES}; do \
 		if [ ! -f ${WWWDIR}/$$i -a -f ${WRKSRC}/$$i.default ]; then \
-			${INSTALL_DATA} ${WRKSRC}/$$i.default ${WWWDIR}/$$i; \
+			${INSTALL_DATA} ${WRKSRC}/$$i.default ${STAGEDIR}${WWWDIR}/$$i; \
 		fi \
 	done
 .if ${PORT_OPTIONS:MAP}
-	@if [ -d "${CONFDIR}" ]; then \
-	  ${CP} ${WRKDIR}/${CONF} ${CONFDIR}/cakephp.conf; \
+	@${MKDIR} ${STAGEDIR}${CONFDIR}
+	@if [ -d "${STAGEDIR}${CONFDIR}" ]; then \
+	  ${CP} ${WRKDIR}/${CONF} ${STAGEDIR}${CONFDIR}/cakephp.conf; \
 	else \
 	  ${ECHO_MSG} "" ; \
 	  ${ECHO_MSG} "Please check your Apache 2.x installation -" ; \
@@ -188,8 +188,8 @@ post-install:
 	fi
 .endif
 .if ${PORT_OPTIONS:MDOCS}
-	@${INSTALL} -d ${DOCSDIR}
-	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+	@${INSTALL} -d ${STAGEDIR}${DOCSDIR}
+	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
 .endif
 	@${CAT} ${PKGMESSAGE}
 .if ${CGI_EXT} == "-cgi"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->swills 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue May 20 17:30:04 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=190021 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue May 20 17:30:05 UTC 2014 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: theis@gmx.at
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/190021: [patch] Add staging support to www/cakephp21
Date: Tue, 20 May 2014 17:30:05 UT

 Maintainer of www/cakephp21,
 
 Please note that PR ports/190021 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/190021
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Christoph Theis <theis@gmx.at>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/190021: [patch] Add staging support to www/cakephp21
Date: Thu, 22 May 2014 16:56:12 +0200

 Same as 190020: I was lost when it came to setting permission. If it is 
 sufficient what the patch does then it is OK for me.
 
>Unformatted:
