Ticket #4259: Portfile.2.diff

File Portfile.2.diff, 3.3 KB (added by dports@…, 19 years ago)

Updated cvsweb Portfile diff

  • Portfile

    old new  
    22
    33PortSystem 1.0
    44name            cvsweb
    5 version         2.0.6
     5version         3.0.5
    66revision        0
    77categories      devel www
    88maintainers     darwinports@opendarwin.org
     
    1616platforms       darwin
    1717master_sites     freebsd:scop \
    1818                 http://people.FreeBSD.org/~scop/cvsweb/
    19 checksums       md5 fd15c8521b26be858616a7ba52fc2c22
     19checksums       md5 572dbb2d66ad6487c0a3536f93023086
     20
     21depends_build   port:perl5.8 \
     22                port:p5-ipc-run \
     23                port:p5-file-temp \
     24                port:p5-uri \
     25                port:p5-mime-types \
     26                port:p5-string-ediff \
     27                port:cvsgraph
     28
    2029configure       {}
    2130build           {}
    2231
    2332set cgi_path ""
    2433set httpd_conf_path ""
     34set icons_path ""
     35set css_path ""
     36
    2537variant darwin {
    2638        global cgi_path httpd_conf_path
    2739        set cgi_path "/Library/WebServer/CGI-Executables/"
    2840        set httpd_conf_path "/private/etc/httpd/"
    29 
    30         # apache darwinport interop
    31         if {[ file exists ${prefix}/sbin/httpd]} {
    32                 set cgi_path "${prefix}/www/cgi-bin/"
    33                 set httpd_conf_path "${prefix}/etc/apache/"
    34         }
    35        
    36         destroot {
    37                 file mkdir ${destroot}${cgi_path}
    38                 file mkdir ${destroot}${httpd_conf_path}
    39                 system "install -m 755 ${worksrcpath}/cvsweb.cgi ${destroot}${cgi_path}"
    40                 system "install -m 644 ${worksrcpath}/cvsweb.conf ${destroot}${httpd_conf_path}"
    41         }
     41        set icons_path "/Library/WebServer/icons/"
     42        set css_path "/Library/WebServer/css/"
    4243}
     44
    4345variant freebsd {
    44         global cgi_path httpd_conf_path
    45         set cgi_path "/usr/local/www/cgi-bin/"
    46         set httpd_conf_path "/usr/local/etc/apache/"
     46        global cgi_path httpd_conf_path
     47        set cgi_path "/usr/local/www/cgi-bin/"
     48        set httpd_conf_path "/usr/local/etc/apache/"
     49        set icons_path "/usr/local/www/icons/"
     50        set css_path "/usr/local/www/css/"
     51}
     52
     53# apache darwinport interop
     54        if {[ file exists ${prefix}/sbin/httpd]} {
     55                set cgi_path "${prefix}/www/cgi-bin/"
     56                set httpd_conf_path "${prefix}/etc/apache/"
     57                set icons_path "${prefix}/www/icons/"
     58                set icons_path "${prefix}/www/css/"
     59}
    4760
    48         # apache darwinport interop
    49         if {[ file exists ${prefix}/sbin/httpd]} {
    50                 set cgi_path "${prefix}/www/cgi-bin/"
    51                 set httpd_conf_path "${prefix}/etc/apache/"
    52         }
    5361
    5462        destroot {
    5563                file mkdir ${destroot}${cgi_path}
    5664                file mkdir ${destroot}${httpd_conf_path}
    57                 system "install -m 755 ${worksrcpath}/cvsweb.cgi ${destroot}${cgi_path}"
    58                 system "install -m 644 ${worksrcpath}/cvsweb.conf ${destroot}${httpd_conf_path}"
    59         }
     65                file mkdir ${destroot}${icons_path}
     66                file mkdir ${destroot}${css_path}
     67                xinstall -m 755 ${worksrcpath}/cvsweb.cgi ${destroot}${cgi_path}
     68                xinstall -m 644 ${worksrcpath}/cvsweb.conf ${destroot}${httpd_conf_path}
     69                eval xinstall -m 755 [glob ${worksrcpath}/icons/*] ${destroot}${icons_path}
     70                eval xinstall -m 755 [glob ${worksrcpath}/css/*] ${destroot}${css_path}
     71
     72                reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|g" \
     73                        "${destroot}${cgi_path}/cvsweb.cgi"
     74                reinplace "s|/usr/local/etc/cvsweb/cvsweb.conf|${httpd_conf_path}cvsweb.conf|g" \
     75                        "${destroot}${cgi_path}/cvsweb.cgi"
     76                reinplace "s|/bin /usr/bin /usr/local/bin|/bin /usr/bin /usr/local/bin ${prefix}/bin ${prefix}/sbin|g" \
     77                        "${destroot}${cgi_path}/cvsweb.cgi"
    6078}