about summary refs log tree commit diff
path: root/pkgs/by-name/pi/picocom/use-system-linenoise.patch
diff options
context:
space:
mode:
authorEmily2024-09-12 14:45:05 +0100
committerEmily2024-09-12 15:40:59 +0100
commita5cd7bba11737aad7f2aae9de0e5c6ab8e121fac (patch)
tree8c8fb963b66911bc25495699a843b58add9a32e6 /pkgs/by-name/pi/picocom/use-system-linenoise.patch
parent5f0e2e9e4e03b5bf446a4cd3f6f98d072c709238 (diff)
picocom: devendor linenoise
Diffstat (limited to 'pkgs/by-name/pi/picocom/use-system-linenoise.patch')
-rw-r--r--pkgs/by-name/pi/picocom/use-system-linenoise.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/by-name/pi/picocom/use-system-linenoise.patch b/pkgs/by-name/pi/picocom/use-system-linenoise.patch
new file mode 100644
index 000000000000..ee31a0d617cc
--- /dev/null
+++ b/pkgs/by-name/pi/picocom/use-system-linenoise.patch
@@ -0,0 +1,30 @@
+diff --git a/Makefile b/Makefile
+index 8fca24ee38..33b59b5b96 100644
+--- a/Makefile
++++ b/Makefile
+@@ -39,9 +39,9 @@
+ ## Comment these out to disable "linenoise"-library support
+ HISTFILE = .picocom_history
+ CPPFLAGS += -DHISTFILE=\"$(HISTFILE)\" \
+-	    -DLINENOISE
+-OBJS += linenoise-1.0/linenoise.o
+-linenoise-1.0/linenoise.o : linenoise-1.0/linenoise.c linenoise-1.0/linenoise.h
++	    -DLINENOISE \
++	    $(shell pkg-config --cflags linenoise)
++LDFLAGS += $(shell pkg-config --libs linenoise)
+ 
+ ## Comment this in to enable (force) custom baudrate support
+ ## even on systems not enabled by default.
+diff --git a/picocom.c b/picocom.c
+index 775ee9c3bb..ba2f9bd666 100644
+--- a/picocom.c
++++ b/picocom.c
+@@ -48,7 +48,7 @@
+ #include "split.h"
+ #include "term.h"
+ #ifdef LINENOISE
+-#include "linenoise-1.0/linenoise.h"
++#include <linenoise.h>
+ #endif
+ 
+ #include "custbaud.h"