2008-10-22 00:43:20 +00:00
|
|
|
# Template build file for 'ncurses'.
|
|
|
|
pkgname=ncurses
|
2011-06-20 21:04:23 +00:00
|
|
|
version=5.9
|
2013-05-14 10:44:23 +00:00
|
|
|
revision=7
|
2008-10-22 00:43:20 +00:00
|
|
|
short_desc="A System V Release 4.0 curses emulation library"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-06-20 21:04:23 +00:00
|
|
|
homepage="http://www.gnu.org/software/ncurses/"
|
|
|
|
license="MIT"
|
2012-07-09 14:58:42 +00:00
|
|
|
distfiles="http://ftp.gnu.org/pub/gnu/ncurses/$pkgname-$version.tar.gz"
|
2011-06-20 21:04:23 +00:00
|
|
|
checksum=9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b
|
2008-10-22 00:43:20 +00:00
|
|
|
long_desc="
|
|
|
|
The ncurses (new curses) library is a freeware emulation of System V Release
|
|
|
|
4.0 curses. It uses terminfo format, supports pads and color and multiple
|
|
|
|
highlights and forms characters and function-key mapping, and has all the
|
|
|
|
other SYSV-curses enhancements over BSD curses. The distribution includes
|
|
|
|
the library and support utilities, including a terminfo compiler tic, a
|
|
|
|
ecompiler infocmp, clear, tput, tset, and a termcap conversion tool captoinfo.
|
|
|
|
Full manual pages are provided for the library and tools."
|
|
|
|
|
2013-10-18 08:57:19 +00:00
|
|
|
bootstrap=yes
|
|
|
|
|
2013-05-14 10:44:23 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
# needs host tic(1)
|
|
|
|
hostmakedepends="ncurses"
|
|
|
|
fi
|
|
|
|
|
2013-04-02 15:52:23 +00:00
|
|
|
do_configure() {
|
2011-02-27 13:51:11 +00:00
|
|
|
mkdir ncurses-build ncursesw-build
|
|
|
|
cd ${wrksrc}/ncursesw-build
|
|
|
|
|
2013-03-02 07:45:12 +00:00
|
|
|
# Override config.sub with ours.
|
|
|
|
cp -f ${XBPS_CROSSPFDIR}/config.sub ${wrksrc}
|
|
|
|
|
2011-02-27 13:51:11 +00:00
|
|
|
# widec build
|
2013-05-26 08:41:55 +00:00
|
|
|
export CFLAGS="$CFLAGS -fPIC"
|
|
|
|
../configure ${configure_args} \
|
2013-02-05 00:35:18 +00:00
|
|
|
--enable-widec --with-shared --without-debug \
|
2013-02-06 11:30:28 +00:00
|
|
|
--with-manpage-symlinks --without-ada --enable-ext-colors \
|
|
|
|
--without-tests
|
2011-02-27 13:51:11 +00:00
|
|
|
|
|
|
|
cd ${wrksrc}/ncurses-build
|
|
|
|
# non-widec build
|
2013-05-26 08:41:55 +00:00
|
|
|
../configure ${configure_args} --with-shared \
|
2013-02-06 11:30:28 +00:00
|
|
|
--without-debug --without-ada --without-tests
|
2013-04-02 15:52:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
cd ${wrksrc}/ncursesw-build
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
cd ${wrksrc}/ncurses-build
|
2011-02-27 13:51:11 +00:00
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
2012-01-24 14:47:22 +00:00
|
|
|
do_install() {
|
2011-02-27 13:51:11 +00:00
|
|
|
cd ${wrksrc}/ncursesw-build
|
2013-02-06 11:08:13 +00:00
|
|
|
make DESTDIR=${DESTDIR} install
|
2011-02-27 13:51:11 +00:00
|
|
|
|
|
|
|
# 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
|
2013-04-18 13:11:41 +00:00
|
|
|
chmod 755 ${DESTDIR}/usr/lib/lib${lib}.so
|
2011-02-27 13:51:11 +00:00
|
|
|
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
|
2013-04-18 13:11:41 +00:00
|
|
|
chmod 755 ${DESTDIR}/usr/lib/libcursesw.so
|
2011-02-27 13:51:11 +00:00
|
|
|
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}
|
2013-04-18 13:11:41 +00:00
|
|
|
|
|
|
|
# Create compat symlinks.
|
2013-05-14 10:44:23 +00:00
|
|
|
for f in ncurses form panel menu; do
|
2013-04-18 13:11:41 +00:00
|
|
|
ln -sfr ${DESTDIR}/usr/lib/lib${f}w.so.6 \
|
|
|
|
${DESTDIR}/usr/lib/lib${f}w.so.5
|
|
|
|
done
|
2012-01-24 14:47:22 +00:00
|
|
|
|
|
|
|
# Remove broken symlink.
|
|
|
|
rm -f ${DESTDIR}/usr/lib/terminfo
|
2013-04-10 13:03:40 +00:00
|
|
|
|
|
|
|
ln -sfr ${DESTDIR}/usr/bin/ncursesw6-config \
|
|
|
|
${DESTDIR}/usr/bin/ncursesw5-config
|
|
|
|
ln -sfr ${DESTDIR}/usr/bin/ncursesw6-config \
|
|
|
|
${DESTDIR}/usr/bin/ncurses5-config
|
|
|
|
}
|
|
|
|
|
|
|
|
ncurses_package() {
|
2013-04-18 13:11:41 +00:00
|
|
|
depends="ncurses-base>=${version}"
|
2013-04-10 13:03:40 +00:00
|
|
|
pkg_install() {
|
2013-04-10 14:50:24 +00:00
|
|
|
vmove usr/bin
|
|
|
|
vmove usr/share/man/man1
|
2013-04-10 13:03:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ncurses-libs_package() {
|
|
|
|
short_desc+=" -- shared libraries"
|
|
|
|
replaces="ncursesw>=0"
|
|
|
|
pkg_install() {
|
2013-04-10 14:50:24 +00:00
|
|
|
vmove "usr/lib/*.so*"
|
2013-04-10 13:03:40 +00:00
|
|
|
}
|
2009-10-09 08:07:40 +00:00
|
|
|
}
|
2013-04-10 13:03:40 +00:00
|
|
|
|
|
|
|
ncurses-devel_package() {
|
|
|
|
depends="ncurses-libs>=${version}"
|
2013-05-14 10:44:23 +00:00
|
|
|
short_desc+=" - development files"
|
2013-04-10 13:03:40 +00:00
|
|
|
replaces="ncursesw-devel>=0"
|
|
|
|
pkg_install() {
|
2013-05-14 10:44:23 +00:00
|
|
|
vmove "usr/bin/ncurses*-config"
|
2013-04-10 14:50:24 +00:00
|
|
|
vmove usr/include
|
|
|
|
vmove "usr/lib/*.a"
|
|
|
|
vmove usr/share/man/man3
|
2013-10-18 08:57:19 +00:00
|
|
|
vmove usr/share/man/man1/ncursesw6-config.1.gz
|
2013-04-10 13:03:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-18 13:18:18 +00:00
|
|
|
ncurses-base_package() {
|
2013-05-14 10:44:23 +00:00
|
|
|
short_desc+=" - base terminfo files"
|
2013-04-18 13:18:18 +00:00
|
|
|
noarch=yes
|
|
|
|
pkg_install() {
|
|
|
|
cat ${FILESDIR}/base-files | while read line; do
|
|
|
|
vmove ${line}
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ncurses-term_package() {
|
|
|
|
depends="ncurses-base>=${version}"
|
2013-05-14 10:44:23 +00:00
|
|
|
short_desc+=" - full terminal descriptions"
|
2013-04-18 13:18:18 +00:00
|
|
|
noarch=yes
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/tabset
|
|
|
|
vmove usr/share/terminfo
|
|
|
|
}
|
|
|
|
}
|