Add recipe for linenoise (replacement for libedit/readline)

A minimal, zero-config, BSD licensed, readline replacement.

Marked as untested since there are still some issues,
at least the base package is empty (no dynamic lib),
not sure it's best,
This commit is contained in:
François Revol
2019-07-31 19:20:34 +02:00
parent 159ad92811
commit b502a38e6d

View File

@@ -0,0 +1,74 @@
SUMMARY="A small self-contained alternative to readline and libedit"
DESCRIPTION="A minimal, zero-config, BSD licensed, readline replacement.
- Single and multi line editing mode with the usual key bindings implemented.
- History handling.
- Completion.
- Hints (suggestions at the right of the prompt as you type).
- About 1,100 lines of BSD license source code.
- Only uses a subset of VT100 escapes (ANSI.SYS compatible).
- UTF-8 support."
HOMEPAGE="https://github.com/rain-1/linenoise-mob"
COPYRIGHT="2010-2014 Salvatore Sanfilippo
2010-2013, Pieter Noordhuis"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/rain-1/linenoise-mob/archive/6b28e06532da498bdb1c98a09d2344e34b4c5795.zip"
CHECKSUM_SHA256="a9c35c8aff79e2107366851a698f0053c7856bb87d95358dff246f4d8b8f8297"
SOURCE_DIR="linenoise-mob-6b28e06532da498bdb1c98a09d2344e34b4c5795"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64 ?sparc"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
linenoise$secondaryArchSuffix = $portVersion compat >= 1
lib:liblinenoise$secondaryArchSuffix = 1.0 compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
linenoise${secondaryArchSuffix}_devel = $portVersion
devel:liblinenoise$secondaryArchSuffix = 1.0 compat >= 1
"
REQUIRES_devel="
linenoise$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
make $jobArgs \
CFLAGS="-Os -Wall" \
PREFIX="$prefix" \
LIBDIR="$libDir" \
INCDIR="$includeDir" \
MANDIR="$manDir"
}
INSTALL()
{
make $jobArgs \
CFLAGS="-Os -Wall" \
PREFIX="$prefix" \
LIBDIR="$libDir" \
INCDIR="$includeDir" \
MANDIR="$manDir" \
install
prepareInstalledDevelLibs liblinenoise
# devel package
packageEntries devel \
$developDir \
$documentationDir
}