2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-23 18:46:43 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Par2 < Formula
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://parchive.sourceforge.net/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/parchive/par2cmdline/0.4/par2cmdline-0.4.tar.gz'
|
2010-04-07 05:58:35 +00:00
|
|
|
sha1 '2fcdc932b5d7b4b1c68c4a4ca855ca913d464d2f'
|
2009-09-23 18:46:43 +00:00
|
|
|
|
2012-07-28 16:02:46 +00:00
|
|
|
conflicts_with "par2tbb",
|
|
|
|
:because => "par2 and par2tbb install the same binaries."
|
|
|
|
|
2014-03-17 02:35:22 +00:00
|
|
|
# Clang doesn't like variable length arrays of non-POD types.
|
|
|
|
patch :DATA
|
|
|
|
|
|
|
|
# Fixes compilation with GCC 4 and still required for clang
|
|
|
|
patch do
|
|
|
|
url "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/par2cmdline/files/par2cmdline-0.4-gcc4.patch?revision=1.1"
|
|
|
|
sha1 "e91540f729115c5ddc210c93bdda34090e2a2cf1"
|
2012-06-15 00:02:12 +00:00
|
|
|
end
|
|
|
|
|
2014-04-28 11:31:15 +00:00
|
|
|
# http://parchive.cvs.sourceforge.net/viewvc/parchive/par2-cmdline/par2creatorsourcefile.cpp?r1=1.4&r2=1.5
|
|
|
|
patch :p0 do
|
2014-06-12 18:45:26 +00:00
|
|
|
url "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/par2cmdline/files/par2cmdline-0.4-offset.patch?revision=1.2"
|
|
|
|
sha1 "5a4e0274ef177c09deb237394b1c5c691b10d83a"
|
2014-04-28 11:31:15 +00:00
|
|
|
end
|
|
|
|
|
2009-09-23 18:46:43 +00:00
|
|
|
def install
|
2012-02-11 04:43:19 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2009-09-23 18:46:43 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2012-08-25 12:03:50 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/par2fileformat.h b/par2fileformat.h
|
|
|
|
index 9920b24..248cfaf 100644
|
|
|
|
--- a/par2fileformat.h
|
|
|
|
+++ b/par2fileformat.h
|
|
|
|
@@ -84,7 +84,7 @@ struct FILEVERIFICATIONPACKET
|
|
|
|
PACKET_HEADER header;
|
|
|
|
// Body
|
|
|
|
MD5Hash fileid; // MD5hash of file_hash_16k, file_length, file_name
|
|
|
|
- FILEVERIFICATIONENTRY entries[];
|
|
|
|
+ FILEVERIFICATIONENTRY entries[0];
|
|
|
|
} PACKED;
|
|
|
|
|
|
|
|
// The file description packet is used to record the name of the file,
|