diff --git a/ncurses-5.9-ibm327x.dif b/ncurses-5.9-ibm327x.dif index 55389e8..fbcbde8 100644 --- a/ncurses-5.9-ibm327x.dif +++ b/ncurses-5.9-ibm327x.dif @@ -3,8 +3,8 @@ 1 file changed, 2 insertions(+), 2 deletions(-) --- misc/terminfo.src -+++ misc/terminfo.src 2018-01-29 10:42:50.284566362 +0000 -@@ -16451,8 +16451,8 @@ hazel|exec80|h80|he80|Hazeltine Executiv ++++ misc/terminfo.src 2018-02-26 09:11:11.405411875 +0000 +@@ -16487,8 +16487,8 @@ hazel|exec80|h80|he80|Hazeltine Executiv # ibm327x|line mode IBM 3270 style, diff --git a/ncurses-6.1-patches.tar.bz2 b/ncurses-6.1-patches.tar.bz2 index db84aa9..a71df9d 100644 --- a/ncurses-6.1-patches.tar.bz2 +++ b/ncurses-6.1-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d822ab8d2d7fa5dc03662a892edec02336ee432580fad6d096b0b3cba8b6d698 -size 8285 +oid sha256:0a949e2d78dc242d1ada722ff3b37b1f16b032d9c1525576c20b2f939dd0911b +size 91010 diff --git a/ncurses-6.1.dif b/ncurses-6.1.dif index 89b8767..2863dce 100644 --- a/ncurses-6.1.dif +++ b/ncurses-6.1.dif @@ -22,7 +22,7 @@ 20 files changed, 248 insertions(+), 81 deletions(-) --- aclocal.m4 -+++ aclocal.m4 2018-01-29 10:43:34.207735837 +0000 ++++ aclocal.m4 2018-03-05 07:53:48.984265229 +0000 @@ -580,7 +580,7 @@ AC_MSG_CHECKING([for size of bool]) AC_CACHE_VAL(cf_cv_type_of_bool,[ rm -f cf_test.out @@ -151,8 +151,8 @@ esac done --- configure -+++ configure 2018-01-29 10:43:34.211735762 +0000 -@@ -5971,7 +5971,7 @@ case $cf_cv_system_name in ++++ configure 2018-03-05 07:53:48.988265152 +0000 +@@ -5972,7 +5972,7 @@ case $cf_cv_system_name in fi ;; (linux*|gnu*|k*bsd*-gnu|freebsd*) @@ -161,7 +161,7 @@ ;; (openbsd[2-9].*|mirbsd*) LD_RPATH_OPT="-Wl,-rpath," -@@ -12022,12 +12022,15 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <\$TMP CF_EOF if test -n "$cf_compress" ; then -@@ -12152,9 +12155,9 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <, rmul=\EG0$<10/>, sgr0=\EG0$<10/>, smir=\Eq, smso=\EG4$<10/>, smul=\EG8$<10/>, tbc=\E0, vpa=\E[%p1%{32}%+%c, @@ -759,7 +759,7 @@ am, da, db, xhp, cols#80, lh#2, lines#24, lm#0, lw#8, nlab#8, acsc=0cjgktlrmfn/q\,t5u6v8w7x., bel=^G, blink=\E&dA, -@@ -12038,6 +12121,7 @@ msk22714|mskermit22714|UCB MS-DOS Kermit +@@ -12074,6 +12157,7 @@ msk22714|mskermit22714|UCB MS-DOS Kermit # at support for the VT320 itself. # Please send changes with explanations to bug-gnu-emacs@prep.ai.mit.edu. # (vt320-k3: I added / based on the init string -- esr) @@ -767,7 +767,7 @@ vt320-k3|MS-Kermit 3.00's vt320 emulation, am, eslok, hs, km, mir, msgr, xenl, cols#80, it#8, lines#49, pb#9600, vt#3, -@@ -12047,7 +12131,7 @@ vt320-k3|MS-Kermit 3.00's vt320 emulatio +@@ -12083,7 +12167,7 @@ vt320-k3|MS-Kermit 3.00's vt320 emulatio csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, @@ -776,7 +776,7 @@ dsl=\E[0$~, ech=\E[%p1%dX, ed=\E[J, el=\E[K, flash=\E[?5h$<100/>\E[?5l\E[?5h$<100/>\E[?5l\E[?5h$<100/>\E[ ?5l, -@@ -16461,7 +16545,7 @@ ibm3101|i3101|IBM 3101-10, +@@ -16497,7 +16581,7 @@ ibm3101|i3101|IBM 3101-10, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, el=\EI, home=\EH, hts=\E0, ind=\n, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, nel=\r\n, tbc=\EH, @@ -785,7 +785,7 @@ is2=\E S, rmacs=\E>B, rmcup=\E>B, rs2=\E S, s0ds=\E>B, sgr=\E4%{64}%?%p1%t%{65}%|%;%?%p2%t%{66}%|%;%?%p3%t%{65}%|%; %?%p4%t%{68}%|%;%?%p5%t%{64}%|%;%?%p6%t%{72}%|%;%?%p7%t -@@ -16719,7 +16803,7 @@ lft|lft-pc850|LFT-PC850|IBM LFT PC850 De +@@ -16755,7 +16839,7 @@ lft|lft-pc850|LFT-PC850|IBM LFT PC850 De tbc=\E[3g, # "Megapel" refers to the display adapter, which was used with the IBM RT # aka IBM 6150. @@ -795,7 +795,7 @@ s1ds=\E(0, sgr0=\E[0m\E(B, use=ibm5154, ibm5081-c|ibmmpel-c|IBM 5081 1024x1024 256/4096 Megapel enhanced color display, --- ncurses/Makefile.in -+++ ncurses/Makefile.in 2018-01-29 10:43:34.219735610 +0000 ++++ ncurses/Makefile.in 2018-03-05 07:53:48.996265000 +0000 @@ -219,7 +219,7 @@ $(DESTDIR)$(libdir) : ../lib : ; mkdir $@ @@ -806,8 +806,8 @@ ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h $(SHELL) -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@ --- ncurses/curses.priv.h -+++ ncurses/curses.priv.h 2018-01-29 10:43:34.219735610 +0000 -@@ -2150,6 +2150,8 @@ extern NCURSES_EXPORT(char *) _nc_tracec ++++ ncurses/curses.priv.h 2018-03-05 07:53:48.996265000 +0000 +@@ -2169,6 +2169,8 @@ extern NCURSES_EXPORT(char *) _nc_tracec extern NCURSES_EXPORT(char *) _nc_tracemouse (SCREEN *, MEVENT const *); extern NCURSES_EXPORT(char *) _nc_trace_mmask_t (SCREEN *, mmask_t); extern NCURSES_EXPORT(int) _nc_access (const char *, int); @@ -817,7 +817,7 @@ extern NCURSES_EXPORT(int) _nc_freewin (WINDOW *); extern NCURSES_EXPORT(int) _nc_getenv_num (const char *); --- ncurses/run_cmd.sh -+++ ncurses/run_cmd.sh 2018-01-29 10:43:34.219735610 +0000 ++++ ncurses/run_cmd.sh 2018-03-05 07:53:48.996265000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + @@ -831,7 +831,7 @@ + +exec ${1+"$@"} --- ncurses/tinfo/MKfallback.sh -+++ ncurses/tinfo/MKfallback.sh 2018-01-29 10:43:34.219735610 +0000 ++++ ncurses/tinfo/MKfallback.sh 2018-03-05 07:53:48.996265000 +0000 @@ -68,6 +68,12 @@ else tmp_info= fi @@ -864,7 +864,7 @@ done --- ncurses/tinfo/access.c -+++ ncurses/tinfo/access.c 2018-01-29 10:43:34.219735610 +0000 ++++ ncurses/tinfo/access.c 2018-03-05 07:53:48.996265000 +0000 @@ -35,6 +35,9 @@ #include @@ -907,7 +907,7 @@ _nc_access(const char *path, int mode) { --- ncurses/tinfo/lib_setup.c -+++ ncurses/tinfo/lib_setup.c 2018-01-29 10:43:34.219735610 +0000 ++++ ncurses/tinfo/lib_setup.c 2018-03-05 07:53:48.996265000 +0000 @@ -599,6 +599,9 @@ _nc_locale_breaks_acs(TERMINAL *termp) } else if ((value = tigetnum("U8")) >= 0) { result = value; /* use extension feature */ @@ -919,7 +919,7 @@ result = 1; /* always broken */ } else if (strstr(env, "screen") != 0 --- ncurses/tinfo/read_entry.c -+++ ncurses/tinfo/read_entry.c 2018-01-29 10:43:34.219735610 +0000 ++++ ncurses/tinfo/read_entry.c 2018-03-05 07:53:48.996265000 +0000 @@ -532,6 +532,7 @@ _nc_read_file_entry(const char *const fi FILE *fp = 0; int code; @@ -937,7 +937,7 @@ return (code); } --- ncurses/tinfo/read_termcap.c -+++ ncurses/tinfo/read_termcap.c 2018-01-29 10:43:34.219735610 +0000 ++++ ncurses/tinfo/read_termcap.c 2018-03-05 07:53:48.996265000 +0000 @@ -322,14 +322,18 @@ _nc_getent( */ if (fd >= 0) { @@ -984,7 +984,7 @@ } if (copied != 0) --- progs/Makefile.in -+++ progs/Makefile.in 2018-01-29 10:43:34.219735610 +0000 ++++ progs/Makefile.in 2018-03-05 07:53:48.996265000 +0000 @@ -100,7 +100,7 @@ CFLAGS_LIBTOOL = $(CCFLAGS) CFLAGS_NORMAL = $(CCFLAGS) CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE @@ -1004,7 +1004,7 @@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) --- test/test.priv.h -+++ test/test.priv.h 2018-01-29 10:43:34.219735610 +0000 ++++ test/test.priv.h 2018-03-05 07:53:48.996265000 +0000 @@ -910,12 +910,12 @@ extern char *strnames[], *strcodes[], *s #endif diff --git a/ncurses.changes b/ncurses.changes index 792e092..69d4f5e 100644 --- a/ncurses.changes +++ b/ncurses.changes @@ -1,3 +1,78 @@ +------------------------------------------------------------------- +Mon Mar 5 07:48:43 UTC 2018 - werner@suse.de + +- Add ncurses patch 6.1-20180303 + + modify TurnOn/TurnOff macros in lib_vidattr.c and lib_vid_attr.c to + avoid expansion of "CUR" in trace. + + improve a few lintian warnings in test-packages. + + modify lib_setup to avoid calling pthread_self() without first + verifying that the address is valid, i.e., for weak symbols + (report/patch by Werner Fink). + + modify generated terminfo.5 to not use "expand" and related width + on the last column of tables, making layout on wide terminals look + better (adapted from patch by Kir Kolyshkin). + + add a category to report_offsets, e.g., "w" for wide-character, "t" + for threads to make the report more readable. Reorganized the + structures reported to make the categories more apparent. + + simplify some ifdef's for extended-colors. + + add NCURSES_GLOBALS and NCURSES_PRESCREEN to report_offsets, to show + how similar the different tinfo configurations are. +- Remove patch ncurses-6.1-weakpthreads.dif now upstream (bsc#1082772) +- Make expect build check less fragile on timing + +------------------------------------------------------------------- +Fri Mar 2 10:00:20 UTC 2018 - werner@suse.de + +- Switch back to shared libtinfo only but provide an auxiliary shared + library libtinfow to avoid a rebuild of third party programs (bsc#1082772) + + Add sanity check if new 32bit API is included in libtinfo + +------------------------------------------------------------------- +Thu Mar 1 13:39:02 UTC 2018 - werner@suse.de + +- Add patch ncurses-6.1-weakpthreads.dif + + Be aware that libtinfo/libtinfw is also used without libpthread + (boo#1058509) +- Use expect to run at least two test for normal and wide character + version of newdemo from test suite + +------------------------------------------------------------------- +Mon Feb 26 09:10:07 UTC 2018 - werner@suse.de + +- Add ncurses patch 6.1-20180224 + + modify _nc_resolve_uses2() to detect incompatible types when merging + a "use=" clause of extended capabilities. The problem was seen in a + defective terminfo integrated from simpleterm sources in 20171111, + compounded by repair in 20180121. + + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD + + fix remaining flash capabilities with trailing mandatory delays -TD + + correct cut/paste in NEWS (report by Sven Joachim). + +------------------------------------------------------------------- +Mon Feb 19 12:56:33 UTC 2018 - werner@suse.de + +- Add ncurses patch 6.1-20180217 + + remove incorrect free() from 20170617 changes (report by David Macek). + + correct type for "U8" in user_caps.5; it is a number not boolean. + + add a null-pointer check in safe_sprintf.c (report by Steven Noonan). + + improve fix for Debian #882620 by reusing limit2 variable (report + Julien Cristau, Sven Joachim). + +------------------------------------------------------------------- +Thu Feb 15 13:00:37 UTC 2018 - werner@suse.de + +- Add ncurses patch 6.1-20180210 + + modify misc/Makefile.in to install/uninstall explicit list in case + the build-directory happens to have no ".pc" files when an uninstall + is performed (report by Jeffrey Walton). + + deprecate safe-sprintf, since the vsnprintf function, which does what + was needed, was standardized long ago. + + add several development/experimental options to development packages. + + minor reordering of options in configure script to make the threaded + and reentrant options distinct from the other extensions which are + normally enabled. +- Make reentrant libs opaque + ------------------------------------------------------------------- Mon Feb 5 08:15:58 UTC 2018 - werner@suse.de diff --git a/ncurses.spec b/ncurses.spec index 054f852..1c9430b 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -23,12 +23,20 @@ %bcond_with symversion %endif %bcond_with memleakck +%bcond_without onlytinfo + +%if %{with onlytinfo} +%global soname_tinfo tinfo +%else +%global soname_tinfo tinfow +%endif Name: ncurses #!BuildIgnore: terminfo %if %{with hasheddb} BuildRequires: db-devel %endif +BuildRequires: expect BuildRequires: gcc-c++ BuildRequires: pkg-config BuildRequires: screen @@ -221,7 +229,7 @@ the ncurses library in its ABI version 5 form. %package -n tack Summary: Terminfo action checker -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Tools/Building Provides: ncurses-devel:%{_bindir}/tack Requires: ncurses = %{version}-%{release} @@ -314,9 +322,9 @@ mv tack-* tack test ! -f /.buildenv || . /.buildenv OPATH=$PATH %ifarch s390x s390 - FALLBK="xterm,ibm327x,vt100,vt102,vt220" + FALLBK="unknown,dumb,xterm,ibm327x,vt100,vt102,vt220" %else - FALLBK="xterm,linux,vt100,vt102" + FALLBK="unknown,dumb,xterm,linux,vt100,vt102,vt220" %endif CC=gcc CXX=g++ @@ -388,6 +396,7 @@ mv tack-* tack --without-debug \ --without-profile \ --without-manpage-tbl \ + --without-tests \ --with-shared \ --with-normal \ --with-manpage-format=gzip \ @@ -400,6 +409,7 @@ mv tack-* tack --with-gpm \ %endif --with-dlsym \ + --with-default-terminfo-dir=%{_datadir}/terminfo \ --with-terminfo-dirs=%{_sysconfdir}/terminfo:%{_datadir}/terminfo \ --with-xterm-kbs=del \ --disable-stripping \ @@ -423,9 +433,13 @@ mv tack-* tack --enable-interop \ --with-pthread \ --enable-reentrant \ + --enable-opaque-curses \ + --enable-opaque-form \ + --enable-opaque-menu \ + --enable-opaque-panel \ --enable-ext-mouse \ --enable-widec \ - --with-termlib=tinfow \ + --with-termlib=%{soname_tinfo} \ --with-ticlib=ticw \ %if %{with symversion} --with-versioned-syms=${PWD}/package/ncursestw.map \ @@ -520,34 +534,64 @@ mv tack-* tack # must not use %jobs here (would lead to: ln: ncurses.h already exists) find man/ -name '*.[1-8]x.*' -print -delete make install DESTDIR=%{root} includedir=%{_incdir} includesubdir=/ncursesw libdir=%{_libdir} +%if %{with onlytinfo} + # This ensures that we get the libtinfo *with* _nc_read_entry2 symbol as well + gcc $CFLAGS $LDFLAGS -fPIC -shared -Wl,--auxiliary=libtinfo.so.6,-soname,libtinfow.so.6,-stats,-lc \ + -Wl,--version-script,ncurses/resulting.map -o %{root}%{_libdir}/libtinfow.so.%{version} + cp -p %{root}%{_libdir}/libtinfo.so.%{version} libtinfo.so.%{version}.back + cp -p %{root}%{_libdir}/libtinfow.so.%{version} libtinfow.so.%{version}.back +%endif ln -sf %{_incdir}/ncurses/{curses,ncurses,term,termcap}.h %{root}%{_incdir} - sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncursesw" --libs "-lncursesw" --libs "-ltinfow" %{root}%{_bindir}/ncursesw6-config + sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncursesw" --libs "-lncursesw" \ + --libs "-l%{soname_tinfo}" %{root}%{_bindir}/ncursesw6-config mkdir pc mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/ + # + # Some tests + # +%if 0%{?qemu_user_space_build:1}%{?_crossbuild} + echo "Skipping tests due to running under QEMU / cross-building" +%else # # Check for tack program on base of above ncurses # LD_LIBRARY_PATH=$PWD/lib export LD_LIBRARY_PATH PATH pushd tack/ -%if 0%{?qemu_user_space_build:1}%{?_crossbuild} - echo "Skipping LDD test due to running under QEMU / cross-building" -%else ldd ./tack -%endif popd unset LD_LIBRARY_PATH + # + # Make the test suite for ncursesw6 + # + pushd test + CFLAGS="$CFLAGS -I%{root}%{_incdir}" LDFLAGS="$LDFLAGS -L%{root}%{_libdir}" \ + ./configure --with-ncursesw --enable-widec --prefix=$PWD + LD_LIBRARY_PATH=%{root}%{_libdir} \ + make %{?_smp_mflags} TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' + make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' + mv bin binw + make distclean + popd +%endif test ! -L tack || rm -f tack make clean - > $SCREENLOG - tail -q -s 0.5 -f $SCREENLOG & pid=$! - # # Now use --without-pthread to disable pthread support (abi == 5). # + > $SCREENLOG + tail -q -s 0.5 -f $SCREENLOG & pid=$! + eval screen -D -m ./${c#*./} --with-abi-version=5 \ + --without-manpages \ + --without-progs \ + --without-tack \ --without-pthread \ --disable-reentrant \ + --disable-opaque-curses \ + --disable-opaque-form \ + --disable-opaque-menu \ + --disable-opaque-panel \ --disable-ext-mouse \ --disable-widec \ --with-termlib=tinfo \ @@ -572,7 +616,8 @@ mv tack-* tack # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir}/ncurses5 includesubdir=/ncurses libdir=%{_libdir}/ncurses5 ln -sf %{_incdir}/ncurses5/ncurses/{curses,ncurses,term}.h %{root}%{_incdir}/ncurses5/ - sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncurses5/ncurses -I%{_incdir}/ncurses5" --libs "-L%{_libdir}/ncurses5 -lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses5-config + sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncurses5/ncurses -I%{_incdir}/ncurses5" --libs "-L%{_libdir}/ncurses5 -lncurses" \ + --libs "-ltinfo" %{root}%{_bindir}/ncurses5-config pushd man sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses5-config.1 popd @@ -597,7 +642,14 @@ mv tack-* tack > $SCREENLOG tail -q -s 0.5 -f $SCREENLOG & pid=$! eval screen -D -m ./${c#*./} --with-pthread \ + --without-manpages \ + --without-progs \ + --without-tack \ --enable-reentrant \ + --enable-opaque-curses \ + --enable-opaque-form \ + --enable-opaque-menu \ + --enable-opaque-panel \ --enable-ext-mouse \ --disable-widec \ --with-termlib=tinfo \ @@ -618,16 +670,40 @@ mv tack-* tack make %{?_smp_mflags} # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir} includesubdir=/ncurses libdir=%{_libdir} - sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncurses" --libs "-lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses6-config +%if %{with onlytinfo} + # This ensures that we get the libtinfo *with* _nc_read_entry2 symbol as well + cp -p libtinfo.so.%{version}.back %{root}%{_libdir}/libtinfo.so.%{version} + cp -p libtinfow.so.%{version}.back %{root}%{_libdir}/libtinfow.so.%{version} +%endif + sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncurses" --libs "-lncurses" \ + --libs "-ltinfo" %{root}%{_bindir}/ncurses6-config pushd man sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1 popd mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/ - + # + # Some tests + # +%if 0%{?qemu_user_space_build:1}%{?_crossbuild} + echo "Skipping tests due to running under QEMU / cross-building" +%else + # + # Make the test suite for ncurses6 + # + pushd test + CFLAGS="$CFLAGS -I%{root}%{_incdir}" LDFLAGS="$LDFLAGS -L%{root}%{_libdir}" \ + ./configure --with-ncurses --disable-widec --prefix=$PWD + LD_LIBRARY_PATH=%{root}%{_libdir} \ + make %{?_smp_mflags} TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' + make install TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' + make distclean + popd +%endif + test ! -L tack || rm -f tack + make clean # # ABI == 5 # - make clean > $SCREENLOG tail -q -s 0.5 -f $SCREENLOG & pid=$! @@ -635,11 +711,18 @@ mv tack-* tack # Now use --without-pthread to disable pthread support (abi == 5). # eval screen -D -m ./${c#*./} --with-abi-version=5 \ + --without-manpages \ + --without-progs \ + --without-tack \ --without-pthread \ --disable-reentrant \ + --disable-opaque-curses \ + --disable-opaque-form \ + --disable-opaque-menu \ + --disable-opaque-panel \ --disable-ext-mouse \ --enable-widec \ - --with-termlib=tinfow \ + --with-termlib=%{soname_tinfo} \ --with-ticlib=ticw \ %if %{with symversion} --with-versioned-syms=${PWD}/package/ncursesw.map \ @@ -660,7 +743,12 @@ mv tack-* tack s@^(includedir=).show_includedir@\1%{_incdir}/ncurses5/ncursesw@' misc/gen-pkgconfig # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir}/ncurses5 includesubdir=/ncursesw libdir=%{_libdir}/ncurses5 - sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncurses5/ncursesw -I%{_incdir}/ncurses5" --libs "-L%{_libdir}/ncurses5 -lncursesw" --libs "-ltinfow" %{root}%{_bindir}/ncursesw5-config +%if %{with onlytinfo} + gcc $CFLAGS $LDFLAGS -fPIC -shared -Wl,--auxiliary=libtinfo.so.5,-soname,libtinfow.so.5,-stats,-lc \ + -Wl,--version-script,package/ncursesw.map -o %{root}%{_libdir}/libtinfow.so.5.9 +%endif + sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncurses5/ncursesw -I%{_incdir}/ncurses5" --libs "-L%{_libdir}/ncurses5 -lncursesw" \ + --libs "-l%{soname_tinfo}" %{root}%{_bindir}/ncursesw5-config pushd man sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw5-config.1 popd @@ -700,7 +788,7 @@ mv tack-* tack libncursesw*) rm -f ${lnk} echo '/* GNU ld script */' > ${lnk} - echo "INPUT(${lib} AS_NEEDED(-ltinfow -ldl))" >> ${lnk} + echo "INPUT(${lib} AS_NEEDED(-l%{soname_tinfo} -ldl))" >> ${lnk} ;; libncurses*) rm -f ${lnk} @@ -729,7 +817,7 @@ mv tack-* tack libncursesw*) rm -f "${lnk}" echo '/* GNU ld script */' > ${lnk} - echo "INPUT(${lib} AS_NEEDED(-ltinfow))">> ${lnk} + echo "INPUT(${lib} AS_NEEDED(-l%{soname_tinfo}))">> ${lnk} ;; libncurses*) rm -f "${lnk}" @@ -761,7 +849,7 @@ mv tack-* tack rm -f ${lnk} echo '/* GNU ld script */' > ${lnk} echo 'SEARCH_DIR(%{_libdir}/ncurses5)' >> ${lnk} - echo "INPUT(${lib} AS_NEEDED(-ltinfow))">> ${lnk} + echo "INPUT(${lib} AS_NEEDED(-l%{soname_tinfo}))">> ${lnk} ;; libncurses*) rm -f ${lnk} @@ -888,6 +976,45 @@ mv tack-* tack rm -f %{buildroot}%{_prefix}/lib/terminfo mv pc/*.pc %{buildroot}%{_libdir}/pkgconfig/ +%if 0%{?qemu_user_space_build:1}%{?_crossbuild} +# No test here +%else +%check +LD_LIBRARY_PATH=%{buildroot}/%{_lib}:%{buildroot}%{_libdir} +export LD_LIBRARY_PATH +%if %{with onlytinfo} +nm -D %{buildroot}/%{_lib}/libtinfo.so.%{version} | grep -q _nc_read_entry2 +%endif +pushd test + expect -d <<-'EOF' + set env(TERM) xterm + set timeout 20 + spawn -noecho "binw/newdemo" + send -- "x" + sleep 5 + send -- "x" + sleep 5 + send -- "x" + sleep 5 + send -- "q" + wait -nowait + EOF + expect -d <<-'EOF' + set env(TERM) xterm + set timeout 20 + spawn -noecho "bin/newdemo" + send -- "x" + sleep 5 + send -- "x" + sleep 5 + send -- "x" + sleep 5 + send -- "q" + wait -nowait + EOF +popd +%endif + %post -n libncurses5 -p /sbin/ldconfig %postun -n libncurses5 -p /sbin/ldconfig