main/ncurses: update to 6.3_p20220917, update abuild

master
parent bef83106f3
commit e2bb69cac9
  1. 132
      main/ncurses/APKBUILD

@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ncurses
pkgver=6.3_p20220612
_ver=${pkgver/_p/-}
pkgver=6.3_p20220917
_pkgver=${pkgver/_p/-}
pkgrel=1
pkgdesc="Console display library"
url="https://invisible-island.net/ncurses/"
@ -9,10 +9,19 @@ arch="all"
options="!check" # "tests" are actual demo programs, not a test suite.
license="MIT"
makedepends_build="ncurses"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs
$pkgname-terminfo-base:base:noarch $pkgname-terminfo:terminfo:noarch"
source="https://invisible-mirror.net/archives/ncurses/current/ncurses-$_ver.tgz"
builddir="$srcdir"/ncurses-$_ver
subpackages="
$pkgname-static
$pkgname-dev
$pkgname-doc
$pkgname-libs
$pkgname-terminfo-base:base:noarch
$pkgname-terminfo:terminfo:noarch
"
_kitty_ver=0.25.2 # see comment in package()
source="https://invisible-mirror.net/archives/ncurses/current/ncurses-$_pkgver.tgz
xterm-kitty-$_kitty_ver::https://github.com/kovidgoyal/kitty/raw/v$_kitty_ver/terminfo/x/xterm-kitty
"
builddir="$srcdir/$pkgname-$_pkgver"
# secfixes:
# 6.3_p20220416-r0:
@ -26,6 +35,44 @@ builddir="$srcdir"/ncurses-$_ver
# 6.0_p20170701-r0:
# - CVE-2017-10684
# Terminfo definitions to be included in ncurses-terminfo-base.
_basic_terms="
alacritty
ansi
console
dumb
gnome
gnome-256color
konsole
konsole-256color
konsole-linux
linux
putty
putty-256color
rxvt
rxvt-256color
screen
screen-256color
st-*
sun
terminator
terminology*
tmux
tmux-256color
vt100
vt102
vt200
vt220
vt52
vte
vte-256color
xterm
xterm-256color
xterm-color
xterm-kitty
xterm-xfree86
"
build() {
./configure \
--build=$CBUILD \
@ -48,47 +95,56 @@ build() {
package() {
make -j1 DESTDIR="$pkgdir" install
cd "$pkgdir"
# kitty terminfo in ncurses database is outdated and upstream doesn't
# cooperate, so Kitty now uses xterm-kitty instead.
# https://github.com/kovidgoyal/kitty/issues/879
install -m644 "$srcdir"/xterm-kitty-$_kitty_ver usr/share/terminfo/x/xterm-kitty
# force link against *w.so
local lib; for lib in ncurses ncurses++ form panel menu; do
ln -s ${lib}w.pc usr/lib/pkgconfig/$lib.pc
ln -s lib${lib}w.a usr/lib/lib$lib.a
echo "INPUT(-l${lib}w)" > usr/lib/lib$lib.so
done
# link curses -> ncurses
ln -s libncurses.a usr/lib/libcurses.a
ln -s libncurses.so usr/lib/libcurses.so
echo 'INPUT(-lncursesw)' > usr/lib/libcursesw.so
# Install basic terms in /etc/terminfo
for i in ansi console dumb linux rxvt screen sun vt52 vt100 vt102 \
vt200 vt220 xterm xterm-color xterm-xfree86 xterm-256color \
alacritty tmux tmux-256color terminator 'terminology*' \
vte vte-256color gnome gnome-256color kitty konsole konsole-256color \
konsole-linux putty putty-256color rxvt-256color 'st-*' \
screen-256color; do
local termfiles=$(find "$pkgdir"/usr/share/terminfo/ -name "$i" 2>/dev/null) || true
local i; for i in $_basic_terms; do
local termfiles=$(find usr/share/terminfo/ -name "$i" 2>/dev/null) || true
[ -z "$termfiles" ] && continue
for termfile in $termfiles; do
local basedir=$(basename "$(dirname "$termfile")")
install -d "$pkgdir"/etc/terminfo/$basedir
mv "$termfile" "$pkgdir"/etc/terminfo/$basedir/
install -d etc/terminfo/$basedir
mv "$termfile" etc/terminfo/$basedir/
ln -s "../../../../etc/terminfo/$basedir/${termfile##*/}" \
"$pkgdir/usr/share/terminfo/$basedir/${termfile##*/}"
"usr/share/terminfo/$basedir/${termfile##*/}"
done
done
}
dev() {
default_dev
# force link against *w.so
for lib in ncurses ncurses++ form panel menu; do
echo "INPUT(-l${lib}w)" > "$subpkgdir"/usr/lib/lib$lib.so
ln -s ${lib}w.pc "$subpkgdir"/usr/lib/pkgconfig/$lib.pc
done
# link curses -> ncurses
echo "INPUT(-lncursesw)" > "$subpkgdir"/usr/lib/libcursesw.so
ln -s libncurses.so "$subpkgdir"/usr/lib/libcurses.so
# also move symlinks
amove usr/lib/*.so
}
terminfo() {
pkgdesc="$pkgdesc (other terminfo files)"
depends="$pkgname-terminfo-base=$pkgver-r$pkgrel"
replaces="kitty<0.25.2-r1" # /usr/share/terminfo/x/xterm-kitty (Alpine <3.17)
mkdir -p "$subpkgdir"/usr/share "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/share/terminfo "$subpkgdir"/usr/share
amove usr/share/terminfo
# also move symlink
mv "$pkgdir"/usr/lib/terminfo "$subpkgdir"/usr/lib/
amove usr/lib/terminfo
}
libs() {
@ -96,29 +152,17 @@ libs() {
depends="$pkgname-terminfo-base=$pkgver-r$pkgrel"
provides="ncurses-widec-libs=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir"/usr/lib
amove usr/lib/*.so.*
}
base() {
depends=""
pkgdesc="Descriptions of common terminals"
depends=""
mkdir -p "$subpkgdir"/etc/terminfo
mv "$pkgdir"/etc/terminfo/ "$subpkgdir"/etc/
}
static() {
pkgdesc="Static libraries for the ncurses library"
mkdir -p "$subpkgdir"/usr/lib
for lib in ncurses ncurses++ form panel menu; do
ln -s lib${lib}w.a "$subpkgdir"/usr/lib/lib${lib}.a
done
# link curses -> ncurses
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
ln -s libncurses.a "$subpkgdir"/usr/lib/libcurses.a
amove etc/terminfo
}
sha512sums="
3c0fccbca77ad70e55f362f054969571d2a558b9c8d51fd7f7a7836a774e34974db073488bbcdb3865deabc9bf8627426b47caa5a3546682a82dd8442c91b9f6 ncurses-6.3-20220612.tgz
50c52e56ff84bbd47db7cff504ef1311da671b0989451fedb299f0d1d544f7e47bbb8e84b8d4d1fce1a440b36fe607b2b5b8ec503c891767fc0ddd0c6a540c26 ncurses-6.3-20220917.tgz
76da551cffa16313933310c71eb7363ef0e35e14cd9c4547f5130484e0001195d2fad08978c9369e2519958c799226ebe14d6018b837bf6c6d75f2ad114cf9ba xterm-kitty-0.25.2
"

Loading…
Cancel
Save