# $Id: Portfile,v 1.2 2006/07/19 13:03:22 dluke Exp $
PortSystem		1.0

name			p5-pathtools
version			3.19
revision		1
categories		perl
maintainers		dluke@geeklair.net
description		PathTools contains path building and modification classes.
long_description	${description}

checksums		md5 03d17567cae023e8a13bf90eeb2c839c
platforms		darwin
master_sites		http://cpan.perl.org/authors/id/K/KW/KWILLIAMS/
homepage		http://search.cpan.org/dist/pathtools/
distname		PathTools-${version}
dist_subdir		perl5
depends_lib		path:${prefix}/bin/perl:perl5.8

#- Perl searches vendor location last, so this won't
#- override the older version included with perl
#- if we install it in the vendor location
configure.cmd		${prefix}/bin/perl
configure.pre_args	Makefile.PL
test.run		yes
destroot.target		pure_install

post-destroot {
		set perl5.version [lindex [split [exec ${prefix}/bin/perl -V:version] {'}] 1]
                foreach packlist [exec find ${destroot}${prefix}/lib/perl5/${perl5.version} -name .packlist] {
                        ui_info "Fixing packlist ${packlist}"
                        reinplace "s|${destroot}||" ${packlist}
                }
		ui_msg "You must install or activate this package with '-f' (force) as it needs to overwrite files installed by the perl5.8 port"
        }
