View | Details | Raw Unified | Return to bug 190023 | Differences between
and this patch

Collapse All | Expand All

(-)b/www/cakephp22/Makefile (-22 / +18 lines)
Lines 25-31 NO_BUILD= yes Link Here
25
USES=		gettext
25
USES=		gettext
26
USE_PHP=	ctype session
26
USE_PHP=	ctype session
27
WANT_PHP_WEB=	yes
27
WANT_PHP_WEB=	yes
28
DEFAULT_PHP_VER=5
28
DEFAULT_VERSIONS=	php=5
29
29
30
CAKE_CONF_FILES=	\
30
CAKE_CONF_FILES=	\
31
		app/Config/acl.php \
31
		app/Config/acl.php \
Lines 50-56 MEMCACHE_DESC= Enable Memcached caching engine client Link Here
50
CONFDIR=	${PREFIX}/${CONFDIR_REL}
50
CONFDIR=	${PREFIX}/${CONFDIR_REL}
51
CONFDIR_REL=	${APACHEETCDIR}/Includes
51
CONFDIR_REL=	${APACHEETCDIR}/Includes
52
52
53
NO_STAGE=	yes
54
.include <bsd.port.pre.mk>
53
.include <bsd.port.pre.mk>
55
54
56
WITH_PHP_CGI?=	/cgi-bin/php
55
WITH_PHP_CGI?=	/cgi-bin/php
Lines 134-182 post-patch: Link Here
134
# Rename config files so we don't overwrite those in an existing installation
133
# Rename config files so we don't overwrite those in an existing installation
135
	@for i in ${CAKE_CONF_FILES}; do \
134
	@for i in ${CAKE_CONF_FILES}; do \
136
		if [ -f ${WRKSRC}/$$i ]; then \
135
		if [ -f ${WRKSRC}/$$i ]; then \
137
			${MV} ${WRKSRC}/$$i ${WRKSRC}/$$i.default; \
136
			${MV} ${WRKSRC}/$$i ${WRKSRC}/$$i.sample; \
138
		fi \
137
		fi \
139
	done
138
	done
139
	@${MV} ${WRKSRC}/app/Config/database.php.default \
140
		   ${WRKSRC}/app/Config/database.php.sample
141
	@${MV} ${WRKSRC}/app/Config/email.php.default \
142
		   ${WRKSRC}/app/Config/email.php.sample
140
143
141
do-install:
144
do-install:
142
	@cd ${WRKSRC} && ${COPYTREE_SHARE} \
145
	@cd ${WRKSRC} && ${COPYTREE_SHARE} \
143
		".htaccess app lib index.php plugins vendors" ${WWWDIR}
146
		".htaccess app lib index.php plugins vendors" ${STAGEDIR}${WWWDIR}
144
147
145
.if empty(PORT_OPTIONS:MPROD)
148
.if empty(PORT_OPTIONS:MPROD)
146
# If installed in development mode, get rid of .htaccess files,
149
# If installed in development mode, get rid of .htaccess files,
147
# as noted by:
150
# as noted by:
148
# http://book.cakephp.org/view/42/The-Configuration-Class#CakePHP-Core-Configuration-Variables-44
151
# http://book.cakephp.org/view/42/The-Configuration-Class#CakePHP-Core-Configuration-Variables-44
149
	@${FIND} ${WWWDIR} -type f -name .htaccess -exec ${RM} {} \;
152
	@${FIND} ${STAGEDIR}${WWWDIR} -type f -name .htaccess -exec ${RM} {} \;
150
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name .htaccess -exec ${RM} {} \;' >> ${TMPPLIST}
153
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name .htaccess -exec ${RM} {} \;' >> ${TMPPLIST}
151
.endif
154
.endif
152
155
153
# Get rid of the empty placeholder files
156
# Get rid of the empty placeholder files
154
	@${FIND} ${WWWDIR} -type f -name empty -size 0 -exec ${RM} {} \;
157
	@${FIND} ${STAGEDIR}${WWWDIR} -type f -name empty -size 0 -exec ${RM} {} \;
155
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name empty -size 0 -exec ${RM} {} \;' >> ${TMPPLIST}
158
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR:S|^${PREFIX}/|%D/|} -type f -name empty -size 0 -exec ${RM} {} \;' >> ${TMPPLIST}
156
159
157
	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
160
	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR}
158
	@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
161
	@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
