scrub 2.6.1

Closes Homebrew/homebrew#39918.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Alex Dunn 2015-05-19 19:34:40 -07:00 committed by Xu Cheng
parent 72a9c81b63
commit cf5b0a4503

View file

@ -1,19 +1,21 @@
require 'formula'
class Scrub < Formula
homepage 'http://code.google.com/p/diskscrub/'
url 'https://diskscrub.googlecode.com/files/scrub-2.5.2.tar.bz2'
sha1 '863e5894e6acb3f922cb25f58e260f9c59b55c14'
homepage "https://code.google.com/p/diskscrub/"
url "https://github.com/chaos/scrub/releases/download/2.6.1/scrub-2.6.1.tar.gz"
mirror "https://mirrors.kernel.org/debian/pool/main/s/scrub/scrub_2.6.1.orig.tar.gz"
sha256 "43d98d3795bc2de7920efe81ef2c5de4e9ed1f903c35c939a7d65adc416d6cb8"
# in src/genrand.c:109 the `return;` statement should be `return 0;` for clang
# in src/util.h we need <sys/types.h> to get off_t which is reported:
# https://code.google.com/p/diskscrub/issues/detail?id=21
patch :DATA
head do
url "https://github.com/chaos/scrub.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "libtool" => :build
end
def install
system "./autogen.sh" if build.head?
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
system "make", "install"
end
test do
@ -26,27 +28,3 @@ class Scrub < Formula
assert !File.exist?(path)
end
end
__END__
--- a/src/genrand.c 2012-06-20 15:00:27.000000000 -0700
+++ b/src/genrand.c 2012-10-27 22:02:27.000000000 -0700
@@ -106,7 +106,7 @@
buf[n] = result;
}
#endif
- return;
+ return 0;
}
}
--- a/src/util.h 2012-06-20 15:00:27.000000000 -0700
+++ b/src/util.h 2012-10-27 22:10:32.000000000 -0700
@@ -24,6 +24,8 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
\*****************************************************************************/
+#include <sys/types.h>
+
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#else