pkgs/ncurses/PKGBUILD

60 lines
1.8 KiB
Text
Raw Permalink Normal View History

2023-12-05 04:47:04 +00:00
# Maintainer: Daryl Ronningen <relms@relms.dev>
pkgname=ncurses
pkgver=6.4_20231202
pkgrel=1
2023-12-08 02:05:38 +00:00
pkgdesc="System V Release 4.0 curses emulation library"
arch=("x86_64")
url="https://invisible-island.net/ncurses/ncurses.html"
license=("MIT")
source=("https://invisible-mirror.net/archives/$pkgname/current/$pkgname-${pkgver/_/-}.tgz")
sha256sums=("f3f42e800eb8af42dddfb2e44ed9c91a7e5f51cf529e0cd91450e0b4db8cc471")
2023-12-05 04:47:04 +00:00
build() {
2023-12-08 02:05:38 +00:00
local configure_options=(
--prefix=/usr
--disable-root-access
--disable-root-environ
--disable-setuid-environ
--enable-widec
--enable-pc-files
--mandir=/usr/share/man
--with-cxx-binding
--with-cxx-shared
--with-manpage-format=normal
--with-pkg-config-libdir=/usr/lib/pkgconfig
--with-shared
--with-xterm-kbs=del
--without-ada
)
cd $pkgname-${pkgver/_/-}
./configure "${configure_options[@]}"
make
2023-12-05 04:47:04 +00:00
}
package() {
2023-12-08 02:05:38 +00:00
local _pkgver=${pkgver/_*/}
make DESTDIR=$pkgdir install -C $pkgname-${pkgver/_/-}
install -vDm 644 $pkgname-${pkgver/_/-}/COPYING -t $pkgdir/usr/share/licenses/$pkgname/
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses ncurses++ form panel menu; do
printf "INPUT(-l%sw)\n" "$lib" >$pkgdir/usr/lib/lib${lib}.so
ln -sv ${lib}w.pc $pkgdir/usr/lib/pkgconfig/$lib.pc
done
# some packages look for -lcurses during build
printf "INPUT(-lncursesw)\n" >$pkgdir/usr/lib/libcursesw.so
ln -sv libncurses.so $pkgdir/usr/lib/libcurses.so
# tic and ticinfo functionality is built in by default
# make sure that anything linking against it links against libncursesw.so instead
for lib in tic tinfo; do
printf "INPUT(libncursesw.so.%s)\n" ${_pkgver:0:1} >$pkgdir/usr/lib/lib${lib}.so
ln -sv libncursesw.so.${pkgver:0:1} $pkgdir/usr/lib/lib${lib}.so.${_pkgver:0:1}
ln -sv ncursesw.pc $pkgdir/usr/lib/pkgconfig/${lib}.pc
done
2023-12-05 04:47:04 +00:00
}