From db92fc302a81334602bcb36b5e41417bd700abfc Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 1 Jul 2024 10:17:47 -0400 Subject: [PATCH] uvg266 0.8.1 autobump: add uvg266 Signed-off-by: Rui Chen uvg266: remove build patch and update build/test Signed-off-by: Rui Chen --- .github/autobump.txt | 1 + Formula/u/uvg266.rb | 33 ++++++++++----------------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/.github/autobump.txt b/.github/autobump.txt index 46cc528f3189a..4433e0e7fc8fb 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -2523,6 +2523,7 @@ uutils-diffutils uutils-findutils uuu uv +uvg266 uvicorn uwsgi v2ray diff --git a/Formula/u/uvg266.rb b/Formula/u/uvg266.rb index 9d26ac0bbe16d..d9a4daf21591c 100644 --- a/Formula/u/uvg266.rb +++ b/Formula/u/uvg266.rb @@ -1,20 +1,11 @@ class Uvg266 < Formula desc "Open-source VVC/H.266 encoder" homepage "https://github.com/ultravideo/uvg266" + url "https://github.com/ultravideo/uvg266/archive/refs/tags/v0.8.1.tar.gz" + sha256 "9a2c68f94a1105058d1e654191036423d0a0fcf33b7e790dd63801997540b6ec" license "BSD-3-Clause" head "https://github.com/ultravideo/uvg266.git", branch: "master" - stable do - url "https://github.com/ultravideo/uvg266/archive/refs/tags/v0.8.0.tar.gz" - sha256 "27e4306577fe646951bd3c12685c1527b41385bfcb95262233669fc7f44f21bd" - - # Fix attempts to build AVX2 code on arm64 - remove on next release - patch do - url "https://github.com/ultravideo/uvg266/commit/e5e32d67f43ba73db4a1a17aa975a070f15496be.patch?full_index=1" - sha256 "2b2e0938eeab7ea9900ec2f40e09debdcd908e13fffb44f66556baa904edaeff" - end - end - bottle do sha256 cellar: :any, arm64_sonoma: "b3f0dcbb7047b2982860c57b4b9d94da3b69ee513c6587be4dd95fbc223ab94f" sha256 cellar: :any, arm64_ventura: "fe2dc71d9b62684ff83a8de3fbd7ba21e491670d24a825a4eb19f05ac4df3d21" @@ -27,24 +18,20 @@ class Uvg266 < Formula depends_on "cmake" => :build - resource "homebrew-videosample" do - url "https://samples.mplayerhq.hu/V-codecs/lm20.avi" - sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392" - end - def install - args = std_cmake_args + %W[-DCMAKE_INSTALL_RPATH=#{rpath}] - - system "cmake", "-S", ".", "-B", "build", *args + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args system "cmake", "--build", "build" system "cmake", "--install", "build" end test do - # download small sample and try to encode it - resource("homebrew-videosample").stage do - system bin/"uvg266", "-i", "lm20.avi", "--input-res", "16x16", "-o", "lm20.vvc" - assert_predicate Pathname.pwd/"lm20.vvc", :exist? + resource "homebrew-videosample" do + url "https://samples.mplayerhq.hu/V-codecs/lm20.avi" + sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392" end + testpath.install resource("homebrew-videosample") + + system bin/"uvg266", "-i", "lm20.avi", "--input-res", "16x16", "-o", "lm20.vvc" + assert_predicate testpath/"lm20.vvc", :exist? end end