aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/xvid.rb28
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