gnupg: take libusb include path from pkg-config

This makes smartcards (like the Nitrokey)  usable again.
This commit is contained in:
Kai Harries 2016-10-19 21:24:37 +02:00 committed by Jörg Thalheim
parent a4e43841a2
commit dace6a176d
No known key found for this signature in database
GPG key ID: CA4106B8D7CC79FA
2 changed files with 12 additions and 0 deletions

View file

@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
readline libusb gnutls adns openldap zlib bzip2
];
patches = [ ./fix-libusb-include-path.patch ];
postPatch = stdenv.lib.optionalString stdenv.isLinux ''
sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
''; #" fix Emacs syntax highlighting :-(

View file

@ -0,0 +1,11 @@
--- a/configure
+++ b/configure
@@ -8872,7 +8872,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libusb include dir" >&5
$as_echo_n "checking libusb include dir... " >&6; }
usb_incdir_found="no"
- for _incdir in "" "/usr/include/libusb-1.0" "/usr/local/include/libusb-1.0"; do
+ for _incdir in "$($PKG_CONFIG --variable=includedir libusb-1.0)/libusb-1.0"; do
_libusb_save_cppflags=$CPPFLAGS
if test -n "${_incdir}"; then
CPPFLAGS="-I${_incdir} ${CPPFLAGS}"