mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-11 04:10:52 +00:00
addpkg(x11/qt-creator): 18.0.0
- Reverts https://github.com/termux/termux-packages/pull/27289 - The software changed completely since the older version, so it is necessary to delete all the old patches and make new ones.
This commit is contained in:
34
x11-packages/qt-creator/build.sh
Normal file
34
x11-packages/qt-creator/build.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
|
||||
TERMUX_PKG_DESCRIPTION="Integrated Development Environment for Qt"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0-only"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="18.0.0"
|
||||
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qtcreator/${TERMUX_PKG_VERSION%.*}/${TERMUX_PKG_VERSION}/qt-creator-opensource-src-${TERMUX_PKG_VERSION}.tar.gz"
|
||||
TERMUX_PKG_SHA256=6c8bcbd2f33aa6851f265ab22fc8bee7fc4cfcb3cc1d0db73978c7afe9272eb3
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_DEPENDS="clang, glib, libandroid-execinfo, libarchive, libelf, libllvm, libsecret, opengl, python, qt6-qtbase, qt6-qtcharts, qt6-qtdeclarative, qt6-qttools, qt6-qtsvg, libyaml-cpp, zstd"
|
||||
TERMUX_PKG_BUILD_DEPENDS="libllvm-static, qt6-qtbase-cross-tools, qt6-qtcharts-cross-tools, qt6-qtdeclarative-cross-tools, qt6-qttools-cross-tools, qt6-qtsvg-cross-tools"
|
||||
TERMUX_PKG_RECOMMENDS="gdb, git, make, cmake, mlocate"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_NO_STATICSPLIT=true
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_INSTALL_LIBDIR=lib
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=include
|
||||
-DBUILD_WITH_PCH=OFF
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
termux_setup_golang
|
||||
|
||||
LDFLAGS+=" -landroid-execinfo"
|
||||
|
||||
# add the directories of all .so files found in the package
|
||||
# to the library run paths of all executables in the package
|
||||
# the 'qtcreator.sh' script sets LD_LIBRARY_PATH automatically so does not
|
||||
# seem to need this, but setting these makes the 'qtcreator' binary
|
||||
# possible to launch directly without errors.
|
||||
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib/qtcreator"
|
||||
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib/qtcreator/plugins"
|
||||
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib/qtcreator/plugins/qmldesigner"
|
||||
}
|
||||
13
x11-packages/qt-creator/no-malloc_trim.patch
Normal file
13
x11-packages/qt-creator/no-malloc_trim.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp
|
||||
index e1416f31..235e6d27 100644
|
||||
--- a/src/plugins/coreplugin/icore.cpp
|
||||
+++ b/src/plugins/coreplugin/icore.cpp
|
||||
@@ -1494,7 +1494,7 @@ void ICorePrivate::init()
|
||||
using namespace std::chrono_literals;
|
||||
m_trimTimer.setInterval(60s);
|
||||
// glibc may not actually free memory in free().
|
||||
-#ifdef Q_OS_LINUX
|
||||
+#if defined(Q_OS_LINUX) && !defined(__ANDROID__)
|
||||
connect(&m_trimTimer, &QTimer::timeout, this, [] { malloc_trim(0); });
|
||||
#endif
|
||||
}
|
||||
11
x11-packages/qt-creator/no-pthread_getname_np.patch
Normal file
11
x11-packages/qt-creator/no-pthread_getname_np.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/src/libs/nanotrace/nanotracehr.cpp
|
||||
+++ b/src/libs/nanotrace/nanotracehr.cpp
|
||||
@@ -104,7 +104,7 @@ std::string getThreadName()
|
||||
{
|
||||
std::array<char, 200> buffer;
|
||||
buffer[0] = 0;
|
||||
-#ifdef Q_OS_UNIX
|
||||
+#if (defined(Q_OS_UNIX) && !defined(__ANDROID__)) || (defined(__ANDROID__) && __ANDROID_API__ >= 26)
|
||||
auto rc = pthread_getname_np(pthread_self(), buffer.data(), buffer.size());
|
||||
if (rc != 0)
|
||||
return {};
|
||||
13
x11-packages/qt-creator/no-utmpxname.patch
Normal file
13
x11-packages/qt-creator/no-utmpxname.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/libs/3rdparty/libptyqt/unixptyprocess.cpp b/src/libs/3rdparty/libptyqt/unixptyprocess.cpp
|
||||
index d76349a4..85cfd3f9 100644
|
||||
--- a/src/libs/3rdparty/libptyqt/unixptyprocess.cpp
|
||||
+++ b/src/libs/3rdparty/libptyqt/unixptyprocess.cpp
|
||||
@@ -323,7 +323,7 @@ void ShellProcess::configChildProcess()
|
||||
ioctl(m_handleSlave, TIOCSCTTY, 0);
|
||||
tcsetpgrp(m_handleSlave, sid);
|
||||
|
||||
-#if !defined(Q_OS_ANDROID) && !defined(Q_OS_FREEBSD)
|
||||
+#if !defined(Q_OS_ANDROID) && !defined(Q_OS_FREEBSD) && !defined(__ANDROID__)
|
||||
// on Android imposible to put record to the 'utmp' file
|
||||
struct utmpx utmpxInfo;
|
||||
memset(&utmpxInfo, 0, sizeof(utmpxInfo));
|
||||
70
x11-packages/qt-creator/shm_open.patch
Normal file
70
x11-packages/qt-creator/shm_open.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
diff --git a/src/libs/qmlpuppetcommunication/container/sharedmemory_unix.cpp b/src/libs/qmlpuppetcommunication/container/sharedmemory_unix.cpp
|
||||
index 76b93a3c..ebdf3917 100644
|
||||
--- a/src/libs/qmlpuppetcommunication/container/sharedmemory_unix.cpp
|
||||
+++ b/src/libs/qmlpuppetcommunication/container/sharedmemory_unix.cpp
|
||||
@@ -23,6 +23,65 @@
|
||||
|
||||
#include <private/qcore_unix_p.h>
|
||||
|
||||
+static int shm_unlink(const char *name) {
|
||||
+ size_t namelen;
|
||||
+ char *fname;
|
||||
+
|
||||
+ /* Construct the filename. */
|
||||
+ while (name[0] == '/') ++name;
|
||||
+
|
||||
+ if (name[0] == '\0') {
|
||||
+ /* The name "/" is not supported. */
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ namelen = strlen(name);
|
||||
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
|
||||
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
|
||||
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
|
||||
+
|
||||
+ return unlink(fname);
|
||||
+}
|
||||
+
|
||||
+static int shm_open(const char *name, int oflag, mode_t mode) {
|
||||
+ size_t namelen;
|
||||
+ char *fname;
|
||||
+ int fd;
|
||||
+
|
||||
+ /* Construct the filename. */
|
||||
+ while (name[0] == '/') ++name;
|
||||
+
|
||||
+ if (name[0] == '\0') {
|
||||
+ /* The name "/" is not supported. */
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ namelen = strlen(name);
|
||||
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
|
||||
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
|
||||
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
|
||||
+
|
||||
+ fd = open(fname, oflag, mode);
|
||||
+ if (fd != -1) {
|
||||
+ /* We got a descriptor. Now set the FD_CLOEXEC bit. */
|
||||
+ int flags = fcntl(fd, F_GETFD, 0);
|
||||
+ flags |= FD_CLOEXEC;
|
||||
+ flags = fcntl(fd, F_SETFD, flags);
|
||||
+
|
||||
+ if (flags == -1) {
|
||||
+ /* Something went wrong. We cannot return the descriptor. */
|
||||
+ int save_errno = errno;
|
||||
+ close(fd);
|
||||
+ fd = -1;
|
||||
+ errno = save_errno;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
namespace QmlDesigner {
|
||||
|
||||
class SharedMemoryLocker
|
||||
Reference in New Issue
Block a user