diff --git a/lnav-0.7.0-bigendian.patch b/lnav-0.7.0-bigendian.patch new file mode 100644 index 0000000..de1cce0 --- /dev/null +++ b/lnav-0.7.0-bigendian.patch @@ -0,0 +1,28 @@ +Description: Fix FTBFS on big-endian architectures + Correctly convert byte encoding for 32bit value from little-endian + order to host byte order. +Origin: vendor +Bug-Debian: http://bugs.debian.org/743503 +Author: Jurica Stanojkovic +Author: Salvatore Bonaccorso +Last-Update: 2014-04-03 + +--- a/src/line_buffer.cc ++++ b/src/line_buffer.cc +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_BZLIB_H + #include +@@ -182,7 +183,7 @@ + throw error(errno); + } + } +- this->lb_file_time = *((int32_t *)&gz_id[4]); ++ this->lb_file_time = le32toh(*((int32_t *)&gz_id[4])); + if (this->lb_file_time < 0) + this->lb_file_time = 0; + this->lb_gz_offset = lseek(this->lb_fd, 0, SEEK_CUR); diff --git a/lnav.spec b/lnav.spec index 4bd2cef..6117c19 100644 --- a/lnav.spec +++ b/lnav.spec @@ -1,10 +1,12 @@ Name: lnav Version: 0.7.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A curses-based tool for viewing and analyzing log files License: BSD URL: http://lnav.org Source0: https://github.com/tstack/lnav/releases/download/v%{version}/lnav-%{version}.tar.bz2 +# https://github.com/tstack/lnav/issues/93 +Patch0: %{name}-0.7.0-bigendian.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bzip2-devel @@ -30,6 +32,7 @@ efficiently zero in on problems. %prep %setup -q +%patch0 -p1 -b .bigendian %build autoreconf -fiv @@ -48,6 +51,9 @@ make check %{_mandir}/man1/lnav.1* %changelog +* Fri Apr 04 2014 Dan HorĂ¡k - 0.7.0-2 +- fix build on big endian arches + * Tue Apr 01 2014 Christopher Meng - 0.7.0-1 - Update to 0.7.0