[72409] trunk/dports/www/ikiwiki/Portfile

Ryan Schmidt ryandesign at macports.org
Wed Oct 13 16:25:53 PDT 2010


On Oct 13, 2010, at 17:51, tommyd at macports.org wrote:

> +pre-extract {
> +    set perl_binary "${prefix}/bin/perl"
> +    if { ![file exists ${perl_binary}] } {
> +        # This shouldn't happen, because perl is a prereq for installing.

FYI, it's easy to make this happen; simply deactivate perl5.8 and then try extracting ikiwiki. Dependencies are not guaranteed to have been installed/activated by pre-extract time. They are guaranteed to have been installed/activated by pre-configure time, however, so you may wish to postpone this check until that time.

> +        ui_error "No Perl version found in ${prefix}/bin."
> +        return -code error "${perl_binary} is missing."
> +    }
> + 
> +    set min_perl_inst [lindex [split [exec ${perl_binary} -e "printf '%vd\n', $^V"] .] 1]
> +    if { ${min_perl_inst} < ${min_perl_req} } {
> +        ui_error "The current Perl version does not meet the version requirements"
> +        ui_error "(wanted Perl >= 5.${min_perl_req}, got Perl 5.${min_perl_inst})."
> +        ui_error "Consider installing Perl 5.${min_perl_req} (or higher), re-install"
> +        ui_error "all dependent p5-* modules and then try to install $name again."
> +        return -code error "Perl version does not match required version."
> +    }
> +}




More information about the macports-dev mailing list