# $Id: Portfile 67114 2010-04-29 09:52:21Z ryandesign@macports.org $

PortSystem			1.0
PortGroup			muniversal 1.0

name				binutils
version				2.20.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			nomaintainer
homepage			http://www.gnu.org/software/binutils/binutils.html
master_sites		gnu:binutils
use_bzip2			yes

checksums			md5     9cdfb9d6ec0578c166d3beae5e15c4e5 \
					sha1    fd2ba806e6f3a55cee453cb25c86991b26a75dee \
					rmd160  2ab2de504a85840d1ec227eff50b5f4d2cad581e

depends_lib-append	port:zlib port:libiconv port:gettext

configure.args  	--infodir='${prefix}/share/info' \
					--mandir='${prefix}/share/man' \
					--disable-werror \
					--program-prefix=g \
					--enable-shared

# The Makefile runs configure again in subdirectories.
# It correcty passes along most configure variables (CFLAGS, LDFLAGS, ...),
#    but seems to neglect CPPFLAGS.
build.env-append	CPPFLAGS='-I${prefix}/include'

# Binutils violates the mtree layout by creating ${prefix}/<arch>/
destroot.violate_mtree	yes

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

notes				Having ${name} installed will cause some other ports to \
					fail to build. Consider uninstalling ${name}.
