diff --git a/ncurses.changes b/ncurses.changes index f8d730f..07fd035 100644 --- a/ncurses.changes +++ b/ncurses.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 7 12:05:37 UTC 2015 - werner@suse.de + +- Simplfy bootstrapping of libtinfo and its fallback.c + ------------------------------------------------------------------- Tue Oct 6 11:30:22 UTC 2015 - werner@suse.de diff --git a/ncurses.spec b/ncurses.spec index 5712478..fc79c0c 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -479,6 +479,11 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src --with-ticlib=tic \ --with-pc-suffix \ --enable-pc-files \ +%if 0%{?_crossbuild} + --with-fallbacks="$FALLBK" \ +%else + --with-fallbacks="" \ +%endif %if %{with symversion} --with-versioned-syms=${PWD}/package/ncursest.map \ %endif @@ -494,22 +499,24 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src # It has been verified several times that this works. # c=$(grep '^ *$ *\./configure' config.log) + make -C c++ etip.h + make %{?_smp_mflags} + # + # Refresh second install path + # + rm -rf %{root} + mkdir %{root} +%if !0%{?_crossbuild} # # 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 + # tools list infocmp(1) and tic(1). The first step was with + # an empty fallback.c, now 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 export LD_LIBRARY_PATH PATH @@ -518,13 +525,8 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src export TERMINFO mkdir -p $TERMINFO (cat > ${PWD}/.build_tic)<<-EOF -%if 0%{?_crossbuild} - export BUILD_TIC=/usr/bin/tic - export BUILD_INFOCMP=/usr/bin/infocmp -%else export BUILD_TIC=$PWD/../progs/tic.build export BUILD_INFOCMP=$PWD/../progs/infocmp.build -%endif EOF . ${PWD}/.build_tic $BUILD_TIC -I -r -e $FALLBK ../misc/terminfo.src > terminfo.src @@ -537,17 +539,18 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src PATH=$OPATH unset LD_LIBRARY_PATH # - # Refresh second install path - # - rm -rf %{root} - mkdir %{root} - # # Now rebuild libncurses and do the rest of this job # find -name fallback.o | xargs -r rm -vf cp fallback.c.build ncurses/fallback.c make -C c++ etip.h make %{?_smp_mflags} +%else + (cat > ${PWD}/.build_tic)<<-EOF + export BUILD_TIC=/usr/bin/tic + export BUILD_INFOCMP=/usr/bin/infocmp + EOF +%endif # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install DESTDIR=%{root} includedir=%{_incdir} includesubdir=/ncurses libdir=%{_libdir} ln -sf %{_incdir}/ncurses/{curses,ncurses,term,termcap}.h %{root}%{_incdir} @@ -588,8 +591,10 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src --without-progs sleep 1 kill $pid +%if !0%{?_crossbuild} find -name fallback.o | xargs -r rm -vf cp fallback.c.build ncurses/fallback.c +%endif make -C c++ etip.h make %{?_smp_mflags} sed -ri 's@^(LDFLAGS=)$@\1-L\\${libdir}@ @@ -634,8 +639,10 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src --without-progs sleep 1 kill $pid +%if !0%{?_crossbuild} find -name fallback.o | xargs -r rm -vf cp fallback.c.build ncurses/fallback.c +%endif make -C c++ etip.h make %{?_smp_mflags} # must not use %jobs here (would lead to: ln: ncurses.h already exists) @@ -666,8 +673,10 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src --without-progs sleep 1 kill $pid +%if !0%{?_crossbuild} find -name fallback.o | xargs -r rm -vf cp fallback.c.build ncurses/fallback.c +%endif make -C c++ etip.h make %{?_smp_mflags} sed -ri 's@^(LDFLAGS=)$@\1-L\\${libdir}@