forked from pool/ncurses
Accepting request 93438 from Base:System
- Use linker scripts to amke sure that libtinfo will be found even if -ltinfo is missed on the linker command line OBS-URL: https://build.opensuse.org/request/show/93438 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ncurses?expand=0&rev=46
This commit is contained in:
commit
15fba4eb70
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 24 12:17:08 UTC 2011 - werner@suse.de
|
||||||
|
|
||||||
|
- Use linker scripts to amke sure that libtinfo will be found
|
||||||
|
even if -ltinfo is missed on the linker command line
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 22 12:03:47 UTC 2011 - werner@suse.de
|
Tue Nov 22 12:03:47 UTC 2011 - werner@suse.de
|
||||||
|
|
||||||
|
46
ncurses.spec
46
ncurses.spec
@ -557,25 +557,47 @@ export BUILD_TIC=$PWD/../progs/tic
|
|||||||
test -e "${lib}" || continue
|
test -e "${lib}" || continue
|
||||||
mv "${lib}" %{buildroot}/%{_lib}/ || continue
|
mv "${lib}" %{buildroot}/%{_lib}/ || continue
|
||||||
done
|
done
|
||||||
for lib in %{buildroot}/%{_lib}/${model}.so.* ; do
|
for lib in %{buildroot}/%{_lib}/${model}.so.%{abi} ; do
|
||||||
test -e "${lib}" || continue
|
test -e "${lib}" || continue
|
||||||
test -L "${lib}" || continue
|
test -L "${lib}" || continue
|
||||||
lib=${lib#%{buildroot}}
|
lib=${lib#%{buildroot}}
|
||||||
ln -sf ${lib} %{buildroot}%{_libdir}/${model}.so
|
lnk=%{buildroot}%{_libdir}/${model}.so
|
||||||
|
case "${lib##*/}" in
|
||||||
|
libncurses*)
|
||||||
|
rm -f ${lnk}
|
||||||
|
echo '/* GNU ld script */' > ${lnk}
|
||||||
|
echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
|
||||||
|
;;
|
||||||
|
*) ln -sf ${lib} %{buildroot}%{_libdir}/${model}.so
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
lnk=%{buildroot}%{_libdir}/libtermcap.so
|
||||||
|
echo '/* GNU ld script */' > ${lnk}
|
||||||
|
echo "INPUT(AS_NEEDED(-ltinfo))" >> ${lnk}
|
||||||
chmod 0755 %{buildroot}/%{_lib}/lib*.so.*
|
chmod 0755 %{buildroot}/%{_lib}/lib*.so.*
|
||||||
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
|
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
|
||||||
chmod a-x %{buildroot}/%{_libdir}/lib*.a
|
chmod a-x %{buildroot}/%{_libdir}/lib*.a
|
||||||
|
%if %abi < 6
|
||||||
if test -d %{buildroot}%{_libdir}/ncurses6 ; then
|
if test -d %{buildroot}%{_libdir}/ncurses6 ; then
|
||||||
mv %{buildroot}%{_libdir}/ncurses6/*.so.6* %{buildroot}%{_libdir}/
|
mv %{buildroot}%{_libdir}/ncurses6/*.so.6* %{buildroot}%{_libdir}/
|
||||||
for lib in %{buildroot}%{_libdir}/ncurses6/*.so
|
for lib in %{buildroot}%{_libdir}/ncurses6/*.so
|
||||||
do
|
do
|
||||||
test -L "${lib}" || continue
|
lnk=$lib
|
||||||
|
lib=/%{_lib}/${lib##*/}.6
|
||||||
case "${lib##*/}" in
|
case "${lib##*/}" in
|
||||||
libncurses*) ln -sf /%{_lib}/${lib##*/}.6 ${lib} ;;
|
libncurses*)
|
||||||
libtinfo*) ln -sf /%{_lib}/${lib##*/}.6 ${lib} ;;
|
rm -f "${lnk}"
|
||||||
*) ln -sf ../${lib##*/}.6 ${lib} ;;
|
echo '/* GNU ld script */' > ${lnk}
|
||||||
|
echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
|
||||||
|
;;
|
||||||
|
libtinfo*)
|
||||||
|
test -L "${lnk}" || continue
|
||||||
|
ln -sf ${lib} ${lnk}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
test -L "${lnk}" || continue
|
||||||
|
ln -sf ../${lib##*/} ${lnk}
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
for model in libncurses libncursest libncursesw libncursestw libtinfo
|
for model in libncurses libncursest libncursesw libncursestw libtinfo
|
||||||
@ -588,13 +610,23 @@ export BUILD_TIC=$PWD/../progs/tic
|
|||||||
test -e "${lib}" || continue
|
test -e "${lib}" || continue
|
||||||
test -L "${lib}" || continue
|
test -L "${lib}" || continue
|
||||||
lib=${lib#%{buildroot}}
|
lib=${lib#%{buildroot}}
|
||||||
ln -sf ${lib} %{buildroot}%{_libdir}/ncurses6/${model}.so
|
lnk=%{buildroot}%{_libdir}/ncurses6/${model}.so
|
||||||
|
case "${lib##*/}" in
|
||||||
|
libncurses*)
|
||||||
|
rm -f ${lnk}
|
||||||
|
echo '/* GNU ld script */' > ${lnk}
|
||||||
|
echo 'SEARCH_DIR(%{_libdir}/ncurses6)' >> ${lnk}
|
||||||
|
echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
|
||||||
|
;;
|
||||||
|
*) ln -sf ${lib} %{buildroot}%{_libdir}/ncurses6/${model}.so
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
chmod 0755 %{buildroot}/%{_lib}/lib*.so.6*
|
chmod 0755 %{buildroot}/%{_lib}/lib*.so.6*
|
||||||
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.6*
|
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.6*
|
||||||
chmod a-x %{buildroot}/%{_libdir}/ncurses6/lib*.a
|
chmod a-x %{buildroot}/%{_libdir}/ncurses6/lib*.a
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
test -n "%{buildroot}" || ldconfig -N
|
test -n "%{buildroot}" || ldconfig -N
|
||||||
mkdir -p %{buildroot}%{_defaultdocdir}/ncurses
|
mkdir -p %{buildroot}%{_defaultdocdir}/ncurses
|
||||||
bzip2 -c misc/terminfo.src > misc/terminfo.src.bz2
|
bzip2 -c misc/terminfo.src > misc/terminfo.src.bz2
|
||||||
|
Loading…
Reference in New Issue
Block a user