jackett 0.22.1382
[Homebrew/homebrew-core.git] / Formula / x / xvid.rb
blob23b96582714c9920b099fe229412ee8718c56295
1 class Xvid < Formula
2   desc "High-performance, high-quality MPEG-4 video library"
3   homepage "https://labs.xvid.com/"
4   url "https://downloads.xvid.com/downloads/xvidcore-1.3.7.tar.bz2"
5   sha256 "aeeaae952d4db395249839a3bd03841d6844843f5a4f84c271ff88f7aa1acff7"
6   license "GPL-2.0-or-later"
8   livecheck do
9     url "https://downloads.xvid.com/downloads/"
10     regex(/href=.*?xvidcore[._-]v?(\d+(?:\.\d+)+)\.t/i)
11   end
13   bottle do
14     sha256 cellar: :any,                 arm64_sequoia:  "c3bf171815c62e62be978f5d1913e7ce2e045cdb3e33012499e06197775ff4bd"
15     sha256 cellar: :any,                 arm64_sonoma:   "8062840ad8e79ae9c733f5d8f4b822e70d962c243e7c9eceee95bb100e016743"
16     sha256 cellar: :any,                 arm64_ventura:  "58aa3f757ca260fb922ee623240b710ef7e1cc75dea00c314d6d5ecd98289cbf"
17     sha256 cellar: :any,                 arm64_monterey: "ccf0c5b732d140dce8c595ff6bad287ed5be49a2c6a05912a1dbfdedfcb232bf"
18     sha256 cellar: :any,                 arm64_big_sur:  "8974d7b8f816f7d5e8d9ae967b94922e0ed212f22f6475b7fa4c80c7a95d6582"
19     sha256 cellar: :any,                 sonoma:         "1ed739249685549c93ef3f8b4ed04c065ea69d814e5c7404487e113776bcee9f"
20     sha256 cellar: :any,                 ventura:        "4726e597ea39861c53660614ebba7270095f12e99d76085f4bf0956408e91e38"
21     sha256 cellar: :any,                 monterey:       "57aae7b7565705fdd83b0c2996cf0d2e3569546e9691197d175431b89a9599b9"
22     sha256 cellar: :any,                 big_sur:        "feabfa1a3df3b916654ba5eef30193b65cdba70a7a49cca6406ec0c214b50338"
23     sha256 cellar: :any,                 catalina:       "ace5fea6272f3594b5c8fca6f1fe03c41c50a14af8599751571c5e44a49a5a53"
24     sha256 cellar: :any,                 mojave:         "4e119534a1351c85799944eb35f6f5675192e67e077fb3452f73f210a57eabe3"
25     sha256 cellar: :any,                 high_sierra:    "79ea46af3061561427ab0af36b09d61e057084c76f655ec21074fba375a36b01"
26     sha256 cellar: :any_skip_relocation, x86_64_linux:   "93bd40f313f5a6656ce1ca70cfeacf67deacd647beaf204ab3fd610a2d92c5a7"
27   end
29   def install
30     cd "build/generic" do
31       system "./configure", "--disable-assembly", "--prefix=#{prefix}"
32       ENV.deparallelize # Work around error: install: mkdir =build: File exists
33       system "make"
34       system "make", "install"
35     end
36   end
38   test do
39     (testpath/"test.cpp").write <<~CPP
40       #include <xvid.h>
41       #define NULL 0
42       int main() {
43         xvid_gbl_init_t xvid_gbl_init;
44         xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL);
45         return 0;
46       }
47     CPP
48     system ENV.cc, "test.cpp", "-L#{lib}", "-lxvidcore", "-o", "test"
49     system "./test"
50   end
51 end