aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMax Howell2012-08-22 09:31:47 -0400
committerMax Howell2012-08-22 09:46:39 -0400
commit00a9e8deda8cce3d21193316b6a795b456e2b175 (patch)
tree4260e6093d9bb2fc55a4088d17aea8dd30ca80f2 /Library/Formula
parentf59ffc63bbbda9ebe4c25348e64aa81a6bd101a6 (diff)
downloadhomebrew-00a9e8deda8cce3d21193316b6a795b456e2b175.tar.bz2
Fix lastfmfpclient compilation with clang
NOTE lastfm_fplib is the exact same formula! We need to solve deletion/renames and remove one of them. Fixes #13485.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/lastfm_fplib.rb1
-rw-r--r--Library/Formula/lastfmfpclient.rb11
2 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/lastfm_fplib.rb b/Library/Formula/lastfm_fplib.rb
index 4b3a92d87..13d12fb54 100644
--- a/Library/Formula/lastfm_fplib.rb
+++ b/Library/Formula/lastfm_fplib.rb
@@ -11,6 +11,7 @@ class LastfmFplib < Formula
depends_on 'fftw'
def install
+ Formula.factory("lastfmfpclient").inreplace_fix
system "cmake", ".", *std_cmake_args
system "make install"
end
diff --git a/Library/Formula/lastfmfpclient.rb b/Library/Formula/lastfmfpclient.rb
index 8707bc633..d21b7c2af 100644
--- a/Library/Formula/lastfmfpclient.rb
+++ b/Library/Formula/lastfmfpclient.rb
@@ -12,7 +12,18 @@ class Lastfmfpclient < Formula
depends_on 'mad'
depends_on 'libsamplerate'
+ def inreplace_fix
+ # This project was made on Windows (LOL), patches against Windows
+ # line-endings fail for some reason, so we will inreplace instead.
+ # Fixes compile with clang failure due to entirely missing variable, how
+ # the fuck did GCC ever compile this?!
+ inreplace 'fplib/src/FloatingAverage.h',
+ 'for ( int i = 0; i < size; ++i )',
+ 'for ( int i = 0; i < m_values.size(); ++i )'
+ end
+
def install
+ inreplace_fix
system "cmake", ".", *std_cmake_args
system "make install"
end