enable package: qt-creator

This commit is contained in:
Leonid Pliushch 2021-10-26 21:34:39 +00:00 committed by Yaksh Bariya
parent 4a620712c6
commit 1ddac61893
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
9 changed files with 264 additions and 0 deletions

View File

@ -0,0 +1,22 @@
excinfo.h is not available on Termux environment
Add an extra macro check for __ANDROID__ so it's excluded
--- src/src/plugins/debugger/shared/backtrace.cpp 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/src/plugins/debugger/shared/backtrace.cpp 2021-05-24 10:38:54.023502983 +0000
@@ -27,7 +27,7 @@
#include <QDebug>
#include <QProcess>
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) && !defined(__ANDROID__)
#include <stdio.h>
#include <signal.h>
#include <execinfo.h>
@@ -40,7 +40,7 @@
{
if (maxdepth == -1)
maxdepth = 200;
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) && !defined(__ANDROID__)
void *bt[200] = {nullptr};
qDebug() << "BACKTRACE:";
int size = backtrace(bt, sizeof(bt) / sizeof(bt[0]));

View File

@ -0,0 +1,41 @@
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
TERMUX_PKG_DESCRIPTION="Integrated Development Environment for Qt"
TERMUX_PKG_LICENSE="LGPL-3.0"
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
TERMUX_PKG_VERSION=4.12.4
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL="https://github.com/qt-creator/qt-creator/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=2469a19ee230eb600467e614c23ed678b1b414adc16efdedcfc0404bf40d8015
TERMUX_PKG_DEPENDS="qt5-qtbase, qt5-qtdeclarative, qt5-qtxmlpatterns, qt5-qttools, qt5-qtx11extras, qt5-qtsvg, llvm, clang"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools, qt5-qtdeclarative-cross-tools, qt5-qttools-cross-tools"
TERMUX_PKG_RECOMMENDS="gdb, git, make, cmake, valgrind"
TERMUX_PKG_SUGGESTS="cvs, subversion"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
termux_step_configure () {
# -r to force Makefile generations for all subdirs at this step so process_stub can be patched
# Disable QML Designer plugin which requires OpenGL
# Disable clang refactoring plugin which has odd linking issues at the moment
export QTC_DO_NOT_BUILD_QMLDESIGNER=1
export QTC_DISABLE_CLANG_REFACTORING=1
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" -r \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}
termux_step_post_configure() {
# process_stub's Makefile has the incorrect LINK executable (it should've been QMAKE_CXX)
sed -i "s|^LINK = clang|LINK = ${CXX}|" \
${TERMUX_PKG_SRCDIR}/src/libs/utils/Makefile.process_stub
# clangbackend's Makefile lacks -lc++_shared to link against libc++ on x86_64
sed -i 's|^LIBS = $(SUBLIBS)|LIBS = $(SUBLIBS) -lc++_shared|' \
${TERMUX_PKG_SRCDIR}/src/tools/clangbackend/Makefile
# make sure clangtools link against libc++_shared on x86_64
sed -i 's|^LIBS = $(SUBLIBS)|LIBS = $(SUBLIBS) -lc++_shared|' \
${TERMUX_PKG_SRCDIR}/src/plugins/clangtools//Makefile
# required by make install, otherwise it installs to '/'
export INSTALL_ROOT="${TERMUX_PREFIX}"
}

View File

@ -0,0 +1,11 @@
--- src/src/tools/clangpchmanagerbackend/source/generatepchactionfactory.h 2020-07-07 06:44:20.000000000 +0000
+++ src.mod//src/tools/clangpchmanagerbackend/source/generatepchactionfactory.h 2021-05-24 12:46:08.430407000 +0000
@@ -44,7 +44,7 @@
bool BeginInvocation(clang::CompilerInstance &compilerInstance) override
{
- compilerInstance.getPreprocessorOpts().DisablePCHValidation = true;
+ // compilerInstance.getPreprocessorOpts().DisablePCHValidation = true;
compilerInstance.getPreprocessorOpts().AllowPCHWithCompilerErrors = true;
compilerInstance.getDiagnosticOpts().ErrorLimit = 0;
compilerInstance.getFrontendOpts().SkipFunctionBodies = true;

View File

@ -0,0 +1,44 @@
--- src/src/plugins/plugins.pro 2021-05-24 18:00:34.384117000 +0000
+++ src.mod/src/plugins/plugins.pro 2021-05-24 18:01:03.292691000 +0000
@@ -16,7 +16,6 @@
bookmarks \
projectexplorer \
vcsbase \
- perforce \
subversion \
git \
cvs \
@@ -35,9 +34,6 @@
qmlprojectmanager \
glsleditor \
python \
- nim \
- mercurial \
- bazaar \
classview \
tasklist \
qmljstools \
@@ -46,13 +42,8 @@
android \
valgrind \
todo \
- qnx \
- clearcase \
- baremetal \
- ios \
beautifier \
modeleditor \
- winrt \
updateinfo \
scxmleditor \
welcome \
@@ -61,9 +52,6 @@
cppcheck \
compilationdatabaseprojectmanager \
qmlpreview \
- studiowelcome \
- webassembly \
- mcusupport \
marketplace
qtHaveModule(serialport) {

View File

@ -0,0 +1,18 @@
Host bin should be used instead of the target bin (QT_INSTALL_BINS)
--- src/share/qtcreator/translations/translations.pro 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/share/qtcreator/translations/translations.pro 2021-05-24 13:16:43.593579000 +0000
@@ -12,10 +12,10 @@
return($$result)
}
-XMLPATTERNS = $$shell_path($$[QT_INSTALL_BINS]/xmlpatterns)
-LUPDATE = $$shell_path($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort
-LRELEASE = $$shell_path($$[QT_INSTALL_BINS]/lrelease)
-LCONVERT = $$shell_path($$[QT_INSTALL_BINS]/lconvert)
+XMLPATTERNS = $$shell_path($$[QT_HOST_BINS]/xmlpatterns)
+LUPDATE = $$shell_path($$[QT_HOST_BINS]/lupdate) -locations relative -no-ui-lines -no-sort
+LRELEASE = $$shell_path($$[QT_HOST_BINS]/lrelease)
+LCONVERT = $$shell_path($$[QT_HOST_BINS]/lconvert)
wd = $$replace(IDE_SOURCE_TREE, /, $$QMAKE_DIR_SEP)

View File

@ -0,0 +1,14 @@
Android or not, let Qt consider it compatible as long as other criteria met
--- src/src/plugins/projectexplorer/abi.cpp 2021-05-24 17:41:06.487058000 +0000
+++ src.mod/src/plugins/projectexplorer/abi.cpp 2021-05-24 17:44:21.724678000 +0000
@@ -654,10 +654,6 @@
isCompat = true;
}
- // Make Android matching more strict than the generic Linux matches so far:
- if (isCompat && (osFlavor() == AndroidLinuxFlavor || other.osFlavor() == AndroidLinuxFlavor))
- isCompat = (architecture() == other.architecture()) && (osFlavor() == other.osFlavor());
-
if (!isCompat && wordWidth() == other.wordWidth()
&& compatibleMSVCFlavors(osFlavor(), other.osFlavor())) {
isCompat = true;

View File

@ -0,0 +1,36 @@
--- src/src/shared/qtsingleapplication/qtsingleapplication.cpp 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/src/shared/qtsingleapplication/qtsingleapplication.cpp 2021-05-24 10:25:32.415055562 +0000
@@ -53,6 +53,10 @@
{
this->appId = appId;
+#ifdef QT_NO_SHAREDMEMORY
+ instances = 0;
+ return;
+#else
const QString appSessionId = QtLocalPeer::appSessionId(appId);
// This shared memory holds a zero-terminated array of active (or crashed) instances
@@ -94,12 +98,14 @@
connect(pidPeer, &QtLocalPeer::messageReceived, this, &QtSingleApplication::messageReceived);
pidPeer->isClient();
lockfile.unlock();
+#endif
}
QtSingleApplication::~QtSingleApplication()
{
if (!instances)
return;
+#ifndef QT_NO_SHAREDMEMORY
const qint64 appPid = QCoreApplication::applicationPid();
QtLockedFile lockfile(instancesLockFilename(QtLocalPeer::appSessionId(appId)));
lockfile.open(QtLockedFile::ReadWrite);
@@ -113,6 +119,7 @@
}
*newpids = 0;
lockfile.unlock();
+#endif
}
bool QtSingleApplication::event(QEvent *event)

View File

@ -0,0 +1,49 @@
Make sure RPATH is enabled regardless of the OS detection.
--- src/src/rpath.pri 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/src/rpath.pri 2021-05-24 14:00:48.228091000 +0000
@@ -8,7 +8,7 @@
macos {
QMAKE_LFLAGS += -Wl,-rpath,@loader_path/$$REL_PATH_TO_LIBS,-rpath,@loader_path/$$REL_PATH_TO_PLUGINS
-} else:linux-* {
+} else {
QMAKE_RPATHDIR += \$\$ORIGIN
QMAKE_RPATHDIR += \$\$ORIGIN/$$REL_PATH_TO_LIBS
QMAKE_RPATHDIR += \$\$ORIGIN/$$REL_PATH_TO_PLUGINS
--- src/src/qtcreatorplugin.pri 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/src/qtcreatorplugin.pri 2021-05-24 14:01:30.264902000 +0000
@@ -96,7 +96,7 @@
TEMPLATE = lib
CONFIG += plugin plugin_with_soname
-linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
target.path = $$INSTALL_PLUGIN_PATH
INSTALLS += target
--- src/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro 2021-05-24 14:02:28.788142000 +0000
@@ -13,17 +13,13 @@
IDE_LIBRARY_BASENAME = lib
}
-linux-*||win32 {
- # form abs path to qtcreator lib dir
- QTC_LIBS=$$dirname(OUT_PWD)
- QTC_LIBS=$$dirname(QTC_LIBS)
- QTC_LIBS=$$dirname(QTC_LIBS)
- QTC_LIBS=$$QTC_LIBS/$$IDE_LIBRARY_BASENAME/qtcreator
-}
+# form abs path to qtcreator lib dir
+QTC_LIBS=$$dirname(OUT_PWD)
+QTC_LIBS=$$dirname(QTC_LIBS)
+QTC_LIBS=$$dirname(QTC_LIBS)
+QTC_LIBS=$$QTC_LIBS/$$IDE_LIBRARY_BASENAME/qtcreator
-linux-*{
- QMAKE_RPATHDIR *= $$QTC_LIBS
-}
+QMAKE_RPATHDIR *= $$QTC_LIBS
INCLUDEPATH += ../../../src/libs
macx {

View File

@ -0,0 +1,29 @@
--- src/src/plugins/plugins.pro 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/src/plugins/plugins.pro 2021-05-24 11:08:50.489277117 +0000
@@ -72,12 +72,6 @@
warning("SerialTerminal plugin has been disabled since the Qt SerialPort module is not available.")
}
-qtHaveModule(quick) {
- SUBDIRS += qmlprofiler perfprofiler ctfvisualizer
-} else {
- warning("QmlProfiler, PerfProfiler and CTF Visualizer plugins have been disabled since the Qt Quick module is not available.")
-}
-
qtHaveModule(help) {
SUBDIRS += help
} else {
--- src/src/libs/libs.pro 2020-07-07 06:44:20.000000000 +0000
+++ src.mod/src/libs/libs.pro 2021-05-24 10:03:26.192640937 +0000
@@ -18,11 +18,6 @@
languageserverprotocol \
sqlite
-qtHaveModule(quick) {
- SUBDIRS += \
- tracing
-}
-
QTC_DO_NOT_BUILD_QMLDESIGNER = $$(QTC_DO_NOT_BUILD_QMLDESIGNER)
isEmpty(QTC_DO_NOT_BUILD_QMLDESIGNER):qtHaveModule(quick-private) {
exists($$[QT_INSTALL_QML]/QtQuick/Controls/qmldir) {