diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-01-30 09:20:59 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-01-30 09:21:48 +0000 |
commit | d09f7efa64b4f8fc092c16af3a052239576181c0 (patch) | |
tree | 53875c3bb56d9d0f57617df4f61b476ea0bb5116 /main/readline | |
parent | 7b4ba02b0f6554c022befc9507a3cd146b2e788c (diff) | |
download | aports-d09f7efa64b4f8fc092c16af3a052239576181c0.tar.bz2 aports-d09f7efa64b4f8fc092c16af3a052239576181c0.tar.xz |
main/readline: add -static subpackage
fixes #6768
Diffstat (limited to 'main/readline')
-rw-r--r-- | main/readline/APKBUILD | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/main/readline/APKBUILD b/main/readline/APKBUILD index 4e9e810218..a6f6a91bf5 100644 --- a/main/readline/APKBUILD +++ b/main/readline/APKBUILD @@ -2,14 +2,14 @@ pkgname=readline pkgver=6.3.008 _myver=${pkgver%.*} -pkgrel=4 +pkgrel=5 pkgdesc="GNU readline library" url="ftp://ftp.cwru.edu/pub/bash/" arch="all" license="GPL" depends= makedepends="ncurses-dev" -subpackages="$pkgname-dev $pkgname-doc" +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 @@ -27,9 +27,9 @@ _getpatch() { done } -_builddir="$srcdir"/$pkgname-$_myver +builddir="$srcdir"/$pkgname-$_myver prepare() { - cd "$_builddir" + cd "$builddir" update_config_sub || return 1 for i in $source; do case $i in @@ -40,21 +40,27 @@ prepare() { } build() { - cd "$_builddir" + cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ - --disable-static \ + --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" + 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 |