Skip to content

Commit

Permalink
Merge pull request #190747 from Homebrew/vapoursynth-sub-meson
Browse files Browse the repository at this point in the history
vapoursynth-sub: switch to `meson` to avoid FetchContent
  • Loading branch information
BrewTestBot authored Sep 16, 2024
2 parents f2ec1db + de7fa4a commit 176840f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Formula/v/vapoursynth-sub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class VapoursynthSub < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "9ebc9c1460d973e9f99019e07866d5422349101796a7a4267c83bc945bffceec"
end

depends_on "cmake" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "ffmpeg"
depends_on "libass"
Expand All @@ -28,12 +29,13 @@ class VapoursynthSub < Formula
fails_with gcc: "5" # ffmpeg is compiled with GCC

def install
# A meson-based install method has been added but is not present
# in this release. Switch to it in the next release to avoid
# manually installing the shared library.
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
(lib/"vapoursynth").install "build/#{shared_library("libsubtext")}"
# Work around Homebrew's keg directory structure by overriding `vapoursynth`
# pkg-config libdir to install instead into `vapoursynth-sub` libdir
ENV["PKG_CONFIG_VAPOURSYNTH_LIBDIR"] = lib.to_s

system "meson", "setup", "build", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
system "meson", "install", "-C", "build"
end

test do
Expand Down

0 comments on commit 176840f

Please sign in to comment.