pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / by-name / pi / picocom / use-system-linenoise.patch
blob455c18010bfc2b7cbcd21f7c22f390250c4c0396
1 diff --git a/Makefile b/Makefile
2 index 8fca24ee38..33b59b5b96 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -39,9 +39,9 @@
6 ## Comment these out to disable "linenoise"-library support
7 HISTFILE = .picocom_history
8 CPPFLAGS += -DHISTFILE=\"$(HISTFILE)\" \
9 - -DLINENOISE
10 -OBJS += linenoise-1.0/linenoise.o
11 -linenoise-1.0/linenoise.o : linenoise-1.0/linenoise.c linenoise-1.0/linenoise.h
12 + -DLINENOISE \
13 + $(shell $(PKG_CONFIG) --cflags linenoise)
14 +LDFLAGS += $(shell $(PKG_CONFIG) --libs linenoise)
16 ## Comment this in to enable (force) custom baudrate support
17 ## even on systems not enabled by default.
18 diff --git a/picocom.c b/picocom.c
19 index 775ee9c3bb..ba2f9bd666 100644
20 --- a/picocom.c
21 +++ b/picocom.c
22 @@ -48,7 +48,7 @@
23 #include "split.h"
24 #include "term.h"
25 #ifdef LINENOISE
26 -#include "linenoise-1.0/linenoise.h"
27 +#include <linenoise.h>
28 #endif
30 #include "custbaud.h"