From eca33baaeadbc69b2df40dfddc13e8d963f8b9ed Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Wed, 9 Mar 2016 19:36:19 +0000 Subject: [PATCH] librsync: backport upstream fix Closes Homebrew/homebrew#49770. --- Formula/librsync.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Formula/librsync.rb b/Formula/librsync.rb index d6a5510440..f48d995270 100644 --- a/Formula/librsync.rb +++ b/Formula/librsync.rb @@ -1,8 +1,9 @@ class Librsync < Formula desc "Library that implements the rsync remote-delta algorithm" - homepage "http://librsync.sourceforge.net/" + homepage "http://librsync.sourcefrog.net/" url "https://github.com/librsync/librsync/archive/v2.0.0.tar.gz" sha256 "b5c4dd114289832039397789e42d4ff0d1108ada89ce74f1999398593fae2169" + revision 1 bottle do sha256 "7205930ff0e86bee031c515209bfb8ef9920274420eaa23701756ce4ae32fb15" => :el_capitan @@ -18,7 +19,18 @@ class Librsync < Formula def install ENV.universal_binary if build.universal? + # https://github.com/librsync/librsync/commit/1765ad0d416 + # https://github.com/librsync/librsync/issues/50 + # Safe to remove when the next stable release is cut. + inreplace "src/search.c", "if (l == r) {", "if ((l == r) && (l <= bucket->r)) {" + system "cmake", ".", *std_cmake_args system "make", "install" + man1.install "doc/rdiff.1" + man3.install "doc/librsync.3" + end + + test do + assert_match version.to_s, shell_output("#{bin}/rdiff -V") end end