From 5fe24c970a029e0aef7b8d1d30ab99f3c0e7c6fd Mon Sep 17 00:00:00 2001 From: Kyungdahm Yun Date: Sat, 20 Jun 2015 15:27:17 -0700 Subject: [PATCH] smpeg 0.4.5 Migrate from head-only. Closes Homebrew/homebrew#35029. Signed-off-by: Dominyk Tiller --- Formula/smpeg.rb | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Formula/smpeg.rb diff --git a/Formula/smpeg.rb b/Formula/smpeg.rb new file mode 100644 index 0000000000..e77919f8b6 --- /dev/null +++ b/Formula/smpeg.rb @@ -0,0 +1,43 @@ +class Smpeg < Formula + desc "SDL MPEG Player Library" + homepage "http://icculus.org/smpeg/" + url "svn://svn.icculus.org/smpeg/tags/release_0_4_5/", :revision => "399" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkg-config" => :build + depends_on "sdl" + depends_on "gtk+" => :optional + + def install + args = %W[ + --prefix=#{prefix} + --with-sdl-prefix=#{Formula["sdl"].opt_prefix} + --disable-dependency-tracking + --disable-debug + --disable-sdltest + ] + + if build.without? "gtk" + args << "--disable-gtk-player" + args << "--disable-gtktest" + end + + # Skip glmovie to avoid OpenGL error + args << "--disable-opengl-player" + + system "./autogen.sh" + system "./configure", *args + system "make" + # Install script is not +x by default for some reason + chmod 0755, "./install-sh" + system "make", "install" + + rm_f "#{man1}/gtv.1" if build.without? "gtk" + end + + test do + system "#{bin}/plaympeg", "--version" + end +end