pkgname=(ncurses ncurses-compat-libs) pkgbase=ncurses pkgver=6.5 pkgrel=1 pkgdesc="System V Release 4.0 curses emulation library" arch=('x86_64') url="https://www.gnu.org/software/ncurses/" license=('MIT-open-group') depends=('glibc' 'gcc-libs') source=(https://invisible-mirror.net/archives/${pkgbase}/${pkgbase}-${pkgver}.tar.gz) sha256sums=(136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6) prepare() { cd ${pkgbase}-${pkgver} mkdir build compat-libs-build } build() { cd ${pkgbase}-${pkgver} local configure_args=( --with-shared --without-debug --without-normal ) ( cd build ../configure \ ${configure_args[@]} \ --mandir=/usr/share/man \ --with-cxx-shared \ --enable-pc-files \ --with-pkg-config-libdir=/usr/lib64/pkgconfig make ) ( cd compat-libs-build ../configure \ ${configure_args[@]} \ --with-cxx-binding \ --with-abi-version=5 \ ${configure_options} make sources libs ) } package_ncurses() { cd ${pkgbase}-${pkgver}/build make DESTDIR=${pkgdir} install sed -e 's/^#if.*XOPEN.*$/#if 1/' \ -i ${pkgdir}/usr/include/curses.h chmod 644 ${pkgdir}/usr/include/curses.h for lib in ncurses form panel menu ; do ln -sfv lib${lib}w.so ${pkgdir}/usr/lib64/lib${lib}.so ln -sfv ${lib}w.pc ${pkgdir}/usr/lib64/pkgconfig/${lib}.pc done ln -sfv libncursesw.so ${pkgdir}/usr/lib64/libcurses.so install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} cp -v -R ../doc -T ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} } package_ncurses-compat-libs() { pkgdesc="Ncurses compatibility libraries" depends=('ncurses') cd ${pkgbase}-${pkgver}/compat-libs-build install -vdm755 ${pkgdir}/usr/lib64 cp -av lib/lib*.so.5* ${pkgdir}/usr/lib64 }