mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 02:57:13 +08:00
86 lines
2.6 KiB
Bash
86 lines
2.6 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer abveritas[at]chakra-project[dot]org>
|
|
|
|
pkgname=ncurses
|
|
pkgver=5.9
|
|
pkgrel=4
|
|
pkgdesc="System V Release 4.0 curses emulation library"
|
|
arch=('x86_64')
|
|
url="http://www.gnu.org/software/ncurses/"
|
|
license=('MIT')
|
|
depends=('glibc')
|
|
source=("ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz"
|
|
'gentoo-ncurses-5.9-rxvt-unicode-9.15.patch')
|
|
md5sums=('8cb9c412e5f2d96bc6f459aa8c6282a1'
|
|
'da9ffd52d5826c661aa02be2bf1fa8c1')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
patch -p0 -i "${srcdir}/gentoo-ncurses-5.9-rxvt-unicode-9.15.patch"
|
|
|
|
cd "${srcdir}"
|
|
rm -rf ncurses{,w}-build && mkdir -p ncurses{,w}-build
|
|
|
|
cd "${srcdir}/ncursesw-build"
|
|
"${srcdir}/${pkgname}-${pkgver}/configure" \
|
|
--prefix=/usr \
|
|
--mandir=/usr/share/man \
|
|
--with-shared \
|
|
--with-normal \
|
|
--without-debug \
|
|
--without-ada \
|
|
--with-install-prefix="${pkgdir}" \
|
|
--enable-widec \
|
|
--enable-pc-files
|
|
make
|
|
|
|
# libncurses.so.5 for external binary support
|
|
cd ${srcdir}/ncurses-build
|
|
CONFIGFLAG="--with-chtype=long"
|
|
"${srcdir}/${pkgname}-${pkgver}/configure" \
|
|
--prefix=/usr \
|
|
--with-shared \
|
|
--with-normal \
|
|
--without-debug \
|
|
--without-ada \
|
|
--with-install-prefix="${pkgdir}" \
|
|
"${CONFIGFLAG}"
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/ncursesw-build"
|
|
make install
|
|
|
|
# Fool packages looking to link to non-wide-character ncurses libraries
|
|
for lib in curses ncurses form panel menu ; do \
|
|
echo "INPUT(-l${lib}w)" >"${pkgdir}/usr/lib/lib${lib}.so" ; \
|
|
ln -s "lib${lib}w.a" "${pkgdir}/usr/lib/lib${lib}.a" ; \
|
|
done
|
|
ln -s libncurses++w.a "${pkgdir}/usr/lib/libncurses++.a"
|
|
|
|
for lib in ncurses ncurses++ form panel menu; do
|
|
ln -s ${lib}w.pc ${pkgdir}/usr/lib/pkgconfig/${lib}.pc
|
|
done
|
|
|
|
# Some packages look for -lcurses during build
|
|
echo "INPUT(-lncursesw)" >"${pkgdir}/usr/lib/libcursesw.so"
|
|
ln -sf libncurses.so "${pkgdir}/usr/lib/libcurses.so"
|
|
ln -sf libncursesw.a "${pkgdir}/usr/lib/libcursesw.a"
|
|
ln -sf libncurses.a "${pkgdir}/usr/lib/libcurses.a"
|
|
|
|
# non-widec compatibility library
|
|
cd "${srcdir}/ncurses-build"
|
|
install -D -m755 "lib/libncurses.so.${pkgver}" \
|
|
"${pkgdir}/usr/lib/libncurses.so.${pkgver}"
|
|
ln -sf "libncurses.so.${pkgver}" "${pkgdir}/usr/lib/libncurses.so.5"
|
|
|
|
# install license, rip it from the readme
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
grep -B 100 '$Id' README > "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
|
|
}
|
|
|