From ab8501ce5fe5f2b00946e31a4faba4f8ae5bbd5de0c976c82bedd8860f1a1cd1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 6 Dec 2007 01:05:01 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ncurses?expand=0&rev=8 --- ncurses-5.6-overwrite.dif | 12 +++ ncurses.changes | 11 +++ ncurses.spec | 152 +++++++++++++++++++++----------------- 3 files changed, 108 insertions(+), 67 deletions(-) create mode 100644 ncurses-5.6-overwrite.dif diff --git a/ncurses-5.6-overwrite.dif b/ncurses-5.6-overwrite.dif new file mode 100644 index 0000000..54ba9ba --- /dev/null +++ b/ncurses-5.6-overwrite.dif @@ -0,0 +1,12 @@ +Make ncurses-config report the correct directory for ncurses.h. + +--- configure 2007/10/29 13:59:32 1.9 ++++ configure 2007/10/29 14:18:12 +@@ -5253,6 +5253,7 @@ + fi; + echo "$as_me:5254: result: $with_overwrite" >&5 + echo "${ECHO_T}$with_overwrite" >&6 ++WITH_OVERWRITE="$with_overwrite" + + echo "$as_me:5257: checking if external terminfo-database is used" >&5 + echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6 diff --git a/ncurses.changes b/ncurses.changes index eb67a92..58471a5 100644 --- a/ncurses.changes +++ b/ncurses.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Dec 5 17:35:53 CET 2007 - werner@suse.de + +- Add compatibility header files (bug #337412) + +------------------------------------------------------------------- +Mon Oct 29 15:51:12 CET 2007 - pth@suse.de + +- Fix configure so that ncurses-config doesn't erroneously + report ncurses.h to reside in /usr/include/ncurses (#337412). + ------------------------------------------------------------------- Wed Sep 5 16:23:03 CEST 2007 - werner@suse.de diff --git a/ncurses.spec b/ncurses.spec index 0eb9094..9a0c39c 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -17,9 +17,9 @@ BuildRequires: gcc-c++ gpm %define tabset() %{_datadir}/%{0}/%{1} License: X11/MIT Group: System/Libraries -Autoreqprov: on +AutoReqProv: on Version: 5.6 -Release: 38 +Release: 50 Summary: New curses Libraries Source0: ncurses-%{version}.tar.bz2 Url: http://invisible-island.net/ncurses/ncurses.html @@ -28,7 +28,11 @@ Source2: handle.linux Patch0: ncurses-%{version}.dif Patch1: ncurses-5.3-printw.dif Patch2: ncurses-5.6-pthread.dif +Patch3: ncurses-5.6-overwrite.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build +%global _sysconfdir /etc +%global _miscdir %{_datadir}/misc +%global _incdir %{_includedir} %description As soon as a text application needs to directly control its output to @@ -49,9 +53,9 @@ Authors: %package -n terminfo Summary: A terminal descriptions database -License: Public Domain, Freeware, # COPYRIGHTS AND OTHER DELUSIONS +License: Public Domain, Freeware Group: System/Base -Autoreqprov: on +AutoReqProv: on %description -n terminfo This is the terminfo reference database, maintained in the ncurses @@ -73,9 +77,9 @@ Authors: Summary: Include Files and Libraries mandatory for Development License: X11/MIT Group: Development/Libraries/C and C++ -Provides: ncurses:/usr/include/ncurses.h -Requires: ncurses = %{version}-%{release}, /usr/bin/tack -Autoreqprov: on +Provides: ncurses:%{_incdir}/ncurses.h +Requires: ncurses = %{version}-%{release}, %{_bindir}/tack +AutoReqProv: on %description -n ncurses-devel This package contains all necessary include files and libraries needed @@ -95,9 +99,9 @@ Authors: Summary: Terminfo action checker License: GPL v2 or later Group: Development/Tools/Building -Provides: ncurses-devel:/usr/bin/tack +Provides: ncurses-devel:%{_bindir}/tack Requires: ncurses = %{version}-%{release} -Autoreqprov: on +AutoReqProv: on %description -n tack This package contains the tack utility to help to build a new terminfo @@ -118,16 +122,12 @@ Authors: tar Oxfj %{SOURCE1} | patch -p1 -s %patch -P 1 -p0 -b .va %patch -P 2 -p0 -b .pt +%patch -P 3 -p0 -b .ow %patch -P 0 -p0 %build test ! -f /.buildenv || . /.buildenv OPATH=$PATH - PREFIX=%{_prefix} - LIBDIR=${PREFIX}/%{_lib} - DATADIR=${PREFIX}/share - INCDIR=${PREFIX}/include - MANDIR=%{_mandir} FALLBK="xterm,linux,vt100,vt102" CC=gcc CXX=g++ @@ -193,15 +193,15 @@ tar Oxfj %{SOURCE1} | patch -p1 -s --enable-symlinks \ --enable-sigwinch \ --enable-colorfgbg \ - --prefix=${PREFIX} \ - --exec-prefix=${PREFIX} \ - --libdir=${LIBDIR} \ - --datadir=${DATADIR} \ - --mandir=${MANDIR} \ - --includedir=${INCDIR} \ + --prefix=%{_prefix} \ + --exec-prefix=%{_prefix}\ + --libdir=%{_libdir} \ + --datadir=%{_datadir} \ + --mandir=%{_mandir} \ + --includedir=%{_incdir} \ "${WITHCHTYPE}" \ --with-ticlib=tic \ - --with-install-prefix=${RPM_BUILD_ROOT} + --with-install-prefix=%{buildroot} # # This is a hack to be able to boot strap # a libncurses with correct fallback.c. @@ -228,7 +228,7 @@ tar Oxfj %{SOURCE1} | patch -p1 -s make GZIP="-9" export GZIP - test -n "${RPM_BUILD_ROOT}" && rm -rf ${RPM_BUILD_ROOT}/* + test -n "%{buildroot}" && rm -rf %{buildroot}/* make install # # Now use --enable-widec for UTF8/wide character support. @@ -243,39 +243,39 @@ tar Oxfj %{SOURCE1} | patch -p1 -s GZIP="-9" export GZIP make install.libs install.includes - mkdir -p ${RPM_BUILD_ROOT}/%{_lib} + mkdir -p %{buildroot}/%{_lib} for lib in libncurses libncursesw do - mv ${RPM_BUILD_ROOT}%{_libdir}/${lib}.so.* ${RPM_BUILD_ROOT}/%{_lib}/ - ln -sf /%{_lib}/${lib}.so.%{version} ${RPM_BUILD_ROOT}%{_libdir}/${lib}.so + mv %{buildroot}%{_libdir}/${lib}.so.* %{buildroot}/%{_lib}/ + ln -sf /%{_lib}/${lib}.so.%{version} %{buildroot}%{_libdir}/${lib}.so done - chmod 0755 ${RPM_BUILD_ROOT}/%{_lib}/lib*.so.* - chmod 0755 ${RPM_BUILD_ROOT}/%{_libdir}/lib*.so.* - chmod a-x ${RPM_BUILD_ROOT}/%{_libdir}/lib*.a - test -n "${RPM_BUILD_ROOT}" || ldconfig -N - mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/ncurses + chmod 0755 %{buildroot}/%{_lib}/lib*.so.* + chmod 0755 %{buildroot}/%{_libdir}/lib*.so.* + chmod a-x %{buildroot}/%{_libdir}/lib*.a + test -n "%{buildroot}" || ldconfig -N + mkdir -p %{buildroot}%{_defaultdocdir}/ncurses bzip2 -c misc/terminfo.src > misc/terminfo.src.bz2 - install -m 644 misc/terminfo.src.bz2 ${RPM_BUILD_ROOT}%{_defaultdocdir}/ncurses/ - install -m 644 doc/html/*.html ${RPM_BUILD_ROOT}%{_defaultdocdir}/ncurses/ + install -m 644 misc/terminfo.src.bz2 %{buildroot}%{_defaultdocdir}/ncurses/ + install -m 644 doc/html/*.html %{buildroot}%{_defaultdocdir}/ncurses/ bzip2 doc/ncurses-intro.doc -c > doc/ncurses-intro.txt.bz2 - install -m 644 doc/ncurses-intro.txt.bz2 ${RPM_BUILD_ROOT}%{_defaultdocdir}/ncurses/ + install -m 644 doc/ncurses-intro.txt.bz2 %{buildroot}%{_defaultdocdir}/ncurses/ bzip2 doc/hackguide.doc -c > doc/hackguide.txt.bz2 - install -m 644 doc/hackguide.txt.bz2 ${RPM_BUILD_ROOT}%{_defaultdocdir}/ncurses/ - mkdir -p ${RPM_BUILD_ROOT}/etc - mkdir -p ${RPM_BUILD_ROOT}/usr/share/misc + install -m 644 doc/hackguide.txt.bz2 %{buildroot}%{_defaultdocdir}/ncurses/ + mkdir -p %{buildroot}%{_sysconfdir} + mkdir -p %{buildroot}%{_miscdir} cd ncurses/ sh ./run_cmd.sh tic -C -r ../misc/terminfo.src | grep -E -v '^#' > termcap # Gererate new termcap entries for various linux consoles TERMCAP=termcap \ - TERMINFO=${RPM_BUILD_ROOT}%{_datadir}/terminfo \ + TERMINFO=%{buildroot}%{_datadir}/terminfo \ bash %{SOURCE2} - install -m 0644 termcap.new ${RPM_BUILD_ROOT}/usr/share/misc/termcap + install -m 0644 termcap.new %{buildroot}%{_miscdir}/termcap cd ../ - if test `/usr/bin/id -u` = '0' ; then - chown root:root ${RPM_BUILD_ROOT}/usr/share/misc/termcap - chmod 0644 ${RPM_BUILD_ROOT}/usr/share/misc/termcap + if test `%{_bindir}/id -u` = '0' ; then + chown root:root %{buildroot}%{_miscdir}/termcap + chmod 0644 %{buildroot}%{_miscdir}/termcap fi - ln -sf /usr/share/misc/termcap ${RPM_BUILD_ROOT}/etc/termcap + ln -sf %{_miscdir}/termcap %{buildroot}%{_sysconfdir}/termcap (cat > default.list) <<-EOF %{tabset std} %{tabset stdcrt} @@ -319,12 +319,21 @@ tar Oxfj %{SOURCE1} | patch -p1 -s %{terminfo x/xterm-nic} %{terminfo x/xterm-r6} EOF - find ${RPM_BUILD_ROOT}%{tabset ""} ${RPM_BUILD_ROOT}%{terminfo ""} \ + find %{buildroot}%{tabset ""} %{buildroot}%{terminfo ""} \ \( -type f -or -type l \) | \ - sed "s@^${RPM_BUILD_ROOT}@@g" | \ + sed "s@^%{buildroot}@@g" | \ grep -v -F -x -f default.list \ > extension.list - rm -f $RPM_BUILD_ROOT/usr/lib/terminfo + rm -f %{buildroot}%{_prefix}/lib/terminfo + mkdir -p %{buildroot}%{_incdir}/ncurses + mkdir -p %{buildroot}%{_incdir}/ncursesw + cat > %{buildroot}%{_incdir}/ncursesw/ncurses.h <<-"EOF" + #ifndef _XOPEN_SOURCE_EXTENDED + #define _XOPEN_SOURCE_EXTENDED + #endif + #include + EOF + ln -sf ../ncurses.h %{buildroot}%{_incdir}/ncurses/ %post -p /sbin/ldconfig @@ -332,20 +341,20 @@ tar Oxfj %{SOURCE1} | patch -p1 -s %files -f default.list %defattr(-,root,root) -#%ghost /usr/lib/tabset -#%ghost /usr/lib/terminfo -%dir /usr/share/tabset/ -%dir /usr/share/terminfo/ -%dir /usr/share/terminfo/*/ -/etc/termcap -%config /usr/share/misc/termcap +#%ghost %{_prefix}/lib/tabset +#%ghost %{_prefix}/lib/terminfo +%dir %{_datadir}/tabset/ +%dir %{_datadir}/terminfo/ +%dir %{_datadir}/terminfo/*/ +%{_sysconfdir}/termcap +%config %{_miscdir}/termcap /%{_lib}/lib*.so.* -/usr/bin/clear -/usr/bin/reset -/usr/bin/toe -/usr/bin/tput -/usr/bin/tset -/usr/%{_lib}/lib*.so.* +%{_bindir}/clear +%{_bindir}/reset +%{_bindir}/toe +%{_bindir}/tput +%{_bindir}/tset +%{_libdir}/lib*.so.* %doc %{_mandir}/man1/clear.1.gz %doc %{_mandir}/man1/reset.1.gz %doc %{_mandir}/man1/toe.1.gz @@ -357,14 +366,18 @@ tar Oxfj %{SOURCE1} | patch -p1 -s %defattr(-,root,root) %dir %{_defaultdocdir}/ncurses/ %doc %{_defaultdocdir}/ncurses/* -/usr/bin/ncurses*-config -/usr/bin/captoinfo -/usr/bin/infocmp -/usr/bin/infotocap -/usr/bin/tic -/usr/include/*.h -/usr/%{_lib}/lib*.a -/usr/%{_lib}/lib*.so +%{_bindir}/ncurses*-config +%{_bindir}/captoinfo +%{_bindir}/infocmp +%{_bindir}/infotocap +%{_bindir}/tic +%dir %{_incdir}/ncurses/ +%dir %{_incdir}/ncursesw/ +%{_incdir}/*.h +%{_incdir}/ncurses/*.h +%{_incdir}/ncursesw/*.h +%{_libdir}/lib*.a +%{_libdir}/lib*.so %doc %{_mandir}/man1/captoinfo.1.gz %doc %{_mandir}/man1/infocmp.1.gz %doc %{_mandir}/man1/infotocap.1.gz @@ -374,13 +387,18 @@ tar Oxfj %{SOURCE1} | patch -p1 -s %files -n tack %defattr(-,root,root) -/usr/bin/tack +%{_bindir}/tack %doc %{_mandir}/man1/tack.1.gz %files -f extension.list -n terminfo %defattr(-,root,root) %changelog +* Wed Dec 05 2007 - werner@suse.de +- Add compatibility header files (bug #337412) +* Mon Oct 29 2007 - pth@suse.de +- Fix configure so that ncurses-config doesn't erroneously + report ncurses.h to reside in /usr/include/ncurses (#337412). * Wed Sep 05 2007 - werner@suse.de - Move libncursesw to /lib or /lib64 (bug #307353) * Fri May 25 2007 - dmueller@suse.de