<!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>[114723] trunk/dports/graphics/ocrad</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/114723">114723</a></dd>
<dt>Author</dt> <dd>mww@macports.org</dd>
<dt>Date</dt> <dd>2013-12-14 03:23:15 -0800 (Sat, 14 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>ocrad: version 0.22</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsocradPortfile">trunk/dports/graphics/ocrad/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/dports/graphics/ocrad/files/</li>
<li><a href="#trunkdportsgraphicsocradfilespatchcharacter_r11ccdiff">trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff</a></li>
<li><a href="#trunkdportsgraphicsocradfilespatchfeats_test0ccdiff">trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff</a></li>
<li><a href="#trunkdportsgraphicsocradfilespatchprofileccdiff">trunk/dports/graphics/ocrad/files/patch-profile.cc.diff</a></li>
<li><a href="#trunkdportsgraphicsocradfilespatchtrackccdiff">trunk/dports/graphics/ocrad/files/patch-track.cc.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsocradPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/ocrad/Portfile (114722 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/Portfile        2013-12-14 11:12:00 UTC (rev 114722)
+++ trunk/dports/graphics/ocrad/Portfile        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> PortSystem 1.0
</span><span class="cx">
</span><span class="cx"> name ocrad
</span><del>-version 0.21
</del><ins>+version 0.22
</ins><span class="cx"> categories graphics
</span><span class="cx"> platforms darwin
</span><span class="cx"> maintainers mww
</span><span class="lines">@@ -17,10 +17,16 @@
</span><span class="cx">
</span><span class="cx"> homepage http://www.gnu.org/software/ocrad/ocrad.html
</span><span class="cx"> master_sites gnu
</span><del>-checksums md5 83f9eae9d808f9d86c181538d3f64aed \
- sha1 857a7e0b671d4216ddf2ec1ec2daf0b21d2a6a64 \
- rmd160 9477787f07b35165c1091ce2cf8ad76fba3daea1
</del><ins>+checksums rmd160 610cd6361b633a1c28b3a5bde252402773483008 \
+ sha256 d6c9dcbcf4c9cc643edfe5a03cb6125d6c39abe59e83719effb056d63c5198fd
+patchfiles patch-track.cc.diff patch-profile.cc.diff patch-feats_test0.cc.diff patch-character_r11.cc.diff
</ins><span class="cx">
</span><ins>+depends_extract bin:lzip:lzip
+
+extract.suffix .tar.lz
+extract.cmd lzip
+extract.pre_args "-dc"
+
</ins><span class="cx"> configure.args CC=${configure.cc} CXX=${configure.cxx} CPPFLAGS=${configure.cppflags} CFLAGS=${configure.cflags} CXXFLAGS=${configure.cxxflags} LDFLAGS=${configure.ldflags}
</span><span class="cx">
</span><span class="cx"> test.run yes
</span></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchcharacter_r11ccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff         (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+--- character_r11.cc        2013-06-21 01:35:33.000000000 +0200
++++ character_r11.cc        2013-12-14 12:20:37.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include <cstdio>
+ #include <vector>
+ #include <stdint.h>
++#include <cstdlib>
+
+ #include "common.h"
+ #include "rectangle.h"
+@@ -229,7 +230,7 @@
+ Features f( b );
+ int top_delta = h.top() - b.top(), bottom_delta = b.bottom() - h.bottom();
+
+- if( std::abs( top_delta - bottom_delta ) <= std::max( 2, h.height() / 4 ) ||
++ if( abs( top_delta - bottom_delta ) <= std::max( 2, h.height() / 4 ) ||
+ Ocrad::similar( top_delta, bottom_delta, 40, 2 ) )
+ {                                        // hole is vertically centred
+ int code = f.test_4ADQao( charset, charbox );
+@@ -283,15 +284,15 @@
+ Profile bp( b, Profile::bottom );
+
+ // Check for 'm' or 'w' with merged serifs
+- if( 10 * std::abs( h2.vcenter() - h1.vcenter() ) <= b.height() &&
++ if( 10 * abs( h2.vcenter() - h1.vcenter() ) <= b.height() &&
+ h1.is_vcentred_in( b ) && h2.is_vcentred_in( b ) )
+ {
+ if( ( b.bottom() - h1.bottom() <= h1.top() - b.top() ) &&
+ ( b.bottom() - h2.bottom() <= h2.top() - b.top() ) && bp.isflats() )
+ { add_guess( 'm', 0 ); return; }
+
+- if( 5 * std::abs( h1.bottom() - b.vcenter() ) <= b.height() &&
+- 5 * std::abs( h2.bottom() - b.vcenter() ) <= b.height() &&
++ if( 5 * abs( h1.bottom() - b.vcenter() ) <= b.height() &&
++ 5 * abs( h2.bottom() - b.vcenter() ) <= b.height() &&
+ tp.isflats() && bp.minima() == 2 )
+ { add_guess( 'w', 0 ); return; }
+ return;
</ins></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchfeats_test0ccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff         (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+--- feats_test0.cc        2013-06-20 01:19:40.000000000 +0200
++++ feats_test0.cc        2013-12-14 12:19:40.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include <cstdio>
+ #include <vector>
+ #include <stdint.h>
++#include <cstdlib>
+
+ #include "common.h"
+ #include "rectangle.h"
+@@ -181,14 +182,14 @@
+ const int botmin = b.bottom() - vnoise;
+ if( vbars() == 1 && vbar(0).width() >= 2 && 2 * vbar(0).width() < b.width() )
+ {
+- if( std::abs( vbar(0).hcenter() - b.hcenter() ) <= noise &&
+- std::abs( (vbar(0).left() - b.left()) - (b.right() - vbar(0).right()) ) <= 2 * noise )
++ if( abs( vbar(0).hcenter() - b.hcenter() ) <= noise &&
++ abs( (vbar(0).left() - b.left()) - (b.right() - vbar(0).right()) ) <= 2 * noise )
+ {
+ if( hbars() == 1 && 4 * hbar(0).height() <= b.height() )
+ {
+ if( hbar(0).top() <= topmax || hbar(0).bottom() < b.vpos( 15 ) )
+ return 'T';
+- if( std::abs( hbar(0).vcenter() - b.vcenter() ) <= 1 &&
++ if( abs( hbar(0).vcenter() - b.vcenter() ) <= 1 &&
+ Ocrad::similar( b.height(), b.width(), 50 ) ) return '+';
+ }
+ if( hbars() == 2 &&
+@@ -223,7 +224,7 @@
+ }
+ if( hbars() == 2 && hbar(1).bottom() >= botmin &&
+ b.height() > b.width() && hbar(1).width() > hbar(0).width() &&
+- std::abs( vbar(0).hcenter() - hbar(0).hcenter() ) <= 1 &&
++ abs( vbar(0).hcenter() - hbar(0).hcenter() ) <= 1 &&
+ rp.iminimum() > rp.pos( 70 ) )
+ return 'L';
+ if( hbars() == 1 && Ocrad::similar( hbar(0).width(), b.width(), 10 ) &&
+@@ -316,7 +317,7 @@
+ if( i > lp.pos( 10 ) && i < lp.pos( 40 ) ) return '1'; }
+ }
+ }
+- if( hbars() == 1 && std::abs( hbar(0).vcenter() - b.vcenter() ) <= 1 &&
++ if( hbars() == 1 && abs( hbar(0).vcenter() - b.vcenter() ) <= 1 &&
+ Ocrad::similar( b.height(), b.width(), 50 ) &&
+ tp.isupit() && bp.isupit() )
+ return '+';
+@@ -525,7 +526,7 @@
+ int hdiff;
+ if( b.bottom_hook( &hdiff ) )
+ {
+- if( std::abs( hdiff ) <= b.height() / 8 )
++ if( abs( hdiff ) <= b.height() / 8 )
+ {
+ if( segments_in_row( b.vpos( 30 ) ) >= 3 ) return 'v';
+ if( bp.isconvex() )
+@@ -601,7 +602,7 @@
+ if( ( vbars() <= 2 || ( vbars() == 3 && b.height() >= b.width() ) ) &&
+ tp.minima( b.height() / 2 ) <= 2 &&
+ tp.minima( ( 2 * b.height() ) / 5 ) <= 2 && !lp.istpit() &&
+- 4 * std::abs( rp[rp.pos(20)] - rp[rp.pos(80)] ) <= b.width() )
++ 4 * abs( rp[rp.pos(20)] - rp[rp.pos(80)] ) <= b.width() )
+ {
+ const int row = b.top() + tp[tp.pos(50)];
+ if( row > b.vcenter() )
+@@ -855,7 +856,7 @@
+ if( b.get_bit( b.top() + i, b.left() + i ) ) ++d;
+ if( b.get_bit( b.top() + i, b.right() - i ) ) --d;
+ }
+- if( 2 * std::abs( d ) >= n - 1 ) return 0;
++ if( 2 * abs( d ) >= n - 1 ) return 0;
+ }
+ if( ( !porosity && inner_area * 100 >= inner_size * 75 ) ||
+ ( b.width() >= 7 && b.height() >= 7 &&
</ins></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchprofileccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-profile.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-profile.cc.diff         (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-profile.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+--- profile.cc        2013-06-20 12:39:37.000000000 +0200
++++ profile.cc        2013-12-14 12:18:36.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include <cstdio>
+ #include <vector>
+ #include <stdint.h>
++#include <cstdlib>
+
+ #include "common.h"
+ #include "rectangle.h"
+@@ -251,7 +252,7 @@
+ { if( data[i] <= noise ) continue; else return isconvex_; }
+ int d = data[i] - data[i-1];
+ if( d == 0 ) continue;
+- if( d > dmax ) { if( std::abs( d ) <= noise ) ++dmax; else dmax = d; }
++ if( d > dmax ) { if( abs( d ) <= noise ) ++dmax; else dmax = d; }
+ else if( d < dmax - noise ) return isconvex_;
+ }
+ if( 2 * ( min_end - min_begin + 1 ) < samples() )
+@@ -616,7 +617,7 @@
+ for( int i = 0; i < samples(); ++i )
+ {
+ int y = ( dx * yl ) + ( ( i - xl ) * dy );
+- int d = std::abs( ( dx * data[i] ) - y );
++ int d = abs( ( dx * data[i] ) - y );
+ if( d >= dmax && ( ( dx * data[i] ) < y || ( i >= xl && i <= xr ) ) )
+ if( d > dmax || ( d == dmax && --faults < 0 ) ) return false;
+ }
</ins></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchtrackccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-track.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-track.cc.diff         (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-track.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+--- track.cc        2013-03-24 18:51:08.000000000 +0100
++++ track.cc        2013-12-14 12:15:57.000000000 +0100
+@@ -19,6 +19,7 @@
+ #include <algorithm>
+ #include <cstdio>
+ #include <vector>
++#include <cstdlib>
+
+ #include "common.h"
+ #include "rectangle.h"
+@@ -43,12 +44,12 @@
+ {
+ if( 9 * r1.height() <= 10 * mean_height &&
+ 9 * r2.height() <= 10 * mean_height &&
+- 10 * std::abs( r1.bottom() - r2.bottom() ) <= mean_height )
++ 10 * abs( r1.bottom() - r2.bottom() ) <= mean_height )
+ { val = 0; return ( r1.height() <= r2.height() ) ? 0 : 1; }
+- if( val > 1 && 10 * std::abs( r1.vcenter() - r2.vcenter() ) <= mean_height )
++ if( val > 1 && 10 * abs( r1.vcenter() - r2.vcenter() ) <= mean_height )
+ { val = 1; return ( r1.bottom() <= r2.bottom() ) ? 0 : 1; }
+ }
+- if( val > 2 && 10 * std::abs( r1.vcenter() - r2.vcenter() ) <= mean_height )
++ if( val > 2 && 10 * abs( r1.vcenter() - r2.vcenter() ) <= mean_height )
+ { val = 2; return ( r1.bottom() <= r2.bottom() ) ? 0 : 1; }
+ }
+ return -1;
</ins></span></pre>
</div>
</div>
</body>
</html>