[617118d] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | ### NCURSES ###
|
---|
| 4 |
|
---|
| 5 | cd ${SRC}
|
---|
| 6 | LOG=ncurse-buildhost.log
|
---|
| 7 |
|
---|
| 8 | unpack_tarball ncurses-${NCURSES_VER} &&
|
---|
| 9 | cd ${PKGDIR}
|
---|
| 10 |
|
---|
| 11 | # replace some deprecated headers
|
---|
| 12 | # strstream deprecated in favour of sstream
|
---|
| 13 | cd c++
|
---|
| 14 | test -f cursesw.h-ORIG ||
|
---|
| 15 | mv cursesw.h cursesw.h-ORIG
|
---|
| 16 | sed 's/include <strstream.h>/include <sstream>/g' ./cursesw.h-ORIG > ./cursesw.h
|
---|
| 17 |
|
---|
| 18 | # CHECK THIS... Should only affect ncurses 5.2 and less,
|
---|
| 19 | # must check whether vsscanf is picked up or not in 5.3
|
---|
| 20 |
|
---|
| 21 | test 5.2 = "${NCURSES_VER}" &&
|
---|
| 22 | {
|
---|
| 23 | # Apply cursesw.cc vsscanf patch
|
---|
| 24 | # Unsure who provided the original patch used.
|
---|
| 25 | # Please contact the authors so we can attribute you correctly.
|
---|
| 26 | test -f ./cursesw.cc-ORIG ||
|
---|
| 27 | cp cursesw.cc cursesw.cc-ORIG
|
---|
| 28 | grep -v strstreambuf cursesw.cc-ORIG |
|
---|
| 29 | sed 's@ss.vscan(@::vsscanf(buf, @' > cursesw.cc
|
---|
| 30 | }
|
---|
| 31 | cd ${SRC}/${PKGDIR}
|
---|
| 32 |
|
---|
| 33 | max_log_init Ncurses ${NCURSES_VER} "buildhost (static)" ${CONFLOGS} ${LOG}
|
---|
| 34 | CC="${CC-gcc}" ./configure --prefix=${HST_TOOLS} \
|
---|
| 35 | --without-debug \
|
---|
| 36 | --without-cxx \
|
---|
| 37 | --without-cxx-binding \
|
---|
| 38 | >> ${LOGFILE} 2>&1 &&
|
---|
| 39 | echo " o Configure OK" &&
|
---|
| 40 |
|
---|
| 41 | min_log_init ${BUILDLOGS} &&
|
---|
| 42 | make \
|
---|
| 43 | >> ${LOGFILE} 2>&1 &&
|
---|
| 44 | echo " o Build OK" &&
|
---|
| 45 |
|
---|
| 46 | min_log_init ${INSTLOGS} &&
|
---|
| 47 | make install \
|
---|
| 48 | >> ${LOGFILE} 2>&1 &&
|
---|
| 49 | echo " o ALL OK" || barf
|
---|
| 50 |
|
---|
| 51 | chmod 755 ${HST_TOOLS}/lib/*.${NCURSES_VER} &&
|
---|
| 52 | ln -s libncurses.a ${HST_TOOLS}/lib/libcurses.a
|
---|
| 53 |
|
---|
| 54 | #ldconfig
|
---|
| 55 |
|
---|
| 56 | # Some braindead apps (util-linux) don't check for term.h under include/ncurses
|
---|
| 57 | # Create link
|
---|
| 58 | ln -sf ncurses/term.h ${HST_TOOLS}/include
|
---|
| 59 | # Also create curses.h symlink
|
---|
| 60 | ln -sf ncurses/curses.h ${HST_TOOLS}/include
|
---|
| 61 |
|
---|