# -*- 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 61853 2009-12-22 17:10:15Z snc@macports.org $

PortSystem          1.0

name                libftdi
version             0.17
revision            2
categories          devel
license             GPLv2+
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/de/produkte/opensource/ftdi
platforms           darwin
master_sites        http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/
checksums           md5     810c69cfaa078b49795c224ef9b6b851 \
                    sha1    e2ab367f20df8f38fa9754070ad0bea5aa0f6f7a \
                    rmd160  cca442415a0ee380e9efcdbd60aa48b1cfdecede

depends_lib         port:libusb-compat

patch {
    reinplace "s|struct ftdi_context \\*ftdi_new()|struct ftdi_context *ftdi_new(void)|" \
        ${worksrcpath}/src/ftdi.h ${worksrcpath}/src/ftdi.c
}
