+#
# Conditional build:
%bcond_without ada # do not build Ada95 bindings
%bcond_without cxx # do not build C++ ncurses bindings and demo programs
-# # (this is neccessary to build ncurses linked with uClibc).
+# # (this is neccessary to build ncurses linked with uClibc).
%bcond_without gpm # build without (dynamically loadable) libgpm support
#
%ifarch sparc64
Summary(uk.UTF-8): ncurses - нова бібліотека керування терміналами
Name: ncurses
Version: 5.7
-Release: 18
+Release: 23
License: distributable
Group: Libraries
Source0: ftp://dickey.his.com/ncurses/%{name}-%{version}.tar.gz
Patch46: %{name}-5.7-20090906.patch.gz
Patch47: %{name}-5.7-20090912.patch.gz
Patch48: %{name}-5.7-20090919.patch.gz
-Patch49: ncurses-5.7-20090927.patch.gz
-Patch50: ncurses-5.7-20091003.patch.gz
-Patch51: ncurses-5.7-20091010.patch.gz
-Patch52: ncurses-5.7-20091017.patch.gz
-Patch53: ncurses-5.7-20091024.patch.gz
-Patch54: ncurses-5.7-20091031.patch.gz
-Patch55: ncurses-5.7-20091107.patch.gz
+Patch49: %{name}-5.7-20090927.patch.gz
+Patch50: %{name}-5.7-20091003.patch.gz
+Patch51: %{name}-5.7-20091010.patch.gz
+Patch52: %{name}-5.7-20091017.patch.gz
+Patch53: %{name}-5.7-20091024.patch.gz
+Patch54: %{name}-5.7-20091031.patch.gz
+Patch55: %{name}-5.7-20091107.patch.gz
Patch100: %{name}-screen_hpa_fix.patch
Patch101: %{name}-xterm_hpa_fix.patch
Patch103: %{name}-xterm-home-end.patch
Patch104: %{name}-mouse_trafo-warning.patch
Patch105: %{name}-gnome-terminal.patch
-# not sure about this one, now all xterms have kbs defined (to ^H, not \177)
-# and only XTerm.ad.pl sets backspace to \177 instead of ^H
-Patch106: %{name}-xterm-kbs.patch
# disable rain demo; triggers gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14998
Patch107: %{name}-no-rain-demo.patch
URL: http://dickey.his.com/ncurses/ncurses.html
%{?with_ada:BuildRequires: gcc-ada}
%{?with_gpm:BuildRequires: gpm-devel}
%{?with_cxx:BuildRequires: libstdc++-devel}
+%{?with_ada:BuildRequires: m4}
+BuildRequires: pkgconfig
BuildRequires: sharutils
Obsoletes: libncurses5
Conflicts: terminfo < 5.4-0.6
%patch103 -p1
%patch104 -p1
%patch105 -p1
-%patch106 -p1
%patch107 -p1
%build
unset TERMINFO || :
gcc_target=$(gcc -dumpmachine)
-gcc_version=$(gcc -dumpversion)
+gcc_version=%{cc_version}
CFLAGS="%{rpmcflags} -DPURE_TERMINFO -D_FILE_OFFSET_BITS=64"
+export PKG_CONFIG_LIBDIR=%{_libdir}/pkgconfig
cp -f /usr/share/automake/config.sub .
%if "%{pld_release}" == "ti"
--with-termlib \
--with-largefile \
--disable-lp64 \
+ --enable-pc-files \
--with-chtype='long' \
--with-mmask-t='long' \
--with-manpage-aliases \
ln -sf ../l/linux $RPM_BUILD_ROOT%{_datadir}/terminfo/c/console
-mv -f $RPM_BUILD_ROOT%{_libdir}/libtinfo.so.* $RPM_BUILD_ROOT/%{_lib}
+%if "%{pld_release}" != "ti"
mv -f $RPM_BUILD_ROOT%{_libdir}/libtinfow.so.6* $RPM_BUILD_ROOT/%{_lib}
+mv -f $RPM_BUILD_ROOT%{_libdir}/libncursesw.so.6* $RPM_BUILD_ROOT/%{_lib}
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libtinfow.so.6.*) $RPM_BUILD_ROOT%{_libdir}/libtinfow.so
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libncursesw.so.6.*) $RPM_BUILD_ROOT%{_libdir}/libncursesw.so
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libncursesw.so.6.*) $RPM_BUILD_ROOT%{_libdir}/libcursesw.so
+%else
+mv -f $RPM_BUILD_ROOT%{_libdir}/libtinfow.so.5* $RPM_BUILD_ROOT/%{_lib}
+mv -f $RPM_BUILD_ROOT%{_libdir}/libncursesw.so.5* $RPM_BUILD_ROOT/%{_lib}
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libtinfow.so.5.*) $RPM_BUILD_ROOT%{_libdir}/libtinfow.so
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libncursesw.so.5.*) $RPM_BUILD_ROOT%{_libdir}/libcursesw.so
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libncursesw.so.5.*) $RPM_BUILD_ROOT%{_libdir}/libncursesw.so
+%endif
+mv -f $RPM_BUILD_ROOT%{_libdir}/libtinfo.so.* $RPM_BUILD_ROOT/%{_lib}
mv -f $RPM_BUILD_ROOT%{_libdir}/libncurses.so.* $RPM_BUILD_ROOT/%{_lib}
-ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libtinfo.so.6.*) $RPM_BUILD_ROOT%{_libdir}/libtinfo.so
-ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libtinfow.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libtinfow.so
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libtinfo.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libtinfo.so
ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libncurses.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libcurses.so
ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libncurses.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libncurses.so
+
ln -sf libncursesw.a $RPM_BUILD_ROOT%{_libdir}/libcursesw.a
-ln -sf libncursesw.so $RPM_BUILD_ROOT%{_libdir}/libcursesw.so
%if "%{pld_release}" != "ti"
cp -a obj-wideclowcolor/lib/lib*w.so.5* $RPM_BUILD_ROOT%{_libdir}
# FIXME: should be fixed properly
# fix too many w's
-sed -i -e 's/tinfoww/tinfow/' $RPM_BUILD_ROOT%{_bindir}/ncurses*-config
+sed -i -e 's/tinfoww/tinfow/' $RPM_BUILD_ROOT%{_bindir}/ncurses*-config $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/tset
%attr(755,root,root) /%{_lib}/libncurses.so.*.*
%attr(755,root,root) %ghost /%{_lib}/libncurses.so.5
+%attr(755,root,root) /%{_lib}/libncursesw.so.*.*
+%if "%{pld_release}" != "ti"
+%attr(755,root,root) %ghost /%{_lib}/libncursesw.so.6
+%endif
%attr(755,root,root) /%{_lib}/libtinfo.so.*.*
%attr(755,root,root) %ghost /%{_lib}/libtinfo.so.5
%attr(755,root,root) /%{_lib}/libtinfow.so.*.*
+%if "%{pld_release}" != "ti"
%attr(755,root,root) %ghost /%{_lib}/libtinfow.so.6
%attr(755,root,root) %{_libdir}/libncursesw.so.*.*
%attr(755,root,root) %ghost %{_libdir}/libncursesw.so.5
-%if "%{pld_release}" != "ti"
-%attr(755,root,root) %ghost %{_libdir}/libncursesw.so.6
-%endif
%attr(755,root,root) %{_libdir}/libtinfow.so.*.*
%attr(755,root,root) %ghost %{_libdir}/libtinfow.so.5
+%else
+%attr(755,root,root) %ghost /%{_lib}/libtinfow.so.5
+%attr(755,root,root) %ghost /%{_lib}/libncursesw.so.5
+%endif
%{_datadir}/tabset
%{_includedir}w/termcap.h
%{_includedir}w/tic.h
%{_includedir}w/unctrl.h
+%{_pkgconfigdir}/*.pc
+
%{_mandir}/man3/*
%exclude %{_mandir}/man3/form*
%exclude %{_mandir}/man3/menu*