Revision: 145120 https://trac.macports.org/changeset/145120 Author: dstrubbe@macports.org Date: 2016-01-26 03:14:05 -0800 (Tue, 26 Jan 2016) Log Message: ----------- 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. Modified Paths: -------------- trunk/dports/science/eo/Portfile Modified: trunk/dports/science/eo/Portfile =================================================================== --- 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) @@ -2,6 +2,7 @@ # $Id$ PortSystem 1.0 +PortGroup compilers 1.0 name eo categories science @@ -16,7 +17,7 @@ ANSI-C++ compliant evolutionary computation \ library. It contains classes for almost any \ kind of evolutionary computation you might \ - come up to - at least for the ones we could \ + come up with -- at least for the ones we could \ think of. It is component-based, so that if \ you don't find the class you need in it, it is \ very easy to subclass existing abstract or \ @@ -37,17 +38,51 @@ patch-make_checkpoint_assembled.h.diff \ patch-make_checkpoint_FDC.h.diff \ patch-make_checkpoint_pareto.h.diff \ - patch-make_help.cpp.diff + patch-make_help.cpp.diff \ + patch-test-t-eoSelect.cpp.diff +# last is required for 'port test' with a GCC compiler. configure.args-append --disable-applications --disable-gnuplot --disable-tutorial -configure.args-delete --enable-applications --enable-gnuplot --enable-tutorial test.run yes test.target check +compilers.choose cc cxx # TODO: Fix this project's buggy C++ code or file a bug upstream +compilers.setup -clang -dragonegg -gcc gcc45 compiler.blacklist *clang* +# clang++ gives: "error: use of undeclared identifier 'value'" + +# gcc5: +#../../src/utils/eoStat.h:382:34: error: type 'eoDistanceStat<EOT>' is not a base type for type 'eoDistanceStat<EOT>' +# using eoDistanceStat< EOT >::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 ".deps/make_genotype_real.Tpo" -c -o make_genotype_real.o make_genotype_real.cpp; \ +# then mv -f ".deps/make_genotype_real.Tpo" ".deps/make_genotype_real.Po"; else rm -f ".deps/make_genotype_real.Tpo"; 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 + #platform darwin { # if {${os.major} >= 13} { # depends_lib @@ -78,34 +113,15 @@ configure.args-delete --disable-tutorial } -variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description "Use GCC 4.3 for compilation of EO - optimized for host machine" { - configure.compiler macports-gcc-4.3 - configure.cflags-append "-ftree-vectorize -march=native -O3" - configure.cxxflags-append "-ftree-vectorize -march=native -O3" +pre-configure { + configure.args-append CC=${configure.cc} CFLAGS="${configure.cflags}" \ + CXX=${configure.cxx} + + if {[gcc_variant_isset]} { + configure.cxxflags-append "-fpermissive" +# configure.cflags-append "-ftree-vectorize -march=native -O3" +# configure.cxxflags-append "-ftree-vectorize -march=native -O3" + } } -variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description "Use GCC 4.4 for compilation of EO - optimized for host machine" { - configure.compiler macports-gcc-4.4 - configure.cflags-append "-ftree-vectorize -march=native -O3" - configure.cxxflags-append "-ftree-vectorize -march=native -O3" -} - -variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description "Use GCC 4.5 for compilation of EO - optimized for host machine" { - configure.compiler macports-gcc-4.5 - configure.cflags-append "-ftree-vectorize -march=native -O3" - configure.cxxflags-append "-ftree-vectorize -march=native -O3" -} - -variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description "Use GCC 4.6 for compilation of EO - optimized for host machine" { - configure.compiler macports-gcc-4.6 - configure.cflags-append "-ftree-vectorize -march=native -O3" - configure.cxxflags-append "-ftree-vectorize -march=native -O3" -} - -variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description "Use GCC 4.7 for compilation of EO - optimized for host machine" { - configure.compiler macports-gcc-4.7 - configure.cflags-append "-ftree-vectorize -march=native -O3" - configure.cxxflags-append "-ftree-vectorize -march=native -O3" -} - livecheck.distname eo