Permalink
Browse files

~ double "if" in depencies

~ split with-lastfm into two modules --with-xmlplaylist and --with-lastfm
  • Loading branch information...
drfill committed Mar 22, 2012
1 parent 0f4f268 commit 3588ae6239d4fe007cc83f261b12b8b5b7a8c43e
Showing with 6 additions and 5 deletions.
  1. +6 −5 Formula/liquidsoap.rb
View
@@ -22,13 +22,14 @@ class Liquidsoap < Formula
depends_on 'theora' => :optional
depends_on 'schroedinger' => :optional
depends_on "libsamplerate" if ARGV.include? "--with-samplerate"
- depends_on "xmlm" if ARGV.include? "--with-lastfm"
- depends_on "sound-touch" if ARGV.include? "--with-soundtouch" if Hardware.is_32_bit?
+ depends_on "xmlm" if ARGV.include? "--with-lastfm" or ARGV.include? "--with-xmlplaylist"
+ depends_on "sound-touch" if ARGV.include? "--with-soundtouch" and Hardware.is_32_bit?
depends_on "libaacplus" if ARGV.include? "--with-aacplus"
def options
- [['--with-samplerate', "Enable Samplerate library support"],
- ['--with-lastfm', "Enables LAST.fm and XmlPlaylist support"],
+ [['--with-samplerate', "Enables Samplerate library support"],
+ ['--with-xmlplaylist', "Enables XmlPlaylist support"],
+ ['--with-lastfm', "Enables LAST.fm support"],
['--with-soundtouch', "Enables Soundtouch library support"],
['--with-aacplus', "Enables AAC+ library support"],]
end
@@ -48,7 +49,7 @@ def install
inreplace 'PACKAGES', '#ocaml-theora', 'ocaml-theora' if Formula.factory('theora').installed?
inreplace 'PACKAGES', '#ocaml-schroedinger', 'ocaml-schroedinger' if Formula.factory('schroedinger').installed?
inreplace 'PACKAGES', '#ocaml-samplerate', 'ocaml-samplerate' if ARGV.include? "--with-samplerate"
- inreplace 'PACKAGES', '#ocaml-xmlplaylist', 'ocaml-xmlplaylist' if ARGV.include? "--with-lastfm"
+ inreplace 'PACKAGES', '#ocaml-xmlplaylist', 'ocaml-xmlplaylist' if ARGV.include? "--with-xmlplaylist" or ARGV.include? "--with-lastfm"
inreplace 'PACKAGES', '#ocaml-lastfm', 'ocaml-lastfm' if ARGV.include? "--with-lastfm"
inreplace 'PACKAGES', '#ocaml-soundtouch', 'ocaml-soundtouch' if ARGV.include? "--with-soundtouch" and Hardware.is_32_bit?
inreplace 'PACKAGES', '#ocaml-aacplus', 'ocaml-aacplus' if ARGV.include? "--with-aacplus"

0 comments on commit 3588ae6

Please sign in to comment.