2010-06-04 02:47:35 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Png2ico < Formula
|
2010-06-04 02:47:35 +00:00
|
|
|
homepage 'http://www.winterdrache.de/freeware/png2ico/'
|
2012-02-13 04:53:15 +00:00
|
|
|
url 'http://www.winterdrache.de/freeware/png2ico/data/png2ico-src-2002-12-08.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '955004bee9a20f12b225aa01895762cbbafaeb28'
|
2014-03-23 02:51:41 +00:00
|
|
|
revision 1
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2014-03-23 02:51:41 +00:00
|
|
|
depends_on 'libpng'
|
2012-06-07 01:35:12 +00:00
|
|
|
|
2013-11-12 06:08:04 +00:00
|
|
|
# Fix build with recent clang
|
2014-03-20 19:05:17 +00:00
|
|
|
patch :DATA
|
2013-11-12 06:08:04 +00:00
|
|
|
|
2010-06-04 02:47:35 +00:00
|
|
|
def install
|
2012-02-13 04:53:15 +00:00
|
|
|
inreplace 'Makefile', 'g++', '$(CXX)'
|
|
|
|
system "make", "CPPFLAGS=#{ENV.cxxflags} #{ENV.cppflags} #{ENV.ldflags}"
|
2010-06-04 02:47:35 +00:00
|
|
|
bin.install 'png2ico'
|
|
|
|
man1.install 'doc/png2ico.1'
|
|
|
|
end
|
2011-03-10 05:11:03 +00:00
|
|
|
end
|
2013-11-12 06:08:04 +00:00
|
|
|
|
|
|
|
__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>
|