aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.qt.mk
diff options
context:
space:
mode:
authorrakuco <rakuco@FreeBSD.org>2018-01-07 23:03:08 +0800
committerrakuco <rakuco@FreeBSD.org>2018-01-07 23:03:08 +0800
commitbc76cbfa7530569f4089be526afdc7e964df67d8 (patch)
tree80ac575fee9029327d2f4724ab275a63514b8c44 /Mk/bsd.qt.mk
parent2aa375571a8444a563aad3b6a47aa0259b68b550 (diff)
downloadfreebsd-ports-gnome-bc76cbfa7530569f4089be526afdc7e964df67d8.tar.gz
freebsd-ports-gnome-bc76cbfa7530569f4089be526afdc7e964df67d8.tar.zst
freebsd-ports-gnome-bc76cbfa7530569f4089be526afdc7e964df67d8.zip
Correctly pass -platform to qtbase's configure script when CXX is an absolute path.
With the update to Qt 5.9.3, the configure script and qmake expect an mkspec name, not an absolute path, which is why r458293 switched to using ${QMAKESPEC:T}. However, the :T modifier breaks things when CXX is set to an absolute path instead of just "c++", QMAKE_COMPILER is a shell string that will be evaluated only after make invokes `configure' with CONFIGURE_ARGS. In other words, we end up turning something like $$(ccver="$$(/usr/bin/c++ --version)"; case "$$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac) into /c++ --version)"; case "$$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac) which is obviously invalid. We now just avoid being too smart and set a separate variable called QMAKESPECNAME, which contains only the mkspec name and that we use both when setting CONFIGURE_ARGS as well as to create QMAKESPEC. PR: 224971
Diffstat (limited to 'Mk/bsd.qt.mk')
-rw-r--r--Mk/bsd.qt.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mk/bsd.qt.mk b/Mk/bsd.qt.mk
index 85d11ac85694..658c8beb04b2 100644
--- a/Mk/bsd.qt.mk
+++ b/Mk/bsd.qt.mk
@@ -135,7 +135,7 @@ CONFIGURE_ARGS+=-fast \
-demosdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/demos
. else
CONFIGURE_ARGS+=-nomake examples -nomake tests \
- -platform ${QMAKESPEC:T} \
+ -platform ${QMAKESPECNAME} \
-archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \
-libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \
-qmldir ${PREFIX}/${QT_QMLDIR_REL} \
@@ -261,7 +261,8 @@ UIC?= ${QT_BINDIR}/uic
QMAKE?= ${QT_BINDIR}/qmake
# Needed to redefine the qmake target for internal Qt configuration.
_QMAKE?= ${QMAKE}
-QMAKESPEC?= ${QT_MKSPECDIR}/freebsd-${QMAKE_COMPILER}
+QMAKESPECNAME?= freebsd-${QMAKE_COMPILER}
+QMAKESPEC?= ${QT_MKSPECDIR}/${QMAKESPECNAME}
# The whole Qt distribution should be built with the same compiler, but it's
# better to support custom settings. Dereferencing the detection allows to