Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

usb-modeswitch: fix cross compilation by using the correct pkg-config

authored by Nick Cao and committed by Peter Hoeg f4b3bea7 254c34fc

+18 -1
+4 -1
pkgs/development/tools/misc/usb-modeswitch/default.nix
··· 10 sha256 = "18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2"; 11 }; 12 13 - patches = [ ./configurable-usb-modeswitch.patch ]; 14 15 # Remove attempts to write to /etc and /var/lib. 16 postPatch = ''
··· 10 sha256 = "18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2"; 11 }; 12 13 + patches = [ 14 + ./configurable-usb-modeswitch.patch 15 + ./pkg-config.patch 16 + ]; 17 18 # Remove attempts to write to /etc and /var/lib. 19 postPatch = ''
+14
pkgs/development/tools/misc/usb-modeswitch/pkg-config.patch
···
··· 1 + diff --git a/Makefile b/Makefile 2 + index 9aa7356..c5f2a87 100644 3 + --- a/Makefile 4 + +++ b/Makefile 5 + @@ -2,7 +2,8 @@ PROG = usb_modeswitch 6 + VERS = 2.6.0 7 + CC ?= gcc 8 + CFLAGS += -Wall -Wno-deprecated-declarations 9 + -LIBS = `pkg-config --libs --cflags libusb-1.0` 10 + +PKG_CONFIG ?= pkg-config 11 + +LIBS = `$(PKG_CONFIG) --libs --cflags libusb-1.0` 12 + RM = /bin/rm -f 13 + OBJS = usb_modeswitch.c 14 + PREFIX = $(DESTDIR)/usr