<pre style='margin:0'>
Michael Dickens (michaelld) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/eb9453fce284aad1055fd2d383a4e74b0fbb54a5">https://github.com/macports/macports-ports/commit/eb9453fce284aad1055fd2d383a4e74b0fbb54a5</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit eb9453fce284aad1055fd2d383a4e74b0fbb54a5
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Mon May 31 19:07:42 2021 +0100
<span style='display:block; white-space:pre;color:#404040;'> boost PG: Rework configuration to ensure parameters are set early as possible
</span>---
_resources/port1.0/group/boost-1.0.tcl | 55 ++++++++++++++++++++++++++++++----
1 file changed, 49 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/boost-1.0.tcl b/_resources/port1.0/group/boost-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 5c8e9a393d6..2ecd7be4482 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/boost-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/boost-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,6 +13,12 @@ default boost.version 1.76
</span> options boost.depends_type
default boost.depends_type lib
<span style='display:block; white-space:pre;background:#e0ffe0;'>+set boost_last_version_nodot ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set boost_last_depends ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set boost_last_cxxflags ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set boost_last_ldflags ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set boost_last_cmake_flags ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> proc boost::version {} {
return [option boost.version]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,22 +40,59 @@ proc boost::lib_dir {} {
</span> return [boost::install_area]/lib
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc boost::configure {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc boost::configure_build {} {
</span> global cmake.build_dir
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global boost_last_version_nodot boost_last_depends boost_last_cxxflags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global boost_last_ldflags boost_last_cmake_flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${boost_last_version_nodot} eq [boost::version_nodot] &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${boost_last_depends} eq [option boost.depends_type] } return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Configure build [boost::version]"
</span>
# Set the requested boost dependency
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${boost_last_version_nodot} ne "" && ${boost_last_depends} ne "" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_${boost_last_depends}-delete port:boost${boost_last_version_nodot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set boost_last_depends [option boost.depends_type]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set boost_last_version_nodot [boost::version_nodot]
</span> depends_[option boost.depends_type]-append port:boost[boost::version_nodot]
# Append to the build flags to find the isolated headers/libs
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.cxxflags-prepend -isystem[boost::include_dir]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.ldflags-prepend -L[boost::lib_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${boost_last_cxxflags} ne "" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxxflags-delete ${boost_last_cxxflags}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${boost_last_ldflags} ne "" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.ldflags-delete ${boost_last_ldflags}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set boost_last_cxxflags -isystem[boost::include_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set boost_last_ldflags -L[boost::lib_dir]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxxflags-prepend ${boost_last_cxxflags}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.ldflags-prepend ${boost_last_ldflags}
</span>
# are we using cmake ?
if { [info exists cmake.build_dir] } {
ui_debug "Detected Cmake PG in use"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append -DBoost_INCLUDE_DIR=[boost::include_dir] \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DBoost_DIR=[boost::install_area]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${boost_last_cmake_flags} ne "" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach flag ${boost_last_cmake_flags} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-delete ${flag}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set boost_last_cmake_flags [list -DBoost_INCLUDE_DIR=[boost::include_dir] -DBoost_DIR=[boost::install_area]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach flag ${boost_last_cmake_flags} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append ${flag}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-port::register_callback boost::configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+port::register_callback boost::configure_build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+boost::configure_build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc boost::set_boost_parameters {option action args} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$action ne "set"} return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ boost::configure_build
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+option_proc boost.version boost::set_boost_parameters
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+option_proc boost.depends_type boost::set_boost_parameters
</span></pre><pre style='margin:0'>
</pre>