2010-01-30 03:18:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Pianobar < Formula
|
2011-04-28 14:14:20 +00:00
|
|
|
url 'https://github.com/PromyLOPh/pianobar/zipball/2011.04.27'
|
|
|
|
version '2011.04.27'
|
2010-11-10 18:16:28 +00:00
|
|
|
homepage 'https://github.com/PromyLOPh/pianobar/'
|
2011-04-28 14:14:20 +00:00
|
|
|
md5 '1e83f851e92792bd6e59decc4a6b3662'
|
2010-01-30 03:18:52 +00:00
|
|
|
|
2011-05-27 05:02:55 +00:00
|
|
|
head 'https://github.com/PromyLOPh/pianobar.git'
|
2010-10-07 23:49:20 +00:00
|
|
|
|
2010-07-15 14:11:41 +00:00
|
|
|
depends_on 'libao'
|
|
|
|
depends_on 'mad'
|
|
|
|
depends_on 'faad2'
|
2010-01-30 03:18:52 +00:00
|
|
|
|
2011-05-05 18:18:42 +00:00
|
|
|
skip_clean 'bin'
|
2010-11-19 06:05:54 +00:00
|
|
|
|
2010-01-30 03:18:52 +00:00
|
|
|
def install
|
2011-04-14 17:45:24 +00:00
|
|
|
ENV.delete 'CFLAGS' # Pianobar uses c99 instead of gcc; remove our gcc flags.
|
|
|
|
|
|
|
|
# Enable 64-bit builds if needed
|
|
|
|
w_flag = MacOS.prefer_64_bit? ? "-W64" : ""
|
2011-05-05 18:18:42 +00:00
|
|
|
# Help non-default install paths
|
|
|
|
lib_path = HOMEBREW_PREFIX.to_s == "/usr/local" ? "" : " -I#{HOMEBREW_PREFIX}/include -L#{HOMEBREW_PREFIX}/lib"
|
|
|
|
|
2011-02-22 06:11:40 +00:00
|
|
|
inreplace "Makefile" do |s|
|
2011-05-05 18:18:42 +00:00
|
|
|
s.gsub! "-O2 -DNDEBUG", "-O2 -DNDEBUG #{w_flag} #{lib_path}"
|
2011-02-22 06:11:40 +00:00
|
|
|
end
|
2011-05-05 18:18:42 +00:00
|
|
|
|
2010-07-15 14:11:41 +00:00
|
|
|
system "make", "PREFIX=#{prefix}"
|
|
|
|
system "make", "install", "PREFIX=#{prefix}"
|
2011-05-05 18:18:42 +00:00
|
|
|
|
2010-12-09 02:22:18 +00:00
|
|
|
# Install contrib folder too, why not.
|
|
|
|
prefix.install Dir['contrib']
|
2010-01-30 03:18:52 +00:00
|
|
|
end
|
|
|
|
end
|