2011-05-16 17:12:54 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libharu < Formula
|
|
|
|
homepage 'http://www.libharu.org'
|
|
|
|
url 'http://libharu.org/files/libharu-2.2.1.tar.bz2'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'bfea7d9df3fb6a112340d0d54731f62f53b26d2f'
|
2011-05-16 17:12:54 +00:00
|
|
|
|
2012-06-07 01:35:12 +00:00
|
|
|
depends_on :libpng
|
|
|
|
|
2011-08-25 14:43:28 +00:00
|
|
|
def patches
|
|
|
|
# Fixes compilation against LibPNG 1.5. Can be removed on next release.
|
|
|
|
# Based on a commit in the LibHaru repository which does not apply cleanly
|
|
|
|
# due to a missing CHANGES file:
|
|
|
|
#
|
|
|
|
# https://github.com/tony2001/libharu/commit/e5bf8b0.patch
|
|
|
|
"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
|
|
|
|
|
2013-01-13 05:36:04 +00:00
|
|
|
def png_prefix
|
2013-07-14 03:56:45 +00:00
|
|
|
MacOS.version >= :mountain_lion ? HOMEBREW_PREFIX/"opt/libpng" : MacOS::X11.prefix
|
2013-01-13 05:36:04 +00:00
|
|
|
end
|
|
|
|
|
2011-05-16 17:12:54 +00:00
|
|
|
def install
|
2012-06-07 01:35:12 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2011-05-16 17:12:54 +00:00
|
|
|
"--prefix=#{prefix}",
|
2012-06-07 01:35:12 +00:00
|
|
|
# libpng doesn't get picked up
|
2013-01-13 05:36:04 +00:00
|
|
|
"--with-png=#{png_prefix}"
|
2011-05-16 17:12:54 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|