aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/alure.rb
blob: aea5f735abf8e1fbd931eebea3d6d462bfcc5aa6 (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
26
27
28
29
30
31
require 'formula'

class Alure < Formula
  homepage 'http://kcat.strangesoft.net/alure.html'
  url 'http://kcat.strangesoft.net/alure-releases/alure-1.2.tar.bz2'
  sha1 'f033f0820c449ebff7b4b0254a7b1f26c0ba485b'

  depends_on 'pkg-config' => :build
  depends_on 'cmake' => :build
  depends_on 'flac'       => :optional
  depends_on 'fluid-synth' => :optional
  depends_on 'libogg'     => :optional
  depends_on 'libsndfile' => :optional
  depends_on 'libvorbis'  => :optional
  depends_on 'mpg123'     => :optional

  def install
    # fix a broken include flags line, which fixes a build error.
    # Not reported upstream.
    # https://github.com/Homebrew/homebrew/pull/6368
    if build.with? "libvorbis"
      inreplace "CMakeLists.txt", "${VORBISFILE_CFLAGS}",
        %x[pkg-config --cflags vorbisfile].chomp
    end

    cd "build" do
      system "cmake", "..", *std_cmake_args
      system "make install"
    end
  end
end