From 88f5b35f34ac6e4e276bfdbade3ccc5ef8b43b19 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Mon, 14 Mar 2011 13:40:30 -0700 Subject: png2ico: works fine against system libpng --- Library/Formula/png2ico.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/png2ico.rb b/Library/Formula/png2ico.rb index 005197b4c..7158b0f32 100644 --- a/Library/Formula/png2ico.rb +++ b/Library/Formula/png2ico.rb @@ -5,12 +5,14 @@ class Png2ico < Formula homepage 'http://www.winterdrache.de/freeware/png2ico/' md5 '9b663df81c826cd564638cba2e6bc75b' - depends_on 'libpng' - def install - # comment out CPPFLAGS so libpng can add -I and -L flags properly - inreplace 'Makefile', 'CPPFLAGS=-W -Wall -O2 -finline-functions', '#CPPFLAGS=-W -Wall -O2 -finline-functions' - inreplace 'Makefile', '$(CPPFLAGS)', '$(CPPFLAGS) $(LDFLAGS) $(CFLAGS) -W -Wall -O2 -finline-functions' + ENV.x11 # For libpng + # Remove hard-coded CPPFLAGS and replace with Homebrew's flags + inreplace 'Makefile' do |s| + s.remove_make_var! 'CPPFLAGS' + s.gsub! '$(CPPFLAGS)', '$(CPPFLAGS) $(LDFLAGS) $(CFLAGS) -finline-functions' + end + system 'make' bin.install 'png2ico' man1.install 'doc/png2ico.1' -- cgit v1.2.3