class GstPluginsGood < Formula desc "GStreamer plugins (well-supported, under the LGPL)" homepage "https://gstreamer.freedesktop.org/" revision 1 stable do url "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.12.2.tar.xz" sha256 "5591ee7208ab30289a30658a82b76bf87169c927572d9b794f3a41ed48e1ee96" depends_on "check" => :optional end bottle do sha256 "b08a7f99f7d8bcab1a9c6db75b54c5e66855f5b01bb523f4eeffa1af9f8dd779" => :high_sierra sha256 "e4ed6fc4ff4cbd7e6d9cd3df20b56db26d2fe0b0c42a2e007c24e1e12f6e6bf0" => :sierra sha256 "6267bcc3e4daf3dcd325e5dd4d415dfb7d0a7c6fe83134065fc2b3cfdbc47dbc" => :el_capitan sha256 "4d09a69e37767a316bda60c8699d093181c0e62a8671159ef85cd1e4c0b48bbb" => :yosemite end head do url "https://anongit.freedesktop.org/git/gstreamer/gst-plugins-good.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "check" end depends_on "pkg-config" => :build depends_on "gettext" depends_on "gst-plugins-base" depends_on "libsoup" depends_on :x11 => :optional # Dependencies based on the intersection of # https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/REQUIREMENTS # and Homebrew formulae. depends_on "jpeg" => :recommended depends_on "orc" => :recommended depends_on "gdk-pixbuf" => :optional depends_on "aalib" => :optional depends_on "cairo" => :optional depends_on "flac" => [:optional, "with-libogg"] depends_on "libcaca" => :optional depends_on "libdv" => :optional depends_on "libpng" => :optional depends_on "libshout" => :optional depends_on "speex" => :optional depends_on "taglib" => :optional depends_on "libvpx" => :optional depends_on "pulseaudio" => :optional depends_on "jack" => :optional depends_on "libogg" if build.with? "flac" def install args = %W[ --prefix=#{prefix} --disable-gtk-doc --disable-goom --with-default-videosink=ximagesink --disable-debug --disable-dependency-tracking --disable-silent-rules ] if build.with? "x11" args << "--with-x" else args << "--disable-x" end # This plugin causes hangs on Snow Leopard (and possibly other versions?) # Upstream says it hasn't "been actively tested in a long time"; # successor is glimagesink (in gst-plugins-bad). # https://bugzilla.gnome.org/show_bug.cgi?id=756918 args << "--disable-osx_video" if MacOS.version == :snow_leopard if build.head? ENV["NOCONFIGURE"] = "yes" system "./autogen.sh" end system "./configure", *args system "make" system "make", "install" end test do gst = Formula["gstreamer"].opt_bin/"gst-inspect-1.0" output = shell_output("#{gst} --plugin cairo") assert_match version.to_s, output end end