blob: a6f6a91bf521c1198b93f6300efaa12020ca282e (
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
71
72
73
74
75
76
77
78
79
80
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=readline
pkgver=6.3.008
_myver=${pkgver%.*}
pkgrel=5
pkgdesc="GNU readline library"
url="ftp://ftp.cwru.edu/pub/bash/"
arch="all"
license="GPL"
depends=
makedepends="ncurses-dev"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="http://ftp.gnu.org/gnu/readline/readline-${_myver}.tar.gz
p0-readline-6.3-008.patch
fix-ncurses-underlinking.patch
"
# generate url's to patches. note: no forks allowed!
_getpatch() {
_i=1
_suff=${_myver//./}
_patchver=${pkgver##*.}
while [ $_i -le $_patchver ]; do
curl http://ftp.gnu.org/gnu/readline/readline-$_myver-patches/readline$_suff-$(printf "%03d" $_i)
_i=$(( $_i + 1))
done
}
builddir="$srcdir"/$pkgname-$_myver
prepare() {
cd "$builddir"
update_config_sub || return 1
for i in $source; do
case $i in
p0-*.patch) msg $i; patch -p0 -i "$srcdir"/$i || return 1;;
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-static \
--enable-shared \
|| return 1
make || return 1
}
static() {
pkgdesc="$pkgdesc - static library"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
# 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
}
md5sums="33c8fb279e981274f485fd91da77e94a readline-6.3.tar.gz
3e84f443ddc7aedad1e6d527c105a213 p0-readline-6.3-008.patch
14c0ace483b61e99441acca376acaeac fix-ncurses-underlinking.patch"
sha256sums="56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43 readline-6.3.tar.gz
b1682565724a25b68118f6880257cd2381988ee34e98e6c69e6fa20a0f941701 p0-readline-6.3-008.patch
351a19e1c8bb4c06b7cacb70a3cf3dda2eefce66bb4eb4635ac93c5716405b1e fix-ncurses-underlinking.patch"
sha512sums="f70efaf46d570b85c7637172b0ee2eb9a4aa73ba38a62bb45075e665929d9701b96fba0aea6c767fd9a2a0d39dfe8e70ab06da08f8524aee76a7c502f370a401 readline-6.3.tar.gz
beab1f333643deea33bde114b7ba3eb6a6d9c84a2a92a66111bb46c6c1d27416d970112cf6ea635a7f3d5a419d4c768718a8f6ff1b4726c0cda8f566a2ad092f p0-readline-6.3-008.patch
325dcf74e9f463a74fb116cb6f3ff8d9708dbec24b423a778eeda3a5ac4fe6df131e0e99d034053ad356b01502894ecc8facc09160d4c29b2291bd95cff6b635 fix-ncurses-underlinking.patch"
|