mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-22 20:41:26 +00:00
add new port: www/cakephp23
This is a port of the CakePHP web application framework. CakePHP is a free open-source rapid development framework for PHP. It's a structure of libraries, classes and run-time infrastructure for programmers creating web applications originally inspired by the Ruby on Rails framework. Our primary goal is to enable you to work in a structured and rapid manner - without loss of flexibility. Add conflicts to the various cakephp ports. PR: ports/176130 Submitted by: Phil Phillips <pphillips@experts-exchange.com> (maintainer of other cakephp ports)
This commit is contained in:
parent
e6839b8393
commit
8fac84745c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=321716
@ -76,6 +76,7 @@
|
||||
SUBDIR += cakephp13
|
||||
SUBDIR += cakephp21
|
||||
SUBDIR += cakephp22
|
||||
SUBDIR += cakephp23
|
||||
SUBDIR += calamaris
|
||||
SUBDIR += cas
|
||||
SUBDIR += castget
|
||||
|
@ -19,7 +19,7 @@ USE_BZIP2= yes
|
||||
USE_APACHE_RUN= 22+
|
||||
SLAVE_PORT_MODULES= REWRITE
|
||||
|
||||
CONFLICTS= cakephp-1.[23].*
|
||||
CONFLICTS= cakephp-1.[23].* cakephp-2.*
|
||||
NO_BUILD= yes
|
||||
|
||||
USE_PHP= pcre session
|
||||
|
@ -21,7 +21,7 @@ PORTDOCS= README
|
||||
|
||||
SLAVE_PORT_MODULES= REWRITE
|
||||
|
||||
CONFLICTS= cakephp-1.[13].*
|
||||
CONFLICTS= cakephp-1.[13].* cakephp-2.*
|
||||
|
||||
NO_BUILD= yes
|
||||
USES= gettext
|
||||
|
@ -22,7 +22,7 @@ PORTDOCS= README
|
||||
|
||||
SLAVE_PORT_MODULES= REWRITE
|
||||
|
||||
CONFLICTS= cakephp-1.* cakephp-2.2.*
|
||||
CONFLICTS= cakephp-1.* cakephp-2.[23].*
|
||||
|
||||
NO_BUILD= yes
|
||||
USES= gettext
|
||||
|
@ -8,6 +8,8 @@ CATEGORIES= www
|
||||
MAINTAINER= pphillips@experts-exchange.com
|
||||
COMMENT= A framework for developing PHP web applications
|
||||
|
||||
LATEST_LINK= cakephp22
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
USE_GITHUB= yes
|
||||
@ -18,7 +20,7 @@ PORTDOCS= README.md
|
||||
|
||||
SLAVE_PORT_MODULES= REWRITE
|
||||
|
||||
CONFLICTS= cakephp-1.* cakephp-2.1.*
|
||||
CONFLICTS= cakephp-1.* cakephp-2.[13].*
|
||||
|
||||
NO_BUILD= yes
|
||||
USES= gettext
|
||||
|
204
www/cakephp23/Makefile
Normal file
204
www/cakephp23/Makefile
Normal file
@ -0,0 +1,204 @@
|
||||
# Created by: Christoph Theis <theis@gmx.at>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= cakephp
|
||||
PORTVERSION= 2.3.6
|
||||
CATEGORIES= www
|
||||
|
||||
MAINTAINER= pphillips@experts-exchange.com
|
||||
COMMENT= A framework for developing PHP web applications
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ${PORTNAME}
|
||||
GH_COMMIT= b81c198
|
||||
|
||||
PORTDOCS= README.md
|
||||
|
||||
SLAVE_PORT_MODULES= REWRITE
|
||||
|
||||
CONFLICTS= cakephp-1.* cakephp-2.[12].*
|
||||
|
||||
NO_BUILD= yes
|
||||
USES= gettext
|
||||
USE_PHP= ctype session
|
||||
WANT_PHP_WEB= yes
|
||||
DEFAULT_PHP_VER=5
|
||||
|
||||
CAKE_CONF_FILES= \
|
||||
app/Config/acl.php \
|
||||
app/Config/acl.ini.php \
|
||||
app/Config/bootstrap.php \
|
||||
app/Config/core.php \
|
||||
app/Config/database.php \
|
||||
app/Config/routes.php \
|
||||
app/Config/email.php
|
||||
CAKE_CONSOLE= lib/Cake/Console/cake
|
||||
|
||||
OPTIONS_DEFINE= PROD AP MYSQL PGSQL SQLITE APC MEMCACHE
|
||||
|
||||
PROD_DESC= Install for production server (make confighelp)
|
||||
AP_DESC= Add Apache 2.2+ dependency
|
||||
MYSQL_DESC= Check for/install MySQL support in PHP
|
||||
PGSQL_DESC= Check for/install PostgreSQL support in PHP
|
||||
SQLITE_DESC= Check for/install SQLite support in PHP
|
||||
APC_DESC= Enable APC caching engine
|
||||
MEMCACHE_DESC= Enable Memcached caching engine client
|
||||
|
||||
CONFDIR= ${PREFIX}/${CONFDIR_REL}
|
||||
CONFDIR_REL= ${APACHEETCDIR}/Includes
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
WITH_PHP_CGI?= /cgi-bin/php
|
||||
|
||||
.if ${PHP_SAPI:Mcgi} == "cgi" && ${PHP_SAPI:Mmod} == ""
|
||||
CGI_EXT= -cgi
|
||||
.else
|
||||
CGI_EXT=
|
||||
.endif
|
||||
|
||||
SUB_LIST+= PHPCGI=${WITH_PHP_CGI}
|
||||
|
||||
.if ${PORT_OPTIONS:MAP}
|
||||
SUB_FILES= pkg-message
|
||||
USE_APACHE_RUN= 22+
|
||||
PKGMESSAGE= pkg-message
|
||||
APDEP=
|
||||
.else
|
||||
SUB_FILES= pkg-message-no-apache
|
||||
PKGMESSAGE= pkg-message-no-apache
|
||||
APDEP= "@comment "
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPROD}
|
||||
PROD= production
|
||||
HTACCESS= ""
|
||||
.else
|
||||
PROD= development
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-patch-app__Config__core.php
|
||||
HTACCESS= "@comment "
|
||||
.endif
|
||||
|
||||
CONF= cakephp-${PROD}${CGI_EXT}.conf
|
||||
SUB_FILES+= ${CONF}
|
||||
|
||||
PLIST_SUB+= CONFDIR=${CONFDIR_REL} ECHO_MSG=${ECHO_MSG} \
|
||||
HTACCESS=${HTACCESS} APDEP=${APDEP}
|
||||
|
||||
.if ${PORT_OPTIONS:MMYSQL}
|
||||
USE_PHP+= pdo pdo_mysql
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPGSQL}
|
||||
USE_PHP+= pdo pdo_pgsql
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MSQLITE}
|
||||
USE_PHP+= pdo pdo_sqlite
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MAPC}
|
||||
USE_PHP+= apc
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MMEMCACHE}
|
||||
USE_PHP+= memcache
|
||||
.endif
|
||||
|
||||
confighelp:
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "On a production server, the Apache DocumentRoot is"
|
||||
@${ECHO_MSG} "updated to point to the CakePHP webroot directory."
|
||||
@${ECHO_MSG} "In this configuration, the CakePHP application is"
|
||||
@${ECHO_MSG} "accessed at http://www.myservername.com/."
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "A non-production server, CakePHP is installed at"
|
||||
@${ECHO_MSG} "the /cakephp URL, and the CakePHP application is"
|
||||
@${ECHO_MSG} "accessed at http://www.myservername.com/cakephp/."
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "For more information, please see:"
|
||||
@${ECHO_MSG} "http://manual.cakephp.org/chapter/installing"
|
||||
@${ECHO_MSG} ""
|
||||
|
||||
post-extract:
|
||||
@${FIND} ${WRKSRC} -name ._\* -delete
|
||||
|
||||
post-patch:
|
||||
@${RM} -f ${WRKSRC}/lib/Cake/Console/cake.orig \
|
||||
${WRKSRC}/app/Config/core.php.orig
|
||||
|
||||
# Rename config files so we don't overwrite those in an existing installation
|
||||
@for i in ${CAKE_CONF_FILES}; do \
|
||||
if [ -f ${WRKSRC}/$$i ]; then \
|
||||
${MV} ${WRKSRC}/$$i ${WRKSRC}/$$i.default; \
|
||||
fi \
|
||||
done
|
||||
|
||||
do-install:
|
||||
@cd ${WRKSRC} && ${COPYTREE_SHARE} \
|
||||
".htaccess app lib index.php plugins vendors" ${WWWDIR}
|
||||
|
||||
.if empty(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}
|
||||
.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}
|
||||
|
||||
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
|
||||
@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
|
||||
${WWWDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
|
||||
@${FIND} ${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
|
||||
@${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}
|
||||
@${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; \
|
||||
fi \
|
||||
done
|
||||
.if ${PORT_OPTIONS:MAP}
|
||||
@if [ -d "${CONFDIR}" ]; then \
|
||||
${CP} ${WRKDIR}/${CONF} ${CONFDIR}/cakephp.conf; \
|
||||
else \
|
||||
${ECHO_MSG} "" ; \
|
||||
${ECHO_MSG} "Please check your Apache 2.x installation -" ; \
|
||||
${ECHO_MSG} "${CONFDIR} doesn't exist," ; \
|
||||
${ECHO_MSG} "so I cannot install cakephp.conf there!" ; \
|
||||
${ECHO_MSG} "" ; \
|
||||
${FALSE} ; \
|
||||
fi
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${INSTALL} -d ${DOCSDIR}
|
||||
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
.if ${CGI_EXT} == "-cgi"
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "Your CakePHP installation was configured to use the PHP CGI binary."
|
||||
@${ECHO_MSG} "The PHP CGI binary is expected to be referenced by the URL:"
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} " ${WITH_PHP_CGI}"
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "If this is incorrect, reinstall the port with the WITH_PHP_CGI knob"
|
||||
@${ECHO_MSG} "set to the correct URL."
|
||||
.endif
|
||||
@${ECHO_MSG} "*********************************************************************"
|
||||
|
||||
.include <bsd.port.post.mk>
|
2
www/cakephp23/distinfo
Normal file
2
www/cakephp23/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (cakephp-2.3.6.tar.gz) = c0f3af6b25094f5cd58eca933c838ba1f94c1c4d737d8e7c45aeaecf236c67d2
|
||||
SIZE (cakephp-2.3.6.tar.gz) = 1377844
|
13
www/cakephp23/files/cakephp-development-cgi.conf.in
Normal file
13
www/cakephp23/files/cakephp-development-cgi.conf.in
Normal file
@ -0,0 +1,13 @@
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
Action php-script %%PHPCGI%%
|
||||
AddHandler php-script .php
|
||||
|
||||
Alias /cakephp %%WWWDIR%%
|
||||
|
||||
<Location /cakephp>
|
||||
DirectoryIndex index.php
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Location>
|
10
www/cakephp23/files/cakephp-development.conf.in
Normal file
10
www/cakephp23/files/cakephp-development.conf.in
Normal file
@ -0,0 +1,10 @@
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
Alias /cakephp %%WWWDIR%%
|
||||
|
||||
<Location /cakephp>
|
||||
DirectoryIndex index.php
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Location>
|
13
www/cakephp23/files/cakephp-production-cgi.conf.in
Normal file
13
www/cakephp23/files/cakephp-production-cgi.conf.in
Normal file
@ -0,0 +1,13 @@
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
Action php-script %%PHPCGI%%
|
||||
AddHandler php-script .php
|
||||
|
||||
DocumentRoot %%WWWDIR%%/app/webroot
|
||||
|
||||
<Location />
|
||||
DirectoryIndex index.php
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Location>
|
10
www/cakephp23/files/cakephp-production.conf.in
Normal file
10
www/cakephp23/files/cakephp-production.conf.in
Normal file
@ -0,0 +1,10 @@
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
DocumentRoot %%WWWDIR%%/app/webroot
|
||||
|
||||
<Location />
|
||||
DirectoryIndex index.php
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Location>
|
11
www/cakephp23/files/extra-patch-app__Config__core.php
Normal file
11
www/cakephp23/files/extra-patch-app__Config__core.php
Normal file
@ -0,0 +1,11 @@
|
||||
--- app/Config/core.php.orig 2012-02-20 18:12:19.000000000 +0100
|
||||
+++ app/Config/core.php 2012-02-20 18:12:37.000000000 +0100
|
||||
@@ -92,7 +92,7 @@
|
||||
*
|
||||
* And uncomment the App.baseUrl below:
|
||||
*/
|
||||
- //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
||||
+ Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
||||
|
||||
/**
|
||||
* Uncomment the define below to use CakePHP prefix routes.
|
13
www/cakephp23/files/patch-cake__console__cake
Normal file
13
www/cakephp23/files/patch-cake__console__cake
Normal file
@ -0,0 +1,13 @@
|
||||
--- lib/Cake/Console/cake.orig 2012-02-20 19:44:50.000000000 +0100
|
||||
+++ lib/Cake/Console/cake 2012-02-20 19:45:27.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env bash
|
||||
+#!/bin/sh
|
||||
################################################################################
|
||||
#
|
||||
# Bake is a shell script for running CakePHP bake script
|
||||
@@ -31,3 +31,4 @@
|
||||
exec php -q "$LIB"cake.php -working "$APP" "$@"
|
||||
|
||||
exit;
|
||||
+
|
7
www/cakephp23/files/pkg-message-no-apache.in
Normal file
7
www/cakephp23/files/pkg-message-no-apache.in
Normal file
@ -0,0 +1,7 @@
|
||||
*********************************************************************
|
||||
You have just installed the CakePHP web application framework. Please
|
||||
consider supporting the project by visiting http://www.cakephp.org/
|
||||
and making a donation to the development effort.
|
||||
|
||||
Be sure to check the files in %%WWWDIR%%/app/config for
|
||||
additional framework configuration options.
|
10
www/cakephp23/files/pkg-message.in
Normal file
10
www/cakephp23/files/pkg-message.in
Normal file
@ -0,0 +1,10 @@
|
||||
*********************************************************************
|
||||
You have just installed the CakePHP web application framework. Please
|
||||
consider supporting the project by visiting http://www.cakephp.org/
|
||||
and making a donation to the development effort.
|
||||
|
||||
Note that you should restart your Apache web server to ensure that
|
||||
the CakePHP configuration file is loaded.
|
||||
|
||||
Be sure to check the files in %%WWWDIR%%/app/config for
|
||||
additional framework configuration options.
|
8
www/cakephp23/pkg-descr
Normal file
8
www/cakephp23/pkg-descr
Normal file
@ -0,0 +1,8 @@
|
||||
This is a port of the CakePHP web application framework. CakePHP is a
|
||||
free open-source rapid development framework for PHP. It's a structure
|
||||
of libraries, classes and run-time infrastructure for programmers
|
||||
creating web applications originally inspired by the Ruby on Rails
|
||||
framework. Our primary goal is to enable you to work in a structured
|
||||
and rapid manner - without loss of flexibility.
|
||||
|
||||
WWW: http://www.cakephp.org/
|
1435
www/cakephp23/pkg-plist
Normal file
1435
www/cakephp23/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user