# $Id$ PortSystem 1.0 name elftoolchain version 0.5.1 categories devel platforms darwin license BSD maintainers raimue description Compilation tools and libraries for ELF long_description \ BSD-licensed compilation tools and libaries for handling the ELF file \ format. This includes implementations of libelf and libdwarf along with \ the tools nm, ar, as, elfdump and more. homepage http://elftoolchain.sourceforge.net/ master_sites sourceforge use_bzip2 yes checksums rmd160 4be0adf8349c764474810e23cfb022c655002d77 \ sha256 b34351b26503ce7f106426d926a87e6c6adef81e324ec7052f3e09108ae7ab81 depends_build port:bsdmake \ port:bison \ port:flex depends_lib port:libarchive patchfiles patch-mk.diff \ patch-disable-tests.diff \ patch-libelf-config.diff \ patch-common-elftc.diff \ patch-byteorder-macros.diff post-patch { reinplace "s:@PREFIX@:${prefix}:g" ${worksrcpath}/mk/elftoolchain.prog.mk } use_configure no build.type bsd build.cmd ${prefix}/bin/bsdmake build.args CC=${configure.cc} \ CWARNFLAGS= \ prefix=${prefix} \ BINDIR=${prefix}/bin \ LIBDIR=${prefix}/lib/elftoolchain \ SHLIBDIR=${prefix}/lib/elftoolchain \ INCSDIR=${prefix}/include/elftoolchain # Exclude docs to avoid pulling in a full TeX distribution build.args-append MKTEX=no destroot.target install destroot.args prefix=${prefix} \ BINDIR=${prefix}/bin \ LIBDIR=${prefix}/lib/elftoolchain \ SHLIBDIR=${prefix}/lib/elftoolchain \ INCSDIR=${prefix}/include/elftoolchain # Do not strip binaries as that leads to errors destroot.args-append STRIP= pre-destroot { file mkdir ${destroot}${prefix}/lib/elftoolchain file mkdir ${destroot}${prefix}/include/elftoolchain file mkdir ${destroot}${prefix}/libexec/elftoolchain } # Add elftc- prefix to all binaries to avoid conflicts post-destroot { foreach f [glob ${destroot}${prefix}/bin/*] { set nf [file dirname $f]/elftc-[file tail $f] move $f $nf ln -s $nf ${destroot}${prefix}/libexec/${name}/[file tail $f] } foreach f [glob ${destroot}${prefix}/share/man/man{1,5}/*] { move $f [file dirname $f]/elftc-[file tail $f] } } notes " The tools provided by elftoolchain are prefixed with the string 'elftc-' by\ default to distinguish them from the commands provided by your default\ toolchain. For example, nm becomes elftc-nm and size becomes elftc-size. If you want to use the tools provided by elftoolchain by default, add this\ directory to the front of your PATH environment variable: ${prefix}/libexec/elftoolchain " livecheck.type regex livecheck.url http://sourceforge.net/projects/elftoolchain/files/Sources/ livecheck.regex ${name}-(\\d+(\\.\\d+)+)