# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:sw=4:ts=4:sts=4
# $Id: Portfile 90862 2012-03-16 09:35:56Z g5pw@macports.org $

PortSystem          1.0

name				radare2
version				0.9
categories			devel
platforms           darwin
license             GPL-3
maintainers			g5pw pixilla openmaintainer
description			Opensource tools to disasm, debug, analyze and manipulate binary files.
long_description    ${description}
homepage			http://radare.org/
master_sites		${homepage}get/

checksums           ${distname}${extract.suffix} \
						rmd160  f68ebf07ec62e907980e8f8bc195754bf993b466 \
						sha256  e12feea3b776601d7b680e64250897110cf4fca2f1214b4c527e13b7abe900e0

patch.pre_args      -p1
patchfiles          patch-change_install_names.diff \
                    patch-libr-Makefile.diff \
                    patch-libr-config.mk.tail.diff \
                    patch-libr-rules.mk.diff \
                    patch-mk-gcc.mk.diff

build.env-append "LDFLAGS=-L${prefix}/lib"
					
post-destroot {
    # Fix link lib paths
    system "cd ${worksrcpath} && sh change_install_names ${destroot}"
}
