Ticket #20681: Portfile.diff

File Portfile.diff, 2.7 KB (added by Markus.Ueberall@…, 15 years ago)

Portfile diff (against revision #55557)

  • lang/php5/Portfile

    old new  
    1313maintainers             ryandesign jwa
    1414homepage                http://www.php.net/
    15 master_sites            php
     15##Currently, the group definition introduced w/ changeset #55557 fails,
     16## because only 'www.php.net/' will work while '<lang-code>.php.net/' will
     17## retrieve an error message in html format
     18#master_sites            php
     19master_sites            http://www.php.net/distributions/
    1620distname                php-${version}
    1721use_bzip2               yes
    1822platforms               darwin freebsd
    1923use_parallel_build      yes
     24set suhosin_patch_ver   ${version}-0.9.8-BETA-1
    2025
    2126description \
     
    2833
    2934checksums \
    30     md5     846760cd655c98dfd86d6d97c3d964b0 \
    31     sha1    934700941d216c453376e3bf24347041cf12c6dc \
    32     rmd160  9a71b74052b0ca515f2ddf95c051b47a73d33f44
     35    ${distname}.tar.bz2 md5     846760cd655c98dfd86d6d97c3d964b0 \
     36    ${distname}.tar.bz2 sha1    934700941d216c453376e3bf24347041cf12c6dc \
     37    ${distname}.tar.bz2 rmd160  9a71b74052b0ca515f2ddf95c051b47a73d33f44
    3338
    3439depends_build \
     
    435440}
    436441
     442variant suhosin description {Add suhosin patch} {
     443##The following doesn't work, because I'm unable to come up with a definition which ensures that
     444##patch is called with '-p1' for the suhosin patch only and with (the default) '-p0' for all other patches
     445#    patch.args-append \
     446#        -p1
     447#    patch_sites-append \
     448#        http://download.suhosin.org/
     449#    checksums-append \
     450#        suhosin-patch-${suhosin_patch_ver}.patch.gz    sha1 8bad461c7b16febc1d2f6bcbf4c8e10428569591 \
     451#        suhosin-patch-${suhosin_patch_ver}.patch.gz    md5  62dc36545b86bf86e44ada1fccc17d0a
     452#    patchfiles-append \
     453#        suhosin-patch-${suhosin_patch_ver}.patch.gz
     454
     455##This leaves us with only two alternatives: either treat the patchfile as 'normal' file to be retrieved and
     456##invoke patch 'manually' as follows, or maintain a modified local copy of the suhosin patch in our repository
     457##(the chosen solution still has the disadvantage that suhosin.org is polled for the main php5 tarball)
     458    master_sites-append \
     459        http://download.suhosin.org/
     460    checksums-append \
     461        suhosin-patch-${suhosin_patch_ver}.patch.gz     sha1 8bad461c7b16febc1d2f6bcbf4c8e10428569591 \
     462        suhosin-patch-${suhosin_patch_ver}.patch.gz     md5  62dc36545b86bf86e44ada1fccc17d0a
     463    distfiles-append \
     464         suhosin-patch-${suhosin_patch_ver}.patch.gz
     465##'post-fetch' would be too early here:
     466    pre-configure {
     467        exec gzcat "${distpath}/suhosin-patch-${suhosin_patch_ver}.patch.gz" | patch -d "${worksrcpath}" -p1
     468    }
     469}
     470
    437471test.run                yes
    438472