aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-14 13:40:30 -0700
committerAdam Vandenberg2011-03-14 13:40:30 -0700
commit88f5b35f34ac6e4e276bfdbade3ccc5ef8b43b19 (patch)
treed7a991bd138f084e4e89e87cfc371dcc0183d7b8 /Library/Formula
parent005243c2122d32c1476f9a38523f141f3029c95e (diff)
downloadhomebrew-88f5b35f34ac6e4e276bfdbade3ccc5ef8b43b19.tar.bz2
png2ico: works fine against system libpng
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/png2ico.rb12
1 files changed, 7 insertions, 5 deletions
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'