# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 66550 2010-04-16 16:06:25Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python26 1.0

name                scons
version             1.3.0
revision            0
categories          devel python
maintainers         landonf openmaintainer

description         Software construction tool
long_description \
    SCons is an Open Source software construction tool--that is, a \
    next-generation build tool. Think of SCons as an improved, \
    cross-platform substitute for the classic Make utility with integrated \
    functionality similar to autoconf/automake and compiler caches such as \
    ccache.

platforms           darwin

if {[info exists supported_archs]} {
    supported_archs noarch
}

homepage            http://www.scons.org/
master_sites        sourceforge

checksums           md5     ad6838c867abd2ad5bf371b353d594f7 \
                    sha1    7694fa60d2a2598c92ef141d04760db29a2a3094 \
                    rmd160  ebcfd666098d1229ad987264d0e4109d183b37bd

patchfiles          patch-setup.py patch-scons patch-sconsign patch-scons-time
post-patch {
    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/script/scons \
        ${worksrcpath}/script/sconsign ${worksrcpath}/script/scons-time
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/man/man1 \
        ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} CHANGES.txt LICENSE.txt README.txt \
        RELEASE.txt ${destroot}${prefix}/share/doc/${name}
    foreach binfile [glob -tails -directory ${destroot}${python.prefix}/bin *] {
        ln -s ${python.prefix}/bin/${binfile} \
            ${destroot}${prefix}/bin/${binfile}
    }
    foreach manfile [glob -tails -directory ${destroot}${python.prefix}/share/man/man1 *] {
        ln -s ${python.prefix}/share/man/man1/${manfile} \
            ${destroot}${prefix}/share/man/man1/${manfile}
    }
}

livecheck.type  regex
livecheck.regex {Stable \((\d+(?:\.\d+)*)\)}
