From 4e173d14819084a25f7e33987bf7a3cfa36534ea Mon Sep 17 00:00:00 2001 From: David Date: Fri, 4 Dec 2015 14:16:42 +0100 Subject: [PATCH] rubberband 1.8.1 (new formula) Originally from http://tuohela.net/irc/rubberband.rb Modified by mtolly to include libsndfile dependency, and to install pkg-config file plus tests, updates and fixes from myself Closes Homebrew/homebrew#46664. Signed-off-by: Mike McQuaid --- Formula/rubberband.rb | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Formula/rubberband.rb diff --git a/Formula/rubberband.rb b/Formula/rubberband.rb new file mode 100644 index 0000000000..a0a8c7e391 --- /dev/null +++ b/Formula/rubberband.rb @@ -0,0 +1,37 @@ +class Rubberband < Formula + desc "audio time stretcher tool and library" + homepage "http://breakfastquay.com/rubberband/" + url "http://code.breakfastquay.com/attachments/download/34/rubberband-1.8.1.tar.bz2" + sha256 "ff0c63b0b5ce41f937a8a3bc560f27918c5fe0b90c6bc1cb70829b86ada82b75" + head "https://bitbucket.org/breakfastquay/rubberband/", :using => :hg + + stable do + # replace vecLib.h by Accelerate.h + # already fixed in upstream: + # https://bitbucket.org/breakfastquay/rubberband/commits/cb02b7ed1500f0c06c0ffd196921c812dbcf6888 + # https://bitbucket.org/breakfastquay/rubberband/commits/9e32f693c6122b656a0df63bc77e6a96d6ba213d + patch :p1 do + url "http://tuohela.net/irc/rubberband-1.8.1-yosemite.diff" + sha1 "76ea7cac0fc0ab99b38081176375ef7c34be678f" + end + end + + depends_on "pkg-config" => :build + depends_on "libsamplerate" + depends_on "libsndfile" + + def install + system "make", "-f", "Makefile.osx" + bin.install "bin/rubberband" + lib.install "lib/librubberband.dylib" + include.install "rubberband" + + cp "rubberband.pc.in", "rubberband.pc" + inreplace "rubberband.pc", "%PREFIX%", opt_prefix + (lib/"pkgconfig").install "rubberband.pc" + end + + test do + assert_match /Pass 2: Processing.../, shell_output("rubberband -t2 #{test_fixtures("test.wav")} out.wav 2>&1") + end +end