From 2115acf28161baf50514e23739e179c594719675 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Thu, 13 Jul 2017 08:14:07 -0700 Subject: [PATCH] mplayer: add optional libdvdread and libdvdnav dependencies (#15587) --- Formula/mplayer.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/mplayer.rb b/Formula/mplayer.rb index ddf414cc6b..7a8de54bda 100644 --- a/Formula/mplayer.rb +++ b/Formula/mplayer.rb @@ -21,6 +21,9 @@ class Mplayer < Formula depends_on "yasm" => :build depends_on "libcaca" => :optional + depends_on "libdvdread" => :optional + depends_on "libdvdnav" => :optional + depends_on "pkg-config" => :build if build.with? "libdvdnav" unless MacOS.prefer_64_bit? fails_with :clang do @@ -43,6 +46,12 @@ class Mplayer < Formula ] args << "--enable-caca" if build.with? "libcaca" + args << "--enable-dvdnav" if build.with? "libdvdnav" + + if build.with? "libdvdread" + ENV["LDFLAGS"] = "-L#{Formula["libdvdread"].opt_lib} -ldvdread" + args << "--enable-dvdread" + end system "./configure", *args system "make"