From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1AE121382C5 for ; Thu, 25 Jun 2020 07:11:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9A58BE08F5; Thu, 25 Jun 2020 07:11:27 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 74D47E08F5 for ; Thu, 25 Jun 2020 07:11:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D25DA34F17E for ; Thu, 25 Jun 2020 07:11:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1F2B62B3 for ; Thu, 25 Jun 2020 07:11:24 +0000 (UTC) From: "Jason A. Donenfeld" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason A. Donenfeld" Message-ID: <1593069064.24dd58fe4592775fe430ee98d17ecb7825a02ade.zx2c4@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qt-creator/files/, dev-qt/qt-creator/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch dev-qt/qt-creator/qt-creator-9999.ebuild X-VCS-Directories: dev-qt/qt-creator/files/ dev-qt/qt-creator/ X-VCS-Committer: zx2c4 X-VCS-Committer-Name: Jason A. Donenfeld X-VCS-Revision: 24dd58fe4592775fe430ee98d17ecb7825a02ade X-VCS-Branch: master Date: Thu, 25 Jun 2020 07:11:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: deee85a0-895f-4ce5-b575-6cccb025d81f X-Archives-Hash: c84c2a77bd1282f2b9f82c83439b4fe9 commit: 24dd58fe4592775fe430ee98d17ecb7825a02ade Author: Peter Levine gmail com> AuthorDate: Fri May 8 07:11:14 2020 +0000 Commit: Jason A. Donenfeld gentoo org> CommitDate: Thu Jun 25 07:11:04 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24dd58fe dev-qt/qt-creator: Support clang-10 Builds and runs without issue using patch from https://codereview.qt-project.org/c/qt-creator/qt-creator/+/299377 Closes: https://bugs.gentoo.org/720240 Closes: https://bugs.gentoo.org/711788 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Peter Levine gmail.com> Signed-off-by: Jason A. Donenfeld gentoo.org> .../files/qt-creator-4.12.0-dylib-fix.patch | 84 ++++++++++++++++++++++ dev-qt/qt-creator/qt-creator-9999.ebuild | 13 +++- 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch b/dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch new file mode 100644 index 00000000000..0d4deb2c795 --- /dev/null +++ b/dev-qt/qt-creator/files/qt-creator-4.12.0-dylib-fix.patch @@ -0,0 +1,84 @@ +From 1c5faa6dcf16135ee31252d13766d01536a69405 Mon Sep 17 00:00:00 2001 +From: Peter Levine +Date: Tue, 5 May 2020 03:45:35 -0400 +Subject: [PATCH] Fix building against clang configured with + CLANG_LINK_CLANG_DYLIB + +LLVM/Clang upstream only officially supports building shared +components as a single dynamic library (via +LLVM_BUILD_LLVM_DYLIB=ON, CLANG_LINK_CLANG_DYLIB=ON, etc..). +Linux distros like Fedora and Gentoo have followed suit. + +Unfortunately, QT-Creator's src/shared/clang/clang_installation.pri +file assumes clang is built with separate component libraries +and the build fails. + +This change alters the build to check for the existence +of clang component libraries and, if found, link to them, or +otherwise to libclang-cpp. + +Task-number: QTCREATORBUG-23172 +Change-Id: I17df5822d7aeb471227f21f2cf4a71871d6f9b86 +--- + src/shared/clang/clang_installation.pri | 35 +++++++++++++++---------- + 1 file changed, 21 insertions(+), 14 deletions(-) + +diff --git a/src/shared/clang/clang_installation.pri b/src/shared/clang/clang_installation.pri +index 08838838bca..c191c57f1c7 100644 +--- a/src/shared/clang/clang_installation.pri ++++ b/src/shared/clang/clang_installation.pri +@@ -204,19 +204,6 @@ isEmpty(LLVM_VERSION) { + } + } + +- isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) { +- CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h +- exists($$CLANGFORMAT_MAIN_HEADER) { +- CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic +- ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \ +- -lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \ +- -lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \ +- -lclangASTMatchers -lclangAST -lclangLex -lclangBasic +- win32:CLANGFORMAT_LIBS += -lversion +- } +- } +- win32:ALL_CLANG_LIBS += -lversion +- + LIBCLANG_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang-c/Index.h + !exists($$LIBCLANG_MAIN_HEADER) { + $$llvmWarningOrError(\ +@@ -237,10 +224,30 @@ isEmpty(LLVM_VERSION) { + LIBCLANG_LIBS += $${CLANG_LIB} + + isEmpty(QTC_CLANG_BUILDMODE_MISMATCH)|!equals(QTC_CLANG_BUILDMODE_MISMATCH, 1) { ++ CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h ++ exists($$CLANGFORMAT_MAIN_HEADER) { ++ exists($${LLVM_LIBDIR}/libclangFormat.so*)|exists($${LLVM_LIBDIR}/libclangFormat.dylib) { ++ CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic ++ ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \ ++ -lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \ ++ -lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \ ++ -lclangASTMatchers -lclangAST -lclangLex -lclangBasic ++ win32:CLANGFORMAT_LIBS += -lversion ++ win32:ALL_CLANG_LIBS += -lversion ++ } else { ++ CLANGFORMAT_LIBS=-lclang-cpp ++ ALL_CLANG_LIBS=-lclang-cpp ++ } ++ } ++ + QTC_DISABLE_CLANG_REFACTORING=$$(QTC_DISABLE_CLANG_REFACTORING) + isEmpty(QTC_DISABLE_CLANG_REFACTORING) { + !contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): LIBTOOLING_LIBS = -L$${LLVM_LIBDIR} +- LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS ++ exists($${LLVM_LIBDIR}/libclangTooling.so*)|exists($${LLVM_LIBDIR}/libclangTooling.dylib) { ++ LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS ++ } else { ++ LIBTOOLING_LIBS += -lclang-cpp $$LLVM_STATIC_LIBS ++ } + } + } + +-- +2.26.2 + diff --git a/dev-qt/qt-creator/qt-creator-9999.ebuild b/dev-qt/qt-creator/qt-creator-9999.ebuild index bf48a061bde..01f6e2d47c2 100644 --- a/dev-qt/qt-creator/qt-creator-9999.ebuild +++ b/dev-qt/qt-creator/qt-creator-9999.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -LLVM_MAX_SLOT=8 +LLVM_MAX_SLOT=10 PLOCALES="cs da de fr ja pl ru sl uk zh-CN zh-TW" inherit llvm qmake-utils virtualx xdg @@ -64,7 +64,14 @@ CDEPEND=" >=dev-qt/qtwidgets-${QT_PV} >=dev-qt/qtx11extras-${QT_PV} >=dev-qt/qtxml-${QT_PV} - clang? ( sys-devel/clang:8= ) + clang? ( + || ( + sys-devel/clang:10 + sys-devel/clang:9 + sys-devel/clang:8 + ) + =dev-qt/designer-${QT_PV} ) help? ( >=dev-qt/qthelp-${QT_PV} @@ -101,6 +108,8 @@ for x in ${PLOCALES}; do done unset x +PATCHES=( "${FILESDIR}"/${PN}-4.12.0-dylib-fix.patch ) + pkg_setup() { use clang && llvm_pkg_setup }