67 lines
2.2 KiB
Ruby
67 lines
2.2 KiB
Ruby
class Gstreamer < Formula
|
|
desc "Development framework for multimedia applications"
|
|
homepage "https://gstreamer.freedesktop.org/"
|
|
url "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.18.1.tar.xz"
|
|
sha256 "79df8de21f284a105a5c1568527f8c559c583c85c0f2bd7bdb5b0372b8beecba"
|
|
license "LGPL-2.0-or-later"
|
|
head "https://gitlab.freedesktop.org/gstreamer/gstreamer.git"
|
|
|
|
livecheck do
|
|
url "https://gstreamer.freedesktop.org/src/gstreamer/"
|
|
regex(/href=.*?gstreamer[._-]v?(\d+\.\d*[02468](?:\.\d+)*)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 "a67df97715d03b9ce1d9fe3c0b7e64f5b2aa86a4495dd1de7dce286b0bda2bf4" => :big_sur
|
|
sha256 "5ff80634d2da417ac4b5bce64b19ad1350fc566599caffac556c79c292eff2f9" => :catalina
|
|
sha256 "378d6f829568e97215e770218899f288ad58f56ac56e6078f58809ce95d94fef" => :mojave
|
|
sha256 "5ddd8a1a83fc44a194e7d580db95ed1ba9ae32ae9e189a6e0d988143de47ffc3" => :high_sierra
|
|
end
|
|
|
|
depends_on "bison" => :build
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "gettext"
|
|
depends_on "glib"
|
|
|
|
uses_from_macos "flex" => :build
|
|
|
|
def install
|
|
# Ban trying to chown to root.
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=750367
|
|
args = std_meson_args + %w[
|
|
-Dintrospection=enabled
|
|
-Dptp-helper-permissions=none
|
|
]
|
|
|
|
# Look for plugins in HOMEBREW_PREFIX/lib/gstreamer-1.0 instead of
|
|
# HOMEBREW_PREFIX/Cellar/gstreamer/1.0/lib/gstreamer-1.0, so we'll find
|
|
# plugins installed by other packages without setting GST_PLUGIN_PATH in
|
|
# the environment.
|
|
inreplace "meson.build",
|
|
"cdata.set_quoted('PLUGINDIR', join_paths(get_option('prefix'), get_option('libdir'), 'gstreamer-1.0'))",
|
|
"cdata.set_quoted('PLUGINDIR', '#{HOMEBREW_PREFIX}/lib/gstreamer-1.0')"
|
|
|
|
mkdir "build" do
|
|
system "meson", *args, ".."
|
|
system "ninja", "-v"
|
|
system "ninja", "install", "-v"
|
|
end
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
Consider also installing gst-plugins-base and gst-plugins-good.
|
|
|
|
The gst-plugins-* packages contain gstreamer-video-1.0, gstreamer-audio-1.0,
|
|
and other components needed by most gstreamer applications.
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system bin/"gst-inspect-1.0"
|
|
end
|
|
end
|