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

Collapse All | Expand All

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