Ticket #11147: Portfile-php5.diff

File Portfile-php5.diff, 1.3 KB (added by markd@…, 18 years ago)

Portfile diff adding rrdtool variant

  • Portfile

    old new  
    2929# Fix PHP bug 39354; should be able to remove this when we upgrade to PHP 5.2.1
    3030patchfiles      patch-interface.c.diff
    3131worksrcdir      php-${version}
    32 checksums       md5 e6029fafcee029edcfa2ceed7a005333 \
     32checksums       php-${version}${extract.suffix} md5 e6029fafcee029edcfa2ceed7a005333 \
    3333                sha1 6306829b1b252156ca3a936ec809aba89a71d9e1
    3434use_bzip2       yes
    3535
     
    211211        }
    212212}
    213213
     214variant rrdtool {
     215# Add rrdtool bindings to PHP
     216        depends_lib-append port:rrdtool
     217        master_sites-append     http://www.opendarwin.org/~markd/:rrdtool
     218        distfiles-append php_rrdtool.tar.bz2:rrdtool 
     219        checksums-append php_rrdtool.tar.bz2 md5 d718887b43831d5c4cae15d9a114bf1a
     220        configure.env-append CFLAGS=-DHAVE_RRD_12X
     221        configure.args-append --with-rrdtool=${prefix}
     222
     223pre-configure {
     224# Extract the php_rrdtool tarball into the php source/ext directory
     225        system "cd ${worksrcpath}/ext && ${extract.cmd} -dc ${distpath}/php_rrdtool.tar.bz2 | /usr/bin/gnutar --no-same-owner -xf -"
     226
     227        file delete ${worksrcpath}/configure
     228        system "cd ${worksrcpath} && ./buildconf --force"
     229         }
     230}
     231
    214232destroot.args   INSTALL_ROOT=${destroot}
    215233
    216234destroot.target install-cli install-build install-headers install-programs