commit:     8f9ec592358a2d12a03a4e48fd91047dcd009e1f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 21 19:39:26 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov 21 22:17:13 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f9ec592

app-office/libreoffice: Fix Qt5 moc path detect, drop QT_SELECT

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/libreoffice-7.0.3.1-qt5detect.patch      | 23 ++++++++++++++++++++++
 app-office/libreoffice/libreoffice-7.0.3.1.ebuild  |  7 ++-----
 app-office/libreoffice/libreoffice-7.0.9999.ebuild |  7 ++-----
 app-office/libreoffice/libreoffice-9999.ebuild     |  7 ++-----
 4 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/app-office/libreoffice/files/libreoffice-7.0.3.1-qt5detect.patch 
b/app-office/libreoffice/files/libreoffice-7.0.3.1-qt5detect.patch
new file mode 100644
index 00000000000..cc4e8e41df2
--- /dev/null
+++ b/app-office/libreoffice/files/libreoffice-7.0.3.1-qt5detect.patch
@@ -0,0 +1,23 @@
+Don't let PATH get in the way of proper Qt5 detection.
+It could lead to broken configure due to mismanaged qtchooser config.
+
+--- a/configure.ac     2020-11-21 16:35:58.433794709 +0100
++++ b/configure.ac     2020-11-21 18:02:41.835207197 +0100
+@@ -11819,7 +11819,7 @@
+     qt5_test_library="libQt5Widgets.so"
+ 
+     dnl Check for qmake5
+-    AC_PATH_PROGS( QMAKE5, [qmake-qt5 qmake], no, [$QT5DIR/bin:$PATH])
++    AC_PATH_PROGS( QMAKE5, [qmake-qt5 qmake], no, [$QT5DIR/bin])
+     if test "$QMAKE5" = "no"; then
+         AC_MSG_ERROR([Qmake not found.  Please specify the root of your Qt5 
installation by exporting QT5DIR before running "configure".])
+     else
+@@ -11886,7 +11886,7 @@
+ 
+     dnl Check for Meta Object Compiler
+ 
+-    AC_PATH_PROGS( MOC5, [moc-qt5 moc], no, [`dirname 
$qt5_libdir`/bin:$QT5DIR/bin:$PATH])
++    AC_PATH_PROGS( MOC5, [moc-qt5 moc], no, [$QT5DIR/bin])
+     if test "$MOC5" = "no"; then
+         AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
+ the root of your Qt installation by exporting QT5DIR before running 
"configure".])

diff --git a/app-office/libreoffice/libreoffice-7.0.3.1.ebuild 
b/app-office/libreoffice/libreoffice-7.0.3.1.ebuild
index 7d33a2c844c..695c9c5f0f6 100644
--- a/app-office/libreoffice/libreoffice-7.0.3.1.ebuild
+++ b/app-office/libreoffice/libreoffice-7.0.3.1.ebuild
@@ -291,6 +291,7 @@ PATCHES=(
        # not upstreamable stuff
        "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
        "${FILESDIR}/${PN}-6.1-nomancompress.patch"
+       "${FILESDIR}/${PN}-7.0.3.1-qt5detect.patch"
 
        # 7.0 branch
        "${FILESDIR}/${P}-fix-disable-pdfium-build.patch"
@@ -441,11 +442,7 @@ src_configure() {
        export PYTHON_CFLAGS=$(python_get_CFLAGS)
        export PYTHON_LIBS=$(python_get_LIBS)
 
-       if use kde; then
-               export QT_SELECT=5 # bug 639620 needs proper fix though
-               export QT5DIR="$(qt5_get_bindir)/../"
-               export MOC5="$(qt5_get_bindir)/moc"
-       fi
+       use kde && export QT5DIR="$(qt5_get_bindir)/.."
 
        local gentoo_buildid="Gentoo official package"
        if [[ -n ${LOCOREGIT_VERSION} ]]; then

diff --git a/app-office/libreoffice/libreoffice-7.0.9999.ebuild 
b/app-office/libreoffice/libreoffice-7.0.9999.ebuild
index 5040a3e0391..b10bdb491e5 100644
--- a/app-office/libreoffice/libreoffice-7.0.9999.ebuild
+++ b/app-office/libreoffice/libreoffice-7.0.9999.ebuild
@@ -291,6 +291,7 @@ PATCHES=(
        # not upstreamable stuff
        "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
        "${FILESDIR}/${PN}-6.1-nomancompress.patch"
+       "${FILESDIR}/${PN}-7.0.3.1-qt5detect.patch"
 )
 
 S="${WORKDIR}/${PN}-${MY_PV}"
@@ -437,11 +438,7 @@ src_configure() {
        export PYTHON_CFLAGS=$(python_get_CFLAGS)
        export PYTHON_LIBS=$(python_get_LIBS)
 
-       if use kde; then
-               export QT_SELECT=5 # bug 639620 needs proper fix though
-               export QT5DIR="$(qt5_get_bindir)/../"
-               export MOC5="$(qt5_get_bindir)/moc"
-       fi
+       use kde && export QT5DIR="$(qt5_get_bindir)/.."
 
        local gentoo_buildid="Gentoo official package"
        if [[ -n ${LOCOREGIT_VERSION} ]]; then

diff --git a/app-office/libreoffice/libreoffice-9999.ebuild 
b/app-office/libreoffice/libreoffice-9999.ebuild
index 1b78e99f05f..0bc93233961 100644
--- a/app-office/libreoffice/libreoffice-9999.ebuild
+++ b/app-office/libreoffice/libreoffice-9999.ebuild
@@ -291,6 +291,7 @@ PATCHES=(
        # not upstreamable stuff
        "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
        "${FILESDIR}/${PN}-6.1-nomancompress.patch"
+       "${FILESDIR}/${PN}-7.0.3.1-qt5detect.patch"
 )
 
 S="${WORKDIR}/${PN}-${MY_PV}"
@@ -437,11 +438,7 @@ src_configure() {
        export PYTHON_CFLAGS=$(python_get_CFLAGS)
        export PYTHON_LIBS=$(python_get_LIBS)
 
-       if use kde; then
-               export QT_SELECT=5 # bug 639620 needs proper fix though
-               export QT5DIR="$(qt5_get_bindir)/../"
-               export MOC5="$(qt5_get_bindir)/moc"
-       fi
+       use kde && export QT5DIR="$(qt5_get_bindir)/.."
 
        local gentoo_buildid="Gentoo official package"
        if [[ -n ${LOCOREGIT_VERSION} ]]; then

Reply via email to