qt5-build.eclass: Pass -platform option to configure on FreeBSD and Linux.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Sat, 3 Mar 2018 03:15:19 +0000 (04:15 +0100)
committerMichael Palimaka <kensington@gentoo.org>
Mon, 12 Mar 2018 00:49:53 +0000 (11:49 +1100)
Closes: https://bugs.gentoo.org/649406

eclass/qt5-build.eclass

index 12695141072c83a2939a42f3585322f9144bd6f9..2517d3992dde1edab2e17c2286c59c18fc0ad932 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: qt5-build.eclass
@@ -544,6 +544,24 @@ qt5_base_configure() {
                -examplesdir "${QT5_EXAMPLESDIR}"
                -testsdir "${QT5_TESTSDIR}"
 
+               # force appropriate compiler
+               $(if use kernel_FreeBSD; then
+                       if tc-is-gcc; then
+                               echo -platform freebsd-g++
+                       elif tc-is-clang; then
+                               echo -platform freebsd-clang
+                       fi
+               fi)
+               $(if [[ ${QT5_MINOR_VERSION} -ge 10 ]]; then
+                       if use kernel_linux; then
+                               if tc-is-gcc; then
+                                       echo -platform linux-g++
+                               elif tc-is-clang; then
+                                       echo -platform linux-clang
+                               fi
+                       fi
+               fi)
+
                # configure in release mode by default,
                # override via the CONFIG qmake variable
                -release