class Gstreamer < Formula desc "Development framework for multimedia applications" homepage "https://gstreamer.freedesktop.org/" url "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.16.2.tar.xz" sha256 "e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e" bottle do sha256 "3473eef6aadd51a378f722c08a399922c4b401f38d8d5bffe7e2cb0ba845f919" => :catalina sha256 "6427cd64ac1c541d35fc57f869dd1290e57aab8a2a9f5589b79f6e078e4432d5" => :mojave sha256 "b1a6cbfbac2bb152ce023fbe283ef38ec371ceccff48ae1545cdeac1a36933ba" => :high_sierra end head do url "https://anongit.freedesktop.org/git/gstreamer/gstreamer.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "bison" => :build depends_on "gobject-introspection" => :build depends_on "pkg-config" => :build depends_on "gettext" depends_on "glib" def install args = %W[ --prefix=#{prefix} --disable-debug --disable-dependency-tracking --disable-gtk-doc --enable-introspection=yes ] if build.head? ENV["NOCONFIGURE"] = "yes" system "./autogen.sh" # Ban trying to chown to root. # https://bugzilla.gnome.org/show_bug.cgi?id=750367 args << "--with-ptp-helper-permissions=none" end # 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 "configure", 'PLUGINDIR="$full_var"', "PLUGINDIR=\"#{HOMEBREW_PREFIX}/lib/gstreamer-1.0\"" system "./configure", *args system "make" system "make", "install" 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