Added lzma support Added test if fsync produces EIVAL on tty
This commit is contained in:
parent
5a606a9e43
commit
51bf205882
38
less-418-fsync.patch
Normal file
38
less-418-fsync.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
diff -ur less-418.orig/configure.ac less-418/configure.ac
|
||||||
|
--- less-418.orig/configure.ac 2008-12-22 07:10:44.000000000 -0500
|
||||||
|
+++ less-418/configure.ac 2008-12-22 07:28:58.000000000 -0500
|
||||||
|
@@ -203,6 +203,8 @@
|
||||||
|
[Define HAVE_TIME_T if your system supports the "time_t" type.])
|
||||||
|
AH_TEMPLATE([HAVE_STRERROR],
|
||||||
|
[Define HAVE_STRERROR if you have the strerror() function.])
|
||||||
|
+AH_TEMPLATE([HAVE_FSYNC],
|
||||||
|
+ [Define HAVE_FSYNC if fsync() on a tty works.])
|
||||||
|
AH_TEMPLATE([HAVE_FILENO],
|
||||||
|
[Define HAVE_FILENO if you have the fileno() macro.])
|
||||||
|
AH_TEMPLATE([HAVE_ERRNO],
|
||||||
|
@@ -251,7 +253,7 @@
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_TYPE_SIGNAL
|
||||||
|
-AC_CHECK_FUNCS([fsync popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod])
|
||||||
|
+AC_CHECK_FUNCS([popen _setjmp sigprocmask sigsetmask snprintf stat system fchmod])
|
||||||
|
|
||||||
|
# AC_CHECK_FUNCS may not work for inline functions, so test these separately.
|
||||||
|
AC_MSG_CHECKING(for memcpy)
|
||||||
|
@@ -298,6 +300,16 @@
|
||||||
|
#endif], [static char *x; x = strerror(0);],
|
||||||
|
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
|
+AC_MSG_CHECKING(for fsync)
|
||||||
|
+AC_TRY_RUN([
|
||||||
|
+#include <fcntl.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+int main(void)
|
||||||
|
+{
|
||||||
|
+ int fd = open("/dev/tty", O_RDWR);
|
||||||
|
+ return fsync(fd);
|
||||||
|
+}], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FSYNC)], [AC_MSG_RESULT(no)])
|
||||||
|
+
|
||||||
|
AC_MSG_CHECKING(for sys_errlist)
|
||||||
|
AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;],
|
||||||
|
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)])
|
13
less.spec
13
less.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A text file browser similar to more, but better
|
Summary: A text file browser similar to more, but better
|
||||||
Name: less
|
Name: less
|
||||||
Version: 424
|
Version: 424
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
||||||
@ -10,11 +10,12 @@ Source2: less.sh
|
|||||||
Source3: less.csh
|
Source3: less.csh
|
||||||
Patch1: less-406-Foption.patch
|
Patch1: less-406-Foption.patch
|
||||||
Patch4: less-394-time.patch
|
Patch4: less-394-time.patch
|
||||||
|
Patch5: less-418-fsync.patch
|
||||||
URL: http://www.greenwoodsoftware.com/less/
|
URL: http://www.greenwoodsoftware.com/less/
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf automake libtool
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The less utility is a text file browser that resembles more, but has
|
The less utility is a text file browser that resembles more, but has
|
||||||
@ -30,6 +31,10 @@ files, and you'll use it frequently.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .Foption
|
%patch1 -p1 -b .Foption
|
||||||
%patch4 -p1 -b .time
|
%patch4 -p1 -b .time
|
||||||
|
%patch5 -p1 -b .fsync
|
||||||
|
|
||||||
|
autoreconf
|
||||||
|
|
||||||
chmod -R a+w *
|
chmod -R a+w *
|
||||||
chmod 644 lessecho.c lesskey.c version.c LICENSE
|
chmod 644 lessecho.c lesskey.c version.c LICENSE
|
||||||
|
|
||||||
@ -58,6 +63,10 @@ ls -la $RPM_BUILD_ROOT/etc/profile.d
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 17 2009 Zdenek Prikryl <zprikryl@redhat.com> - 424-3
|
||||||
|
- Added lzma support
|
||||||
|
- Added test if fsync produces EIVAL on tty
|
||||||
|
|
||||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 424-2
|
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 424-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ lesspipe() {
|
|||||||
*.tar.bz2|*.tbz2) bzip2 -dc -- "$1" | tar tvvf - ;;
|
*.tar.bz2|*.tbz2) bzip2 -dc -- "$1" | tar tvvf - ;;
|
||||||
*.[zZ]|*.gz) gzip -dc -- "$1" ;;
|
*.[zZ]|*.gz) gzip -dc -- "$1" ;;
|
||||||
*.bz2) bzip2 -dc -- "$1" ;;
|
*.bz2) bzip2 -dc -- "$1" ;;
|
||||||
|
*.lzma) lzma -c -d -- "$1" ;;
|
||||||
*.zip) zipinfo -- "$1" ;;
|
*.zip) zipinfo -- "$1" ;;
|
||||||
*.rpm) rpm -qpivl --changelog -- "$1" ;;
|
*.rpm) rpm -qpivl --changelog -- "$1" ;;
|
||||||
*.cpi|*.cpio) cpio -itv < "$1" ;;
|
*.cpi|*.cpio) cpio -itv < "$1" ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user