Ticket #48024: qt5-1.0.diff
File qt5-1.0.diff, 11.5 KB (added by RJVB (René Bertin), 9 years ago) |
---|
-
/opt/local/
old new 1 1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 2 # 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; 3 # $Id: qt5-1.0.tcl 113952 2015-06-11 16:30:53Z gmail.com:rjvbertin $ 2 4 # $Id: qt5-1.0.tcl 113952 2013-11-26 18:01:53Z michaelld@macports.org $ 3 5 4 6 # Copyright (c) 2014 The MacPorts Project … … 35 37 # Usage: 36 38 # PortGroup qt5 1.0 37 39 38 # no universal binary support in Qt 539 # see http://lists.qt-project.org/pipermail/interest/2012-December/005038.html40 # see also https://bugreports.qt-project.org/browse/QTBUG-2495241 40 if { ![exists universal_variant] || [option universal_variant] } { 42 41 PortGroup muniversal 1.0 43 42 #universal_archs_supported i386 x86_64 … … 59 58 } 60 59 } 61 60 62 # standard Qt5 name 61 # standard Qt5 name. This should be just "qt5" (or qt53 for instance when more 62 # specific version info must be included). There is nothing but a historical reason 63 # to call the Qt5 port itself qt5-mac, so that name should not appear on disk where 64 # files could be installed that would be the distant descendants of files from qt4-x11 63 65 global qt_name 64 66 set qt_name qt5 65 67 68 # global definitions with explanation; set the actual values below for cleanness. 66 69 # standard install directory 67 global qt_dir 68 set qt_dir ${prefix}/libexec/qt5-mac 69 70 # standard Qt non-.app executables directory 71 global qt_bins_dir 72 set qt_bins_dir ${qt_dir}/bin 73 74 # standard Qt includes directory 75 global qt_includes_dir 76 set qt_includes_dir ${qt_dir}/include 77 78 # standard Qt libraries directory 79 global qt_libs_dir 80 set qt_libs_dir ${qt_dir}/lib 81 82 # standard Qt libraries directory 83 global qt_frameworks_dir 84 set qt_frameworks_dir ${qt_libs_dir} 85 86 global qt_archdata_dir 87 set qt_archdata_dir ${qt_dir} 88 70 global qt_dir 71 # idem, relative to ${prefix} 72 global qt_dir_rel 73 # archdata: equal to qt_dir 74 global qt_archdata_dir 75 # standard Qt documents directory 76 global qt_docs_dir 89 77 # standard Qt plugins directory 90 global qt_plugins_dir91 set qt_plugins_dir ${qt_archdata_dir}/plugins 92 78 global qt_plugins_dir 79 # standard Qt mkspecs directory 80 global qt_mkspecs_dir 93 81 # standard Qt imports directory 94 global qt_imports_dir 95 set qt_imports_dir ${qt_archdata_dir}/imports 96 82 global qt_imports_dir 97 83 # standard Qt qml directory 98 global qt_qml_dir 99 set qt_qml_dir ${qt_archdata_dir}/qml 100 84 global qt_qml_dir 85 # standard Qt includes directory, under ${prefix}/includes where they would be expected 86 global qt_includes_dir 87 # standard Qt libraries directory 88 global qt_libs_dir 89 # standard Qt libraries directory: OS X frameworks 90 global qt_frameworks_dir 91 # idem, relative to ${prefix} 92 global qt_frameworks_dir_rel 93 # standard Qt non-.app executables directory 94 global qt_bins_dir 101 95 # standard Qt data directory 102 global qt_data_dir 103 set qt_data_dir ${qt_dir} 104 105 # standard Qt documents directory 106 global qt_docs_dir 107 set qt_docs_dir ${qt_data_dir}/doc 108 96 global qt_data_dir 109 97 # standard Qt translations directory 110 global qt_translations_dir 111 set qt_translations_dir ${qt_data_dir}/translations 112 98 global qt_translations_dir 113 99 # standard Qt sysconf directory 114 global qt_sysconf_dir115 set qt_sysconf_dir ${qt_dir}/etc/xdg 116 100 global qt_sysconf_dir 101 # standard Qt .app executables directory, if created 102 global qt_apps_dir 117 103 # standard Qt examples directory 118 global qt_examples_dir 119 set qt_examples_dir ${qt_dir}/examples 120 121 # standard Qt tests directory 122 global qt_tests_dir 123 set qt_tests_dir ${qt_dir}/tests 124 125 # data used by qmake 126 global qt_host_data_dir 127 set qt_host_data_dir ${qt_dir} 128 104 global qt_examples_dir 129 105 # standard Qt demos directory 130 #global qt_demos_dir 131 #set qt_demos_dir ${qt_dir}/share/${qt_name}/demos 132 133 # standard Qt mkspecs directory 134 global qt_mkspecs_dir 135 set qt_mkspecs_dir ${qt_dir}/mkspecs 136 137 # standard Qt .app executables directory, if created? 138 #global qt_apps_dir 139 #set qt_apps_dir ${qt_bins_dir} 140 106 global qt_demos_dir 107 # standard Qt tests directory 108 global qt_tests_dir 141 109 # standard CMake module directory for Qt-related files 142 #global qt_cmake_module_dir 143 #set qt_cmake_module_dir ${qt_libs_dir}/cmake 144 110 global qt_cmake_module_dir 145 111 # standard qmake command location 146 global qt_qmake_cmd 147 set qt_qmake_cmd ${qt_dir}/bin/qmake 148 112 global qt_qmake_cmd 149 113 # standard moc command location 150 global qt_moc_cmd 151 set qt_moc_cmd ${qt_dir}/bin/moc 152 114 global qt_moc_cmd 153 115 # standard uic command location 154 global qt_uic_cmd 155 set qt_uic_cmd ${qt_dir}/bin/uic 156 116 global qt_uic_cmd 157 117 # standard lrelease command location 158 global qt_lrelease_cmd 159 set qt_lrelease_cmd ${qt_dir}/bin/lrelease 118 global qt_lrelease_cmd 160 119 161 # standard PKGCONFIG path 162 global qt_pkg_config_dir 163 set qt_pkg_config_dir ${qt_libs_dir}/pkgconfig 120 set qt_dir ${prefix}/libexec/${qt_name} 121 set qt_dir_rel libexec/${qt_name} 122 set qt_includes_dir ${prefix}/include/${qt_name} 123 set qt_libs_dir ${qt_dir}/lib 124 set qt_frameworks_dir ${qt_dir}/Library/Frameworks 125 set qt_frameworks_dir_rel ${qt_dir_rel}/Library/Frameworks 126 set qt_bins_dir ${qt_dir}/bin 127 set qt_cmake_module_dir ${prefix}/lib/cmake 128 set qt_archdata_dir ${qt_dir} 129 set qt_sysconf_dir ${prefix}/etc/${qt_name} 130 set qt_data_dir ${prefix}/share/${qt_name} 131 set qt_plugins_dir ${prefix}/share/${qt_name}/plugins 132 set qt_mkspecs_dir ${prefix}/share/${qt_name}/mkspecs 133 set qt_imports_dir ${prefix}/share/${qt_name}/imports 134 set qt_qml_dir ${prefix}/share/${qt_name}/qml 135 set qt_translations_dir ${prefix}/share/${qt_name}/translations 136 set qt_tests_dir ${prefix}/share/${qt_name}/tests 137 set qt_docs_dir ${prefix}/share/doc/${qt_name} 138 139 set qt_qmake_cmd ${qt_dir}/bin/qmake 140 set qt_moc_cmd ${qt_dir}/bin/moc 141 set qt_uic_cmd ${qt_dir}/bin/uic 142 set qt_lrelease_cmd ${qt_dir}/bin/lrelease 143 144 set qt_apps_dir ${applications_dir}/Qt5 145 set qt_examples_dir ${qt_apps_dir}/examples 146 set qt_demos_dir ${qt_apps_dir}/demos 164 147 165 # standard qmake spec166 # other platforms required? (see http://doc.qt.io/qt-5/supported-platforms.html and http://doc.qt.io/QtSupportedPlatforms/index.html)167 148 global qt_qmake_spec 168 149 global qt_qmake_spec_32 169 150 global qt_qmake_spec_64 170 compiler.whitelist clang171 151 172 set qt_qmake_spec_32 macx-clang-32 173 set qt_qmake_spec_64 macx-clang 152 PortGroup compiler_blacklist_versions 1.0 153 compiler.whitelist clang macports-clang-3.5 macports-clang-3.4 154 compiler.blacklist-append macports-llvm-gcc-4.2 llvm-gcc-4.2 155 compiler.blacklist-append gcc-4.2 apple-gcc-4.2 gcc-4.0 156 compiler.blacklist-append macports-clang-3.1 macports-clang-3.0 macports-clang-3.2 macports-clang-3.3 157 compiler.blacklist-append {clang < 500} 158 159 160 # set Qt understood arch types, based on user preference 161 options qt_arch_types 162 default qt_arch_types {[string map {i386 x86} [get_canonical_archs]]} 163 164 set qt_qmake_spec_32 macx-clang-32 165 set qt_qmake_spec_64 macx-clang 174 166 175 167 if { ![option universal_variant] || ![variant_isset universal] } { 176 168 if { ${build_arch} eq "i386" } { 177 set qt_qmake_spec ${qt_qmake_spec_32}169 set qt_qmake_spec ${qt_qmake_spec_32} 178 170 } else { 179 set qt_qmake_spec ${qt_qmake_spec_64}171 set qt_qmake_spec ${qt_qmake_spec_64} 180 172 } 181 173 } else { 182 174 set qt_qmake_spec "" 183 175 } 184 176 177 # standard PKGCONFIG path 178 global qt_pkg_config_dir 179 set qt_pkg_config_dir ${prefix}/lib/pkgconfig 180 181 # data used by qmake 182 global qt_host_data_dir 183 set qt_host_data_dir ${prefix}/share/${qt_name} 184 185 185 # standard cmake info for Qt5 186 186 global qt_cmake_defines 187 187 set qt_cmake_defines \ … … 190 190 -DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib \ 191 191 -DQT_PNG_LIBRARY=${prefix}/lib/libpng.dylib" 192 192 193 # set Qt understood arch types, based on user preference 194 options qt_arch_types 195 default qt_arch_types {[string map {i386 x86} [get_canonical_archs]]} 196 197 # allow for depending on either qt5-mac and qt5-mac-devel, simultaneously 193 # allow for depending on either qt5[-mac] or qt5[-mac]-devel or qt5[-mac]*-kde, simultaneously 198 194 199 195 if {![info exists building_qt5]} { 200 196 if {${os.platform} eq "darwin"} { … … 202 198 # see if the framework install exists, and if so depend on it; 203 199 # if not, depend on the library version 204 200 205 if {[file exists ${qt_frameworks_dir}/QtCore /QtCore]} {206 depends_lib-append path: Library/Frameworks/QtCore/QtCore:qt5-mac201 if {[file exists ${qt_frameworks_dir}/QtCore.framework/QtCore]} { 202 depends_lib-append path:libexec/${qt_name}/Library/Frameworks/QtCore.framework/QtCore:qt5-mac 207 203 } else { 208 depends_lib-append path:lib /libQtCore.5.dylib:qt5-mac204 depends_lib-append path:libexec/${qt_name}/lib/libQtCore.5.dylib:qt5-mac 209 205 } 210 206 } 211 207 } … … 223 219 } else { 224 220 set merger_configure_env(i386) "QMAKESPEC=${qt_qmake_spec_32}" 225 221 set merger_configure_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}" 222 set merger_arch_flag yes 223 set merger_arch_compiler yes 226 224 } 227 225 228 226 # make sure the Qt binaries' directory is in the path, if it is … … 246 244 if { ![option universal_variant] || ![variant_isset universal] } { 247 245 build.env-append QMAKESPEC=${qt_qmake_spec} 248 246 } else { 249 set merger_build_env(i386) "QMAKESPEC=${qt_qmake_spec_32}" 250 set merger_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}" 247 set merger_build_env(i386) "QMAKESPEC=${qt_qmake_spec_32}" 248 set merger_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}" 249 set merger_arch_flag yes 250 set merger_arch_compiler yes 251 251 } 252 252 253 253 # make sure the Qt binaries' directory is in the path, if it is 254 254 # not the current prefix 255 255 256 256 if {${qt_dir} ne ${prefix}} { 257 build.env-append PATH=${qt_dir}/bin:$env(PATH)257 build.env-append PATH=${qt_dir}/bin:$env(PATH) 258 258 } 259 259 } 260 260 261 261 # use PKGCONFIG for Qt discovery in configure scripts 262 depends_build-append port:pkgconfig262 depends_build-append port:pkgconfig 263 263 264 264 # standard destroot environment 265 265 if { ![option universal_variant] || ![variant_isset universal] } { … … 282 282 if { ![option universal_variant] || ![variant_isset universal] } { 283 283 build.env-append QMAKESPEC=${qt_qmake_spec} 284 284 } else { 285 set destroot_build_env(i386) "QMAKESPEC=${qt_qmake_spec_32}"286 set destroot_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}"285 set destroot_build_env(i386) "QMAKESPEC=${qt_qmake_spec_32}" 286 set destroot_build_env(x86_64) "QMAKESPEC=${qt_qmake_spec_64}" 287 287 } 288 288 289 289 # make sure the Qt binaries' directory is in the path, if it is … … 293 293 destroot.env-append PATH=${qt_dir}/bin:$env(PATH) 294 294 } 295 295 } 296 297 proc qt_branch {} { 298 global version 299 return [join [lrange [split ${version} .] 0 1] .] 300 }