aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/glib.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2010-02-19 11:19:01 -0800
committerAdam Vandenberg2010-02-21 23:37:49 -0800
commitaad4dc23ece5869165b23f9637475503d2491db8 (patch)
tree733f6c214af986df9db5c04728588fadaae2fbb2 /Library/Formula/glib.rb
parenta6caeff4507f4502f5b9d9435ba009564e7c0669 (diff)
downloadhomebrew-aad4dc23ece5869165b23f9637475503d2491db8.tar.bz2
Use more inreplace features.
Update formulas to make more idiomatic use of "inreplace", including its new ability to take a list of files to act on.
Diffstat (limited to 'Library/Formula/glib.rb')
-rw-r--r--Library/Formula/glib.rb23
1 files changed, 11 insertions, 12 deletions
diff --git a/Library/Formula/glib.rb b/Library/Formula/glib.rb
index 7f1ee6048..0930efa50 100644
--- a/Library/Formula/glib.rb
+++ b/Library/Formula/glib.rb
@@ -44,20 +44,19 @@ class Glib <Formula
system "make"
system "make install"
- # this sucks, basically gettext is Keg only to prevent conflicts with
- # the wider system, but pkg-config or glib is not smart enough to
- # have determined that libintl.dylib isn't in the DYLIB_PATH so we have
- # to add it manually, we might have to do this a lot, so clearly we need
- # to make it automatic or solve the BSD/GNU gettext conflict in another
- # way
- gettext = Formula.factory 'gettext'
- inreplace lib+'pkgconfig'+'glib-2.0.pc',
- 'Libs: -L${libdir} -lglib-2.0 -lintl',
+ # This sucks; gettext is Keg only to prevent conflicts with the wider
+ # system, but pkg-config or glib is not smart enough to have determined
+ # that libintl.dylib isn't in the DYLIB_PATH so we have to add it
+ # manually.
+ gettext = Formula.factory('gettext')
+ inreplace lib+'pkgconfig/glib-2.0.pc' do |s|
+ s.gsub! 'Libs: -L${libdir} -lglib-2.0 -lintl',
"Libs: -L${libdir} -lglib-2.0 -L#{gettext.lib} -lintl"
- inreplace lib+'pkgconfig'+'glib-2.0.pc',
- 'Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include',
+
+ s.gsub! 'Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include',
"Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include -I#{gettext.include}"
+ end
- (prefix+'share'+'gtk-doc').rmtree
+ (prefix+'share/gtk-doc').rmtree
end
end