<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/dfc5f7ff33a31bc87b774c0abc50c5cca9d92f49">https://github.com/macports/macports-ports/commit/dfc5f7ff33a31bc87b774c0abc50c5cca9d92f49</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit dfc5f7ff33a31bc87b774c0abc50c5cca9d92f49
</span>Author: Marcus Calhoun-Lopez <marcuscalhounlopez@gmail.com>
AuthorDate: Thu Sep 28 03:45:37 2017 -0700
<span style='display:block; white-space:pre;color:#404040;'> qt5 PG: add 3 global variables; remove 2 variables
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Remove qt5.base_version option.
</span><span style='display:block; white-space:pre;color:#404040;'> Remove qt_name variable.
</span><span style='display:block; white-space:pre;color:#404040;'> Automatically determine qt5.name instead.
</span><span style='display:block; white-space:pre;color:#404040;'> Use qt5.name to determine qt5.base_port and qt5.version.
</span>---
_resources/port1.0/group/qmake5-1.0.tcl | 6 +--
_resources/port1.0/group/qt5-1.0.tcl | 67 ++++++++++++++++-----------------
aqua/qt5/Portfile | 2 -
aqua/qt55/Portfile | 2 -
aqua/qt56/Portfile | 2 -
aqua/qt57/Portfile | 2 -
6 files changed, 35 insertions(+), 46 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/qmake5-1.0.tcl b/_resources/port1.0/group/qmake5-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 863dca0..f47d5fe 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/qmake5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/qmake5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -115,8 +115,6 @@ pre-configure {
</span> puts ${cache} "QMAKE_LINK_SHLIB=${configure.cxx}"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set qt_version [exec ${prefix}/bin/pkg-config --modversion Qt5Core]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # save certain configure flags
set qmake5_cxx11_flags ""
set qmake5_cxx_flags ""
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -132,7 +130,7 @@ pre-configure {
</span> set qmake5_cxx_flags [join ${qmake5_cxx11_flags} " "]
set qmake5_l_flags [join ${qmake5_l_flags} " "]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [vercmp ${qt_version} 5.6.0] >= 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [vercmp ${qt5.version} 5.6] >= 0 } {
</span> if { ${configure.cxx_stdlib} ne "libc++" } {
# override C++ flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf
# so value of ${configure.cxx_stdlib} can always be used
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -144,7 +142,7 @@ pre-configure {
</span> if {${qmake5_cxx11_flags} ne ""} {
puts ${cache} QMAKE_CXXFLAGS+="${qmake5_cxx11_flags}"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif { [vercmp ${qt_version} 5.5.0] == 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif { [vercmp ${qt5.version} 5.5] >= 0 } {
</span>
# always use the same standard library
puts ${cache} QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/qt5-1.0.tcl b/_resources/port1.0/group/qt5-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 06dfb6d..1be4dcc 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/qt5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/qt5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,8 +34,6 @@
</span> # Usage:
# PortGroup qt5 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-options qt5.base_version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> global available_qt_versions
array set available_qt_versions {
qt5 {qt5-qtbase 5.8}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -137,14 +135,30 @@ proc qt5.get_default_name {} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# standard Qt5 name
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-global qt_name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+global qt5.name qt5.base_port qt5.version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# get the latest Qt version that runs on current OS configuration
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set qt5.name [qt5.get_default_name]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set qt5.base_port [lindex $available_qt_versions(${qt5.name}) 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set qt5.version [lindex $available_qt_versions(${qt5.name}) 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# check if another version of Qt is installed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach {qt_test_name qt_test_info} [array get available_qt_versions] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set qt_test_base_port [lindex ${qt_test_info} 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![catch {set installed [lindex [registry_active ${qt_test_base_port}] 0]}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set qt5.name ${qt_test_name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set qt5.base_port ${qt_test_base_port}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set qt5.version [lindex $installed 1]
</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:#ffe0e0;'>-if { [info exists qt_name] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default qt5.base_version ${qt_name}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set qt_name [qt5.get_default_name]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default qt5.base_version {[qt5.get_default_name]}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# check to see if this is a Qt port being built
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach {qt_test_name qt_test_info} [array get available_qt_versions] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${qt_test_name} eq ${name}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set qt5.name ${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set qt5.base_port [lindex $available_qt_versions(${qt5.name}) 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set qt5.version [lindex $available_qt_versions(${qt5.name}) 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
# Qt has what is calls reference configurations, which are said to be thoroughly tested
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -621,34 +635,20 @@ pre-destroot {
</span>
if {![info exists building_qt5]} {
pre-configure {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set qt_installed_name ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach {qt_test_name qt_test_info} [array get available_qt_versions] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set qt_test_port_name [lindex ${qt_test_info} 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![catch {set installed [lindex [registry_active ${qt_test_port_name}] 0]}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set qt_installed_name ${qt_test_name}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${qt_installed_name} eq "" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "at least one Qt must be installed"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "insufficient dependencies"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "qt5 PortGroup: Qt is provided by ${qt_installed_name}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "qt5 PortGroup: Qt is provided by ${qt5.name}"
</span>
if { [variant_exists qt5kde] && [variant_isset qt5kde] } {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [string range ${qt_installed_name} end-3 end] ne "-kde" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${qt5.base_port} ne "qt5-kde" } {
</span> ui_error "qt5 PortGroup: Qt is installed but not qt5-kde, as is required by this variant"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "qt5 PortGroup: please run `sudo port uninstall --follow-dependents ${qt_installed_name}-qtbase and try again"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "qt5 PortGroup: please run `sudo port uninstall --follow-dependents ${qt5.base_port} and try again"
</span> return -code error "improper Qt installed"
}
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${qt_installed_name} ne [qt5.get_default_name] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${qt5.name} ne [qt5.get_default_name] } {
</span> # see https://wiki.qt.io/Qt-Version-Compatibility
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "qt5 PortGroup: default Qt for this platform is [qt5.get_default_name] but ${qt_installed_name} is installed"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "qt5 PortGroup: default Qt for this platform is [qt5.get_default_name] but ${qt5.name} is installed"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${qt_installed_name} ne "qt5" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${qt5.name} ne "qt5" } {
</span> ui_warn "Qt dependency is not the latest version but may be the latest supported on your OS"
}
if { ${os.major} < 11 } {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -671,7 +671,7 @@ proc eval_variants {variations} {
</span>
namespace eval qt5pg {
proc register_dependents {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global qt5_private_components qt5_private_build_components qt5.base_version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global qt5_private_components qt5_private_build_components qt5.name
</span>
if { ![exists qt5_private_components] } {
# no Qt components have been requested
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -718,14 +718,13 @@ namespace eval qt5pg {
</span> }
} else {
# ![variant_isset qt5kde]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set qt_default_name ${qt5.base_version}
</span> foreach component "qtbase ${qt5_private_components}" {
if { ${component} eq "qt5" } {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append path:share/doc/qt5/README.txt:${qt_default_name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append path:share/doc/qt5/README.txt:${qt5.name}
</span> } elseif { [info exists qt5pg::qt5_component_lib(${component})] } {
set component_info $qt5pg::qt5_component_lib(${component})
set path [lindex ${component_info} 2]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append path:${path}:${qt_default_name}-${component}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append path:${path}:${qt5.name}-${component}
</span> } else {
return -code error "unknown component ${comp}"
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -734,7 +733,7 @@ namespace eval qt5pg {
</span> if { [info exists qt5pg::qt5_component_lib(${component})] } {
set component_info $qt5pg::qt5_component_lib(${component})
set path [lindex ${component_info} 2]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append path:${path}:${qt_default_name}-${component}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append path:${path}:${qt5.name}-${component}
</span> } else {
return -code error "unknown component ${comp}"
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt5/Portfile b/aqua/qt5/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index a31eaf3..82e862d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/aqua/qt5/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt5/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,8 +15,6 @@ homepage http://qt.io
</span>
version 5.8.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set qt_name ${name}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set just_want_qt5_variables yes
PortGroup qt5 1.0
unset just_want_qt5_variables
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt55/Portfile b/aqua/qt55/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c52e9bb..cc5a959 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/aqua/qt55/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt55/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,8 +15,6 @@ homepage http://qt.io
</span>
version 5.5.1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set qt_name ${name}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set just_want_qt5_variables yes
PortGroup qt5 1.0
unset just_want_qt5_variables
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt56/Portfile b/aqua/qt56/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 627d496..9b265b6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/aqua/qt56/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt56/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,8 +15,6 @@ homepage http://qt.io
</span>
version 5.6.2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set qt_name ${name}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set just_want_qt5_variables yes
PortGroup qt5 1.0
unset just_want_qt5_variables
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt57/Portfile b/aqua/qt57/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 71d2978..963bed9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/aqua/qt57/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt57/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,8 +15,6 @@ homepage http://qt.io
</span>
version 5.7.1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set qt_name ${name}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> set just_want_qt5_variables yes
PortGroup qt5 1.0
unset just_want_qt5_variables
</pre><pre style='margin:0'>
</pre>