# $Id: Portfile 30190 2007-10-22 20:34:02Z jmpp@macports.org $ PortSystem 1.0 name arm-apple-darwin-binutils version r118 revision 2 categories cross iphone maintainers landonf@macports.org openmaintainer description Binutils for arm-apple-darwin (iPhone) cross development long_description ${description} homepage http://developer.berlios.de/projects/iphone-binutils/ platforms darwin master_sites http://landonf.bikemonkey.org/static/iphone/ distname iphone-binutils-${version} checksums md5 111b11f80fe535b3beb3d40633962f3b depends_build port:Libstreams patchfiles patch-Makefile.in \ patch-libtool-driver set iphone_prefix ${prefix}/arm-apple-darwin configure.args --prefix=${iphone_prefix} --with-heavenly=${iphone_prefix}/heavenly build.args DESTDIR=${destroot} USE_DEPENDENCY_FILE=NO # Work-around the experimental destroot validation destroot.violate_mtree yes post-patch { # remove the Makedep file which is preventing compilation on Leopard # it's useless anyway as this is a one-shot build delete ${worksrcpath}/cctools/cbtlibs/Makedep } pre-configure { if {![file exists ${iphone_prefix}/heavenly/usr/lib/dyld]} { return -code error "Heavenly (the iPhone installation disk image) must be manually copied to ${iphone_prefix}/heavenly before building this port: sudo mkdir -p ${iphone_prefix}/heavenly && sudo cp -Rn ${iphone_prefix}" } } pre-build { file mkdir ${destroot}/${iphone_prefix}/bin file copy ${prefix}/include/streams ${worksrcpath}/cctools/include/streams } destroot { # Install missing binaries xinstall -m 755 ${worksrcpath}/cctools/ar/ar.NEW ${destroot}/${iphone_prefix}/bin/arm-apple-darwin-ar system "cd ${destroot}/${iphone_prefix}/bin && ln -s arm-apple-darwin-libtool arm-apple-darwin-ranlib" # Make the binaries externally visible. system "cd ${destroot}/${prefix}/bin && ln -s ${iphone_prefix}/bin/arm-apple-darwin-ld ./" system "cd ${destroot}/${prefix}/bin && ln -s ${iphone_prefix}/bin/arm-apple-darwin-as ./" system "cd ${destroot}/${prefix}/bin && ln -s ${iphone_prefix}/bin/arm-apple-darwin-ar ./" system "cd ${destroot}/${prefix}/bin && ln -s ${iphone_prefix}/bin/arm-apple-darwin-libtool ./" system "cd ${destroot}/${prefix}/bin && ln -s ${iphone_prefix}/bin/arm-apple-darwin-ranlib ./" # Set up non-prefixed binaries in the iphone bin directory system "cd ${destroot}/${iphone_prefix}/bin && ln -s arm-apple-darwin-ld ld" system "cd ${destroot}/${iphone_prefix}/bin && ln -s arm-apple-darwin-as as" system "cd ${destroot}/${iphone_prefix}/bin && ln -s arm-apple-darwin-ar ar" system "cd ${destroot}/${iphone_prefix}/bin && ln -s arm-apple-darwin-libtool libtool" }