diff options
| author | Joey Korkames | 2014-05-22 22:02:31 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2014-06-24 22:36:55 +0100 |
| commit | a7eb45e360b4fb33515b6aeb7b52054fa2899777 (patch) | |
| tree | 39fd6b85c55fdbca98193a87daa4445c75702e02 /Library/Formula | |
| parent | ad46ee92a7ec5c2aeb8c800d3d9bf4897bd58bcb (diff) | |
| download | homebrew-a7eb45e360b4fb33515b6aeb7b52054fa2899777.tar.bz2 | |
djvulibre: fix corrupt djvu output with Mavericks
clang+libcxx builds. patch from: https://sourceforge.net/p/djvu/djvulibre-git/ci/2c904e0cb8314c0d2314331e5ac1eaf65a7757b4/
Also, install doc/ & add test case installs some djvu-format files so we can run a functional test on the built binaries.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/djvulibre.rb | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/Library/Formula/djvulibre.rb b/Library/Formula/djvulibre.rb index 8475d4ce9..9ca63e282 100644 --- a/Library/Formula/djvulibre.rb +++ b/Library/Formula/djvulibre.rb @@ -2,8 +2,19 @@ require 'formula' class Djvulibre < Formula homepage 'http://djvu.sourceforge.net/' - url 'http://ftp.de.debian.org/debian/pool/main/d/djvulibre/djvulibre_3.5.25.4.orig.tar.gz' - sha1 'c7044201703f30df0f1732c54c6544467412811d' + + stable do + url 'http://ftp.de.debian.org/debian/pool/main/d/djvulibre/djvulibre_3.5.25.4.orig.tar.gz' + sha1 'c7044201703f30df0f1732c54c6544467412811d' + # Fixes 10.9 clang/libcxx: + # http://sourceforge.net/p/djvu/bugs/236/#ce5c/a7ca + # http://sourceforge.net/p/djvu/djvulibre-git/ci/2c904e/ + patch :DATA + end + + head do + url 'git://git.code.sf.net/p/djvu/djvulibre-git' + end depends_on 'jpeg' depends_on 'libtiff' @@ -13,5 +24,23 @@ class Djvulibre < Formula system "./configure", "--prefix=#{prefix}", "--disable-desktopfiles" system "make" system "make install" + (share/'doc/djvu').install Dir['doc/*'] + end + + test do + %x[#{bin}/djvused -e n #{share}/doc/djvu/lizard2002.djvu].chomp == "2" #should show count of 2 pages end end + +__END__ +--- a/libdjvu/atomic.h ++++ b/libdjvu/atomic.h +@@ -122,7 +122,7 @@ + static inline int atomicDecrement(int volatile *var) { + int ov; __asm__ __volatile__ ("lock; xaddl %0, %1" + : "=r" (ov), "=m" (*var) : "0" (-1), "m" (*var) : "cc" ); +- return ov + 1; ++ return ov - 1; + } + static inline int atomicExchange(int volatile *var, int nv) { + int ov; __asm__ __volatile__ ("xchgl %0, %1" |
