Ignore:
Timestamp:
Sep 15, 2005, 8:19:47 PM (14 years ago)
Author:
jberry
Message:

Validate ant version at pre-build time, rather than globally. This
prevents slowness and any issues when the portfile is evaluated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/java/tomcat5/Portfile

    r13716 r14118  
    1 # $Id: Portfile,v 1.19 2005/08/25 18:08:43 jberry Exp $
     1# $Id: Portfile,v 1.20 2005/09/15 20:19:47 jberry Exp $
    22
    33PortSystem 1.0
     
    5555set tomcatuser          www
    5656set tomcatgroup         www
    57 
    58 #
    59 # Tomcat in this version requires ant 1.6.2.
    60 # If the current version of ant is not at least 1.6.2 then add an
    61 # explicit dependency onto our ant port.
    62 #
    63 if { [string length [auto_execok ant]] } {
    64         set verOutput [exec ant -version]
    65         regexp {version (\d+(\.\d+)*)} $verOutput -> antVersion
    66         if { [rpm-vercomp $antVersion "1.6.2"] < 0 } {
    67                 depends_build-append port:apache-ant
    68         }
    69 }
    7057
    7158use_configure           no
     
    10693
    10794pre-build {
     95        #
     96        # Tomcat in this version requires ant 1.6.2.
     97        # If the current version of ant is not at least 1.6.2 then
     98        # tell the user and fail.
     99        #
     100        if { [string length [auto_execok ant]] } {
     101                set verOutput [exec ant -version]
     102                regexp {version (\d+(\.\d+)*)} $verOutput -> antVersion
     103                if { [rpm-vercomp $antVersion "1.7.2"] < 0 } {
     104                        ui_error "This version of tomcat requires ant version 1.6.2 or"
     105                        ui_error "better. Please install a newer ant before proceeding."
     106                        exit 1
     107                }
     108        }
     109
    108110        # Make a bogus file to prevent nsis.exe from downloading
    109111        system "touch ${worksrcpath}/.bogus"
Note: See TracChangeset for help on using the changeset viewer.