# $Id: Portfile 27966 2007-08-16 18:41:25Z eridius@macports.org $ PortSystem 1.0 name arm-apple-darwin-runtime version r118 revision 1 categories cross iphone maintainers landonf@macports.org openmaintainer@macports.org description Free arm-apple-darwin (iPhone) runtime, headers and libraries. 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_lib port:arm-apple-darwin-binutils \ port:arm-apple-darwin-cc # patch-iphonenes-includes are header fixes from NerveGas/iPhoneNES project patchfiles patch-Makefile.in \ patch-libarmfp_Makefile.in \ patch-iphonenes-includes set iphone_prefix ${prefix}/arm-apple-darwin configure.args --prefix=${iphone_prefix} --with-heavenly=${iphone_prefix}/heavenly build.target includes csu libarmfp build.args DESTDIR=${destroot} # Work-around the experimental destroot validation destroot.violate_mtree yes pre-build { file mkdir ${destroot}/${iphone_prefix}/lib } destroot { set inst ${destroot}/${iphone_prefix} set slf "/System/Library/Frameworks" # These are included, non-existent. The contents aren't necessary, # so we create blank ones. system "touch ${inst}/include/UIKit/NSObject.h" system "touch ${inst}/include/LayerKit/NSObject.h" # # Ugly mess to populate include/ and avoid patching system headers. # # i386 param.h file copy -force /usr/include/i386/param.h ${inst}/include/machine/ # i386 signal.h file copy -force /usr/include/i386/signal.h ${inst}/include/machine/ # i386 limits.h file copy -force /usr/include/i386/limits.h ${inst}/include/machine/ file copy -force /usr/include/i386/_limits.h ${inst}/include/machine/ # Symlink CoreGraphics system "ln -s ${slf}/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers ${inst}/include/CoreGraphics" # Copy & Patch CarbonCore set ccframework "${slf}/CoreServices.framework/Frameworks/CarbonCore.framework" file mkdir ${inst}/include/CarbonCore file copy ${ccframework}/Headers/MachineExceptions.h \ ${ccframework}/Headers/fp.h \ ${inst}/include/CarbonCore system "cd ${inst}/include/CarbonCore && patch -p0 < ${worksrcpath}/include/CarbonCore/MachineExceptions.h.diff" if {[variant_isset darwin_9]} { # fp.h needs a new patch for Leopard # MachineExceptions.h probably should have one, but the current one succeeds with offset # so lets just kill the .orig file delete ${inst}/include/CarbonCore/MachineExceptions.h.orig system "cd ${inst}/include/CarbonCore && patch -p0 < ${filespath}/patch-darwin_9-fp.h" } else { system "cd ${inst}/include/CarbonCore && patch -p0 < ${worksrcpath}/include/CarbonCore/fp.h.diff" } # ok, kill the .diff files, we don't need them in our output delete ${inst}/include/CarbonCore/MachineExceptions.h.diff ${inst}/include/CarbonCore/fp.h.diff } platform darwin 9 { # just used for a variant_isset test }