# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 55056 2009-08-06 12:03:21Z snc@macports.org $

PortSystem 1.0

name                libftd2xx
version             0.1.6
revision            1
categories          devel
maintainers         gmail.com:ranauei
description         FTDI D2XX Driver
long_description    D2XX Driver: allow direct access to the USB device through \
                    a DLL. Devices supported: FT2232H, FT4232H, FT232R, \
                    FT245R, FT2232, FT232B, FT245B, FT8U232AM, FT8U245AM
                  
homepage            http://www.ftdichip.com/Drivers/D2XX.htm
platforms           macosx
distname            Universal%20D2XX${version}
master_sites        http://www.ftdichip.com/Drivers/D2XX/MacOSX/UniBin/
checksums           md5 ce20e3ee5a9f70adc7e2b7bd3a0589e3 \
                    sha1 7d5487068972c97526fc59ec8bea4577df86f520 \
                    rmd160 aa4c2a2f8961ab3382c948ac617f007d0cd4f3af
use_dmg             yes
use_configure       no

build {}
destroot {
   xinstall ${worksrcpath}/D2XX/bin/${name}.${version}.dylib ${destroot}${prefix}/lib
   xinstall -m 644 -W ${worksrcpath}/D2XX bin/ftd2xx.h Samples/WinTypes.h ${destroot}${prefix}/include
   ln -s ${name}.${version}.dylib ${destroot}${prefix}/lib/${name}.dylib
   system "install_name_tool -id ${prefix}/lib/${name}.${version}.dylib ${destroot}${prefix}/lib/${name}.${version}.dylib"
}
