42 | | # with the -r option, the examples do not install correctly (no source code) |
43 | | # the install_sources target is not created in the Makefile(s) |
44 | | configure.cmd ${qt_qmake_cmd} |
45 | | #configure.cmd ${qt_qmake_cmd} -r |
46 | | |
47 | | configure.pre_args-replace --prefix=${prefix} "PREFIX=${prefix}" |
48 | | configure.universal_args-delete --disable-dependency-tracking |
49 | | |
50 | | # specify build configuration (compiler, 32-bit/64-bit, etc.) |
51 | | if { ![option universal_variant] || ![variant_isset universal] } { |
52 | | configure.args-append -spec ${qt_qmake_spec} |
53 | | } else { |
54 | | lappend merger_configure_args(i386) -spec ${qt_qmake_spec_32} |
55 | | lappend merger_configure_args(x86_64) -spec ${qt_qmake_spec_64} |
| 45 | if {![info exists qt5.using_kde]} { |
| 46 | ui_debug "qmake5 PortGroup : no qt5-kde info was provided by the Qt5 PortGroup" |
| 47 | set qt5.using_kde no |
58 | | # if qtbase was build as a universal, |
59 | | # QT_ARCH and QT_TARGET_ARCH may be set incorrectly in ${qt_mkspecs_dir}/qconfig.pri, |
60 | | # so set them manually |
61 | | if { ![option universal_variant] || ![variant_isset universal] } { |
62 | | pre-configure { |
63 | | if {[active_variants qt5-qtbase universal ""]} { |
64 | | configure.args-append \ |
65 | | QT_ARCH=${build_arch} \ |
66 | | QT_TARGET_ARCH=${build_arch} |
67 | | } |
| 50 | if {${qt5.using_kde}} { |
| 51 | |
| 52 | #configure.cmd ${qt_qmake_cmd} -r |
| 53 | configure.cmd ${qt_qmake_cmd} |
| 54 | configure.pre_args-replace --prefix=${prefix} PREFIX=${prefix} |
| 55 | configure.universal_args-delete --disable-dependency-tracking |
| 56 | |
| 57 | # qmake defaults to -mmacosx-version-min=10.6, which implies stdlib is libstdc++, which caused problems |
| 58 | # (see https://trac.macports.org/wiki/FAQ#libcpp) |
| 59 | # override QMAKE_MACOSX_DEPLOYMENT_TARGET set in ${prefix}/libexec/qt5/mkspecs/macx-clang/qmake.conf |
| 60 | # see #50249 |
| 61 | configure.pre_args-append "QMAKE_MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}" |
| 62 | |
| 63 | if {[variant_exists universal] && [variant_isset universal]} { |
| 64 | set merger_configure_args(i386) "CONFIG+=\"x86\" -spec ${qt_qmake_spec_32}" |
| 65 | set merger_configure_args(x86_64) "-spec ${qt_qmake_spec_64}" |
81 | | # override C++11 flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf |
82 | | # so value of ${configure.cxx_stdlib} can always be used |
83 | | configure.args-append \ |
84 | | QMAKE_CXXFLAGS_CXX11-=-stdlib=libc++ \ |
85 | | QMAKE_LFLAGS_CXX11-=-stdlib=libc++ \ |
86 | | QMAKE_CXXFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib} \ |
87 | | QMAKE_LFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib} |
88 | | |
89 | | # ensure ${configure.cxx_stdlib} is used for C++ stdlib |
90 | | configure.args-append \ |
91 | | QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib} \ |
92 | | QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib} |
93 | | |
94 | | if {![info exists qt5_qmake_request_no_debug]} { |
95 | | variant debug description {Build both release and debug libraries} {} |
96 | | |
97 | | # accommodating variant request varies depending on how qtbase was built |
98 | | pre-configure { |
99 | | |
100 | | # determine if qmake builds debug libraries by default (set via variants) |
101 | | if {[active_variants qt5-qtbase debug ""]} { |
102 | | set base_debug true |
103 | | } else { |
104 | | set base_debug false |
105 | | } |
| 75 | PortGroup active_variants 1.1 |
107 | | # determine if the user wants to build debug libraries |
108 | | if { [variant_exists debug] && [variant_isset debug] } { |
109 | | set this_debug true |
110 | | } else { |
111 | | set this_debug false |
112 | | } |
| 77 | # with the -r option, the examples do not install correctly (no source code) |
| 78 | # the install_sources target is not created in the Makefile(s) |
| 79 | configure.cmd ${qt_qmake_cmd} |
| 80 | #configure.cmd ${qt_qmake_cmd} -r |
| 81 | |
| 82 | configure.pre_args-replace --prefix=${prefix} "PREFIX=${prefix}" |
| 83 | configure.universal_args-delete --disable-dependency-tracking |
| 84 | |
| 85 | # specify build configuration (compiler, 32-bit/64-bit, etc.) |
| 86 | if { ![option universal_variant] || ![variant_isset universal] } { |
| 87 | configure.args-append -spec ${qt_qmake_spec} |
| 88 | } else { |
| 89 | lappend merger_configure_args(i386) -spec ${qt_qmake_spec_32} |
| 90 | lappend merger_configure_args(x86_64) -spec ${qt_qmake_spec_64} |
| 91 | } |
114 | | # determine of qmake's default and user requests are compatible; override qmake if necessary |
115 | | if { ${this_debug} && !${base_debug} } { |
116 | | configure.args-append "QT_CONFIG+=\"debug_and_release build_all\"" |
| 93 | # if qtbase was build as a universal, |
| 94 | # QT_ARCH and QT_TARGET_ARCH may be set incorrectly in ${qt_mkspecs_dir}/qconfig.pri, |
| 95 | # so set them manually |
| 96 | if { ![option universal_variant] || ![variant_isset universal] } { |
| 97 | pre-configure { |
| 98 | if {[active_variants qt5-qtbase universal ""]} { |
| 99 | configure.args-append \ |
| 100 | QT_ARCH=${build_arch} \ |
| 101 | QT_TARGET_ARCH=${build_arch} |
| 102 | } |
| 103 | } |
| 104 | } else { |
| 105 | foreach arch ${configure.universal_archs} { |
| 106 | lappend merger_configure_args(${arch}) \ |
| 107 | QT_ARCH=${arch} \ |
| 108 | QT_TARGET_ARCH=${arch} |
119 | | if { !${this_debug} && ${base_debug} } { |
120 | | configure.args-append "QT_CONFIG-=\"debug_and_release build_all\" CONFIG-=\"debug\"" |
| 112 | # override QMAKE_MACOSX_DEPLOYMENT_TARGET set in ${prefix}/libexec/qt5/mkspecs/macx-clang/qmake.conf |
| 113 | # see #50249 |
| 114 | configure.args-append QMAKE_MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target} |
| 115 | |
| 116 | if {![info exists qt5_qmake_request_no_debug]} { |
| 117 | variant debug description {Build both release and debug libraries} {} |
| 118 | |
| 119 | # accommodating variant request varies depending on how qtbase was built |
| 120 | pre-configure { |
| 121 | |
| 122 | # determine if qmake builds debug libraries by default (set via variants) |
| 123 | if {[active_variants qt5-qtbase debug ""]} { |
| 124 | set base_debug true |
| 125 | } else { |
| 126 | set base_debug false |
| 127 | } |
| 128 | |
| 129 | # determine if the user wants to build debug libraries |
| 130 | if { [variant_exists debug] && [variant_isset debug] } { |
| 131 | set this_debug true |
| 132 | } else { |
| 133 | set this_debug false |
| 134 | } |
| 135 | |
| 136 | # determine of qmake's default and user requests are compatible; override qmake if necessary |
| 137 | if { ${this_debug} && !${base_debug} } { |
| 138 | configure.args-append "QT_CONFIG+=\"debug_and_release build_all\"" |
| 139 | } |
| 140 | |
| 141 | if { !${this_debug} && ${base_debug} } { |
| 142 | configure.args-append "QT_CONFIG-=\"debug_and_release build_all\" CONFIG-=\"debug\"" |
| 143 | } |
| 148 | |
| 149 | # override C++11 flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf |
| 150 | # so value of ${configure.cxx_stdlib} can always be used |
| 151 | # RJVB: only use cxx_stdlib when it is actually set and not equal to libc++ already. |
| 152 | if {${configure.cxx_stdlib} ne ""} { |
| 153 | if {${configure.cxx_stdlib} ne "libc++"} { |
| 154 | configure.args-append \ |
| 155 | QMAKE_CXXFLAGS_CXX11-=-stdlib=libc++ \ |
| 156 | QMAKE_LFLAGS_CXX11-=-stdlib=libc++ \ |
| 157 | QMAKE_CXXFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib} \ |
| 158 | QMAKE_LFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib} |
| 159 | } |
| 160 | # ensure ${configure.cxx_stdlib} is used for C++ stdlib |
| 161 | configure.args-append \ |
| 162 | QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib} \ |
| 163 | QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib} |
| 164 | } |
| 165 | |
| 166 | # kate: backspace-indents true; indent-pasted-text true; indent-width 4; keep-extra-spaces true; remove-trailing-spaces modified; replace-tabs true; replace-tabs-save true; syntax Tcl/Tk; tab-indents true; tab-width 4; |