# $Id: Portfile,v 1.4 2005/08/26 19:57:03 toby Exp $

PortSystem 1.0
name             boost-jam
version          3.1.11
categories       devel
maintainers      toby@opendarwin.org
description      Boost.Jam (BJam) is a build tool based on FTJam
long_description \
	Boost.Jam (BJam) is a build tool based on FTJam, \
	which in turn is based on Perforce Jam. It contains \
	significant improvements made to facilitate its use \
	in the Boost Build System, but should be backward \
	compatible with Perforce Jam.
homepage         http://www.boost.org
master_sites     sourceforge:boost
extract.suffix   .tgz
checksums        sha1 49b106c8bed99ecc9a48436c65fc626edf1d25cd
platforms        darwin

patchfiles       patch-execunix.c
post-patch {
	reinplace "s|/usr/share/boost-build|${prefix}/share/boost-build|" \
		${worksrcpath}/jambase.c
}

configure        {}

build.env        LOCATE_TARGET=bin
build.cmd        ./build.sh
build.target

destroot {
	xinstall -d -m 0755 ${destroot}${prefix}/bin
	xinstall -m 0755 ${worksrcpath}/bin/bjam ${destroot}${prefix}/bin

	xinstall -d -m 0755 ${destroot}${prefix}/lib/bjam/bin/
	xinstall -m 0755 ${worksrcpath}/bin/bjam ${destroot}${prefix}/lib/bjam/bin/jam
}
