Portfile

# $Id: Portfile 20266 2006-11-01 01:27:03Z blair@macports.org $

PortSystem 1.0
name binutils
version 2.16.1

description FSF Binutils for native development.
long_description Free Software Foundation development toolchain ("binutils") \
for native development. Tools are prefixed with g to avoid \
conflicts with original tools.
platforms darwin
categories devel
maintainers pguyot@kallisys.net
homepage http://www.gnu.org/software/binutils/binutils.html
master_sites gnu:binutils
use_bzip2 yes
checksums md5 6a9d529efb285071dad10e1f3d2b2967 \
sha1 5c80fd5657da47efc16a63fdd93ef7395319fbbf \
rmd160 638861a6b709ac380f1bc13d55c6b48d0532b3d0

# Build in a different directory, as advised in the README file.
pre-configure { system "cd ${workpath} && mkdir -p build"}
configure.dir ${workpath}/build
configure.cmd ${worksrcpath}/configure
configure.env CC="cc -no-cpp-precomp"
configure.args --infodir='${prefix}/share/info' \
--mandir='${prefix}/share/man' \
--program-prefix=g
build.dir ${workpath}/build

# Fix the configure script to build bfd, binutils and opcode.
patchfiles patch-configure

# We don't want the etc module.
post-extract {
system "rm -rf ${worksrcpath}/etc"
}

files