xvid: modernize, https, sha256

Closes Homebrew/homebrew#37627.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
CNA-Bld 2015-03-12 15:34:17 +08:00 committed by Mike McQuaid
parent d6deeed941
commit fc0d0c68ba

View file

@ -1,11 +1,9 @@
require 'formula'
class Xvid < Formula class Xvid < Formula
homepage 'http://www.xvid.org' homepage "http://www.xvid.org"
url 'http://fossies.org/unix/privat/xvidcore-1.3.3.tar.gz' url "https://fossies.org/unix/privat/xvidcore-1.3.3.tar.gz"
# Official download takes a long time to fail, so set it as the mirror for now # Official download takes a long time to fail, so set it as the mirror for now
mirror 'http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz' mirror "http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz"
sha1 '465763c92679ca230526d4890d17dbf6d6974b08' sha256 "9e6bb7f7251bca4615c2221534d4699709765ff019ab0366609f219b0158499d"
bottle do bottle do
cellar :any cellar :any
@ -16,11 +14,25 @@ class Xvid < Formula
end end
def install def install
cd 'build/generic' do cd "build/generic" do
system "./configure", "--disable-assembly", "--prefix=#{prefix}" system "./configure", "--disable-assembly", "--prefix=#{prefix}"
ENV.j1 # Or make fails ENV.j1 # Or make fails
system "make" system "make"
system "make install" system "make", "install"
end end
end end
test do
(testpath/"test.cpp").write <<-EOS.undent
#include <xvid.h>
#define NULL 0
int main() {
xvid_gbl_init_t xvid_gbl_init;
xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL);
return 0;
}
EOS
system ENV.cc, "test.cpp", "-L#{lib}", "-lxvidcore", "-o", "test"
system "./test"
end
end end