+fpm variant in php5 Portfile

Michael J. I. Jackson mjijackson at gmail.com
Thu Nov 19 08:33:15 PST 2009


I'm trying to modify the php5 Portfile (first attempt ever, so please
be patient!) to include support for the PHP-FPM
(https://launchpad.net/php-fpm/) patch. So far, this is what I've
added:


variant fpm description {Add FPM patch} {
    depends_lib-append \
        port:libevent
    configure.args-append \
        --with-fpm \
        --with-libevent=${prefix}
    set fpm_patch_version       0.6
    set fpm_patch               php-fpm-${fpm_patch_version}~5.3.patch
    patch_sites-append
http://launchpad.net/php-fpm/master/${fpm_patch_version}/+download/
    patchfiles-append           ${fpm_patch}
    checksums-append \
        ${fpm_patch} \
            md5     361c934eec184a398db6c974994a8870
}


However, when I try and use the +fpm variant, the compile fails
complaining that libevent can't be found. Here's the output I get:


$ sudo port install php5 +fpm
--->  Computing dependencies for php5
--->  Fetching php5
--->  Verifying checksum(s) for php5
--->  Extracting php5
--->  Applying patches to php5
--->  Configuring php5
Error: Target org.macports.configure returned: configure failure:
shell command " cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_php5/work/php-5.3.0"
&& ./configure --prefix=/opt/local --mandir=/opt/local/share/man
--infodir=/opt/local/share/info
--with-config-file-path=/opt/local/etc/php5
--with-config-file-scan-dir=/opt/local/var/db/php5 --disable-all
--enable-bcmath --enable-ctype --enable-dom --enable-fileinfo
--enable-filter --enable-hash --enable-json --enable-libxml
--enable-pdo --enable-phar --enable-session --enable-simplexml
--enable-tokenizer --enable-xml --enable-xmlreader --enable-xmlwriter
--with-bz2=/opt/local --with-mhash=/opt/local
--with-pcre-regex=/opt/local --with-readline=/opt/local
--with-libxml-dir=/opt/local --with-zlib=/opt/local --without-pear
--disable-cgi --with-ldap=/usr --with-fpm --with-libevent=/opt/local "
returned error 1
Command output: checking whether to force non-PIC code in shared modules... no
checking whether /dev/urandom exists... yes
checking for pthreads_cflags...
checking for pthreads_lib...

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support... no
checking whether to enable Apache charset compatibility option... no
checking for Caudium support... no
checking for CLI build... yes
checking for Continuity support... no
checking for embedded SAPI library support... no

Configuring fpm
checking dynamic linker characteristics... darwin10.2.0 dyld
checking for libevent >= 1.4.11... no
configure: warning: libevent.a could not be found. We looked in:
configure: warning: " /lib/i686-apple-darwin10/4.2.1/x86_64/
/lib/x86_64/ /usr/lib/i686-apple-darwin10/4.2.1/x86_64/
/usr/lib/x86_64/ /usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/i686-apple-darwin10/4.2.1/x86_64/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/x86_64/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1/x86_64/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../x86_64/
/lib/i686-apple-darwin10/4.2.1/ /lib/
/usr/lib/i686-apple-darwin10/4.2.1/ /usr/lib/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/i686-apple-darwin10/4.2.1/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1/
/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../  /lib /usr/lib
/usr/local/lib"
configure: warning: Install libevent system-wide (make install)
configure: warning: Syntax:
configure: warning: --with-libevent=yes|path - link to libevent.a
(static library)
configure: warning: --with-libevent=shared,path - link to libevent.so
(shared library)
configure: error: libevent.a could not be found. Stop.

Error: Status 1 encountered during processing.


However, libevent is indeed installed and libevent.a is found at
/opt/local/lib/libevent.a. Obviously /opt/local wasn't checked for
libevent, despite the fact that I included the --with-libevent
configure flag as instructed on the FPM instructions here:

http://github.com/dreamcat4/php-fpm/blob/master/readme.markdown

I'm a bit stuck. Any help is greatly appreciated!

Thanks,

Michael


More information about the macports-users mailing list