diff --git a/ncurses-6.2-patches.tar.bz2 b/ncurses-6.2-patches.tar.bz2 index 587f9b4..2327e52 100644 --- a/ncurses-6.2-patches.tar.bz2 +++ b/ncurses-6.2-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a956b68882ca20ca98de238655ef447e74df655dd824327392d4da8211c8acb -size 292596 +oid sha256:7400447eca28922c8647427d7b2c3c02987ec97deb2c222ac122811fc0dd654c +size 358126 diff --git a/ncurses-6.2.dif b/ncurses-6.2.dif index 7ef99c8..18a0200 100644 --- a/ncurses-6.2.dif +++ b/ncurses-6.2.dif @@ -22,7 +22,7 @@ --- aclocal.m4 +++ aclocal.m4 2020-03-09 09:17:28.745300221 +0000 -@@ -583,7 +583,7 @@ AC_MSG_CHECKING([for size of bool]) +@@ -617,7 +617,7 @@ AC_MSG_CHECKING([for size of bool]) AC_CACHE_VAL(cf_cv_type_of_bool,[ rm -f cf_test.out AC_TRY_RUN([ @@ -31,7 +31,7 @@ #include #if defined(__cplusplus) -@@ -5321,12 +5321,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 -@@ -5451,9 +5454,9 @@ 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 <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <\$TMP CF_EOF if test -n "$cf_compress" ; then -@@ -14234,9 +14237,9 @@ cat >>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man < + +- Add ncurses patch 20200404 + + modify -fvisibility check to work with g++ + > fixes for building with Visual Studio C++ and msys2 (patches by + "Maarten Anonymous"): + + add configure option and check for gcc -fvisibility=hidden feature + + define NCURSES_NOMACROS in lib_gen.c to work around Visual Studio + C++ preprocessor limitations. + + modify some of the configure-macros, as well as mk-1st.awk to work + with Visual Studio C++ default filenaming. + +------------------------------------------------------------------- +Mon Mar 30 12:10:47 UTC 2020 - Dr. Werner Fink + +- Add ncurses patch 20200328 + + correct length of buffer copied in dup_field(). + + remove "$(srcdir)/" from path of library.gpr, needed for out-of-tree + builds of Ada95 (patch by Adam Van Ymeren). + ------------------------------------------------------------------- Mon Mar 23 08:19:29 UTC 2020 - Dr. Werner Fink diff --git a/ncurses.spec b/ncurses.spec index 49d91d2..a4863c7 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -31,6 +31,9 @@ %global soname_tinfo tinfow %endif +%define patchlvl 20200321 +%define basevers 6.2 + Name: ncurses #!BuildIgnore: terminfo %if %{with hasheddb} @@ -56,7 +59,7 @@ Obsoletes: ncurses-64bit # 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.2 +Version: 6.2.%{patchlvl} Release: 0 Summary: Terminal control library #Git: http://ncurses.scripts.mit.edu @@ -292,7 +295,7 @@ timings needed to ensure that screen updates do not fall behind the incoming data stream. %prep -%setup -q +%setup -q -n %basevers tar -xjf %{S:1} set +x for patch in patches/ncurses*.patch @@ -592,8 +595,8 @@ mv tack-* tack # 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 + cp -p %{root}%{_libdir}/libtinfo.so.%{basevers} libtinfo.so.%{basevers}.back + cp -p %{root}%{_libdir}/libtinfow.so.%{basevers} libtinfow.so.%{basevers}.back %endif ln -sf %{_incdir}/ncurses/{curses,ncurses,term,termcap}.h %{root}%{_incdir} mkdir pc @@ -739,8 +742,8 @@ includedir5=%{_incdir}/ncurses5' "$pc" make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir} includesubdir=/ncurses libdir=%{_libdir} %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} + cp -p libtinfo.so.%{basevers}.back %{root}%{_libdir}/libtinfo.so.%{basevers} + cp -p libtinfow.so.%{basevers}.back %{root}%{_libdir}/libtinfow.so.%{basevers} %endif pushd man sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1 @@ -1060,7 +1063,7 @@ includedir5=%{_incdir}/ncurses5' "$pc" 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 +nm -D %{buildroot}/%{_lib}/libtinfo.so.%{basevers} | grep -q _nc_read_entry2 %endif %if 0%{?suse_version} > 1500 pushd test diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..3a6d506 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,9 @@ +#!/bin/bash +version=$(sed -rn '/^Version:[[:space:]]+/{s/^Version:[[:space:]]+([0-9]+\.[0-9]+)(\.[0-9+])?/\1/p}' ncurses.spec) || exit 1 +test -e ncurses-${version}-patches.tar.bz2 || exit 1 +OFS="$IFS" +IFS=- +last=($(tar -tf ncurses-${version}-patches.tar.bz2 | sed -r 's@\.patch$@@'| sort -t '-' -k 3,3 -n | tail -n 1)) +IFS="$OFS" +patch=${last[2]} +sed -ri "/^%define[[:space:]]+patchlvl/{ s/(^%define[[:space:]]+patchlvl)[[:space:]]+.*/\1 ${patch}/ }" ncurses.spec