<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[134525] trunk/dports/graphics/ipe</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/134525">134525</a></dd>
<dt>Author</dt> <dd>khindenburg@macports.org</dd>
<dt>Date</dt> <dd>2015-03-28 10:27:55 -0700 (Sat, 28 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>ipe: update to 7.1.7 maintainer #47280</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsipePortfile">trunk/dports/graphics/ipe/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsipefilespatchipeletsqvoronoiqvoronoicppdiff">trunk/dports/graphics/ipe/files/patch-ipelets-qvoronoi-qvoronoi.cpp.diff</a></li>
<li><a href="#trunkdportsgraphicsipefilespatchipelibipebitmapcppdiff">trunk/dports/graphics/ipe/files/patch-ipelib-ipebitmap.cpp.diff</a></li>
<li><a href="#trunkdportsgraphicsipefilespatchipeluaipeluaipeletcppdiff">trunk/dports/graphics/ipe/files/patch-ipelua-ipeluaipelet.cpp.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsipePortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/ipe/Portfile (134524 => 134525)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ipe/Portfile        2015-03-28 17:16:00 UTC (rev 134524)
+++ trunk/dports/graphics/ipe/Portfile        2015-03-28 17:27:55 UTC (rev 134525)
</span><span class="lines">@@ -5,10 +5,10 @@
</span><span class="cx"> PortGroup               qt4 1.0
</span><span class="cx"> 
</span><span class="cx"> name                    ipe
</span><del>-version                 7.1.4
</del><ins>+version                 7.1.7
</ins><span class="cx"> set branch              [join [lrange [split ${version} .] 0 1] .]
</span><span class="cx"> categories              graphics
</span><del>-maintainers             jacobs-university.de:m.thon openmaintainer
</del><ins>+maintainers             gmail.com:m7.thon openmaintainer
</ins><span class="cx"> description             The Ipe extensible drawing editor
</span><span class="cx"> long_description        \
</span><span class="cx">                         Ipe is a drawing editor for creating figures in PDF or \
</span><span class="lines">@@ -23,22 +23,37 @@
</span><span class="cx"> distname                ${name}-${version}-src
</span><span class="cx"> worksrcdir              ${name}-${version}/src
</span><span class="cx"> 
</span><del>-checksums               sha1    48a5aebd6e54a3832e4841b12ed5dd8bb6ec8ec6 \
-                        rmd160  ab90157ae53a72b1a04bddb5f62aa645bdc9b20b
</del><ins>+checksums               sha1    ace0628f9e8a1d752f4a1837ac705e0457498a00 \
+                        rmd160  e77099d2d24d195d4ef541311b6114dc38580dc8
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> depends_lib-append      port:freetype \
</span><span class="cx">                         path:lib/pkgconfig/cairo.pc:cairo \
</span><span class="cx">                         path:lib/pkgconfig/lua.pc:lua \
</span><span class="cx">                         port:lua \
</span><ins>+                        path:lib/libjpeg.dylib:jpeg \
+                        port:libpng \
</ins><span class="cx">                         port:zlib
</span><span class="cx"> 
</span><del>-patchfiles              ipe-cstdlib.patch
</del><ins>+patchfiles              patch-ipelib-ipebitmap.cpp.diff \
+                        patch-ipelets-qvoronoi-qvoronoi.cpp.diff \
+                        patch-ipelua-ipeluaipelet.cpp.diff
</ins><span class="cx"> 
</span><span class="cx"> use_configure           no
</span><span class="cx"> 
</span><span class="cx"> variant universal {}
</span><span class="cx"> 
</span><ins>+variant qvoronoi description {Add qvoronoi ipelet} {
+    depends_lib-append  port:qhull
+    build.post_args     subdirs=&quot;ipelib ipelets/lua ipelets/qvoronoi ipetoipe ipe6upgrade \
+                            ipeextract ipescript ipecairo iperender ipecanvas ipeview ipelua ipeui ipe&quot; \
+                        QHULL_CFLAGS=-I${prefix}/include/qhull
+    destroot.post_args  subdirs=&quot;ipelib ipelets/lua ipelets/qvoronoi ipetoipe ipe6upgrade \
+                            ipeextract ipescript ipecairo iperender ipecanvas ipeview ipelua ipeui ipe&quot;
+}
+
+default_variants        +qvoronoi
+
</ins><span class="cx"> pre-build {
</span><span class="cx">     set    lua_pc       [lindex [split [glob ${prefix}/lib/pkgconfig/lua*] &quot;/&quot;] end]
</span><span class="cx">     set    lua_version  [join [lrange [split ${lua_pc} &quot;.&quot;] 0 end-1] &quot;.&quot;]
</span><span class="lines">@@ -48,6 +63,9 @@
</span><span class="cx">     build.args          IPEPREFIX=${prefix} \
</span><span class="cx">                         ZLIB_CFLAGS=&quot;`pkg-config --cflags zlib`&quot; \
</span><span class="cx">                         ZLIB_LIBS=&quot;`pkg-config --libs zlib`&quot; \
</span><ins>+                        JPEG_LIBS=&quot;-ljpeg&quot; \
+                        PNG_CFLAGS=&quot;`pkg-config --cflags libpng`&quot; \
+                        PNG_LIBS=&quot;`pkg-config --libs libpng`&quot; \
</ins><span class="cx">                         FREETYPE_CFLAGS=&quot;`pkg-config --cflags freetype2`&quot; \
</span><span class="cx">                         FREETYPE_LIBS=&quot;`pkg-config --libs freetype2`&quot; \
</span><span class="cx">                         CAIRO_CFLAGS=&quot;`pkg-config --cflags cairo`&quot; \
</span></span></pre></div>
<a id="trunkdportsgraphicsipefilespatchipeletsqvoronoiqvoronoicppdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ipe/files/patch-ipelets-qvoronoi-qvoronoi.cpp.diff (0 => 134525)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ipe/files/patch-ipelets-qvoronoi-qvoronoi.cpp.diff                                (rev 0)
+++ trunk/dports/graphics/ipe/files/patch-ipelets-qvoronoi-qvoronoi.cpp.diff        2015-03-28 17:27:55 UTC (rev 134525)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+--- ipelets/qvoronoi/qvoronoi.cpp.orig        2015-03-27 12:21:50.000000000 +0100
++++ ipelets/qvoronoi/qvoronoi.cpp        2015-03-27 12:22:16.000000000 +0100
+@@ -29,7 +29,8 @@
+ */

+ #include &lt;stdio.h&gt;
+-#include &lt;stdlib.h&gt;
++#include &lt;cstdlib&gt;
++

+ extern &quot;C&quot; {
+ #include &quot;qhull_a.h&quot;
</ins></span></pre></div>
<a id="trunkdportsgraphicsipefilespatchipelibipebitmapcppdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ipe/files/patch-ipelib-ipebitmap.cpp.diff (0 => 134525)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ipe/files/patch-ipelib-ipebitmap.cpp.diff                                (rev 0)
+++ trunk/dports/graphics/ipe/files/patch-ipelib-ipebitmap.cpp.diff        2015-03-28 17:27:55 UTC (rev 134525)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+--- ipelib/ipebitmap.cpp.orig        2015-03-27 12:12:31.000000000 +0100
++++ ipelib/ipebitmap.cpp        2015-03-27 12:15:36.000000000 +0100
+@@ -32,7 +32,10 @@
+ #include &quot;ipeutils.h&quot;
+ #include &lt;zlib.h&gt;

+-#include &lt;turbojpeg.h&gt;
++#include &lt;cstdio&gt;
++#include &lt;csetjmp&gt;
++#include &lt;jpeglib.h&gt;
++
+ #include &lt;png.h&gt;

+ using namespace ipe;
+@@ -332,36 +335,47 @@

+ // --------------------------------------------------------------------

++// The following is error-handling code for decopressing jpeg using the
++// standard libjpeg API. Taken from the example.c and stackoverflow.
++struct jpegErrorManager {
++  struct jpeg_error_mgr pub;
++  jmp_buf setjmp_buffer;
++};
++char jpegLastErrorMsg[JMSG_LENGTH_MAX];
++void jpegErrorExit (j_common_ptr cinfo) {
++  jpegErrorManager *myerr = (jpegErrorManager*) cinfo-&gt;err;
++  (*(cinfo-&gt;err-&gt;format_message)) (cinfo, jpegLastErrorMsg);
++  longjmp(myerr-&gt;setjmp_buffer, 1);
++}
++
++// Decode jpeg image using the standard libjpeg API with errorhandling
+ bool dctDecode(Buffer dctData, Buffer pixelData, int components)
+ {
+-  tjhandle handle = tjInitDecompress();
+-  if (!handle) {
+-    ipeDebug(&quot;tjInitDecompress failed: %s&quot;,  tjGetErrorStr());
++  struct jpeg_decompress_struct cinfo;
++  // Error handling:
++  struct jpegErrorManager jerr;
++  cinfo.err = jpeg_std_error(&amp;jerr.pub);
++  jerr.pub.error_exit = jpegErrorExit;
++  if (setjmp(jerr.setjmp_buffer)) {
++    ipeDebug(&quot;jpeg decompression failed: %s&quot;, jpegLastErrorMsg);
++    jpeg_destroy_decompress(&amp;cinfo);
+     return false;
+   }
+-
+-  int width, height, jpegSubsamp;
+-  if (tjDecompressHeader2(handle, (uchar *) dctData.data(), dctData.size(),
+-                          &amp;width, &amp;height, &amp;jpegSubsamp) &lt; 0) {
+-    ipeDebug(&quot;tjDecompressHeader2 failed: %s&quot;,  tjGetErrorStr());
+-    tjDestroy(handle);
+-    return false;
+-  }
+-
+-  int flags = 0;
+-  // if (fast)
+-  // flags |= TJFLAG_FASTDCT;
+-
+-  if (tjDecompress2(handle, (uchar *) dctData.data(), dctData.size(),
+-                    (uchar *) pixelData.data(),
+-                    width, components * width, height,
+-                    (components == 3) ? TJPF_RGB : TJPF_GRAY,
+-                    flags) &lt; 0) {
+-    ipeDebug(&quot;tjDecompress2 failed: %s&quot;,  tjGetErrorStr());
+-    tjDestroy(handle);
+-    return false;
++  // Decompression:
++  jpeg_create_decompress(&amp;cinfo);
++  jpeg_mem_src(&amp;cinfo, (unsigned char *) dctData.data(), dctData.size());
++  jpeg_read_header(&amp;cinfo, 1);
++        cinfo.out_color_space = ((components == 3) ? JCS_RGB : JCS_GRAYSCALE);
++  jpeg_start_decompress(&amp;cinfo);
++  while (cinfo.output_scanline &lt; cinfo.output_height) {
++                int row_stride = cinfo.output_width * cinfo.output_components;
++                int index = cinfo.output_scanline * row_stride;
++                unsigned char *buffer[1];
++                buffer[0] = (unsigned char *) &amp;(pixelData[index]);
++    jpeg_read_scanlines(&amp;cinfo, buffer, 1);
+   }
+-  tjDestroy(handle);
++  jpeg_finish_decompress(&amp;cinfo);
++  jpeg_destroy_decompress(&amp;cinfo);
+   return true;
+ }

</ins></span></pre></div>
<a id="trunkdportsgraphicsipefilespatchipeluaipeluaipeletcppdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ipe/files/patch-ipelua-ipeluaipelet.cpp.diff (0 => 134525)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ipe/files/patch-ipelua-ipeluaipelet.cpp.diff                                (rev 0)
+++ trunk/dports/graphics/ipe/files/patch-ipelua-ipeluaipelet.cpp.diff        2015-03-28 17:27:55 UTC (rev 134525)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- ipelua/ipeluaipelet.cpp.orig        2015-03-27 13:38:43.000000000 +0100
++++ ipelua/ipeluaipelet.cpp        2015-03-27 13:39:02.000000000 +0100
+@@ -67,7 +67,7 @@
+ #ifdef WIN32
+   fname += &quot;.dll&quot;;
+ #else
+-  fname += &quot;.so&quot;;
++  fname += &quot;.dylib&quot;;
+ #endif
+   ipeDebug(&quot;Loading dll '%s'&quot;, fname.z());
+   PNewIpeletFn pIpelet = 0;
</ins></span></pre>
</div>
</div>

</body>
</html>