132 lines
3.6 KiB
Bash
132 lines
3.6 KiB
Bash
# Template file for 'ncurses'
|
|
pkgname=ncurses
|
|
version=6.1
|
|
revision=4
|
|
short_desc="System V Release 4.0 curses emulation library"
|
|
maintainer="Juan RP <xtraeme@voidlinux.org>"
|
|
license="MIT"
|
|
homepage="http://www.gnu.org/software/ncurses/"
|
|
distfiles="${GNU_SITE}/ncurses/$pkgname-$version.tar.gz"
|
|
checksum=aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17
|
|
|
|
bootstrap=yes
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# needs host tic(1)
|
|
hostmakedepends="ncurses"
|
|
fi
|
|
depends="ncurses-base-${version}_${revision}"
|
|
|
|
do_configure() {
|
|
export CFLAGS="$CFLAGS -fPIC"
|
|
export BUILD_CFLAGS="$BUILD_CFLAGS -fPIC"
|
|
|
|
mkdir -p ncurses-build ncursesw-build
|
|
|
|
cd ${wrksrc}/ncursesw-build
|
|
# widec build
|
|
../configure ${configure_args} \
|
|
--enable-widec --with-shared --without-debug \
|
|
--with-manpage-symlinks --with-manpage-format=normal \
|
|
--without-ada --enable-ext-colors \
|
|
--without-tests --enable-pc-files \
|
|
--with-pkg-config-libdir=/usr/lib/pkgconfig \
|
|
ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config \
|
|
BUILD_CFLAGS="$BUILD_CFLAGS"
|
|
|
|
cd ${wrksrc}/ncurses-build
|
|
# non-widec build
|
|
../configure ${configure_args} --with-shared \
|
|
--without-debug --without-ada --without-tests \
|
|
--enable-pc-files --with-pkg-config-libdir=/usr/lib/pkgconfig \
|
|
ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config \
|
|
BUILD_CFLAGS="$BUILD_CFLAGS"
|
|
}
|
|
|
|
do_build() {
|
|
cd ${wrksrc}/ncursesw-build
|
|
make ${makejobs}
|
|
|
|
cd ${wrksrc}/ncurses-build
|
|
make ${makejobs}
|
|
}
|
|
|
|
do_install() {
|
|
vlicense COPYING
|
|
|
|
cd ${wrksrc}/ncursesw-build
|
|
make DESTDIR=${DESTDIR} install
|
|
|
|
# Fool packages looking to link to non-wide-character ncurses libraries
|
|
for lib in curses ncurses form panel menu; do
|
|
rm -f ${DESTDIR}/usr/lib/lib${lib}.so
|
|
echo "INPUT(-l${lib}w)" >${DESTDIR}/usr/lib/lib${lib}.so
|
|
chmod 755 ${DESTDIR}/usr/lib/lib${lib}.so
|
|
ln -sf lib${lib}w.a ${DESTDIR}/usr/lib/lib${lib}.a
|
|
done
|
|
ln -sf libncurses++w.a ${DESTDIR}/usr/lib/libncurses++.a
|
|
|
|
# Some packages look for -lcurses during build
|
|
rm -f ${DESTDIR}/usr/lib/libcursesw.so
|
|
echo "INPUT(-lncursesw)" >${DESTDIR}/usr/lib/libcursesw.so
|
|
chmod 755 ${DESTDIR}/usr/lib/libcursesw.so
|
|
ln -sf libncurses.so ${DESTDIR}/usr/lib/libcurses.so
|
|
ln -sf libncursesw.a ${DESTDIR}/usr/lib/libcursesw.a
|
|
ln -sf libncurses.a ${DESTDIR}/usr/lib/libcurses.a
|
|
|
|
# non-widec compatibility library
|
|
cd ${wrksrc}/ncurses-build
|
|
install -Dm755 lib/libncurses.so.${version} \
|
|
${DESTDIR}/usr/lib/libncurses.so.${version}
|
|
|
|
# Create compat symlinks.
|
|
for f in ncurses form panel menu; do
|
|
ln -sfr ${DESTDIR}/usr/lib/lib${f}w.so.6 \
|
|
${DESTDIR}/usr/lib/lib${f}w.so.5
|
|
done
|
|
|
|
# Remove broken symlink.
|
|
rm -f ${DESTDIR}/usr/lib/terminfo
|
|
|
|
ln -sf ncursesw6-config ${DESTDIR}/usr/bin/ncursesw5-config
|
|
ln -sf ncursesw6-config ${DESTDIR}/usr/bin/ncurses5-config
|
|
}
|
|
|
|
ncurses-libs_package() {
|
|
shlib_provides="libformw.so.5 libmenuw.so.5 libpanelw.so.5 libncursesw.so.5"
|
|
short_desc+=" -- shared libraries"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
ncurses-devel_package() {
|
|
depends="ncurses-libs-${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove "usr/bin/ncurses*-config"
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/share/man/man3
|
|
vmove usr/share/man/man1/ncursesw6-config.1
|
|
}
|
|
}
|
|
ncurses-base_package() {
|
|
short_desc+=" - base terminfo files"
|
|
archs=noarch
|
|
pkg_install() {
|
|
cat ${FILESDIR}/base-files | while read line; do
|
|
vmove ${line}
|
|
done
|
|
}
|
|
}
|
|
ncurses-term_package() {
|
|
depends="ncurses-base-${version}_${revision}"
|
|
short_desc+=" - full terminal descriptions"
|
|
archs=noarch
|
|
pkg_install() {
|
|
vmove usr/share/tabset
|
|
vmove usr/share/terminfo
|
|
}
|
|
}
|