Subject: [PATCH v2] testing/bestline: new aport

From: Sebastian <[email-masked]>
Date: Sat, 12 Feb 2022 19:35:29 -0500

https://github.com/jart/bestline
Minimal replacement for readline

Signed-off-by: Sebastian <[email-masked]>
---
Changes since v1: Removed -dbg subpackage and don't install bestline.o

 testing/bestline/APKBUILD | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 testing/bestline/APKBUILD

diff --git a/testing/bestline/APKBUILD b/testing/bestline/APKBUILD
new file mode 100644
index 00000000..56957369
--- /dev/null
+++ b/testing/bestline/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Sebastian Hudak <[email-masked]>
+# Maintainer: Sebastian Hudak <[email-masked]>
+pkgname=bestline
+# No official release tagged yet; not ready to be moved out of testing.
+pkgver=0.0_git20211108
+_commit=8ab535e621b3848f8491469c2083c7ecb0df3e22
+pkgrel=0
+pkgdesc="Minimal replacement for readline"
+url="https://github.com/jart/bestline"
+arch="all"
+license="BSD-2-Clause"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://github.com/jart/bestline/archive/$_commit.tar.gz"
+builddir="$srcdir/$pkgname-$_commit"
+options="!check" # No test suite
+
+build() {
+	# Makefile doesn't use -fPIC, which is needed for shared library
+	${CC:-gcc} $CFLAGS -fPIC -c -o bestline.o bestline.c
+	${CC:-gcc} $LDFLAGS -shared -o libbestline.so bestline.o
+}
+
+package() {
+	install -Dm755 libbestline.so "$pkgdir"/usr/lib/libbestline.so
+	install -Dm644 bestline.h "$pkgdir"/usr/include/bestline.h
+	install -Dm644 README.md "$pkgdir"/usr/share/doc/bestline/README.md
+	install -m644 bestline.gif "$pkgdir"/usr/share/doc/bestline/bestline.gif
+}
+
+sha512sums="cd7411604c47a6910188394343b0388a0e580de891d332f4eea89f308888dfce5348fc94e826cb6cf960896ebf6272280cca90caca4537ca54e8719df61ec57b  8ab535e621b3848f8491469c2083c7ecb0df3e22.tar.gz"
-- 
2.34.1