# $Id: Portfile 68536 2010-06-05 18:20:28Z ram@macports.org $

PortSystem      1.0

name            libtool
version         2.2.8
categories      devel sysutils
maintainers     boeyms openmaintainer
description     GNU Libtool - The GNU Portable Library Tool

long_description \
    GNU libtool is a generic library support script. Libtool hides the  \
    complexity of using shared libraries behind a consistent, portable  \
    interface.

homepage        http://www.gnu.org/software/libtool/
platforms       darwin freebsd
master_sites    gnu

checksums       md5     cad2a7188242bc8dbab0645532ae3d6f \
                sha1    e0fd6f9d39c81c2da8b548411c74a46c24442abf \
                rmd160  8f1297b6e3149ba5f6fa73f6949ff9ae8598ab3d

depends_build   port:automake

if {${os.platform} != "darwin"} {
    depends_lib port:grep \
                port:gsed
}

#worksrcdir      [strsed $distname {s/[a-z]*$//}]

configure.args  --program-prefix=g

use_parallel_build  yes

post-destroot {
    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README THANKS \
        TODO ${destroot}${docdir}
}

test.run        yes
test.target     check

platform darwin {
    configure.env-append GREP=/usr/bin/grep \
                         SED=/usr/bin/sed
}

livecheck.type  regex
livecheck.url   http://ftp.gnu.org/gnu/${name}/?C=M&O=D
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*\[a-z\]?)
