|
root / base / readline
readline Plain Text 60 lines 1.8 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Build script for readline
# GNU readline library for command line editing

set -e

cd "$SRCDIR"

# Set library path for ncurses (installed under $PREFIX, not /usr)
# Note: no tputs cast needed — readline depends on ncurses (build dep), which
# uses `int(*)(int)`, matching _rl_output_character_function's signature.
export LDFLAGS="-L$PREFIX/lib -R$PREFIX/lib -lncurses"
export CPPFLAGS="-I$PREFIX/include -I$PREFIX/include/ncurses"
export SHLIB_LIBS="-L$PREFIX/lib -lncursesw"

# Configure readline with shared library support
./configure \
    --build=$BUILD_TRIPLE \
    --host=$BUILD_TRIPLE \
    --prefix=$PREFIX \
    --libdir=$PREFIX/lib \
    --with-curses \
    --enable-shared

gmake -j${JOBS:-1}
gmake install DESTDIR="$PKGDIR"

# readline's shobj-conf for illumos installs only libreadline.so.8 with no
# libreadline.so symlink, so `-lreadline` falls through to the static archive
# (which then needs explicit -lncurses/-ltermcap to resolve tputs/tgetent).
# Add the canonical .so → .so.8 symlinks so consumers link dynamically.
ln -sf libreadline.so.8 "$PKGDIR$PREFIX/lib/libreadline.so"
ln -sf libhistory.so.8  "$PKGDIR$PREFIX/lib/libhistory.so"
# readline - GNU readline library
# https://tiswww.case.edu/php/chet/readline/rltop.html

[package]
name = "readline"
version = "8.2"
release = 1
description = "GNU readline library for command line editing"
url = "https://tiswww.case.edu/php/chet/readline/rltop.html"
license = "GPL-3.0"
maintainer = "Chris Tusa <chris.tusa@leafscale.com>"
arch = "x86_64"

[dependencies]
runtime = ["ncurses"]
build = ["ncurses"]

[[source]]
file = "readline-8.2.tar.gz"
urls = ["https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz"]
checksum = "3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35"


[build]
parallel = true
jobs = 0