<!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>[120125] trunk/dports/graphics/asymptote</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/120125">120125</a></dd>
<dt>Author</dt> <dd>mojca@macports.org</dd>
<dt>Date</dt> <dd>2014-05-16 11:27:54 -0700 (Fri, 16 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>asymptote: upgrade to 2.29, less dependencies, use libstdc++ (#40979, #43691, maint. timeout)

  * upgrade to version 2.29
  * don't depend on the whole TeX Live, only some packages (#43691)
  * temporary workaround for 10.9: use -std=libstdc++ (#40979)
  * some patches to make the binary compile with libc++ (but binary doesn't work yet)</pre>

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

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsasymptotefilespatchupstreamdiff">trunk/dports/graphics/asymptote/files/patch-upstream.diff</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsasymptotefilespatchprcwritePRChdiff">trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsasymptotePortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/asymptote/Portfile (120124 => 120125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/asymptote/Portfile        2014-05-16 17:11:24 UTC (rev 120124)
+++ trunk/dports/graphics/asymptote/Portfile        2014-05-16 18:27:54 UTC (rev 120125)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> PortGroup           texlive 1.0
</span><span class="cx"> 
</span><span class="cx"> name                asymptote
</span><del>-version             2.28
</del><ins>+version             2.29
</ins><span class="cx"> categories          graphics
</span><span class="cx"> maintainers         gmail.com:loshea
</span><span class="cx"> description         a vector graphics language
</span><span class="lines">@@ -23,18 +23,50 @@
</span><span class="cx">                     --disable-offscreen
</span><span class="cx"> master_sites        sourceforge
</span><span class="cx"> extract.suffix      .src.tgz
</span><del>-checksums           rmd160  c028df3174018877ca2a3db274de1328f5f1011e \
-                    sha256  d6d4be0f37da3eec241f52c4b1427eeb22785deaf33e2dd4bb7a9305a6cfb47e
-depends_build       port:texinfo
</del><ins>+checksums           rmd160  e1a46654e0a3f1c65b63afc69a46a476d40fd911 \
+                    sha256  6c5cf29beefad40414f47223b12d438493bee64db24b4c30ac785e8db801c9c3
+
+# texlive-latex-recommended and texinfo are only used for building the docs
+# other relevant packages are:
+# - texlive-common
+# - texlive-bin
+# - texlive-basic
+# - texlive-latex
+# but they are already a dependency of latex-recommended
+#
+# one day we could split that into a separate +docs variant
+# or fetch the PDF from somewhere
+depends_build       port:ghostscript \
+                    port:texinfo \
+                    port:texlive-latex-recommended
+
</ins><span class="cx"> depends_lib         port:readline \
</span><del>-                    port:texlive \
-                    port:ghostscript \
</del><span class="cx">                     port:fftw-3 \
</span><span class="cx">                     port:gsl \
</span><span class="cx">                     port:libsigsegv \
</span><span class="cx">                     port:ncurses \
</span><span class="cx">                     path:lib/libgc.dylib:boehmgc
</span><span class="cx"> 
</span><ins>+# Runtime dependencies really depend on user preferences.
+# Asy can draw graphics without any TeX or without LaTeX,
+# so one might just as well remove all deps (or add more)
+#
+# The hierarchy of dependencies goes as:
+# - texlive-latex-recommended [common, bin, basic, latex]
+# - texlive-latex             [common, bin, basic]
+# - texlive-basic             [common, bin]
+#
+# But then asy also supports luatex, context, etc.
+depends_run         port:ghostscript \
+                    port:texlive-basic
+
+patchfiles          patch-upstream.diff
+
+# temporary workaround to avoid asymptote from hanging forever
+if {${os.major} &gt;= 11} {
+    configure.env   CFLAGS=&quot;-stdlib=libstdc++&quot; CXXFLAGS=&quot;-stdlib=libstdc++&quot;
+}
+
</ins><span class="cx"> post-destroot {
</span><span class="cx">     set python.bin &quot;&quot;
</span><span class="cx">     if {[variant_isset python27]} {
</span><span class="lines">@@ -50,8 +82,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-patchfiles          patch-prc-writePRC.h.diff
-
</del><span class="cx"> post-activate {
</span><span class="cx">   # run `mktexlsr` to make sure the asymptote files are found:
</span><span class="cx">   system &quot;mktexlsr&quot;
</span></span></pre></div>
<a id="trunkdportsgraphicsasymptotefilespatchprcwritePRChdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff (120124 => 120125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff        2014-05-16 17:11:24 UTC (rev 120124)
+++ trunk/dports/graphics/asymptote/files/patch-prc-writePRC.h.diff        2014-05-16 18:27:54 UTC (rev 120125)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-# https://sourceforge.net/p/asymptote/code/5634/
-#
---- prc/writePRC.h.orig
-+++ prc/writePRC.h
-@@ -25,9 +25,15 @@
- #include &lt;vector&gt;
- #include &lt;deque&gt;
- #include &lt;list&gt;
-+
- #ifdef __GNUC__
-+#if __cplusplus &gt;= 201103L
-+#include &lt;forward_list&gt;
-+#else
- #include &lt;ext/slist&gt;
- #endif
-+#endif
-+
- #include &lt;map&gt;
- #include &lt;iostream&gt;
- #include &quot;PRCbitStream.h&quot;
-@@ -225,7 +231,13 @@
-   std::deque&lt;PRCSingleAttribute&gt; attribute_keys;
- };
- #ifdef __GNUC__
-+
-+#if __cplusplus &gt;= 201103L
-+typedef forward_list&lt;PRCAttribute&gt; PRCAttributeList;
-+#else
- typedef __gnu_cxx::slist&lt;PRCAttribute&gt; PRCAttributeList;
-+#endif
-+
- #else
- typedef std::list&lt;PRCAttribute&gt; PRCAttributeList;
- #endif
-
</del></span></pre></div>
<a id="trunkdportsgraphicsasymptotefilespatchupstreamdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/asymptote/files/patch-upstream.diff (0 => 120125)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/asymptote/files/patch-upstream.diff                                (rev 0)
+++ trunk/dports/graphics/asymptote/files/patch-upstream.diff        2014-05-16 18:27:54 UTC (rev 120125)
</span><span class="lines">@@ -0,0 +1,90 @@
</span><ins>+https://sourceforge.net/p/asymptote/code/5651
+--- genv.cc.orig
++++ genv.cc
+@@ -15,7 +15,7 @@

+ #include &lt;sstream&gt;
+ #include &lt;unistd.h&gt;
+-#include &lt;bits/stl_algo.h&gt;
++#include &lt;algorithm&gt;

+ #include &quot;genv.h&quot;
+ #include &quot;env.h&quot;
+https://sourceforge.net/p/asymptote/code/5652
+--- configure.orig
++++ configure
+@@ -5737,7 +5737,7 @@
+ ac_fn_cxx_check_header_mongrel &quot;$LINENO&quot; &quot;unordered_map&quot; &quot;ac_cv_header_unordered_map&quot; &quot;$ac_includes_default&quot;
+ if test &quot;x$ac_cv_header_unordered_map&quot; = xyes; then :

+-$as_echo &quot;#define HAVE_UNORDERDED_MAP 1&quot; &gt;&gt;confdefs.h
++$as_echo &quot;#define HAVE_UNORDERED_MAP 1&quot; &gt;&gt;confdefs.h

+ else
+   ac_fn_cxx_check_header_mongrel &quot;$LINENO&quot; &quot;tr1/unordered_map&quot; &quot;ac_cv_header_tr1_unordered_map&quot; &quot;$ac_includes_default&quot;
+--- config.h.in.orig
++++ config.h.in
+@@ -160,7 +160,7 @@
+ #undef HAVE_UNISTD_H

+ /* Define to 1 if you have unordered_map */
+-#undef HAVE_UNORDERDED_MAP
++#undef HAVE_UNORDERED_MAP

+ /* Define to 1 if you have the `vfork' function. */
+ #undef HAVE_VFORK
+https://sourceforge.net/p/asymptote/code/5653/
+--- gsl.cc.orig
++++ gsl.cc
+@@ -850,7 +850,7 @@ void GSLrng_dir2d(stack *s)
+ {
+   string method = pop&lt;string&gt;(s,string(&quot;neumann&quot;));
+   checkGSLrng();
+-  double x,y;
++  double x=0, y=0;
+   if(method == &quot;neumann&quot;) gsl_ran_dir_2d(GSLrng,&amp;x,&amp;y);
+   else if(method == &quot;trig&quot;) gsl_ran_dir_2d_trig_method(GSLrng,&amp;x,&amp;y);
+   else error(GSLinvalid);
+--- runfile.in.orig
++++ runfile.in
+@@ -43,7 +43,7 @@ file* :nullFile()
+ file* input(string name=emptystring, bool check=true,
+             string comment=commentchar, string mode=emptystring)
+ {
+-  file *f;
++  file *f=NULL;
+   if(mode == &quot;binary&quot;) {
+     f=new ibfile(name,check);
+   } else if(mode == &quot;xdr&quot;) {
+@@ -71,7 +71,7 @@ file* input(string name=emptystring, bool check=true,
+ file* output(string name=emptystring, bool update=false,
+              string comment=commentchar, string mode=emptystring)
+ {
+-  file *f;
++  file *f=NULL;
+   if(mode == &quot;pipe&quot;) {
+     f=new opipe(name);
+   } else if(mode == &quot;binary&quot;) {
+https://sourceforge.net/p/asymptote/code/5654/
+--- drawlabel.cc.orig
++++ drawlabel.cc
+@@ -75,11 +75,15 @@
+   bool Latex=latex(texengine);
+   
+   if(Latex) {
+-    if(setlatexfont(tex,pentype,drawElement::lastpen))
+-      tex.wait(&quot;\n*&quot;);
++    if(setlatexfont(tex,pentype,drawElement::lastpen)) {
++      tex &lt;&lt; &quot;\n&quot;;
++      tex.wait(texready.c_str());
++    }
+   }
+-  if(settexfont(tex,pentype,drawElement::lastpen,Latex))
+-    tex.wait(&quot;\n*&quot;);
++  if(settexfont(tex,pentype,drawElement::lastpen,Latex)) {
++    tex &lt;&lt; &quot;\n&quot;;
++    tex.wait(texready.c_str());
++  }
+   
+   drawElement::lastpen=pentype;
+ }
</ins></span></pre>
</div>
</div>

</body>
</html>