diff options
| author | CNA-Bld | 2015-03-12 15:34:17 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-12 12:30:23 +0000 |
| commit | 9b5fc394df0dd55a740ce7ebde256b04b295cfab (patch) | |
| tree | 5addde15af45416743a496182cff9a79cc328d90 | |
| parent | 4eecf0ca485700dc3c04645199c1260852626db9 (diff) | |
| download | homebrew-9b5fc394df0dd55a740ce7ebde256b04b295cfab.tar.bz2 | |
xvid: modernize, https, sha256
Closes #37627.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/xvid.rb | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/Library/Formula/xvid.rb b/Library/Formula/xvid.rb index da2c31734..7b288a33f 100644 --- a/Library/Formula/xvid.rb +++ b/Library/Formula/xvid.rb @@ -1,11 +1,9 @@ -require 'formula' - class Xvid < Formula - homepage 'http://www.xvid.org' - url 'http://fossies.org/unix/privat/xvidcore-1.3.3.tar.gz' + homepage "http://www.xvid.org" + 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 - mirror 'http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz' - sha1 '465763c92679ca230526d4890d17dbf6d6974b08' + mirror "http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz" + sha256 "9e6bb7f7251bca4615c2221534d4699709765ff019ab0366609f219b0158499d" bottle do cellar :any @@ -16,11 +14,25 @@ class Xvid < Formula end def install - cd 'build/generic' do + cd "build/generic" do system "./configure", "--disable-assembly", "--prefix=#{prefix}" ENV.j1 # Or make fails system "make" - system "make install" + system "make", "install" 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 |
