blob: 2525f52698f150cca27261dfe5c7eb65474cdc2d (
plain)
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
60
61
62
63
64
65
66
67
68
69
70
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=readline
pkgver=8.0.0
pkgrel=0
_myver=${pkgver%.*}
pkgdesc="GNU readline library"
url="https://tiswww.cwru.edu/php/chet/readline/rltop.html"
arch="all"
options="!check"
license="GPL"
depends=
makedepends_host="ncurses-dev"
subpackages="$pkgname-dev $pkgname-doc libhistory"
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$_myver.tar.gz
fix-ncurses-underlinking.patch
inputrc
"
for _patch in $(seq -w 001 ${pkgver##*.}); do
_name=$pkgname${_myver//./}-$_patch
source="$source $_name.diff::https://ftp.gnu.org/gnu/$pkgname/$pkgname-$_myver-patches/$_name"
done
builddir="$srcdir/$pkgname-$_myver"
prepare() {
local i
cd "$builddir"
for i in $source; do
case ${i%::*} in
*.diff) msg ${i#*::}; patch -p0 -i "$srcdir"/${i%::*} ;;
esac
done
default_prepare
}
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-static \
--enable-shared
make
}
package() {
make -C "$builddir" DESTDIR="$pkgdir" install
# verfy that its not underlinked as upstream designed it
if ! readelf -d "$pkgdir"/usr/lib/libreadline.so | grep 'NEEDED.*ncurses'; then
error "readline needs to be linked against ncurses"
return 1
fi
rmdir "$pkgdir"/usr/bin
mkdir -p "$pkgdir"/etc
install -m644 "$srcdir"/inputrc "$pkgdir"/etc/inputrc
}
libhistory() {
pkgdesc="GNU History Library"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/$subpkgname.* "$subpkgdir"/usr/lib
}
sha512sums="41759d27bc3a258fefd7f4ff3277fa6ab9c21abb7b160e1a75aa8eba547bd90b288514e76264bd94fb0172da8a4faa54aab2c07b68a0356918ecf7f1969e866f readline-8.0.tar.gz
325dcf74e9f463a74fb116cb6f3ff8d9708dbec24b423a778eeda3a5ac4fe6df131e0e99d034053ad356b01502894ecc8facc09160d4c29b2291bd95cff6b635 fix-ncurses-underlinking.patch
5dbe872e94166aaed7ca2edec5a34ef9b13b254381e252cc6d851877b461579903cbb5b5dc588eabececcf1ebe636f6cb4da406cd01b64757f8c7e7f62e9a276 inputrc"
|