2008-10-22 02:43:20 +02:00
|
|
|
# Template build file for 'ncurses'.
|
|
|
|
pkgname=ncurses
|
2011-06-20 23:04:23 +02:00
|
|
|
version=5.9
|
2013-04-07 02:00:23 +02:00
|
|
|
revision=5
|
2008-10-22 02:43:20 +02:00
|
|
|
short_desc="A System V Release 4.0 curses emulation library"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-06-20 23:04:23 +02:00
|
|
|
homepage="http://www.gnu.org/software/ncurses/"
|
|
|
|
license="MIT"
|
2012-07-09 16:58:42 +02:00
|
|
|
distfiles="http://ftp.gnu.org/pub/gnu/ncurses/$pkgname-$version.tar.gz"
|
2011-06-20 23:04:23 +02:00
|
|
|
checksum=9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b
|
2008-10-22 02:43:20 +02: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-04-07 02:00:23 +02:00
|
|
|
if [ "$XBPS_CROSS_BUILD" ]; then
|
2013-02-06 12:08:13 +01:00
|
|
|
subpackages="ncurses-devel ncurses-libs"
|
|
|
|
else
|
|
|
|
subpackages="ncurses-base ncurses-devel ncurses-libs ncurses-term"
|
|
|
|
fi
|
|
|
|
|
2013-04-02 17:52:23 +02:00
|
|
|
do_configure() {
|
2011-02-27 14:51:11 +01:00
|
|
|
mkdir ncurses-build ncursesw-build
|
|
|
|
cd ${wrksrc}/ncursesw-build
|
|
|
|
|
2013-03-02 08:45:12 +01:00
|
|
|
# Override config.sub with ours.
|
|
|
|
cp -f ${XBPS_CROSSPFDIR}/config.sub ${wrksrc}
|
|
|
|
|
2011-02-27 14:51:11 +01:00
|
|
|
# widec build
|
2013-02-05 01:35:18 +01:00
|
|
|
CFLAGS="$CFLAGS -fPIC" \
|
|
|
|
../configure ${CONFIGURE_SHARED_ARGS} \
|
|
|
|
--enable-widec --with-shared --without-debug \
|
2013-02-06 12:30:28 +01:00
|
|
|
--with-manpage-symlinks --without-ada --enable-ext-colors \
|
|
|
|
--without-tests
|
2011-02-27 14:51:11 +01:00
|
|
|
|
|
|
|
cd ${wrksrc}/ncurses-build
|
|
|
|
# non-widec build
|
2013-02-05 01:35:18 +01:00
|
|
|
CFLAGS="$CFLAGS -fPIC" \
|
|
|
|
../configure ${CONFIGURE_SHARED_ARGS} --with-shared \
|
2013-02-06 12:30:28 +01:00
|
|
|
--without-debug --without-ada --without-tests
|
2013-04-02 17:52:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
cd ${wrksrc}/ncursesw-build
|
|
|
|
make ${makejobs}
|
|
|
|
|
|
|
|
cd ${wrksrc}/ncurses-build
|
2011-02-27 14:51:11 +01:00
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
2012-01-24 15:47:22 +01:00
|
|
|
do_install() {
|
2011-02-27 14:51:11 +01:00
|
|
|
cd ${wrksrc}/ncursesw-build
|
2013-04-07 02:00:23 +02:00
|
|
|
if [ "$XBPS_CROSS_BUILD" ]; then
|
2013-02-06 12:08:13 +01:00
|
|
|
sed -e "s#install : install.data install.libs#install: install.libs#g" -i misc/Makefile
|
|
|
|
fi
|
|
|
|
make DESTDIR=${DESTDIR} install
|
2011-02-27 14:51:11 +01: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
|
|
|
|
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
|
|
|
|
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
|
2013-02-06 12:08:13 +01:00
|
|
|
|
2011-02-27 14:51:11 +01:00
|
|
|
install -Dm755 lib/libncurses.so.${version} \
|
|
|
|
${DESTDIR}/usr/lib/libncurses.so.${version}
|
|
|
|
ln -sf libncurses.so.${version} \
|
|
|
|
${DESTDIR}/usr/lib/libncurses.so.5
|
2012-01-24 15:47:22 +01:00
|
|
|
|
|
|
|
# Remove broken symlink.
|
|
|
|
rm -f ${DESTDIR}/usr/lib/terminfo
|
2009-10-09 10:07:40 +02:00
|
|
|
}
|