diff options
| author | Jack Nagel | 2013-11-19 11:03:01 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-11-19 11:03:06 -0600 |
| commit | 891622cc4bfef8f30a09eaf0c365e5d57b16ed27 (patch) | |
| tree | 5d5ca40203232f3b4e9e8e0ae2121c7b3e846629 /Library/Formula/libagg.rb | |
| parent | ca78b735b72b71d3c3daff6fe3fd525714e414ae (diff) | |
| download | homebrew-891622cc4bfef8f30a09eaf0c365e5d57b16ed27.tar.bz2 | |
libagg: fix build with clang
Diffstat (limited to 'Library/Formula/libagg.rb')
| -rw-r--r-- | Library/Formula/libagg.rb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Library/Formula/libagg.rb b/Library/Formula/libagg.rb index c3da841b5..e5174211f 100644 --- a/Library/Formula/libagg.rb +++ b/Library/Formula/libagg.rb @@ -12,12 +12,8 @@ class Libagg < Formula depends_on 'sdl' depends_on :freetype => :optional - fails_with :clang do - cause <<-EOS.undent - AGG tries to return a const reference as a non-const reference, which is - rejected by clang 3.1 but accepted by gcc - EOS - end + # Fix build with clang; last release was in 2006 + def patches; DATA; end def install # AM_C_PROTOTYPES was removed in automake 1.12, as it's only needed for @@ -35,3 +31,18 @@ class Libagg < Formula system "make install" end end + +__END__ +diff --git a/include/agg_renderer_outline_aa.h b/include/agg_renderer_outline_aa.h +index ce25a2e..9a12d35 100644 +--- a/include/agg_renderer_outline_aa.h ++++ b/include/agg_renderer_outline_aa.h +@@ -1375,7 +1375,7 @@ namespace agg + //--------------------------------------------------------------------- + void profile(const line_profile_aa& prof) { m_profile = &prof; } + const line_profile_aa& profile() const { return *m_profile; } +- line_profile_aa& profile() { return *m_profile; } ++ const line_profile_aa& profile() { return *m_profile; } + + //--------------------------------------------------------------------- + int subpixel_width() const { return m_profile->subpixel_width(); } |
