diff options
| author | Viktor Szakáts | 2015-03-03 00:50:36 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-04 16:01:22 +0000 |
| commit | 715ca594a91a6213f439a825bb920a5a1d8ea9f3 (patch) | |
| tree | 8502965a453ed68ab87cc4c08f0df8ba60419b5c /Library | |
| parent | 9602948ad1f585efb486fc2df8d58e555d5a8feb (diff) | |
| download | homebrew-715ca594a91a6213f439a825bb920a5a1d8ea9f3.tar.bz2 | |
libharu 2.3.0
Closes #37336.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/libharu.rb | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/Library/Formula/libharu.rb b/Library/Formula/libharu.rb index 85f76d17f..bf8a0318a 100644 --- a/Library/Formula/libharu.rb +++ b/Library/Formula/libharu.rb @@ -1,10 +1,8 @@ -require 'formula' - class Libharu < Formula - homepage 'http://www.libharu.org' - url 'http://libharu.org/files/libharu-2.2.1.tar.bz2' - sha1 'bfea7d9df3fb6a112340d0d54731f62f53b26d2f' - revision 1 + homepage "http://www.libharu.org/" + url "https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz" + sha1 "434177d4baaf2a37b2d2d16467dd786961919e0d" + head "https://github.com/libharu/libharu.git" bottle do cellar :any @@ -13,22 +11,42 @@ class Libharu < Formula sha1 "0a20c683544726d870f53c005f79a730b1effffe" => :mountain_lion end - depends_on 'libpng' - - # 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 - patch do - url "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" - sha1 "463641d4570d59d632c1878597253db962129599" - end + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "libpng" def install + system "./buildconf.sh", "--force" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-png=#{Formula["libpng"].opt_prefix}" - system "make install" + system "make", "install" + end + + test do + (testpath/"test.c").write <<-EOS.undent + #include "hpdf.h" + + int main(void) + { + int result = 1; + HPDF_Doc pdf = HPDF_New(NULL, NULL); + + if (pdf) { + HPDF_AddPage(pdf); + + if (HPDF_SaveToFile(pdf, "test.pdf") == HPDF_OK) + result = 0; + + HPDF_Free(pdf); + } + + return result; + } + EOS + system ENV.cc, "test.c", "-lhpdf", "-lz", "-o", "test" + system "./test" end end |
