Changeset 94077


Ignore:
Timestamp:
Jun 8, 2012, 6:57:32 PM (7 years ago)
Author:
ryandesign@…
Message:

hadoop: check OS version before fetching distfile; simplify how OS version is checked (using ${os.major})

File:
1 edited

Legend:

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

    r94067 r94077  
    2525                    sha256  a33d07ece0e9b7e1ecf32670cac28444ba8f56b3360548d96b56964facc2d1ef
    2626
     27pre-fetch {
     28    # This port works on Mac OS X 10.6 or later, because 'sudo option -E'
     29    # is not available on Mac OS X 10.5 or earlier. See #34665.
     30    if {${os.platform} == "darwin" && ${os.major} <= 9} {
     31        ui_error "This port works on Mac OS X 10.6 (Snow Leopard) or later"
     32        return -code error "Mac OS X 10.6 (Snow Leopard) or later is required"
     33    }
     34}
     35
    2736patchfiles          patch-hadoop-env.sh.diff
    2837
     
    3948        ui_error "Java 1.6 is required, but not located at ${java_home}"
    4049        return -code error "Java 1.6 missing"
    41     }
    42 
    43     # This port works on Mac OS X 10.6 or later, because 'sudo option -E'
    44     # is not available on Mac OS X 10.5 or earlier. See #34665.
    45     set os_major_version  [lindex [split ${os.version} .] 0]
    46     if {${os_major_version} <= 9} {
    47         ui_error "This port works on Mac OS X 10.6 (Snow Leopard) or later"
    48         return -code error "Mac OS X 10.6 (Snow Leopard) or later is required"
    4950    }
    5051}
Note: See TracChangeset for help on using the changeset viewer.