shared libtinfo only but with auxillary shared libtinfow as well
OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=361
This commit is contained in:
parent
653080d4bb
commit
5fff6b98c3
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
+ Add sanity check if new 32bit API is included in libtinfo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 1 13:39:02 UTC 2018 - werner@suse.de
|
||||
|
||||
|
52
ncurses.spec
52
ncurses.spec
@ -23,6 +23,13 @@
|
||||
%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
|
||||
@ -434,7 +441,7 @@ mv tack-* tack
|
||||
--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 \
|
||||
@ -529,8 +536,16 @@ 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/
|
||||
#
|
||||
@ -555,8 +570,8 @@ mv tack-* tack
|
||||
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 -ltinfow -Wl,--as-needed'
|
||||
make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -ltinfow -Wl,--as-needed'
|
||||
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
|
||||
@ -603,7 +618,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
|
||||
@ -656,7 +672,13 @@ 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
|
||||
@ -702,7 +724,7 @@ mv tack-* tack
|
||||
--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 \
|
||||
@ -723,7 +745,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
|
||||
@ -763,7 +790,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}
|
||||
@ -792,7 +819,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}"
|
||||
@ -824,7 +851,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}
|
||||
@ -957,6 +984,9 @@ mv tack-* tack
|
||||
%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
|
||||
|
Loading…
Reference in New Issue
Block a user