mpd: add modplug decoder support

Module playback with the modplug decoder can be enabled with the --with-libmodplug flag.
https://www.musicpd.org/doc/user/decoder_plugins.html#idm45666765924944

Closes #174.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
This commit is contained in:
Rune Flobakk 2016-04-09 22:08:04 +02:00 committed by Tim D. Smith
parent 7500dcf540
commit 99d01923f6

View file

@ -31,6 +31,7 @@ class Mpd < Formula
option "with-libvorbis", "Build with vorbis support (for Ogg encoding)"
option "with-yajl", "Build with yajl support (for playing from soundcloud)"
option "with-opus", "Build with opus support (for Opus encoding and decoding)"
option "with-libmodplug", "Build with modplug support (for decoding modules supported by MODPlug)"
deprecated_option "with-vorbis" => "with-libvorbis"
@ -63,6 +64,7 @@ class Mpd < Formula
depends_on "libvorbis" => :optional
depends_on "libnfs" => :optional
depends_on "mad" => :optional
depends_on "libmodplug" => :optional # MODPlug decoder
def install
# mpd specifies -std=gnu++0x, but clang appears to try to build
@ -93,6 +95,7 @@ class Mpd < Formula
args << "--disable-soundcloud" if build.without? "yajl"
args << "--enable-vorbis-encoder" if build.with? "libvorbis"
args << "--enable-nfs" if build.with? "libnfs"
args << "--enable-modplug" if build.with? "libmodplug"
system "./configure", *args
system "make"