summaryrefslogtreecommitdiff
path: root/system/linenoise/build-shared-lib.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-19 20:04:21 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-19 20:04:21 -0500
commit146dbadd4867c64bf5594cd51ee31057dc05b023 (patch)
tree856013e082edb16eb65321d2252eba1733b50712 /system/linenoise/build-shared-lib.patch
parent7e8a986670ad147bcdb735cf2184357a5e5900b9 (diff)
downloadpackages-146dbadd4867c64bf5594cd51ee31057dc05b023.tar.gz
packages-146dbadd4867c64bf5594cd51ee31057dc05b023.tar.bz2
packages-146dbadd4867c64bf5594cd51ee31057dc05b023.tar.xz
packages-146dbadd4867c64bf5594cd51ee31057dc05b023.zip
system: pull in lua bull crap for kyua
Diffstat (limited to 'system/linenoise/build-shared-lib.patch')
-rw-r--r--system/linenoise/build-shared-lib.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/system/linenoise/build-shared-lib.patch b/system/linenoise/build-shared-lib.patch
new file mode 100644
index 000000000..2f9542dcf
--- /dev/null
+++ b/system/linenoise/build-shared-lib.patch
@@ -0,0 +1,37 @@
+--- ./Makefile.orig
++++ ./Makefile
+@@ -1,7 +1,33 @@
++MAJOR_VERSION = 0
++EXTRA_VERSION = .0.0
++SONAME = liblinenoise.so.$(MAJOR_VERSION)
++LIB = $(SONAME)$(EXTRA_VERSION)
++
++export CFLAGS ?= -Os -g
++CFLAGS += -Wall -fpic -DUSE_UTF8
++LIBDIR ?= /usr/lib
++INCLUDEDIR ?= /usr/include
++
++.PHONY: all
++all: $(LIB) linenoise_example
++
++$(LIB): linenoise.o
++ $(CC) $(CFLAGS) -shared -Wl,-soname,$(SONAME) $(LDFLAGS) -o $@ $^
++
+ linenoise_example: linenoise.h linenoise.c
+
+ linenoise_example: linenoise.c example.c
+ $(CC) -Wall -W -Os -g -o linenoise_example linenoise.c example.c
+
++.PHONY: clean
+ clean:
+- rm -f linenoise_example
++ rm -f$(LIB) linenoise_example *.o
++
++.PHONY: install
++install: $(LIB)
++ install -m 0755 -d $(DESTDIR)$(INCLUDEDIR)
++ install -m 0644 linenoise.h $(DESTDIR)$(INCLUDEDIR)
++ install -m 0755 -d $(DESTDIR)$(LIBDIR)
++ install -m 0755 $(LIB) $(DESTDIR)$(LIBDIR)
++ ldconfig -n $(DESTDIR)$(LIBDIR)
++ ln -s $(LIB) $(DESTDIR)$(LIBDIR)/liblinenoise.so