From a5be60cc9cee24971e2ae32fedb69531728bb07d325d13e0b8c1a522c27d6bc7 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 25 Aug 2014 14:06:26 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=167 --- ncurses-5.9-patches.tar.bz2 | 4 +-- ncurses-5.9.dif | 49 +++++++++++++++++++++++++++++++++++++ ncurses.changes | 25 +++++++++++++++++++ ncurses.spec | 39 ++++++++++++++++++++++++++++- 4 files changed, 114 insertions(+), 3 deletions(-) diff --git a/ncurses-5.9-patches.tar.bz2 b/ncurses-5.9-patches.tar.bz2 index f0f174f..70a8325 100644 --- a/ncurses-5.9-patches.tar.bz2 +++ b/ncurses-5.9-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1549d635d4973b0630a5e22ede2868b7141a64d562aa7c690806696d935d0d67 -size 3793781 +oid sha256:1036bd97c703439a3c58beb4bb1400793a7d513a0cdbac1d91912e9448f0cc31 +size 3794854 diff --git a/ncurses-5.9.dif b/ncurses-5.9.dif index 0dc706f..a1f9713 100644 --- a/ncurses-5.9.dif +++ b/ncurses-5.9.dif @@ -338,6 +338,55 @@ The \fBncurses\fR library permits manipulation of data structures, called \fIwindows\fR, which can be thought of as two-dimensional arrays of characters representing all or part of a CRT screen. +--- misc/gen-pkgconfig.in ++++ misc/gen-pkgconfig.in 2014-08-25 11:52:06.262235364 +0000 +@@ -69,7 +69,7 @@ else + CFLAGS="-I\${includedir}" + fi + +-if test "$libdir" = "/usr/lib" ; then ++if test "$libdir" = "/usr/lib" -o "$libdir" = "/usr/lib64" ; then + LDFLAGS= + else + LDFLAGS="-L\${libdir}" +@@ -80,6 +80,7 @@ do + name="${name}" + + desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" ++ deps= + reqs= + + if test $name = $MAIN_LIBRARY ; then +@@ -88,9 +89,11 @@ do + desc="$desc terminal interface library" + elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then + reqs="$PANEL_LIBRARY, $MENU_LIBRARY, $FORM_LIBRARY, $MAIN_LIBRARY" ++ deps="-l$PANEL_LIBRARY -l$MENU_LIBRARY -l$FORM_LIBRARY -l$MAIN_LIBRARY" + desc="$desc add-on library" + else + reqs="$MAIN_LIBRARY" ++ deps="-l$MAIN_LIBRARY" + desc="$desc add-on library" + fi + +@@ -98,6 +101,8 @@ do + if test $name != $TINFO_NAME ; then + test -n "$reqs" && reqs="$reqs, " + reqs="${reqs}${SUB_LIBRARY}" ++ test -n "$deps" && deps="$deps " ++ deps="${deps}-l${SUB_LIBRARY}" + fi + fi + +@@ -115,7 +120,7 @@ Description: $desc + Version: \${version} + URL: http://invisible-island.net/ncurses + Requires.private: $reqs +-Libs: $LDFLAGS -l$name ++Libs: $LDFLAGS -l$name $deps + Libs.private: @LIBS@ + Cflags: $CFLAGS + EOF --- misc/ncurses-config.in +++ misc/ncurses-config.in 2011-11-17 12:46:49.000000000 +0000 @@ -98,7 +98,7 @@ while test $# -gt 0; do diff --git a/ncurses.changes b/ncurses.changes index be663e4..89ed3b1 100644 --- a/ncurses.changes +++ b/ncurses.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Mon Aug 25 13:48:27 UTC 2014 - werner@suse.de + +- Make pkgconfig files work for all current versions that is + abi 5, abi wide 5, abi 6, and abi wide 6 +- Change patch ncurses-5.9.dif to enable gen-pkgconfig to do this + +------------------------------------------------------------------- +Mon Aug 25 09:50:03 UTC 2014 - werner@suse.de + +- Add ncurses patch 20140823 + + fix special case where double-width character overwrites a single- + width character in the first column (report by Egmont Koblinger, + cf: 20050813). + +------------------------------------------------------------------- +Fri Aug 22 13:34:00 UTC 2014 - mmarek@suse.cz + +- Install pkg-config files into %_libdir + +------------------------------------------------------------------- +Fri Aug 22 10:59:18 UTC 2014 - mmarek@suse.cz + +- Install pkg-config files + ------------------------------------------------------------------- Mon Aug 18 10:09:40 UTC 2014 - werner@suse.de diff --git a/ncurses.spec b/ncurses.spec index 2797585..cf290be 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -19,6 +19,7 @@ Name: ncurses #!BuildIgnore: terminfo BuildRequires: gcc-c++ +BuildRequires: pkg-config BuildRequires: screen %if 0%{?suse_version} > 1130 BuildRequires: gpm-devel @@ -452,7 +453,9 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src --disable-widec \ --disable-tic-depends \ --with-cxx-shared \ - --with-ticlib=tic + --with-ticlib=tic \ + --enable-pc-files \ + --with-pkg-config-libdir=%{_libdir}/pkgconfig kill $pid # # The configure line @@ -509,7 +512,13 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src # 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} +%if %abi >= 6 + sh %{S:6} --cflags "-I%{_incdir}/ncurses" --libs "-lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses6-config +%else sh %{S:6} --cflags "-I%{_incdir}/ncurses" --libs "-lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses5-config +%endif + mkdir pc + mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/ # # Check for tack program on base of above ncurses # @@ -537,6 +546,7 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src cp fallback.c.build ncurses/fallback.c make -C c++ etip.h make %{?_smp_mflags} + sed -ri "s@^(libdir=).show_libdir@\1%{_libdir}/ncurses6@;s@^(includedir=).show_includedir@\1%{_incdir}/ncurses6/ncurses@" 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}/ncurses6 includesubdir=/ncurses libdir=%{_libdir}/ncurses6 ln -sf %{_incdir}/ncurses6/ncurses/{curses,ncurses,term}.h %{root}%{_incdir}/ncurses6/ @@ -544,6 +554,13 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src pushd man sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1 popd + for pc in %{root}%{_libdir}/pkgconfig/*.pc + do + test -e "$pc" || break + base=${pc%%.pc} + base=${base##*/} + mv -f $pc pc/${base}6.pc + done %endif make clean # @@ -565,10 +582,19 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src 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=/ncursesw libdir=%{_libdir} +%if %abi >= 6 + sh %{S:6} --cflags "-I%{_incdir}/ncursesw" --libs "-lncursesw" --libs "-ltinfo" %{root}%{_bindir}/ncursesw6-config + pushd man + sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw6-config.1 + popd +%else sh %{S:6} --cflags "-I%{_incdir}/ncursesw" --libs "-lncursesw" --libs "-ltinfo" %{root}%{_bindir}/ncursesw5-config pushd man sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw5-config.1 popd +%endif + rm -f %{root}%{_libdir}/pkgconfig/ti*.pc + mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/ %if %abi < 6 make clean # @@ -582,12 +608,21 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src cp fallback.c.build ncurses/fallback.c make -C c++ etip.h make %{?_smp_mflags} + sed -ri "s@^(libdir=).show_libdir@\1%{_libdir}/ncurses6@;s@^(includedir=).show_includedir@\1%{_incdir}/ncurses6/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}/ncurses6 includesubdir=/ncursesw libdir=%{_libdir}/ncurses6 sh %{S:6} --cflags "-I%{_incdir}/ncurses6/ncursesw -I%{_incdir}/ncurses6" --libs "-L%{_libdir}/ncurses6 -lncursesw" --libs "-ltinfo" %{root}%{_bindir}/ncursesw6-config pushd man sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw6-config.1 popd + rm -f %{root}%{_libdir}/pkgconfig/ti*.pc + for pc in %{root}%{_libdir}/pkgconfig/*.pc + do + test -e "$pc" || break + base=${pc%%.pc} + base=${base##*/} + mv -f $pc pc/${base}6.pc + done %endif %install @@ -767,6 +802,7 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src grep -v -F -x -f default.list \ > extension.list rm -f %{buildroot}%{_prefix}/lib/terminfo + mv pc/*.pc %{buildroot}%{_libdir}/pkgconfig/ %if %abi < 6 %post -n libncurses5 -p /sbin/ldconfig @@ -836,6 +872,7 @@ sed -ri '/^iTerm/{s@iterm\|@@}' misc/terminfo.src %{_libdir}/lib*.so %{_libdir}/ncurses6/lib*.a %{_libdir}/ncurses6/lib*.so +%{_libdir}/pkgconfig/*.pc %doc %{_mandir}/man1/*-config.1.gz %doc %{_mandir}/man1/captoinfo.1.gz %doc %{_mandir}/man1/infocmp.1.gz