| 1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
|---|
| 2 | # $Id: Portfile 84585 2011-09-28 15:49:47Z snc@macports.org $ |
|---|
| 3 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | |
|---|
| 6 | name php56-web |
|---|
| 7 | version 5.6.0 |
|---|
| 8 | categories lang php www |
|---|
| 9 | platforms darwin |
|---|
| 10 | maintainers ryandesign |
|---|
| 11 | license BSD |
|---|
| 12 | supported_archs noarch |
|---|
| 13 | |
|---|
| 14 | homepage http://www.php.net/ |
|---|
| 15 | |
|---|
| 16 | description Meta-port for PHP web server support |
|---|
| 17 | |
|---|
| 18 | long_description If you have a port for a web app that uses PHP, and \ |
|---|
| 19 | you don't care (as you usually wouldn't) whether \ |
|---|
| 20 | PHP is compiled as an Apache module or as a FastCGI \ |
|---|
| 21 | binary, depend on ${name} so the user can choose. |
|---|
| 22 | |
|---|
| 23 | depends_lib path:bin/php:php56 |
|---|
| 24 | |
|---|
| 25 | distfiles |
|---|
| 26 | |
|---|
| 27 | use_configure no |
|---|
| 28 | |
|---|
| 29 | build { |
|---|
| 30 | set found 0 |
|---|
| 31 | foreach {desc file} " |
|---|
| 32 | {FastCGI binary} ${prefix}/bin/php-cgi |
|---|
| 33 | {Apache 2 module} ${prefix}/apache2/modules/mod_php56.so |
|---|
| 34 | {Apache 1 module} ${prefix}/libexec/apache/mod_php56.so |
|---|
| 35 | " { |
|---|
| 36 | if {[file exists ${file}]} { |
|---|
| 37 | ui_debug "OK: found ${desc} (${file})" |
|---|
| 38 | incr found |
|---|
| 39 | } |
|---|
| 40 | } |
|---|
| 41 | if {!${found}} { |
|---|
| 42 | ui_error "php5 is installed without web server support. Please reinstall it with one of the web server SAPI variants." |
|---|
| 43 | return -code error "incompatible php5 installation" |
|---|
| 44 | } |
|---|
| 45 | } |
|---|
| 46 | |
|---|
| 47 | destroot { |
|---|
| 48 | xinstall -d ${destroot}${prefix}/share/doc/${name} |
|---|
| 49 | system "echo \"${long_description}\" > ${destroot}${prefix}/share/doc/${name}/README.txt" |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | livecheck.type none |
|---|