Ignore:
Timestamp:
Sep 12, 2006, 12:55:49 AM (12 years ago)
Author:
markd@…
Message:

Closes ticket 9040. Corrected paths soo .css file is accessible. Removed FreeBSD variant and clarifed variant usage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/cvsweb/Portfile

    r17473 r19501  
    2929build           {}
    3030
    31 set cgi_path ""
    32 set httpd_conf_path ""
    33 set icons_path ""
    34 set css_path ""
    35 
    36 variant darwin {
     31# Default is for Apple's Apache
    3732        global cgi_path httpd_conf_path
    3833        set cgi_path "/Library/WebServer/CGI-Executables/"
    3934        set httpd_conf_path "/private/etc/httpd/"
    40         set icons_path "/Library/WebServer/icons/"
    41         set css_path "/Library/WebServer/css/"
     35        set icons_path "/Library/WebServer/Documents/icons/"
     36        set css_path "/Library/WebServer/Documents/css/"
     37
     38variant macports_apache2 {
     39# Optional MacPorts Apache2 port
     40        global cgi_path httpd_conf_path
     41        set cgi_path "${prefix}/apache2/cgi-bin/"
     42        set httpd_conf_path "${prefix}/apache2/htdocs/"
     43        set icons_path "${prefix}/apache2/icons/"
     44        set css_path "${prefix}/apache2/htdocs/css/"
     45
    4246}
    4347
    44 variant freebsd {
    45         global cgi_path httpd_conf_path
    46         set cgi_path "/usr/local/www/cgi-bin/"
    47         set httpd_conf_path "/usr/local/etc/apache/"
    48         set icons_path "/usr/local/www/icons/"
    49         set css_path "/usr/local/www/css/"
     48destroot {
     49        file mkdir ${destroot}${cgi_path}
     50        file mkdir ${destroot}${httpd_conf_path}
     51        file mkdir ${destroot}${icons_path}
     52        file mkdir ${destroot}${css_path}
     53        xinstall -m 755 ${worksrcpath}/cvsweb.cgi ${destroot}${cgi_path}
     54        xinstall -m 644 ${worksrcpath}/cvsweb.conf ${destroot}${httpd_conf_path}
     55        eval xinstall -m 755 [glob ${worksrcpath}/icons/*] ${destroot}${icons_path}
     56        eval xinstall -m 755 [glob ${worksrcpath}/css/*] ${destroot}${css_path}
     57
     58        reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|g" \
     59                "${destroot}${cgi_path}/cvsweb.cgi"
     60        reinplace "s|/usr/local/etc/cvsweb/cvsweb.conf|${httpd_conf_path}cvsweb.conf|g" \
     61                "${destroot}${cgi_path}/cvsweb.cgi"
     62        reinplace "s|/bin /usr/bin /usr/local/bin|/bin /usr/bin /usr/local/bin ${prefix}/bin ${prefix}/sbin|g" \
     63                "${destroot}${cgi_path}/cvsweb.cgi"
    5064}
    51 
    52 # apache darwinport interop
    53         if {[ file exists ${prefix}/sbin/httpd]} {
    54                 set cgi_path "${prefix}/www/cgi-bin/"
    55                 set httpd_conf_path "${prefix}/etc/apache/"
    56                 set icons_path "${prefix}/www/icons/"
    57                 set icons_path "${prefix}/www/css/"
    58 }
    59 
    60 
    61         destroot {
    62                 file mkdir ${destroot}${cgi_path}
    63                 file mkdir ${destroot}${httpd_conf_path}
    64                 file mkdir ${destroot}${icons_path}
    65                 file mkdir ${destroot}${css_path}
    66                 xinstall -m 755 ${worksrcpath}/cvsweb.cgi ${destroot}${cgi_path}
    67                 xinstall -m 644 ${worksrcpath}/cvsweb.conf ${destroot}${httpd_conf_path}
    68                 eval xinstall -m 755 [glob ${worksrcpath}/icons/*] ${destroot}${icons_path}
    69                 eval xinstall -m 755 [glob ${worksrcpath}/css/*] ${destroot}${css_path}
    70 
    71                 reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|g" \
    72                         "${destroot}${cgi_path}/cvsweb.cgi"
    73                 reinplace "s|/usr/local/etc/cvsweb/cvsweb.conf|${httpd_conf_path}cvsweb.conf|g" \
    74                         "${destroot}${cgi_path}/cvsweb.cgi"
    75                 reinplace "s|/bin /usr/bin /usr/local/bin|/bin /usr/bin /usr/local/bin ${prefix}/bin ${prefix}/sbin|g" \
    76                         "${destroot}${cgi_path}/cvsweb.cgi"
    77 }
Note: See TracChangeset for help on using the changeset viewer.