| 54 | post-destroot { |
| 55 | # fix location of documentation to include version. |
| 56 | # remove documentation if no variant is set. |
| 57 | # for now since NumPy variant does not work, just |
| 58 | # move what can be moved and delete the rest. |
| 59 | if {[variant_isset docs]} { |
| 60 | # move documentation to a versioned directory |
| 61 | xinstall -m 755 -d ${destroot}${prefix}/share/doc |
| 62 | move ${destroot}${prefix}/doc/${name} \ |
| 63 | ${destroot}${prefix}/share/doc/${name}-${version} |
| 64 | } |
| 65 | # delete whatever is left in the doc directory |
| 66 | delete ${destroot}${prefix}/doc |
| 67 | } |
| 68 | |
| 69 | variant docs description "Build documentation" {} |
| 70 | |
| 71 | if {[variant_isset docs]} { |
| 72 | depends_lib-append port:doxygen |
| 73 | } else { |
| 74 | configure.args-append \ |
| 75 | -DBUILD_doc=OFF \ |
| 76 | -DDOXYGEN_DOT_EXECUTABLE= \ |
| 77 | -DDOXYGEN_DOT_PATH= \ |
| 78 | -DDOXYGEN_EXECUTABLE= |
| 79 | } |
| 80 | |
| 81 | variant hdf5 description {Include support for HDF5} {} |
| 82 | # set default variant |
| 83 | if {![variant_isset hdf5]} { |
| 84 | default_variants +hdf5 |
| 85 | } |
| 86 | # see if user specified -hdf5 |
| 87 | if {[variant_isset hdf5]} { |
| 88 | depends_lib-append port:hdf5-18 |
| 89 | } else { |
| 90 | configure.args-append -DWITH_HDF5=NO |
| 91 | } |
| 92 | |
| 93 | variant valgrind description {Include support for VALGRIND} {} |
| 94 | # set default variant |
| 95 | if {![variant_isset valgrind]} { |
| 96 | default_variants +valgrind |
| 97 | } |
| 98 | # see if user specified -valgrind |
| 99 | if {[variant_isset valgrind]} { |
| 100 | depends_lib-append port:valgrind |
| 101 | } else { |
| 102 | configure.args-append -DWITH_VALGRIND=NO |
| 103 | } |
| 104 | |
| 105 | variant python25 conflicts python26 python27 \ |
| 106 | description "Use Python 2.5" {} |
| 107 | |
| 108 | variant python26 conflicts python25 python27 \ |
| 109 | description "Use Python 2.6" {} |
| 110 | |
| 111 | variant python27 conflicts python25 python26 \ |
| 112 | description "Use Python 2.7" {} |
| 113 | |
| 114 | # set default variant, if no others set |
| 115 | if { ![variant_isset python25] && \ |
| 116 | ![variant_isset python26] && \ |
| 117 | ![variant_isset python27] } { |
| 118 | default_variants +python26 |
| 119 | } |
| 120 | |
| 121 | # check to make sure -some- Python variant is active |
| 122 | if { ![variant_isset python25] && \ |
| 123 | ![variant_isset python26] && \ |
| 124 | ![variant_isset python27] } { |
| 125 | ui_error "${name} requires some variant of Python." |
| 126 | } |
| 127 | |
| 128 | set python_version "" |
| 129 | if {[variant_isset python25]} { |
| 130 | set python_version "2.5" |
| 131 | } elseif {[variant_isset python26]} { |
| 132 | set python_version "2.6" |
| 133 | } elseif {[variant_isset python27]} { |
| 134 | set python_version "2.7" |
| 135 | } |
| 136 | |
| 137 | configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python${python_version} |
| 138 | |
| 139 | # -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Headers |
| 140 | |
| 141 | set python_version_join [join [split ${python_version} "."] ""] |
| 142 | depends_lib-append port:python${python_version_join} |
| 143 | |
| 144 | # disable NUMPY -- requires Boost::Python. |
| 145 | configure.args-append -DWITH_VIGRANUMPY=NO |
| 146 | |
| 147 | # variant numpy description {Include support for NUMPY} {} |
| 148 | # set default variant |
| 149 | # if {![variant_isset numpy]} { |
| 150 | # default_variants +numpy |
| 151 | #} |
| 152 | # see if user specified -numpy |
| 153 | #if {[variant_isset numpy]} { |
| 154 | # depends_lib-append port:py${python_version_join}-numpy |
| 155 | # port:py${python_version_join}-sphinx |
| 156 | #} else { |
| 157 | # configure.args-append -DWITH_VIGRANUMPY=NO |
| 158 | #} |
| 159 | |