# $Id: Portfile 44473 2008-12-29 06:24:30Z jmr@macports.org $

PortSystem      1.0

name            libtool1
set my_name     libtool
version         1.5.26
revision        1
categories      devel sysutils
maintainers     nomaintainer
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:libtool

dist_subdir     ${my_name}
distname        ${my_name}-${version}
checksums       md5 aa9c5107f3ec9ef4200eb6556f3b3c29 \
                sha1 4c1738351736562a951a345e24f233d00953ec0a \
                rmd160 4d1d7dd0308b98e8f590723ae5daddb8da49ac11

depends_build   port:automake

configure.args  --program-prefix=g \
                --program-suffix=1 \
                --includedir=${prefix}/include/${name} \
                --libdir=${prefix}/lib/${name}

patchfiles       patch-libtool.m4.diff \
                 patch-configure.diff \
                 patch-configure.ac.diff \
                 patch-Makefile.am.diff \
                 patch-Makefile.in.diff \
                 patch-libtoolize.in.diff \
                 patch-bootstrap.diff

post-patch {
	move ${worksrcpath}/libtool.m4 ${worksrcpath}/libtool1.m4
	move ${worksrcpath}/ltdl.m4 ${worksrcpath}/ltdl1.m4
}

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}
    move ${destroot}${prefix}/share/info/libtool.info \
         ${destroot}${prefix}/share/info/libtool1.info
}

test.run        yes
test.target     check

livecheck.check regex
livecheck.url   http://ftp.gnu.org/gnu/${my_name}/?C=M&O=D
livecheck.regex ${my_name}-(1(?:\\.\\d+)+)
