From 146dbadd4867c64bf5594cd51ee31057dc05b023 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 19 Jun 2018 20:04:21 -0500 Subject: system: pull in lua bull crap for kyua --- system/linenoise/APKBUILD | 31 +++++++++++++++++++++++++++ system/linenoise/build-shared-lib.patch | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 system/linenoise/APKBUILD create mode 100644 system/linenoise/build-shared-lib.patch (limited to 'system/linenoise') diff --git a/system/linenoise/APKBUILD b/system/linenoise/APKBUILD new file mode 100644 index 000000000..92443594f --- /dev/null +++ b/system/linenoise/APKBUILD @@ -0,0 +1,31 @@ +# Contributor: Natanael Copa +# Maintainer: +pkgname=linenoise +pkgver=1.0 +pkgrel=1 +pkgdesc="Minimal replacement for readline" +url="https://github.com/antirez/linenoise" +arch="all" +options="!check" # No test suite. +license="BSD-2-Clause-NetBSD" +depends="" +depends_dev="" +makedepends="$depends_dev" +install="" +subpackages="$pkgname-dev" +source="linenoise-$pkgver.tar.gz::https://github.com/antirez/linenoise/archive/$pkgver.tar.gz + build-shared-lib.patch + " + +build() { + cd "$builddir" + make +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="9e68fade8d64d7ba8d5d681e74d0ca6c4ebd9576249bb0e885b1aa708a9af77a43ea6264307ae46fb74e52219387a2c831b570f9601e331837f35294af9883e3 linenoise-1.0.tar.gz +e37fe58f414f48a6a6fcab9925881131d2dbca0c54fe2b17a359d0b5c58ce1e29dad92baa8dc7f7d390af1edace2a75091f20bed5aa381ff2599e734616b2418 build-shared-lib.patch" 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 -- cgit v1.2.3-60-g2f50