libftdi: enable async mode
Apparently, async mode for libftdi 0.20 is allegedly disabled when using libusb-compat wrappers, as libftdi does not really support libftdi 1.x. Because we only ship libusb-compat, this would normally make async mode completely unavailable. Except distributions like Ubuntu just disable this check completely! See this patch from Launchpad: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff In the spirit of good competition (and feature parity for software that *doesn't* support the synchronous mode, thanks to Ubuntu silently ensuring their async-only paths work) we enable this just the same. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
ae7efee4fa
commit
0339dc5fae
|
@ -14,6 +14,14 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# Hack to avoid TMPDIR in RPATHs.
|
||||
preFixup = ''rm -rf "$(pwd)" '';
|
||||
configureFlags = [ "--with-async-mode" ];
|
||||
|
||||
# allow async mode. from ubuntu. see:
|
||||
# https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff
|
||||
patchPhase = ''
|
||||
substituteInPlace ./src/ftdi.c \
|
||||
--replace "ifdef USB_CLASS_PTP" "if 0"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A library to talk to FTDI chips using libusb";
|
||||
|
|
Loading…
Reference in New Issue