[118688] trunk/dports/graphics/jbig2enc

ryandesign at macports.org ryandesign at macports.org
Mon Apr 7 21:22:17 PDT 2014


Revision: 118688
          https://trac.macports.org/changeset/118688
Author:   ryandesign at macports.org
Date:     2014-04-07 21:22:17 -0700 (Mon, 07 Apr 2014)
Log Message:
-----------
jbig2enc: fix build with leptonica 1.70 (#43185)

Modified Paths:
--------------
    trunk/dports/graphics/jbig2enc/Portfile

Added Paths:
-----------
    trunk/dports/graphics/jbig2enc/files/
    trunk/dports/graphics/jbig2enc/files/patch-leptonica-1.70.diff

Modified: trunk/dports/graphics/jbig2enc/Portfile
===================================================================
--- trunk/dports/graphics/jbig2enc/Portfile	2014-04-08 03:49:48 UTC (rev 118687)
+++ trunk/dports/graphics/jbig2enc/Portfile	2014-04-08 04:22:17 UTC (rev 118688)
@@ -28,6 +28,8 @@
 
 depends_lib         port:leptonica
 
+patchfiles          patch-leptonica-1.70.diff
+
 configure.args      --docdir=${prefix}/share/doc/${name}
 
 configure.universal_args-delete --disable-dependency-tracking

Added: trunk/dports/graphics/jbig2enc/files/patch-leptonica-1.70.diff
===================================================================
--- trunk/dports/graphics/jbig2enc/files/patch-leptonica-1.70.diff	                        (rev 0)
+++ trunk/dports/graphics/jbig2enc/files/patch-leptonica-1.70.diff	2014-04-08 04:22:17 UTC (rev 118688)
@@ -0,0 +1,46 @@
+Fix build with leptonica >= 1.70
+https://github.com/agl/jbig2enc/issues/45
+https://github.com/agl/jbig2enc/commit/53ce5fe7e73d7ed95c9e12b52dd4984723f865fa
+--- configure.orig	2012-09-19 16:27:24.000000000 -0500
++++ configure	2014-04-07 23:15:34.000000000 -0500
+@@ -14885,6 +14889,17 @@
+ 
+ fi
+ 
++for ac_func in expandBinaryPower2Low
++do :
++  ac_fn_c_check_func "$LINENO" "expandBinaryPower2Low" "ac_cv_func_expandBinaryPower2Low"
++if test "x$ac_cv_func_expandBinaryPower2Low" = xyes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_EXPANDBINARYPOWER2LOW 1
++_ACEOF
++
++fi
++done
++
+ # test for function - it should detect leptonica dependecies
+ 
+ # Check for possible dependancies of leptonica.
+--- src/jbig2.cc.orig	2012-09-19 16:27:24.000000000 -0500
++++ src/jbig2.cc	2014-04-07 23:15:27.000000000 -0500
+@@ -130,11 +130,16 @@
+   // input color image, so we have to do it this way...
+   // is there a better way?
+   // PIX *pixd = pixExpandBinary(pixd4, 4);
+-  PIX *pixd = pixCreate(piximg->w, piximg->h, 1);
+-  pixCopyResolution(pixd, piximg);
+-  if (verbose) pixInfo(pixd, "mask image: ");
+-  expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
++  PIX *pixd;
++#ifdef HAVE_EXPANDBINARYPOWER2LOW
++    pixd = pixCreate(piximg->w, piximg->h, 1);
++    pixCopyResolution(pixd, piximg);
++    expandBinaryPower2Low(pixd->data, pixd->w, pixd->h, pixd->wpl,
+                         pixd4->data, pixd4->w, pixd4->h, pixd4->wpl, 4);
++#else
++    pixd = pixExpandBinaryPower2(pixd4, 4);
++#endif
++  if (verbose) pixInfo(pixd, "mask image: ");
+ 
+   pixDestroy(&pixd4);
+   pixDestroy(&pixsf4);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140407/9293aa7d/attachment-0001.html>


More information about the macports-changes mailing list