From 00a9e8deda8cce3d21193316b6a795b456e2b175 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 22 Aug 2012 09:31:47 -0400 Subject: 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.--- Library/Formula/lastfm_fplib.rb | 1 + Library/Formula/lastfmfpclient.rb | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'Library/Formula') 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 -- cgit v1.2.3