From dc35b7cfdbc25fc192860dff716283e30ae54e77 Mon Sep 17 00:00:00 2001 From: xhaa123 Date: Sat, 7 Sep 2024 23:18:11 +0800 Subject: [PATCH] ncurses 6.5-1 --- ncurses/PKGBUILD | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 ncurses/PKGBUILD diff --git a/ncurses/PKGBUILD b/ncurses/PKGBUILD new file mode 100644 index 0000000..01d46ed --- /dev/null +++ b/ncurses/PKGBUILD @@ -0,0 +1,88 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# Maintainer: Future Linux Team +pkgname=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/${pkgname}/${pkgname}-${pkgver}.tar.gz) +sha256sums=(136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6) + +prepare() { + cd ${pkgname}-${pkgver} + + mkdir build non-wide-characters-library +} + +build() { + cd ${pkgname}-${pkgver} + + ( + cd build + + ${BUILD_CONFIGURE} \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-normal \ + --with-cxx-shared \ + --enable-pc-files \ + --with-pkg-config-libdir=/usr/lib64/pkgconfig + + make + ) + + ( + cd non-wide-characters-library + + ${BUILD_CONFIGURE} \ + --with-shared \ + --without-normal \ + --with-cxx-shared \ + --without-debug \ + --without-cxx-binding \ + --with-abi-version=5 + + make sources libs + ) +} + +package() { + cd ${pkgname}-${pkgver} + + ( + cd build + + make DESTDIR=$PWD/dest install + +# install -vdm755 ${pkgdir}/usr/lib64/pkgconfig + install -vDm755 dest/usr/lib64/libncursesw.so.${pkgver} ${pkgdir}/usr/lib64/libncursesw.so.${pkgver} + rm -v dest/usr/lib64/libncursesw.so.${pkgver} + sed -e 's/^#if.*XOPEN.*$/#if 1/' \ + -i dest/usr/include/curses.h + cp -av dest/* ${pkgdir}/ + + 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} + ) + + ( + cd non-wide-characters-library + + cp -av lib/lib*.so.5* ${pkgdir}/usr/lib64 + ) +}