Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 2014 17:07:13 GMT
From:      Joseph Benden <joe@thrallingpenguin.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/190019: [patch] Add staging support to www/cakephp12
Message-ID:  <201405201707.s4KH7DOv006260@cgiserv.freebsd.org>
Resent-Message-ID: <201405201710.s4KHA0iP057497@freefall.freebsd.org>

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

>Number:         190019
>Category:       ports
>Synopsis:       [patch] Add staging support to www/cakephp12
>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:   Tue May 20 17:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>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/cakephp12.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/www/cakephp12/Makefile b/www/cakephp12/Makefile
index 774bd4d..3506743 100644
--- a/www/cakephp12/Makefile
+++ b/www/cakephp12/Makefile
@@ -25,7 +25,7 @@ NO_BUILD=	yes
 USES=		gettext
 USE_PHP=	session
 WANT_PHP_WEB=	yes
-DEFAULT_PHP_VER=5
+DEFAULT_VERSIONS=	php=5
 
 CAKE_CONF_FILES=	\
 		app/config/acl.ini.php \
@@ -44,7 +44,6 @@ MEMCACHE_DESC=	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
@@ -136,45 +135,46 @@ post-patch:
 
 do-install:
 	@cd ${WRKSRC} && ${COPYTREE_SHARE} \
-		".htaccess app cake index.php vendors" ${WWWDIR}
+		".htaccess app cake index.php 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} {} \;
-	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name .htaccess -exec ${RM} {} \;' >> ${TMPPLIST}
+	@${FIND} ${STAGEDIR}${WWWDIR} -type f -name .htaccess -exec ${RM} {} \;
+	@${ECHO_CMD} '@exec ${FIND} ${STAGEDIR}${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} {} \;
-	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name empty -size 0 -exec ${RM} {} \;' >> ${TMPPLIST}
+	@${FIND} ${STAGEDIR}${WWWDIR} -type f -name empty -size 0 -exec ${RM} {} \;
+	@${ECHO_CMD} '@exec ${FIND} ${STAGEDIR}${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name empty -size 0 -exec ${RM} {} \;' >> ${TMPPLIST}
 
 	@for i in ${CAKE_CONF_FILES}; do \
 		if [ -f ${WRKSRC}/$$i.default -a ! -f ${WRKSRC}/$$i ]; then \
-			${INSTALL_DATA} ${WRKSRC}/$$i.default ${WWWDIR}/$$i; \
+			${INSTALL_DATA} ${WRKSRC}/$$i.default ${STAGEDIR}${WWWDIR}/$$i; \
 		elif [ -f ${WRKSRC}/$$i -a ! -f ${WRKSRC}/$$i.default ]; then \
-			${INSTALL_DATA} ${WRKSRC}/$$i ${WWWDIR}/$$i.default; \
+			${INSTALL_DATA} ${WRKSRC}/$$i ${STAGEDIR}${WWWDIR}/$$i.default; \
 		fi \
 	done
-	@${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:
 .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 -" ; \
@@ -185,8 +185,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:
>Unformatted:



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