diff --git a/edit.sed b/edit.sed index 42f1e41..b05be81 100644 --- a/edit.sed +++ b/edit.sed @@ -3,19 +3,19 @@ while test "${1::2}" = "--" ; do case "$1" in --cflags=*) - cflags="${1#*=}" + cflags="${cflags:+$cflags }${1#*=}" shift ;; --cflags) - cflags="$2" + cflags="${cflags:+$cflags }$2" shift 2 ;; --libs=*) - libs="${1#*=}" + libs="${libs:+$libs }${1#*=}" shift ;; --libs) - libs="$2" + libs="${libs:+$libs }$2" shift 2 ;; esac diff --git a/ncurses.changes b/ncurses.changes index e431b00..944aaa4 100644 --- a/ncurses.changes +++ b/ncurses.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 16 11:08:09 UTC 2011 - werner@suse.de + +- Split libncurses(w) into libncurses(w)+libtinfo to be able to + link python against wide libncursesw and libreadline which is + linked with libtinfo only (bnc#729226) + ------------------------------------------------------------------- Fri Sep 30 15:46:17 UTC 2011 - uli@suse.com diff --git a/ncurses.spec b/ncurses.spec index 490d95b..7e22517 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -317,7 +317,7 @@ rm -vf mk-dlls.sh trap 'rm -rf ${TMPDIR}' EXIT export TMPDIR # - # No --enable-term-driver as tihs had crhased last time + # No --enable-term-driver as this had crashed last time # in ncurses/tinfo/lib_setup.c due to the fact that # _nc_globals.term_driver was a NULL function pointer # @@ -349,6 +349,8 @@ rm -vf mk-dlls.sh --with-ospeed=speed_t \ --with-gpm \ --with-dlsym \ + --with-termlib=tinfo \ + --with-ticlib=tic \ --disable-root-environ \ --disable-termcap \ --disable-overwrite \ @@ -439,10 +441,12 @@ export BUILD_TIC=$PWD/../progs/tic # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install DESTDIR=%{root} includedir=${inc} libdir=${lib} ln -sf ${inc##*/}/{curses,ncurses,term,termcap}.h %{root}${inc%%/*}/ - sh %{S:6} --cflags "-I${inc}" --libs "-lncurses" %{root}%{_bindir}/ncurses5-config + sh %{S:6} --cflags "-I${inc}" --libs "-lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses5-config # # 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" @@ -450,6 +454,7 @@ export BUILD_TIC=$PWD/../progs/tic ldd ./tack %endif popd + unset LD_LIBRARY_PATH test ! -L tack || rm -f tack %if %abi < 6 # @@ -464,9 +469,9 @@ export BUILD_TIC=$PWD/../progs/tic # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib} ln -sf ${inc##*/}/{curses,ncurses,term}.h %{root}${inc%%/*}/ - sh %{S:6} --cflags "-I${inc} -I${inc%%/*}" --libs "-L${lib} -lncurses" %{root}%{_bindir}/ncurses6-config + sh %{S:6} --cflags "-I${inc} -I${inc%%/*}" --libs "-L${lib} -lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses6-config pushd man - sh ../edit_man.sh normal installing %{root}%{_mandir} ../ ncurses6-config.1 + sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1 popd %endif # @@ -486,9 +491,9 @@ export BUILD_TIC=$PWD/../progs/tic inc=%{_incdir}/ncursesw # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib} - sh %{S:6} --cflags "-I${inc}" --libs "-lncursesw" %{root}%{_bindir}/ncursesw5-config + sh %{S:6} --cflags "-I${inc}" --libs "-lncursesw" --libs "-ltinfo" %{root}%{_bindir}/ncursesw5-config pushd man - sh ../edit_man.sh normal installing %{root}%{_mandir} ../ ncursesw5-config.1 + sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw5-config.1 popd %if %abi < 6 # @@ -502,9 +507,9 @@ export BUILD_TIC=$PWD/../progs/tic inc=%{_incdir}/ncurses6/ncursesw # must not use %jobs here (would lead to: ln: ncurses.h already exists) make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib} - sh %{S:6} --cflags "-I${inc} -I${inc%%/*}" --libs "-L${lib} -lncursesw" %{root}%{_bindir}/ncursesw6-config + sh %{S:6} --cflags "-I${inc} -I${inc%%/*}" --libs "-L${lib} -lncursesw" --libs "-ltinfo" %{root}%{_bindir}/ncursesw6-config pushd man - sh ../edit_man.sh normal installing %{root}%{_mandir} ../ ncursesw6-config.1 + sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw6-config.1 popd %endif @@ -514,12 +519,15 @@ export BUILD_TIC=$PWD/../progs/tic (cd %{root}/; tar -cpsSf - *)|tar -xpsSf - -C %{buildroot}/ rm -rf %{root} mkdir %{buildroot}/%{_lib} - for model in libncurses libncursest libncursesw libncursestw + for model in libncurses libncursest libncursesw libncursestw libtinfo do - mv %{buildroot}%{_libdir}/${model}.so.* %{buildroot}/%{_lib}/ || continue - for lib in %{buildroot}/%{_lib}/${model}.so.* ; do + for lib in %{buildroot}%{_libdir}/${model}.so.* ; do test -e "${lib}" || continue - test ! -L "${lib}" || continue + mv "${lib}" %{buildroot}/%{_lib}/ || continue + done + for lib in %{buildroot}/%{_lib}/${model}.so.* ; do + test -e "${lib}" || continue + test -L "${lib}" || continue lib=${lib#%{buildroot}} ln -sf ${lib} %{buildroot}%{_libdir}/${model}.so done @@ -528,24 +536,28 @@ export BUILD_TIC=$PWD/../progs/tic chmod 0755 %{buildroot}/%{_libdir}/lib*.so.* chmod a-x %{buildroot}/%{_libdir}/lib*.a 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 do test -L "${lib}" || continue case "${lib##*/}" in libncurses*) ln -sf /%{_lib}/${lib##*/}.6 ${lib} ;; + libtinfo*) ln -sf /%{_lib}/${lib##*/}.6 ${lib} ;; *) ln -sf ../${lib##*/}.6 ${lib} ;; esac done - for model in libncurses libncursest libncursesw libncursestw + for model in libncurses libncursest libncursesw libncursestw libtinfo do - mv %{buildroot}%{_libdir}/${model}.so.6* %{buildroot}/%{_lib}/ || continue - done - for lib in %{buildroot}/%{_lib}/${model}.so.6* ; do - test -e "${lib}" || continue - test ! -L "${lib}" || continue - lib=${lib#%{buildroot}} - ln -sf ${lib} %{buildroot}%{_libdir}/${model}.so + for lib in %{buildroot}%{_libdir}/${model}.so.* ; do + test -e "${lib}" || continue + mv "${lib}" %{buildroot}/%{_lib}/ || continue + done + for lib in %{buildroot}/%{_lib}/${model}.so.6 ; do + test -e "${lib}" || continue + test -L "${lib}" || continue + lib=${lib#%{buildroot}} + ln -sf ${lib} %{buildroot}%{_libdir}/ncurses6/${model}.so + done done chmod 0755 %{buildroot}/%{_lib}/lib*.so.6* chmod 0755 %{buildroot}/%{_libdir}/lib*.so.6* @@ -563,7 +575,9 @@ export BUILD_TIC=$PWD/../progs/tic install -m 644 %{S:3} %{buildroot}%{_defaultdocdir}/ncurses/ mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_miscdir} - cd ncurses/ + LD_LIBRARY_PATH=$PWD/lib + export LD_LIBRARY_PATH + pushd ncurses/ { echo "# See annotated version in %{_defaultdocdir}/ncurses/terminfo.src.bz2" %if 0%{?_crossbuild} BUILD_TIC=/usr/bin/tic @@ -576,7 +590,8 @@ export BUILD_TIC=$PWD/../progs/tic TERMINFO=%{buildroot}%{_datadir}/terminfo \ bash %{SOURCE2} install -m 0644 termcap.new %{buildroot}%{_miscdir}/termcap - cd ../ + popd + unset LD_LIBRARY_PATH if test `%{_bindir}/id -u` = '0' ; then chown root:root %{buildroot}%{_miscdir}/termcap chmod 0644 %{buildroot}%{_miscdir}/termcap