homebrew-core/Formula/gst-plugins-good.rb
Lettier fe0575b6b2
gst-plugins-good: fix gtk+3 option.
Closes #29917.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2018-08-09 05:24:55 +01:00

95 lines
2.7 KiB
Ruby

class GstPluginsGood < Formula
desc "GStreamer plugins (well-supported, under the LGPL)"
homepage "https://gstreamer.freedesktop.org/"
stable do
url "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.14.2.tar.xz"
sha256 "c0575e2811860bfff59b865b8d125153859a01f0615fa41e279b64d88d25caad"
depends_on "check" => :optional
end
bottle do
sha256 "d9662303e702a1dd2c521ce3b4d0acf85181ec72ffe8e29e97b01ae97af19d5a" => :high_sierra
sha256 "42582defb0dff9b1d6bdec017f8bfb22440d6fe8f479b2e1736eb8e4b711c043" => :sierra
sha256 "5c40515683b558638307ea9511b63b86f3970038fd06be9eb21b660eb2a2cff5" => :el_capitan
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
depends_on "gtk+3" => :optional
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
def install
args = %W[
--prefix=#{prefix}
--disable-gtk-doc
--disable-goom
--with-default-videosink=ximagesink
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
]
args << "--enable-gtk3" if build.with? "gtk+3"
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