<!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>[145120] trunk/dports/science/eo/Portfile</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/145120">145120</a></dd>
<dt>Author</dt> <dd>dstrubbe@macports.org</dd>
<dt>Date</dt> <dd>2016-01-26 03:14:05 -0800 (Tue, 26 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>eo: Use compilers portgroup for C variants. Unfortunately only gcc45 and llvm actually compile and pass tests, after adding a patch and modifying cflags. Fix up description. Remove useless configure.args-delete of args not present. Include default cflags.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsscienceeoPortfile">trunk/dports/science/eo/Portfile</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsscienceeoPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/science/eo/Portfile (145119 => 145120)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/eo/Portfile        2016-01-26 10:25:23 UTC (rev 145119)
+++ trunk/dports/science/eo/Portfile        2016-01-26 11:14:05 UTC (rev 145120)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> # $Id$
</span><span class="cx"> 
</span><span class="cx"> PortSystem              1.0
</span><ins>+PortGroup               compilers 1.0
</ins><span class="cx"> 
</span><span class="cx"> name                    eo
</span><span class="cx"> categories              science
</span><span class="lines">@@ -16,7 +17,7 @@
</span><span class="cx">                         ANSI-C++ compliant evolutionary computation \
</span><span class="cx">                         library. It contains classes for almost any \
</span><span class="cx">                         kind of evolutionary computation you might \
</span><del>-                        come up to - at least for the ones we could \
</del><ins>+                        come up with -- at least for the ones we could \
</ins><span class="cx">                         think of. It is component-based, so that if \
</span><span class="cx">                         you don't find the class you need in it, it is \
</span><span class="cx">                         very easy to subclass existing abstract or \
</span><span class="lines">@@ -37,17 +38,51 @@
</span><span class="cx">                         patch-make_checkpoint_assembled.h.diff \
</span><span class="cx">                         patch-make_checkpoint_FDC.h.diff \
</span><span class="cx">                         patch-make_checkpoint_pareto.h.diff \
</span><del>-                        patch-make_help.cpp.diff
</del><ins>+                        patch-make_help.cpp.diff \
+                        patch-test-t-eoSelect.cpp.diff
+# last is required for 'port test' with a GCC compiler.
</ins><span class="cx"> 
</span><span class="cx"> configure.args-append   --disable-applications --disable-gnuplot --disable-tutorial
</span><del>-configure.args-delete   --enable-applications --enable-gnuplot --enable-tutorial
</del><span class="cx"> 
</span><span class="cx"> test.run                yes
</span><span class="cx"> test.target             check
</span><span class="cx"> 
</span><ins>+compilers.choose        cc cxx
</ins><span class="cx"> # TODO: Fix this project's buggy C++ code or file a bug upstream
</span><ins>+compilers.setup         -clang -dragonegg -gcc gcc45
</ins><span class="cx"> compiler.blacklist      *clang*
</span><span class="cx"> 
</span><ins>+# clang++ gives: &quot;error: use of undeclared identifier 'value'&quot;
+
+# gcc5:
+#../../src/utils/eoStat.h:382:34: error: type 'eoDistanceStat&lt;EOT&gt;' is not a base type for type 'eoDistanceStat&lt;EOT&gt;'
+#     using eoDistanceStat&lt; EOT &gt;::value;
+
+# gcc46, gcc47, dragonegg33, dragonegg34:
+# eoFunctorStore.cpp: In destructor 'virtual eoFunctorStore::~eoFunctorStore()':
+# eoFunctorStore.cpp:13:9: error: 'size_t' was not declared in this scope
+# eoFunctorStore.cpp:13:9: note: suggested alternatives:
+# In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:60:0,
+#                  from /opt/local/include/gcc47/c++/vector:61,
+#                  from ./eoFunctorStore.h:30,
+#                  from eoFunctorStore.cpp:6:
+# /opt/local/include/gcc47/c++//x86_64-apple-darwin14/bits/c++config.h:173:26: note:   'std::size_t'
+# /opt/local/include/gcc47/c++//x86_64-apple-darwin14/bits/c++config.h:173:26: note:   'std::size_t'
+# eoFunctorStore.cpp:13:16: error: expected ';' before 'i'
+# eoFunctorStore.cpp:13:23: error: 'i' was not declared in this scope
+
+# caused by gcc use of -ftree-vectorize -march=native -O3
+# if /opt/local/bin/g++-mp-4.4 -DHAVE_CONFIG_H -I. -I. -I../..   -I/opt/local/include -I../../src -pipe -Os -fpermissive -ftree-vectorize -march=native -O3 -MT make_genotype_real.o -MD -MP -MF &quot;.deps/make_genotype_real.Tpo&quot; -c -o make_genotype_real.o make_genotype_real.cpp; \
+#         then mv -f &quot;.deps/make_genotype_real.Tpo&quot; &quot;.deps/make_genotype_real.Po&quot;; else rm -f &quot;.deps/make_genotype_real.Tpo&quot;; exit 1; fi
+# {standard input}:807:no such instruction: `vmovsd (%r9), %xmm1'
+# {standard input}:808:no such instruction: `vmovd %rbx, %xmm0'
+# {standard input}:809:no such instruction: `vucomisd %xmm0, %xmm1'
+# {standard input}:810:no such instruction: `vcmpnltsd %xmm1, %xmm0,%xmm2'
+# {standard input}:813:no such instruction: `vandpd %xmm2, %xmm0,%xmm0'
+# {standard input}:814:no such instruction: `vandnpd %xmm1, %xmm2,%xmm1'
+
+# gcc44 test: FAIL: t-eoRandom
+
</ins><span class="cx"> #platform darwin {
</span><span class="cx"> #    if {${os.major} &gt;= 13} {
</span><span class="cx"> #        depends_lib
</span><span class="lines">@@ -78,34 +113,15 @@
</span><span class="cx">         configure.args-delete   --disable-tutorial
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description &quot;Use GCC 4.3 for compilation of EO - optimized for host machine&quot; {
-    configure.compiler          macports-gcc-4.3
-    configure.cflags-append     &quot;-ftree-vectorize -march=native -O3&quot;
-    configure.cxxflags-append   &quot;-ftree-vectorize -march=native -O3&quot;
</del><ins>+pre-configure {
+    configure.args-append       CC=${configure.cc} CFLAGS=&quot;${configure.cflags}&quot; \
+                                CXX=${configure.cxx}
+    
+    if {[gcc_variant_isset]} {
+        configure.cxxflags-append   &quot;-fpermissive&quot;
+#        configure.cflags-append     &quot;-ftree-vectorize -march=native -O3&quot;
+#        configure.cxxflags-append   &quot;-ftree-vectorize -march=native -O3&quot;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description &quot;Use GCC 4.4 for compilation of EO - optimized for host machine&quot; {
-    configure.compiler          macports-gcc-4.4
-    configure.cflags-append     &quot;-ftree-vectorize -march=native -O3&quot;
-    configure.cxxflags-append   &quot;-ftree-vectorize -march=native -O3&quot;
-}
-
-variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description &quot;Use GCC 4.5 for compilation of EO - optimized for host machine&quot; {
-    configure.compiler          macports-gcc-4.5
-    configure.cflags-append     &quot;-ftree-vectorize -march=native -O3&quot;
-    configure.cxxflags-append   &quot;-ftree-vectorize -march=native -O3&quot;
-}
-
-variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description &quot;Use GCC 4.6 for compilation of EO - optimized for host machine&quot; {
-    configure.compiler          macports-gcc-4.6
-    configure.cflags-append     &quot;-ftree-vectorize -march=native -O3&quot;
-    configure.cxxflags-append   &quot;-ftree-vectorize -march=native -O3&quot;
-}
-
-variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description &quot;Use GCC 4.7 for compilation of EO - optimized for host machine&quot; {
-    configure.compiler          macports-gcc-4.7
-    configure.cflags-append     &quot;-ftree-vectorize -march=native -O3&quot;
-    configure.cxxflags-append   &quot;-ftree-vectorize -march=native -O3&quot;
-}
-
</del><span class="cx"> livecheck.distname   eo
</span></span></pre>
</div>
</div>

</body>
</html>