Skip to content

Instantly share code, notes, and snippets.

@smathy
Created November 15, 2013 17:04
Show Gist options
  • Save smathy/7487853 to your computer and use it in GitHub Desktop.
Save smathy/7487853 to your computer and use it in GitHub Desktop.
--- Portfile.orig 2013-02-06 14:04:05.000000000 -0800
+++ Portfile.new 2013-02-06 14:04:10.000000000 -0800
@@ -89,6 +89,7 @@
--with-mhash=${prefix} \
--with-pcre-regex=${prefix} \
--with-readline=${prefix} \
+ --with-libexpat-dir=${prefix} \
--with-libxml-dir=${prefix} \
--with-zlib=${prefix} \
--without-pear \
@@ -103,7 +104,7 @@
configure.env-append LIBS=-lresolv
}
-variant no_web conflicts apache apache2 fastcgi description {Don't include any web server support} {}
+variant no_web conflicts apache apache2 fpm description {Don't include any web server support} {}
# Build an Apache 1 module. On Mac OS X, it uses Apple's provided Apache 1 server.
# On other platforms, the MacPorts apache port is used. Keep the options here
@@ -139,14 +140,14 @@
--with-apxs2=${prefix}/apache2/bin/apxs
}
-# Build a FastCGI binary. Keep the options here in sync with those in the
+# Build a FPM binary. Keep the options here in sync with those in the
# relevant part of the post-destroot phase.
-variant fastcgi conflicts no_web description {Add FastCGI web server binary} {
+variant fpm conflicts no_web description {Add FPM web server binary} {
if { ![variant_isset apache] && ![variant_isset apache2] } {
configure.args-delete \
--disable-cgi
configure.args-append \
- --enable-cgi
+ --enable-fpm
}
}
@@ -158,7 +159,7 @@
--enable-sysvmsg
}
-if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset fastcgi] && ![variant_isset no_web]} {
+if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset fpm] && ![variant_isset no_web]} {
default_variants +apache2
}
@@ -232,10 +233,10 @@
xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache2/conf/extra
}
- if { [variant_isset fastcgi] } {
- # If we've built an Apache module (any version) then the FastCGI binary
+ if { [variant_isset fpm] } {
+ # If we've built an Apache module (any version) then the FPM binary
# will not have been built, so we need to run through the whole process
- # again and build just the FastCGI binary. Keep the options here in sync
+ # again and build just the FPM binary. Keep the options here in sync
# with the options specified in the apache and apache2 variants.
if { [variant_isset apache] } {
if { ![variant_isset macosx] && (![info exists os.subplatform] || ${os.subplatform} != "macosx") } {
@@ -251,23 +252,23 @@
--with-apxs2=${prefix}/apache2/bin/apxs
}
- # Run the build again to get the FastCGI binary. Keep the options here
- # in sync with those in the fastcgi variant.
+ # Run the build again to get the FPM binary. Keep the options here
+ # in sync with those in the FPM variant.
if { [variant_isset apache] || [variant_isset apache2] } {
configure.args-delete \
--disable-cgi
configure.args-append \
- --enable-cgi
- ui_msg "$UI_PREFIX Configuring ${name} again for fastcgi"
+ --enable-fpm
+ ui_msg "$UI_PREFIX Configuring ${name} again for FPM"
command_exec configure
- ui_msg "$UI_PREFIX Building ${name} again for fastcgi"
+ ui_msg "$UI_PREFIX Building ${name} again for FPM"
command_exec build
- ui_msg "$UI_PREFIX Staging ${name} fastcgi into destroot"
+ ui_msg "$UI_PREFIX Staging ${name} FPM into destroot"
}
- # Copy the FastCGI binary to the bin dir under a new name so it doesn't
+ # Copy the FPM binary to the bin dir under a new name so it doesn't
# conflict with the cli version.
- xinstall -m 755 ${worksrcpath}/sapi/cgi/php-cgi ${destroot}${prefix}/bin
+ xinstall -m 755 ${worksrcpath}/sapi/fpm/php-fpm ${destroot}${prefix}/bin
}
#file rename ${destroot}${prefix}/etc/pear.conf ${destroot}${prefix}/etc/pear.conf.sample
@@ -312,7 +313,7 @@
if {![variant_isset no_web]} {
ui_msg ""
ui_msg "If this is your first install, you need to activate PHP in your web server."
- if {![variant_isset fastcgi]} {
+ if {![variant_isset fpm]} {
if {[variant_isset apache]} {
set moduledir ${prefix}/libexec/modules
set apxs ${prefix}/apache/bin/apxs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment