# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 114339 2013-12-05 13:11:22Z cal@macports.org $

PortSystem          1.0

name                binutils
version             2.24

checksums           rmd160  b4aa3ea5ba9d0d9f817b2cf136e7f911f692af8d \
                    sha256  e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137

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
license             GPL-3+
maintainers         nomaintainer
homepage            http://www.gnu.org/software/binutils/binutils.html
master_sites        gnu:binutils
use_bzip2           yes

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"
}

universal_variant   no

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