Skip to content

Commit

Permalink
fluid-synth: add portaudio option
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#40906.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
  • Loading branch information
DomT4 committed Jun 20, 2015
1 parent 313bf7c commit 6418062
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions Formula/fluid-synth.rb
@@ -1,10 +1,8 @@
require 'formula'

class FluidSynth < Formula
desc "Real-time software synthesizer based on the SoundFont 2 specs"
homepage 'http://www.fluidsynth.org'
url 'https://downloads.sourceforge.net/project/fluidsynth/fluidsynth-1.1.6/fluidsynth-1.1.6.tar.gz'
sha1 '155de731e72e91e1d4b7f52c33d8171596fbf244'
homepage "http://www.fluidsynth.org"
url "https://downloads.sourceforge.net/project/fluidsynth/fluidsynth-1.1.6/fluidsynth-1.1.6.tar.gz"
sha256 "50853391d9ebeda9b4db787efb23f98b1e26b7296dd2bb5d0d96b5bccee2171c"

bottle do
cellar :any
Expand All @@ -13,15 +11,25 @@ class FluidSynth < Formula
sha1 "5cde076c223fa805c4e9fba1d4b7cdf5f5a4b5d5" => :lion
end

depends_on 'pkg-config' => :build
depends_on 'cmake' => :build
depends_on 'glib'
depends_on 'libsndfile' => :optional
depends_on "pkg-config" => :build
depends_on "cmake" => :build
depends_on "glib"
depends_on "libsndfile" => :optional
depends_on "portaudio" => :optional

def install
mkdir 'build' do
system "cmake", "..", "-Denable-framework=OFF", "-DLIB_SUFFIX=", *std_cmake_args
system "make install"
args = std_cmake_args
args << "-Denable-framework=OFF" << "-DLIB_SUFFIX="
args << "-Denable-portaudio=ON" if build.with? "portaudio"
args << "-Denable-libsndfile=OFF" if build.without? "libsndfile"

mkdir "build" do
system "cmake", "..", *args
system "make", "install"
end
end

test do
assert_match /#{version}/, shell_output("#{bin}/fluidsynth --version")
end
end

0 comments on commit 6418062

Please sign in to comment.