[98735] trunk/dports/_resources/port1.0/group/crossbinutils-1.0.tcl

landonf at macports.org landonf at macports.org
Sat Oct 13 19:37:17 PDT 2012


Revision: 98735
          http://trac.macports.org//changeset/98735
Author:   landonf at macports.org
Date:     2012-10-13 19:37:17 -0700 (Sat, 13 Oct 2012)
Log Message:
-----------
Install libiberty and libbfd in a target-specific directory, rather than disabling their installation outright. This allows for their use by other ports (such as simulavr, which requires the avr-binutils libiberty and libbfd).
I've verified that this works with all ports that use the crossbinutils port group.

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/crossbinutils-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/crossbinutils-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/crossbinutils-1.0.tcl	2012-10-14 01:28:53 UTC (rev 98734)
+++ trunk/dports/_resources/port1.0/group/crossbinutils-1.0.tcl	2012-10-14 02:37:17 UTC (rev 98735)
@@ -102,8 +102,18 @@
                 ${worksrcpath}/${dir}/configure
         }
 
-        # Do not install libiberty
-        reinplace {/^install:/s/ .*//} ${worksrcpath}/libiberty/Makefile.in
+	# Install target-compatible libbfd/libiberty in the target's directory
+	reinplace "s|bfdlibdir=.*|bfdlibdir='${prefix}/${crossbinutils.target}/host/lib'|g" \
+		${worksrcpath}/bfd/configure                                \
+		${worksrcpath}/opcodes/configure
+	reinplace "s|bfdincludedir=.*|bfdincludedir='${prefix}/${crossbinutils.target}/host/include'|g"  \
+		${worksrcpath}/bfd/configure                                             \
+		${worksrcpath}/opcodes/configure
+
+	reinplace "s|\$(libdir)|\"${prefix}/${crossbinutils.target}/host/lib\"|g" \
+		${worksrcpath}/libiberty/Makefile.in
+	reinplace "s|\$(MULTIOSDIR)||g" \
+		${worksrcpath}/libiberty/Makefile.in
     }
 
     depends_lib \
@@ -117,7 +127,9 @@
 
     configure.args \
         --target=${target} \
-        --program-prefix=${target}-
+        --program-prefix=${target}- \
+        --enable-install-libiberty \
+        --enable-install-libbfd
 
     build.dir ${workpath}/build
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121013/5644f0f8/attachment.html>


More information about the macports-changes mailing list