159
		${WWWDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
162
		${WWWDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
160
	@${FIND} ${WWWDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
163
	@${FIND} ${STAGEDIR}${WWWDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
161
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type f -print0 | \
164
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type f -print0 | \
162
		${XARGS} -0 ${CHMOD} 644' >> ${TMPPLIST}
165
		${XARGS} -0 ${CHMOD} 644' >> ${TMPPLIST}
163
	@${FIND} ${WWWDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
166
	@${FIND} ${STAGEDIR}${WWWDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
164
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type d -print0 | \
167
	@${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type d -print0 | \
165
		${XARGS} -0 ${CHMOD} 755' >> ${TMPPLIST}
168
		${XARGS} -0 ${CHMOD} 755' >> ${TMPPLIST}
166
169
167
# Fix the permissions of the Cake console script
170
# Fix the permissions of the Cake console script
168
	@${CHMOD} 755 ${WWWDIR}/${CAKE_CONSOLE}
171
	@${CHMOD} 755 ${STAGEDIR}${WWWDIR}/${CAKE_CONSOLE}
169
	@${ECHO_CMD} '@exec ${CHMOD} 755 ${WWWDIR}/${CAKE_CONSOLE}' >> ${TMPPLIST}
172
	@${ECHO_CMD} '@exec ${CHMOD} 755 ${WWWDIR}/${CAKE_CONSOLE}' >> ${TMPPLIST}
170
173
171
post-install:
174
post-install:
172
	@for i in ${CAKE_CONF_FILES}; do \
173
		if [ ! -f ${WWWDIR}/$$i -a -f ${WRKSRC}/$$i.default ]; then \
174
			${INSTALL_DATA} ${WRKSRC}/$$i.default ${WWWDIR}/$$i; \
175
		fi \
176
	done
177
.if ${PORT_OPTIONS:MAP}
175
.if ${PORT_OPTIONS:MAP}
178
	@if [ -d "${CONFDIR}" ]; then \
176
	@${MKDIR} ${STAGEDIR}${CONFDIR}
179
	  ${CP} ${WRKDIR}/${CONF} ${CONFDIR}/cakephp.conf; \
177
	@if [ -d "${STAGEDIR}${CONFDIR}" ]; then \
178
	  ${CP} ${WRKDIR}/${CONF} ${STAGEDIR}${CONFDIR}/cakephp.conf; \
180
	else \
179
	else \
181
	  ${ECHO_MSG} "" ; \
180
	  ${ECHO_MSG} "" ; \
182
	  ${ECHO_MSG} "Please check your Apache 2.x installation -" ; \
181
	  ${ECHO_MSG} "Please check your Apache 2.x installation -" ; \
Lines 186-196 post-install: Link Here
186
	  ${FALSE} ; \
185
	  ${FALSE} ; \
187
	fi
186
	fi
188
.endif
187
.endif
189
.if ${PORT_OPTIONS:MDOCS}
188
	@${INSTALL} -d ${STAGEDIR}${DOCSDIR}
190
	@${INSTALL} -d ${DOCSDIR}
189
	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
191
	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
192
.endif
193
	@${CAT} ${PKGMESSAGE}
194
.if ${CGI_EXT} == "-cgi"
190
.if ${CGI_EXT} == "-cgi"
195
	@${ECHO_MSG}	""
191
	@${ECHO_MSG}	""
196
	@${ECHO_MSG}	"Your CakePHP installation was configured to use the PHP CGI binary."
192
	@${ECHO_MSG}	"Your CakePHP installation was configured to use the PHP CGI binary."
(-)b/www/cakephp22/pkg-plist (-21 / +7 lines)
Lines 1-26 Link Here
1
%%HTACCESS%%%%WWWDIR%%/.htaccess
1
%%HTACCESS%%%%WWWDIR%%/.htaccess
2
%%HTACCESS%%%%WWWDIR%%/app/.htaccess
2
%%HTACCESS%%%%WWWDIR%%/app/.htaccess
3
@unexec if cmp -s %D/%%WWWDIR%%/app/Config/acl.php.default %D/%%WWWDIR%%/app/Config/acl.php; then rm -f %D/%%WWWDIR%%/app/Config/acl.php; else %%ECHO_MSG%% "===> Customized %D/%%WWWDIR%%/app/Config/acl.php has not been removed"; fi
3
@sample %%WWWDIR%%/app/Config/acl.php.sample
4
%%WWWDIR%%/app/Config/acl.php.default
4
@sample %%WWWDIR%%/app/Config/acl.ini.php.sample
5
@exec if [ ! -f %B/acl.php ]; then cp -p %B/acl.php.default %B/acl.php; else %%ECHO_MSG%% "===> Customized %B/acl.php has not been overwritten"; fi
5
@sample %%WWWDIR%%/app/Config/bootstrap.php.sample
6
@unexec if cmp -s %D/%%WWWDIR%%/app/Config/acl.ini.php.default %D/%%WWWDIR%%/app/Config/acl.ini.php; then rm -f %D/%%WWWDIR%%/app/Config/acl.ini.php; else %%ECHO_MSG%% "===> Customized %D/%%WWWDIR%%/app/Config/acl.ini.php has not been removed"; fi
6
@sample %%WWWDIR%%/app/Config/core.php.sample
7
%%WWWDIR%%/app/Config/acl.ini.php.default
7
@sample %%WWWDIR%%/app/Config/database.php.sample
8
@exec if [ ! -f %B/acl.ini.php ]; then cp -p %B/acl.ini.php.default %B/acl.ini.php; else %%ECHO_MSG%% "===> Customized %B/acl.ini.php has not been overwritten"; fi
8
@sample %%WWWDIR%%/app/Config/email.php.sample
9
@unexec if cmp -s %D/%%WWWDIR%%/app/Config/bootstrap.php.default %D/%%WWWDIR%%/app/Config/bootstrap.php; then rm -f %D/%%WWWDIR%%/app/Config/bootstrap.php; else %%ECHO_MSG%% "===> Customized %D/%%WWWDIR%%/app/Config/bootstrap.php has not been removed"; fi
9
@sample %%WWWDIR%%/app/Config/routes.php.sample
10
%%WWWDIR%%/app/Config/bootstrap.php.default
11
@exec if [ ! -f %B/bootstrap.php ]; then cp -p %B/bootstrap.php.default %B/bootstrap.php; else %%ECHO_MSG%% "===> Customized %B/bootstrap.php has not been overwritten"; fi
12
@unexec if cmp -s %D/%%WWWDIR%%/app/Config/core.php.default %D/%%WWWDIR%%/app/Config/core.php; then rm -f %D/%%WWWDIR%%/app/Config/core.php; else %%ECHO_MSG%% "===> Customized %D/%%WWWDIR%%/app/Config/core.php has not been removed"; fi
13
%%WWWDIR%%/app/Config/core.php.default
14
@exec if [ ! -f %B/core.php ]; then cp -p %B/core.php.default %B/core.php; else %%ECHO_MSG%% "===> Customized %B/core.php has not been overwritten"; fi
15
@unexec if cmp -s %D/%%WWWDIR%%/app/Config/database.php.default %D/%%WWWDIR%%/app/Config/database.php; then rm -f %D/%%WWWDIR%%/app/Config/database.php; else %%ECHO_MSG%% "===> Customized %D/%%WWWDIR%%/app/Config/database.php has not been removed"; fi
16
%%WWWDIR%%/app/Config/database.php.default
17
@exec if [ ! -f %B/database.php ]; then cp -p %B/database.php.default %B/database.php; else %%ECHO_MSG%% "===> Customized %B/database.php has not been overwritten"; fi
18
@unexec if cmp -s %D/%%WWWDIR%%/app/Config/email.php.default %D/%%WWWDIR%%/app/Config/email.php; then rm -f %D/%%WWWDIR%%/app/Config/email.php; else %%ECHO_MSG%% "===> Customized %D/%%WWWDIR%%/app/Config/email.php has not been removed"; fi
19
%%WWWDIR%%/app/Config/email.php.default
20
@exec if [ ! -f %B/email.php ]; then cp -p %B/email.php.default %B/email.php; else %%ECHO_MSG%% "===> Customized %B/email.php has not been overwritten"; fi
21
@unexec if cmp -s %D/%%WWWDIR%%/app/Config/routes.php.default %D/%%WWWDIR%%/app/Config/routes.php; then rm -f %D/%%WWWDIR%%/app/Config/routes.php; else %%ECHO_MSG%% "===> Customized %D/%%WWWDIR%%/app/Config/routes.php has not been removed"; fi
22
%%WWWDIR%%/app/Config/routes.php.default
23
@exec if [ ! -f %B/routes.php ]; then cp -p %B/routes.php.default %B/routes.php; else %%ECHO_MSG%% "===> Customized %B/routes.php has not been overwritten"; fi
24
%%WWWDIR%%/app/Config/Schema/db_acl.php
10
%%WWWDIR%%/app/Config/Schema/db_acl.php
25
%%WWWDIR%%/app/Config/Schema/db_acl.sql
11
%%WWWDIR%%/app/Config/Schema/db_acl.sql
26
%%WWWDIR%%/app/Config/Schema/i18n.php
12
%%WWWDIR%%/app/Config/Schema/i18n.php

Return to bug 190023