# -*- 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 104193 2013-03-20 14:22:55Z snc@macports.org $

PortSystem          1.0

name                libftdi
if {${name} == ${subport}} {
    replaced_by         libftdi0
    PortGroup           obsolete 1.0
    epoch               1
    
}
version             0.20
categories          devel
license             GPL-2+
maintainers         snc openmaintainer
description         A library to talk to FTDI chips
long_description    A library to talk to FTDI chips: \
                    FT232BM/245BM, FT2232C/D and FT232/245R \
                    using libusb, including the popular bitbang mode. \
                    The license is LGPL.
homepage            http://www.intra2net.com/en/developer/libftdi/
platforms           darwin
master_sites        http://www.intra2net.com/en/developer/libftdi/download/
depends_build-append    port:pkgconfig
depends_lib-append  port:libusb-compat
                    


subport             libftdi0 {
    distname            libftdi-${version}
    checksums           rmd160  7406f831a6d7b3ccf8e246504f7275a5208f94e9 \
                        sha256  3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e
    livecheck.regex     "(?i)<title>libftdi (0(\\.\\d+)+)</title>"
}

subport             libftdi1 {
    PortGroup           cmake 1.0

    version             1.0
    distname            libftdi1-${version}
    use_bzip2           yes

    depends_lib-append  port:libconfuse

    checksums           rmd160  288ca78807455be6c2625a98cc5b313638d7a903 \
                        sha256  7290fd38208d8c00d25ed13ce172aaa0403b37148080e4a33a99837022d2b321
}

if {${subport} == ${name}} {
    livecheck.type      none
}
