aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-11-12 00:08:04 -0600
committerJack Nagel2013-11-12 00:08:52 -0600
commit62adb70d3e9fcb6f09fb2761dd1d775cf5ee34b9 (patch)
tree9798cd86ce8b3bff9a325206b4504ae8a20f4664 /Library/Formula
parent2498b43801026bf9996524efcc767f27a70b5360 (diff)
downloadhomebrew-62adb70d3e9fcb6f09fb2761dd1d775cf5ee34b9.tar.bz2
png2ico: fix build with recent clang
This project seems dead, but several people reported this issue so let's carry this tiny patch rather than remove it. Fixes #23497.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/png2ico.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Formula/png2ico.rb b/Library/Formula/png2ico.rb
index e9951e8f0..3287a7db2 100644
--- a/Library/Formula/png2ico.rb
+++ b/Library/Formula/png2ico.rb
@@ -7,6 +7,9 @@ class Png2ico < Formula
depends_on :libpng
+ # Fix build with recent clang
+ def patches; DATA; end
+
def install
inreplace 'Makefile', 'g++', '$(CXX)'
system "make", "CPPFLAGS=#{ENV.cxxflags} #{ENV.cppflags} #{ENV.ldflags}"
@@ -14,3 +17,17 @@ class Png2ico < Formula
man1.install 'doc/png2ico.1'
end
end
+
+__END__
+diff --git a/png2ico.cpp b/png2ico.cpp
+index 8fb87e4..9dedb97 100644
+--- a/png2ico.cpp
++++ b/png2ico.cpp
+@@ -34,6 +34,7 @@ Notes about transparent and inverted pixels:
+ #include <cstdio>
+ #include <vector>
+ #include <climits>
++#include <cstdlib>
+
+ #if __GNUC__ > 2
+ #include <ext/hash_map>