Revision: 75349 http://trac.macports.org/changeset/75349 Author: landonf@macports.org Date: 2011-01-22 17:56:35 -0800 (Sat, 22 Jan 2011) Log Message: ----------- Install the target-specific libbfd and libiberty in ${prefix}/avr/host. Modified Paths: -------------- trunk/dports/cross/avr-binutils/Portfile Modified: trunk/dports/cross/avr-binutils/Portfile =================================================================== --- trunk/dports/cross/avr-binutils/Portfile 2011-01-23 01:44:27 UTC (rev 75348) +++ trunk/dports/cross/avr-binutils/Portfile 2011-01-23 01:56:35 UTC (rev 75349) @@ -3,6 +3,7 @@ PortSystem 1.0 name avr-binutils version 2.20 +revision 1 # Parameters for this port. set crossgcc-target avr @@ -43,11 +44,13 @@ configure.args --disable-werror \ --infodir='${prefix}/share/info' \ --disable-nls \ - --disable-install-libiberty \ --target=${crossgcc-target} \ --program-prefix=${crossgcc-target}- \ - --mandir='${prefix}/share/man' + --mandir='${prefix}/share/man' \ + --enable-install-libiberty \ + --enable-install-libbfd + if {$build_arch != "" && ${os.platform} == "darwin"} { configure.args-append --build=${build_arch}-apple-darwin${os.major} \ --host=${build_arch}-apple-darwin${os.major} @@ -63,6 +66,19 @@ post-patch { namespace eval crossgcc {} + # Install avr-compatible libbfd/libiberty in the avr directory + reinplace "s|bfdlibdir=.*|bfdlibdir='${prefix}/avr/host/lib'|g" \ + ${worksrcpath}/bfd/configure \ + ${worksrcpath}/opcodes/configure + reinplace "s|bfdincludedir=.*|bfdincludedir='${prefix}/avr/host/include'|g" \ + ${worksrcpath}/bfd/configure \ + ${worksrcpath}/opcodes/configure + + reinplace "s|libdir = .*|libdir = \"${prefix}/avr/host/lib\"|g" \ + ${worksrcpath}/libiberty/Makefile.in + reinplace "s|MULTIOSDIR = .*|MULTIOSDIR = |g" \ + ${worksrcpath}/libiberty/Makefile.in + # Fix the info pages and related stuff. # # path: path to the doc directory (e.g. gas/doc/) @@ -141,9 +157,5 @@ } post-destroot { - # Installing (host) libiberty was a mistake. - foreach f [glob -directory "${destroot}${prefix}/lib" libiberty.a */libiberty.a] { - file delete $f - } + file rename "${destroot}/${prefix}/lib/libiberty.a" "${destroot}/${prefix}/avr/host/lib/" } -