aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-01-12 23:36:04 -0600
committerJack Nagel2013-01-12 23:36:56 -0600
commitcdda429940a16b4bae0ab6cdf676e4f964c7f3c8 (patch)
tree7c6747d3288ca934827cf0bb12468aeaf8687030 /Library/Formula
parent514830d85633577d1e108067b08138902f03951b (diff)
downloadhomebrew-cdda429940a16b4bae0ab6cdf676e4f964c7f3c8.tar.bz2
libharu: fix build without XQuartz
Fixes #17051.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libharu.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Formula/libharu.rb b/Library/Formula/libharu.rb
index 0beac0da1..9600f5eb1 100644
--- a/Library/Formula/libharu.rb
+++ b/Library/Formula/libharu.rb
@@ -16,12 +16,16 @@ class Libharu < Formula
"http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libharu/files/libharu-2.2.1-libpng-1.5.patch?revision=1.1"
end
+ def png_prefix
+ MacOS::X11.installed? ? MacOS::X11.prefix : HOMEBREW_PREFIX/:opt/:libpng
+ end
+
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
# libpng doesn't get picked up
- "--with-png=#{MacOS::X11.prefix}"
+ "--with-png=#{png_prefix}"
system "make install"
end
end