diff --git a/libgit2-0.18.0-non-x86.patch b/libgit2-0.18.0-non-x86.patch new file mode 100644 index 0000000..4067b52 --- /dev/null +++ b/libgit2-0.18.0-non-x86.patch @@ -0,0 +1,14 @@ +diff -up libgit2-0.18.0/src/bswap.h.non-x86 libgit2-0.18.0/src/bswap.h +--- libgit2-0.18.0/src/bswap.h.non-x86 2013-06-19 10:01:31.000000000 +0200 ++++ libgit2-0.18.0/src/bswap.h 2013-06-19 10:01:50.000000000 +0200 +@@ -76,6 +76,10 @@ GIT_INLINE(uint16_t) default_swab16(uint + #define bswap32(x) _byteswap_ulong(x) + #define bswap16(x) _byteswap_ushort(x) + ++#else ++ ++#include ++ + #endif + + #ifdef bswap32 diff --git a/libgit2.spec b/libgit2.spec index 4d8b6bf..62bbdaa 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -1,6 +1,6 @@ Name: libgit2 Version: 0.18.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A C implementation of the Git core methods as a library License: GPLv2 with exceptions @@ -13,6 +13,9 @@ Patch0: libgit2-0.18.0-http.patch # Use system libxdiff Patch1: libgit2-0.18.0-system-libxdiff.patch +# Add htonl() and friends declarations on non-x86 arches +Patch2: libgit2-0.18.0-non-x86.patch + BuildRequires: cmake >= 2.6 BuildRequires: http-parser-devel BuildRequires: libxdiff-devel @@ -44,6 +47,7 @@ find examples -name ".gitignore" -delete # Apply patches %patch0 -p1 %patch1 -p1 -b .system-libxdiff +%patch2 -p1 -b .non-x86 # Fix pkgconfig generation sed -i 's|@CMAKE_INSTALL_PREFIX@/||' libgit2.pc.in @@ -86,6 +90,10 @@ make install DESTDIR=%{buildroot} %changelog +* Wed Jun 19 2013 Dan HorĂ¡k - 0.18.0-5 +- Add htonl() and friends declarations on non-x86 arches +- Rebuilt with fixed libxdiff for big endian arches + * Thu May 30 2013 Veeti Paananen - 0.18.0-4 - Update the http-parser patch - Skip tests that require network connectivity