1 | Index: Portfile |
---|
2 | =================================================================== |
---|
3 | --- Portfile (revision 142427) |
---|
4 | +++ Portfile (working copy) |
---|
5 | @@ -35,13 +35,10 @@ |
---|
6 | depends_lib port:maloc \ |
---|
7 | port:readline |
---|
8 | |
---|
9 | -# dependencies are not managed correctly within this code, so errors such as from Eigen or -lapbs_geoflow might occur |
---|
10 | +# dependencies are not managed correctly within this code, so errors such as from -lapbs_geoflow might occur |
---|
11 | +# how to solve: first 'make apbs_geoflow', then 'make all' |
---|
12 | use_parallel_build no |
---|
13 | |
---|
14 | -# BEM needs 'gfortran', hard-coded, and configure fails without it if BEM is enabled, with a syntax error |
---|
15 | -#CMake Error at CMakeLists.txt:217 (get_filename_component): |
---|
16 | -# get_filename_component called with incorrect number of arguments |
---|
17 | -# To enable, need not only to fix that check, but also fix configure in tapipb directory to use chosen FC compiler. |
---|
18 | configure.args-append -DENABLE_OPENMP:BOOL=OFF \ |
---|
19 | -DENABLE_BEM=OFF \ |
---|
20 | -DCMAKE_C_COMPILER_ARG1:STRING="-I${worksrcpath}/include" \ |
---|
21 | @@ -60,6 +57,13 @@ |
---|
22 | mergedx mergedx2 mgmesh multivalue similarity smooth tensor2dx |
---|
23 | uhbd_asc2bin value} |
---|
24 | |
---|
25 | +# Some cmake tests will fail with "error: unrecognized option '-arch'" from gcc 4.6 and earlier. Same with dragonegg based on it. |
---|
26 | +# llvm-gcc-4.2 will fail to build with: error: unrecognized command line option "-std=c++0x" |
---|
27 | +compiler.blacklist macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6 \ |
---|
28 | + macports-dragonegg-3.3 macports-dragonegg-3.4 llvm-gcc-4.2 |
---|
29 | +# g++ will just fail to link apbs_geoflow. probably about -lstdc++ stuff. So, just use Fortran. |
---|
30 | +compilers.choose fc |
---|
31 | + |
---|
32 | switch ${subport} { |
---|
33 | apbs { |
---|
34 | compilers.setup |
---|
35 | @@ -117,6 +121,28 @@ |
---|
36 | } |
---|
37 | } |
---|
38 | |
---|
39 | +variant bem description {Build with support for Boundary Element Method} { |
---|
40 | + configure.args-delete -DENABLE_BEM=OFF |
---|
41 | + configure.args-append -DENABLE_BEM=ON |
---|
42 | + |
---|
43 | + if {![fortran_variant_isset]} { |
---|
44 | + ui_error "+bem requires a Fortran variant, e.g. +gfortran, +gccX, or +g95." |
---|
45 | + return -code error "+bem requires a Fortran variant." |
---|
46 | + } |
---|
47 | + |
---|
48 | + # BEM looks for 'gfortran', hard-coded, and configure fails without it if BEM is enabled, with a syntax error |
---|
49 | + #CMake Error at CMakeLists.txt:217 (get_filename_component): |
---|
50 | + # get_filename_component called with incorrect number of arguments |
---|
51 | + post-patch { |
---|
52 | + reinplace "s|get_filename_component(LIBGFORTRANPATH|#get_filename_component(LIBGFORTRANPATH|g" ${worksrcpath}/CMakeLists.txt |
---|
53 | + reinplace "s|find_path(LIBGFORTRAN_PATH|#find_path(LIBGFORTRAN_PATH|g" ${worksrcpath}/CMakeLists.txt |
---|
54 | + # -lstdc++ does not seem necessary and may cause trouble; specifying full paths avoid possible use of -ltabip from an earlier installation in ${prefix} |
---|
55 | + reinplace "s|-L\${LIBGFORTRAN_PATH} -lgfortran -ltabipb -lstdc\+\+|${compilers.libfortran} ${worksrcpath}/lib/libtabipb.a|" ${worksrcpath}/CMakeLists.txt |
---|
56 | + # provide this information to subsidiary cmake command run in tabipb directory during build phase |
---|
57 | + reinplace "s|CMAKE_ARGS|CMAKE_ARGS -DCMAKE_Fortran_COMPILER:STRING=${configure.fc}|" ${worksrcpath}/CMakeLists.txt |
---|
58 | + } |
---|
59 | +} |
---|
60 | + |
---|
61 | # check for real releases, not github commits |
---|
62 | livecheck.type regex |
---|
63 | livecheck.url http://www.poissonboltzmann.org/news/ |
---|