aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/madplay.rb
blob: de5f6ae9c9c829ab8ba1c474495fc0e6633dbdd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'formula'

class Madplay < Formula
  url 'http://downloads.sourceforge.net/project/mad/madplay/0.15.2b/madplay-0.15.2b.tar.gz'
  md5 '6814b47ceaa99880c754c5195aa1aac1'

  def homepage
    Formula.factory('mad').homepage
  end

  depends_on 'mad'
  depends_on 'libid3tag'

  def patches
    {:p0 => "https://trac.macports.org/export/89276/trunk/dports/audio/madplay/files/patch-audio_carbon.c"}
  end

  def install
    configure_flags = ["--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"]
    # Avoid "error: CPU you selected does not support x86-64 instruction set"
    configure_flags << "--build=x86_64" if MacOS.prefer_64_bit?
    system "./configure", *configure_flags
    system "make install"
  end
end