new: lfs-12.2-systemd/ncurses-6.5

This commit is contained in:
Yingjie Wang 2024-11-29 01:03:45 -05:00
parent 47c22478ed
commit 1c11a5fb79

View File

@ -0,0 +1,49 @@
pkgname="ncurses"
pkgver="6.5"
pkgdesc='System V Release 4.0 curses emulation library'
homepage="https://www.gnu.org/software/ncurses/"
license=(MIT-open-group)
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://invisible-mirror.net/archives/ncurses/${sources[0]}")
md5sums=("ac2d2629296f04c8537ca706b6977687")
src_prepare() {
tar -xf ${DIST_DIR}/${pkgname}-${pkgver}/${sources[0]} --strip-components=1
}
src_build() {
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-shared \
--without-debug \
--without-normal \
--with-cxx-shared \
--enable-pc-files \
--with-pkg-config-libdir=/usr/lib/pkgconfig
make
}
src_install() {
make DESTDIR="$pkgdir" install
install -vDm 644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
-i "${pkgdir}/usr/include/curses.h"
for lib in ncurses form panel menu ; do
ln -sfv lib${lib}w.so "${pkgdir}/usr/lib/lib${lib}.so"
ln -sfv ${lib}w.pc "${pkgdir}/usr/lib/pkgconfig/${lib}.pc"
done
ln -sfv libncursesw.so "${pkgdir}/usr/lib/libcurses.so"
install -vd "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
cp -v -R doc -T "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
# non-wide
make distclean
./configure --prefix=/usr \
--with-shared \
--without-normal \
--without-debug \
--without-cxx-binding \
--with-abi-version=5
make sources libs
cp -av lib/lib*.so.5* "${pkgdir}/usr/lib"
}