# -*- 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 116814 2014-02-07 21:41:01Z 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.1
    distname            libftdi1-${version}
    use_bzip2           yes

    depends_lib-append  port:libconfuse port:gettext port:libusb

    checksums           rmd160  185237715206743b3c4aeea1510137eca7c9042d \
                        sha256  c0b1af1a13e2c6682a1d8041e5b164a1e0d90267cd378bb51e059bd62f821e21
}

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