diff --git a/ncurses.changes b/ncurses.changes index 3f97e3a..f8d730f 100644 --- a/ncurses.changes +++ b/ncurses.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 6 11:30:22 UTC 2015 - werner@suse.de + +- Add some comments what is done in the spec file as well as + do some modernisation, concretion, and clarification + ------------------------------------------------------------------- Fri Sep 25 09:42:43 UTC 2015 - normand@linux.vnet.ibm.com diff --git a/ncurses.spec b/ncurses.spec index c146e05..5712478 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -43,6 +43,10 @@ BuildRequires: gpm Obsoletes: ncurses-64bit %endif # +# Note that this spec files does not only build the ABI version 6 +# but also build the ABI version 5 as this is part of the source +# tar ball including the latest upstream fixes for ABI 5. +# Version: 6.0 Release: 0 Summary: New curses Libraries @@ -55,7 +59,8 @@ Source1: ncurses-6.0-patches.tar.bz2 Source2: handle.linux Source3: README.devel Source4: ncurses-rpmlintrc -Source5: tack-1.07-20150606.tar.bz2 +# Latest tack can be found at ftp://invisible-island.net/pub/ncurses/current/ +Source5: ftp://invisible-island.net/pub/ncurses/current/tack-1.07-20150606.tar.bz2 Source6: edit.sed Source7: baselibs.conf Patch0: ncurses-6.0.dif @@ -293,6 +298,14 @@ rm -vf mk-dlls.sh sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src %build +# +# Note that there is a test if the system call poll(2) really works +# on terminal or files. To make sure that even in OBS the configure +# script has its own terminal we use screen here (could be also tmux). +# +# Remark: A better solution would be that in OBS a real pty/tty pair +# would be used instead of redirecting stdout/stderr to a log file. +# %global _configure screen -L -D -m ./configure SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1 SCREENRC=${SCREENDIR}/ncurses @@ -311,6 +324,9 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src silence on utf8 on EOF + # + # Used to test out various cflags of the gcc + # cflags () { local flag=$1; shift @@ -360,20 +376,21 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src GZIP="-9" export CC CFLAGS CXX CXXFLAGS GZIP TERM LDFLAGS # - # Detect 64bit architecures and be sure that - # we use an unsigned long for chtype to be - # backward compatible with ncurses 5.4 + # Detect 64bit architecures and be sure that we use an + # unsigned long for chtype to be backward compatible with + # already existing ncurses applications. Otherwise we + # might break existing applications on any update! # - echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 - - if ./test64 ; then + if test $(getconf LONG_BIT) -gt 32 ; then WITHCHTYPE="--with-chtype=long" else WITHCHTYPE="" - CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCES -D_FILE_OFFSET_BITS=64" + CFLAGS="${CFLAGS} $(getconf LFS_CFLAGS)" fi - rm -f ./test64 # - # For security of some configure and install scripts + # Let's care about people which build ncurses on their own + # system. That is take care that some configure tests might + # be exploitable below /tmp ... compare with aclocal.m4 # TMPDIR=$(mktemp -d /tmp/ncurses.XXXXXXXX) || exit 1 trap 'rm -rf ${TMPDIR}' EXIT @@ -394,6 +411,10 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src # on console/konsole (no magic cookie support on those?) # %if 0%{?suse_version} > 1310 + # + # Why the libgpm has moved to /usr/lib(64)? + # It is a standard system library for linux. + # SO=$(rpm -ql gpm-devel|grep %{_libdir}) SO=%{_libdir}/$(readlink $SO) %endif @@ -468,16 +489,26 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src sleep 1 kill $pid # - # The configure line + # The configure line used above. Note that we override + # several options later with other configurations. + # It has been verified several times that this works. # c=$(grep '^ *$ *\./configure' config.log) # - # This is a hack to be able to boot strap - # a libncurses with correct fallback.c. + # This is a hack to be able to boot strap libncurses with + # our preferred fallback.c. For this we need the appropiate + # tools list infocmp(1) and tic(1). The first step is with + # an empty fallback.c, then we include the latest terminfo + # of our preferred fallback terminfo list into the final + # fallback.c. # make %{?_smp_mflags} -C include make %{?_smp_mflags} -C ncurses fallback.c FALLBACK_LIST="" +%if !0%{?_crossbuild} make %{?_smp_mflags} -C progs termsort.c transform.h infocmp tic + cp -p progs/tic progs/tic.build + cp -p progs/infocmp progs/infocmp.build +%endif rm -f ncurses/fallback.c PATH=$PWD/progs:$OPATH LD_LIBRARY_PATH=$PWD/lib @@ -486,8 +517,6 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src TERMINFO=$PWD/tmp export TERMINFO mkdir -p $TERMINFO - cp -p $PWD/../progs/tic $PWD/../progs/tic.build - cp -p $PWD/../progs/infocmp $PWD/../progs/infocmp.build (cat > ${PWD}/.build_tic)<<-EOF %if 0%{?_crossbuild} export BUILD_TIC=/usr/bin/tic