# -*- 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 55455 2009-08-11 02:58:43Z snc@macports.org $

PortSystem          1.0

name                libftdi
version             0.16
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 524af6f39aefa1a4e8fac12c6be0ed06 \
                    sha1 03e453ea0b74e41ffe5bf0476c1997a4faa072c3 \
                    rmd160 7ab0cab64cd43239c5a2ed22d85c4e931b3b1625

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
}
