diff options
30 files changed, 426 insertions, 156 deletions
diff --git a/www/cakephp-devel/Makefile b/www/cakephp-devel/Makefile index 860396cbec37..4b2b59fe556f 100644 --- a/www/cakephp-devel/Makefile +++ b/www/cakephp-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= cakephp PORTVERSION= 1.1.13.4450 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://cakeforge.org/frs/download.php/326/ DISTNAME= cake_${PORTVERSION} @@ -24,10 +25,9 @@ SLAVE_PORT_MODULES= rewrite NO_BUILD= yes USE_PHP= pcre session -WANT_PHP_MOD= yes +WANT_PHP_WEB= yes SUB_FILES= pkg-message -SUB_LIST= DATADIR=${DATADIR} WRKSRC= ${WRKDIR}/cake_${DISTVERSION} @@ -36,22 +36,36 @@ OPTIONS= PROD "Install for production server (see: make confighelp)" Off \ PGSQL "Check for/install PostgreSQL support in PHP" Off \ SQLITE "Check for/install SQLite support in PHP" Off -.if !defined(NOPORTDOCS) -INSTALL_TARGET= install install-docs -.endif +PLIST_SUB+= CONFDIR=${CONFDIR_REL} + +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 + DEFAULT_PHP_VER=5 -IGNORE_WITH_PHP=4.0 4.1 4.2 4.3.1 +IGNORE_WITH_PHP=4 + +SUB_LIST+= PHPCGI=${WITH_PHP_CGI} .if defined(WITH_PROD) -SUB_FILES+= cakephp-production.conf +PROD= production .else -SUB_FILES+= cakephp-development.conf +PROD= development EXTRA_PATCHES= ${FILESDIR}/development-app-config-core.php.patch .endif +CONF= cakephp-${PROD}${CGI_EXT}.conf +SUB_FILES+= ${CONF} + DB_DEFINED= no .if defined(WITH_MYSQL) @@ -106,23 +120,31 @@ do-install: ${FIND} ${DATADIR} -type d -print | ${XARGS} -n1 ${CHMOD} 755 post-install: -.if exists(${PREFIX}/etc/apache2/Includes) -.if defined(WITH_PROD) - @${CP} ${WRKDIR}/cakephp-production.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.else - @${CP} ${WRKDIR}/cakephp-development.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.endif -.else - @${ECHO_MSG} "" - @${ECHO_MSG} "Please check your Apache 2.x installation -" - @${ECHO_MSG} "${PREFIX}/etc/apache2/Includes doesn't exist," - @${ECHO_MSG} "so I cannot install cakephp.conf there!" - @${ECHO_MSG} "" -.endif + @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 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${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> diff --git a/www/cakephp-devel/files/cakephp-development-cgi.conf.in b/www/cakephp-devel/files/cakephp-development-cgi.conf.in new file mode 100644 index 000000000000..b3c5c74af043 --- /dev/null +++ b/www/cakephp-devel/files/cakephp-development-cgi.conf.in @@ -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 %%DATADIR%% + +<Location /cakephp> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp-devel/files/cakephp-production-cgi.conf.in b/www/cakephp-devel/files/cakephp-production-cgi.conf.in new file mode 100644 index 000000000000..8565f6286351 --- /dev/null +++ b/www/cakephp-devel/files/cakephp-production-cgi.conf.in @@ -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 %%DATADIR%%/app/webroot + +<Location /> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp-devel/files/pkg-message.in b/www/cakephp-devel/files/pkg-message.in index 8a4d8281a5e0..5175204423df 100644 --- a/www/cakephp-devel/files/pkg-message.in +++ b/www/cakephp-devel/files/pkg-message.in @@ -7,6 +7,5 @@ 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. -Finally, be sure to check %%DATADIR%%/app/config/core.php for +Be sure to check %%DATADIR%%/app/config/core.php for additional framework configuration options. -********************************************************************* diff --git a/www/cakephp-devel/pkg-plist b/www/cakephp-devel/pkg-plist index 9db52a3047c0..0db1a81580a8 100644 --- a/www/cakephp-devel/pkg-plist +++ b/www/cakephp-devel/pkg-plist @@ -143,9 +143,7 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/index.php %%DATADIR%%/.htaccess -etc/apache2/Includes/cakephp.conf -share/nls/POSIX -share/nls/en_US.US-ASCII +%%CONFDIR%%/cakephp.conf @exec mkdir -p %D/%%DATADIR%%/vendors @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/webroot/files @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/views/pages diff --git a/www/cakephp/Makefile b/www/cakephp/Makefile index 860396cbec37..4b2b59fe556f 100644 --- a/www/cakephp/Makefile +++ b/www/cakephp/Makefile @@ -7,6 +7,7 @@ PORTNAME= cakephp PORTVERSION= 1.1.13.4450 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://cakeforge.org/frs/download.php/326/ DISTNAME= cake_${PORTVERSION} @@ -24,10 +25,9 @@ SLAVE_PORT_MODULES= rewrite NO_BUILD= yes USE_PHP= pcre session -WANT_PHP_MOD= yes +WANT_PHP_WEB= yes SUB_FILES= pkg-message -SUB_LIST= DATADIR=${DATADIR} WRKSRC= ${WRKDIR}/cake_${DISTVERSION} @@ -36,22 +36,36 @@ OPTIONS= PROD "Install for production server (see: make confighelp)" Off \ PGSQL "Check for/install PostgreSQL support in PHP" Off \ SQLITE "Check for/install SQLite support in PHP" Off -.if !defined(NOPORTDOCS) -INSTALL_TARGET= install install-docs -.endif +PLIST_SUB+= CONFDIR=${CONFDIR_REL} + +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 + DEFAULT_PHP_VER=5 -IGNORE_WITH_PHP=4.0 4.1 4.2 4.3.1 +IGNORE_WITH_PHP=4 + +SUB_LIST+= PHPCGI=${WITH_PHP_CGI} .if defined(WITH_PROD) -SUB_FILES+= cakephp-production.conf +PROD= production .else -SUB_FILES+= cakephp-development.conf +PROD= development EXTRA_PATCHES= ${FILESDIR}/development-app-config-core.php.patch .endif +CONF= cakephp-${PROD}${CGI_EXT}.conf +SUB_FILES+= ${CONF} + DB_DEFINED= no .if defined(WITH_MYSQL) @@ -106,23 +120,31 @@ do-install: ${FIND} ${DATADIR} -type d -print | ${XARGS} -n1 ${CHMOD} 755 post-install: -.if exists(${PREFIX}/etc/apache2/Includes) -.if defined(WITH_PROD) - @${CP} ${WRKDIR}/cakephp-production.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.else - @${CP} ${WRKDIR}/cakephp-development.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.endif -.else - @${ECHO_MSG} "" - @${ECHO_MSG} "Please check your Apache 2.x installation -" - @${ECHO_MSG} "${PREFIX}/etc/apache2/Includes doesn't exist," - @${ECHO_MSG} "so I cannot install cakephp.conf there!" - @${ECHO_MSG} "" -.endif + @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 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${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> diff --git a/www/cakephp/files/cakephp-development-cgi.conf.in b/www/cakephp/files/cakephp-development-cgi.conf.in new file mode 100644 index 000000000000..b3c5c74af043 --- /dev/null +++ b/www/cakephp/files/cakephp-development-cgi.conf.in @@ -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 %%DATADIR%% + +<Location /cakephp> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp/files/cakephp-production-cgi.conf.in b/www/cakephp/files/cakephp-production-cgi.conf.in new file mode 100644 index 000000000000..8565f6286351 --- /dev/null +++ b/www/cakephp/files/cakephp-production-cgi.conf.in @@ -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 %%DATADIR%%/app/webroot + +<Location /> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp/files/pkg-message.in b/www/cakephp/files/pkg-message.in index 8a4d8281a5e0..5175204423df 100644 --- a/www/cakephp/files/pkg-message.in +++ b/www/cakephp/files/pkg-message.in @@ -7,6 +7,5 @@ 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. -Finally, be sure to check %%DATADIR%%/app/config/core.php for +Be sure to check %%DATADIR%%/app/config/core.php for additional framework configuration options. -********************************************************************* diff --git a/www/cakephp/pkg-plist b/www/cakephp/pkg-plist index 9db52a3047c0..0db1a81580a8 100644 --- a/www/cakephp/pkg-plist +++ b/www/cakephp/pkg-plist @@ -143,9 +143,7 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/index.php %%DATADIR%%/.htaccess -etc/apache2/Includes/cakephp.conf -share/nls/POSIX -share/nls/en_US.US-ASCII +%%CONFDIR%%/cakephp.conf @exec mkdir -p %D/%%DATADIR%%/vendors @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/webroot/files @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/views/pages diff --git a/www/cakephp11/Makefile b/www/cakephp11/Makefile index 860396cbec37..4b2b59fe556f 100644 --- a/www/cakephp11/Makefile +++ b/www/cakephp11/Makefile @@ -7,6 +7,7 @@ PORTNAME= cakephp PORTVERSION= 1.1.13.4450 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://cakeforge.org/frs/download.php/326/ DISTNAME= cake_${PORTVERSION} @@ -24,10 +25,9 @@ SLAVE_PORT_MODULES= rewrite NO_BUILD= yes USE_PHP= pcre session -WANT_PHP_MOD= yes +WANT_PHP_WEB= yes SUB_FILES= pkg-message -SUB_LIST= DATADIR=${DATADIR} WRKSRC= ${WRKDIR}/cake_${DISTVERSION} @@ -36,22 +36,36 @@ OPTIONS= PROD "Install for production server (see: make confighelp)" Off \ PGSQL "Check for/install PostgreSQL support in PHP" Off \ SQLITE "Check for/install SQLite support in PHP" Off -.if !defined(NOPORTDOCS) -INSTALL_TARGET= install install-docs -.endif +PLIST_SUB+= CONFDIR=${CONFDIR_REL} + +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 + DEFAULT_PHP_VER=5 -IGNORE_WITH_PHP=4.0 4.1 4.2 4.3.1 +IGNORE_WITH_PHP=4 + +SUB_LIST+= PHPCGI=${WITH_PHP_CGI} .if defined(WITH_PROD) -SUB_FILES+= cakephp-production.conf +PROD= production .else -SUB_FILES+= cakephp-development.conf +PROD= development EXTRA_PATCHES= ${FILESDIR}/development-app-config-core.php.patch .endif +CONF= cakephp-${PROD}${CGI_EXT}.conf +SUB_FILES+= ${CONF} + DB_DEFINED= no .if defined(WITH_MYSQL) @@ -106,23 +120,31 @@ do-install: ${FIND} ${DATADIR} -type d -print | ${XARGS} -n1 ${CHMOD} 755 post-install: -.if exists(${PREFIX}/etc/apache2/Includes) -.if defined(WITH_PROD) - @${CP} ${WRKDIR}/cakephp-production.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.else - @${CP} ${WRKDIR}/cakephp-development.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.endif -.else - @${ECHO_MSG} "" - @${ECHO_MSG} "Please check your Apache 2.x installation -" - @${ECHO_MSG} "${PREFIX}/etc/apache2/Includes doesn't exist," - @${ECHO_MSG} "so I cannot install cakephp.conf there!" - @${ECHO_MSG} "" -.endif + @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 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${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> diff --git a/www/cakephp11/files/cakephp-development-cgi.conf.in b/www/cakephp11/files/cakephp-development-cgi.conf.in new file mode 100644 index 000000000000..b3c5c74af043 --- /dev/null +++ b/www/cakephp11/files/cakephp-development-cgi.conf.in @@ -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 %%DATADIR%% + +<Location /cakephp> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp11/files/cakephp-production-cgi.conf.in b/www/cakephp11/files/cakephp-production-cgi.conf.in new file mode 100644 index 000000000000..8565f6286351 --- /dev/null +++ b/www/cakephp11/files/cakephp-production-cgi.conf.in @@ -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 %%DATADIR%%/app/webroot + +<Location /> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp11/files/pkg-message.in b/www/cakephp11/files/pkg-message.in index 8a4d8281a5e0..5175204423df 100644 --- a/www/cakephp11/files/pkg-message.in +++ b/www/cakephp11/files/pkg-message.in @@ -7,6 +7,5 @@ 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. -Finally, be sure to check %%DATADIR%%/app/config/core.php for +Be sure to check %%DATADIR%%/app/config/core.php for additional framework configuration options. -********************************************************************* diff --git a/www/cakephp11/pkg-plist b/www/cakephp11/pkg-plist index 9db52a3047c0..0db1a81580a8 100644 --- a/www/cakephp11/pkg-plist +++ b/www/cakephp11/pkg-plist @@ -143,9 +143,7 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/index.php %%DATADIR%%/.htaccess -etc/apache2/Includes/cakephp.conf -share/nls/POSIX -share/nls/en_US.US-ASCII +%%CONFDIR%%/cakephp.conf @exec mkdir -p %D/%%DATADIR%%/vendors @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/webroot/files @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/views/pages diff --git a/www/cakephp12/Makefile b/www/cakephp12/Makefile index 860396cbec37..4b2b59fe556f 100644 --- a/www/cakephp12/Makefile +++ b/www/cakephp12/Makefile @@ -7,6 +7,7 @@ PORTNAME= cakephp PORTVERSION= 1.1.13.4450 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://cakeforge.org/frs/download.php/326/ DISTNAME= cake_${PORTVERSION} @@ -24,10 +25,9 @@ SLAVE_PORT_MODULES= rewrite NO_BUILD= yes USE_PHP= pcre session -WANT_PHP_MOD= yes +WANT_PHP_WEB= yes SUB_FILES= pkg-message -SUB_LIST= DATADIR=${DATADIR} WRKSRC= ${WRKDIR}/cake_${DISTVERSION} @@ -36,22 +36,36 @@ OPTIONS= PROD "Install for production server (see: make confighelp)" Off \ PGSQL "Check for/install PostgreSQL support in PHP" Off \ SQLITE "Check for/install SQLite support in PHP" Off -.if !defined(NOPORTDOCS) -INSTALL_TARGET= install install-docs -.endif +PLIST_SUB+= CONFDIR=${CONFDIR_REL} + +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 + DEFAULT_PHP_VER=5 -IGNORE_WITH_PHP=4.0 4.1 4.2 4.3.1 +IGNORE_WITH_PHP=4 + +SUB_LIST+= PHPCGI=${WITH_PHP_CGI} .if defined(WITH_PROD) -SUB_FILES+= cakephp-production.conf +PROD= production .else -SUB_FILES+= cakephp-development.conf +PROD= development EXTRA_PATCHES= ${FILESDIR}/development-app-config-core.php.patch .endif +CONF= cakephp-${PROD}${CGI_EXT}.conf +SUB_FILES+= ${CONF} + DB_DEFINED= no .if defined(WITH_MYSQL) @@ -106,23 +120,31 @@ do-install: ${FIND} ${DATADIR} -type d -print | ${XARGS} -n1 ${CHMOD} 755 post-install: -.if exists(${PREFIX}/etc/apache2/Includes) -.if defined(WITH_PROD) - @${CP} ${WRKDIR}/cakephp-production.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.else - @${CP} ${WRKDIR}/cakephp-development.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.endif -.else - @${ECHO_MSG} "" - @${ECHO_MSG} "Please check your Apache 2.x installation -" - @${ECHO_MSG} "${PREFIX}/etc/apache2/Includes doesn't exist," - @${ECHO_MSG} "so I cannot install cakephp.conf there!" - @${ECHO_MSG} "" -.endif + @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 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${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> diff --git a/www/cakephp12/files/cakephp-development-cgi.conf.in b/www/cakephp12/files/cakephp-development-cgi.conf.in new file mode 100644 index 000000000000..b3c5c74af043 --- /dev/null +++ b/www/cakephp12/files/cakephp-development-cgi.conf.in @@ -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 %%DATADIR%% + +<Location /cakephp> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp12/files/cakephp-production-cgi.conf.in b/www/cakephp12/files/cakephp-production-cgi.conf.in new file mode 100644 index 000000000000..8565f6286351 --- /dev/null +++ b/www/cakephp12/files/cakephp-production-cgi.conf.in @@ -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 %%DATADIR%%/app/webroot + +<Location /> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp12/files/pkg-message.in b/www/cakephp12/files/pkg-message.in index 8a4d8281a5e0..5175204423df 100644 --- a/www/cakephp12/files/pkg-message.in +++ b/www/cakephp12/files/pkg-message.in @@ -7,6 +7,5 @@ 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. -Finally, be sure to check %%DATADIR%%/app/config/core.php for +Be sure to check %%DATADIR%%/app/config/core.php for additional framework configuration options. -********************************************************************* diff --git a/www/cakephp12/pkg-plist b/www/cakephp12/pkg-plist index 9db52a3047c0..0db1a81580a8 100644 --- a/www/cakephp12/pkg-plist +++ b/www/cakephp12/pkg-plist @@ -143,9 +143,7 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/index.php %%DATADIR%%/.htaccess -etc/apache2/Includes/cakephp.conf -share/nls/POSIX -share/nls/en_US.US-ASCII +%%CONFDIR%%/cakephp.conf @exec mkdir -p %D/%%DATADIR%%/vendors @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/webroot/files @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/views/pages diff --git a/www/cakephp13/Makefile b/www/cakephp13/Makefile index 860396cbec37..4b2b59fe556f 100644 --- a/www/cakephp13/Makefile +++ b/www/cakephp13/Makefile @@ -7,6 +7,7 @@ PORTNAME= cakephp PORTVERSION= 1.1.13.4450 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://cakeforge.org/frs/download.php/326/ DISTNAME= cake_${PORTVERSION} @@ -24,10 +25,9 @@ SLAVE_PORT_MODULES= rewrite NO_BUILD= yes USE_PHP= pcre session -WANT_PHP_MOD= yes +WANT_PHP_WEB= yes SUB_FILES= pkg-message -SUB_LIST= DATADIR=${DATADIR} WRKSRC= ${WRKDIR}/cake_${DISTVERSION} @@ -36,22 +36,36 @@ OPTIONS= PROD "Install for production server (see: make confighelp)" Off \ PGSQL "Check for/install PostgreSQL support in PHP" Off \ SQLITE "Check for/install SQLite support in PHP" Off -.if !defined(NOPORTDOCS) -INSTALL_TARGET= install install-docs -.endif +PLIST_SUB+= CONFDIR=${CONFDIR_REL} + +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 + DEFAULT_PHP_VER=5 -IGNORE_WITH_PHP=4.0 4.1 4.2 4.3.1 +IGNORE_WITH_PHP=4 + +SUB_LIST+= PHPCGI=${WITH_PHP_CGI} .if defined(WITH_PROD) -SUB_FILES+= cakephp-production.conf +PROD= production .else -SUB_FILES+= cakephp-development.conf +PROD= development EXTRA_PATCHES= ${FILESDIR}/development-app-config-core.php.patch .endif +CONF= cakephp-${PROD}${CGI_EXT}.conf +SUB_FILES+= ${CONF} + DB_DEFINED= no .if defined(WITH_MYSQL) @@ -106,23 +120,31 @@ do-install: ${FIND} ${DATADIR} -type d -print | ${XARGS} -n1 ${CHMOD} 755 post-install: -.if exists(${PREFIX}/etc/apache2/Includes) -.if defined(WITH_PROD) - @${CP} ${WRKDIR}/cakephp-production.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.else - @${CP} ${WRKDIR}/cakephp-development.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.endif -.else - @${ECHO_MSG} "" - @${ECHO_MSG} "Please check your Apache 2.x installation -" - @${ECHO_MSG} "${PREFIX}/etc/apache2/Includes doesn't exist," - @${ECHO_MSG} "so I cannot install cakephp.conf there!" - @${ECHO_MSG} "" -.endif + @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 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${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> diff --git a/www/cakephp13/files/cakephp-development-cgi.conf.in b/www/cakephp13/files/cakephp-development-cgi.conf.in new file mode 100644 index 000000000000..b3c5c74af043 --- /dev/null +++ b/www/cakephp13/files/cakephp-development-cgi.conf.in @@ -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 %%DATADIR%% + +<Location /cakephp> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp13/files/cakephp-production-cgi.conf.in b/www/cakephp13/files/cakephp-production-cgi.conf.in new file mode 100644 index 000000000000..8565f6286351 --- /dev/null +++ b/www/cakephp13/files/cakephp-production-cgi.conf.in @@ -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 %%DATADIR%%/app/webroot + +<Location /> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp13/files/pkg-message.in b/www/cakephp13/files/pkg-message.in index 8a4d8281a5e0..5175204423df 100644 --- a/www/cakephp13/files/pkg-message.in +++ b/www/cakephp13/files/pkg-message.in @@ -7,6 +7,5 @@ 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. -Finally, be sure to check %%DATADIR%%/app/config/core.php for +Be sure to check %%DATADIR%%/app/config/core.php for additional framework configuration options. -********************************************************************* diff --git a/www/cakephp13/pkg-plist b/www/cakephp13/pkg-plist index 9db52a3047c0..0db1a81580a8 100644 --- a/www/cakephp13/pkg-plist +++ b/www/cakephp13/pkg-plist @@ -143,9 +143,7 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/index.php %%DATADIR%%/.htaccess -etc/apache2/Includes/cakephp.conf -share/nls/POSIX -share/nls/en_US.US-ASCII +%%CONFDIR%%/cakephp.conf @exec mkdir -p %D/%%DATADIR%%/vendors @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/webroot/files @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/views/pages diff --git a/www/cakephp2/Makefile b/www/cakephp2/Makefile index 860396cbec37..4b2b59fe556f 100644 --- a/www/cakephp2/Makefile +++ b/www/cakephp2/Makefile @@ -7,6 +7,7 @@ PORTNAME= cakephp PORTVERSION= 1.1.13.4450 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://cakeforge.org/frs/download.php/326/ DISTNAME= cake_${PORTVERSION} @@ -24,10 +25,9 @@ SLAVE_PORT_MODULES= rewrite NO_BUILD= yes USE_PHP= pcre session -WANT_PHP_MOD= yes +WANT_PHP_WEB= yes SUB_FILES= pkg-message -SUB_LIST= DATADIR=${DATADIR} WRKSRC= ${WRKDIR}/cake_${DISTVERSION} @@ -36,22 +36,36 @@ OPTIONS= PROD "Install for production server (see: make confighelp)" Off \ PGSQL "Check for/install PostgreSQL support in PHP" Off \ SQLITE "Check for/install SQLite support in PHP" Off -.if !defined(NOPORTDOCS) -INSTALL_TARGET= install install-docs -.endif +PLIST_SUB+= CONFDIR=${CONFDIR_REL} + +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 + DEFAULT_PHP_VER=5 -IGNORE_WITH_PHP=4.0 4.1 4.2 4.3.1 +IGNORE_WITH_PHP=4 + +SUB_LIST+= PHPCGI=${WITH_PHP_CGI} .if defined(WITH_PROD) -SUB_FILES+= cakephp-production.conf +PROD= production .else -SUB_FILES+= cakephp-development.conf +PROD= development EXTRA_PATCHES= ${FILESDIR}/development-app-config-core.php.patch .endif +CONF= cakephp-${PROD}${CGI_EXT}.conf +SUB_FILES+= ${CONF} + DB_DEFINED= no .if defined(WITH_MYSQL) @@ -106,23 +120,31 @@ do-install: ${FIND} ${DATADIR} -type d -print | ${XARGS} -n1 ${CHMOD} 755 post-install: -.if exists(${PREFIX}/etc/apache2/Includes) -.if defined(WITH_PROD) - @${CP} ${WRKDIR}/cakephp-production.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.else - @${CP} ${WRKDIR}/cakephp-development.conf ${PREFIX}/etc/apache2/Includes/cakephp.conf -.endif -.else - @${ECHO_MSG} "" - @${ECHO_MSG} "Please check your Apache 2.x installation -" - @${ECHO_MSG} "${PREFIX}/etc/apache2/Includes doesn't exist," - @${ECHO_MSG} "so I cannot install cakephp.conf there!" - @${ECHO_MSG} "" -.endif + @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 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${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> diff --git a/www/cakephp2/files/cakephp-development-cgi.conf.in b/www/cakephp2/files/cakephp-development-cgi.conf.in new file mode 100644 index 000000000000..b3c5c74af043 --- /dev/null +++ b/www/cakephp2/files/cakephp-development-cgi.conf.in @@ -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 %%DATADIR%% + +<Location /cakephp> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp2/files/cakephp-production-cgi.conf.in b/www/cakephp2/files/cakephp-production-cgi.conf.in new file mode 100644 index 000000000000..8565f6286351 --- /dev/null +++ b/www/cakephp2/files/cakephp-production-cgi.conf.in @@ -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 %%DATADIR%%/app/webroot + +<Location /> + DirectoryIndex index.php + Order deny,allow + Allow from all +</Location> diff --git a/www/cakephp2/files/pkg-message.in b/www/cakephp2/files/pkg-message.in index 8a4d8281a5e0..5175204423df 100644 --- a/www/cakephp2/files/pkg-message.in +++ b/www/cakephp2/files/pkg-message.in @@ -7,6 +7,5 @@ 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. -Finally, be sure to check %%DATADIR%%/app/config/core.php for +Be sure to check %%DATADIR%%/app/config/core.php for additional framework configuration options. -********************************************************************* diff --git a/www/cakephp2/pkg-plist b/www/cakephp2/pkg-plist index 9db52a3047c0..0db1a81580a8 100644 --- a/www/cakephp2/pkg-plist +++ b/www/cakephp2/pkg-plist @@ -143,9 +143,7 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/index.php %%DATADIR%%/.htaccess -etc/apache2/Includes/cakephp.conf -share/nls/POSIX -share/nls/en_US.US-ASCII +%%CONFDIR%%/cakephp.conf @exec mkdir -p %D/%%DATADIR%%/vendors @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/webroot/files @exec mkdir -p %D/%%DATADIR%%/cake/scripts/templates/skel/views/pages |