diff --git a/srcpkgs/ncurses/template b/srcpkgs/ncurses/template index 48ed66fdc30..85b59ff37e8 100644 --- a/srcpkgs/ncurses/template +++ b/srcpkgs/ncurses/template @@ -2,7 +2,6 @@ pkgname=ncurses version=5.9 revision=4 -subpackages="ncurses-base ncurses-devel ncurses-libs ncurses-term" short_desc="A System V Release 4.0 curses emulation library" maintainer="Juan RP " homepage="http://www.gnu.org/software/ncurses/" @@ -18,6 +17,12 @@ long_desc=" ecompiler infocmp, clear, tput, tset, and a termcap conversion tool captoinfo. Full manual pages are provided for the library and tools." +if [ -n "$XBPS_CROSS_TRIPLET" ]; then + subpackages="ncurses-devel ncurses-libs" +else + subpackages="ncurses-base ncurses-devel ncurses-libs ncurses-term" +fi + do_build() { mkdir ncurses-build ncursesw-build cd ${wrksrc}/ncursesw-build @@ -26,21 +31,23 @@ do_build() { CFLAGS="$CFLAGS -fPIC" \ ../configure ${CONFIGURE_SHARED_ARGS} \ --enable-widec --with-shared --without-debug \ - --with-manpage-symlinks --without-ada --enable-ext-colors \ - --with-install-prefix=${DESTDIR} + --with-manpage-symlinks --without-ada --enable-ext-colors make ${makejobs} cd ${wrksrc}/ncurses-build # non-widec build CFLAGS="$CFLAGS -fPIC" \ ../configure ${CONFIGURE_SHARED_ARGS} --with-shared \ - --without-debug --without-ada --with-install-prefix=${DESTDIR} + --without-debug --without-ada make ${makejobs} } do_install() { cd ${wrksrc}/ncursesw-build - make install + if [ -n "$XBPS_CROSS_TRIPLET" ]; then + sed -e "s#install : install.data install.libs#install: install.libs#g" -i misc/Makefile + fi + make DESTDIR=${DESTDIR} install # Fool packages looking to link to non-wide-character ncurses libraries for lib in curses ncurses form panel menu; do @@ -59,6 +66,7 @@ do_install() { # non-widec compatibility library cd ${wrksrc}/ncurses-build + install -Dm755 lib/libncurses.so.${version} \ ${DESTDIR}/usr/lib/libncurses.so.${version} ln -sf libncurses.so.${version} \