# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       xcode 1.0

name            AquaLess
revision        2
version         1.6
license         GPL-2+
categories      aqua sysutils
maintainers     nomaintainer
description     Cocoa pager similar to less

long_description \
    AquaLess is a text pager for Mac OS X. It allows you to browse plain \
    text files and -- more importantly -- text output from Unix command \
    line tools. AquaLess is a Cocoa replacement for the less command, which \
    is constrained to the terminal window. AquaLess opens a separate window \
    for each text, so you can keep working in the terminal while you read.

homepage        http://aqualess.sourceforge.net/
master_sites    sourceforge:project/aqualess/AquaLess/${version}
distname        ${name}-${version}-src

supported_archs i386 ppc

xcode.target            ${name}

checksums       md5     0d20fbda422538480abd18f4b298b7e0 \
                sha1    29fd0a76e38f01d55fb46f00bb9b81af8b8f60a8 \
                rmd160  8b4e727b415b0024c8ebbfcc469557fd458c8ef5

post-destroot {
    if {[vercmp $xcodeversion 4.2] >= 0} {
        move ${destroot}${applications_dir}/aless ${destroot}${prefix}/bin
    } else {
        copy ${worksrcpath}/build/UninstalledProducts/aless ${destroot}${prefix}/bin
        copy ${worksrcpath}/build/UninstalledProducts/AquaLess.app ${destroot}${applications_dir}
    }
}

post-patch {
    reinplace -E /@/s|/usr/bin/aless|${prefix}/bin/aless| \
        ${worksrcpath}/ToolInstaller.m
}

livecheck.distname  ${name}
