# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 90097 2012-02-21 16:22:35Z snc@macports.org $

PortSystem     1.0

name            testdisk
version         6.13
categories      sysutils
platforms       darwin
maintainers     snc openmaintainer
license         GPL-2+
description     TestDisk is a powerful free data recovery utility.
long_description    \
        TestDisk was primarily designed to help recover     \
        lost partitions and/or make non-booting disks bootable  \
        again when these symptoms are caused by faulty      \
        software, certain types of viruses or human error   \
        (such as accidentally erasing your Partition Table).    \
        Partition table recovery using TestDisk is really easy.

depends_build   port:ncurses

depends_lib     port:e2fsprogs \
                port:libiconv \
                port:jpeg \
                port:ncurses \
                port:ntfs-3g \
                port:openssl \
                port:zlib \
                port:libewf

use_bzip2       yes

homepage        http://www.cgsecurity.org/wiki/TestDisk
master_sites    http://www.cgsecurity.org/

checksums           rmd160  9ff09fdcc53a02240b4e22365193eac14a7d5e13 \
                    sha256  48275ccddfc9445b6c3e6e181728dae9e49bd25b824a6b5670d58f1f88cdf220

if {${configure.compiler} == "clang"} {
    configure.compiler  llvm-gcc-4.2
}

configure.cppflags-append   -I${prefix}/include/ossp

configure.args-append   --with-ncurses-lib=${prefix}/lib \
                        --with-ncurses-includes=${prefix}/include/ncurses \
                        --with-iconv-lib=${prefix}/lib \
                        --with-iconv-includes=${prefix}/include

# needed for testdisk 6.11's configure script
configure.cflags-append -fnested-functions

livecheck.type  regex
livecheck.regex {href="/wiki/TestDisk_Download".*>([0-9.]+)<}
