summaryrefslogtreecommitdiff
path: root/repo/qt5-qtdeclarative
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-06 21:25:48 +0000
committerdavidovski <david@davidovski.xyz>2022-06-06 21:25:48 +0000
commitccc722b7ed330198d82a3cf28ead76d6d107a70a (patch)
tree7611b3cc4f3ca681524fa28b174a0253eb802e0e /repo/qt5-qtdeclarative
parent9ee32689f0b57b9e1de6d22c84ce8e3700b6122b (diff)
added java
Diffstat (limited to 'repo/qt5-qtdeclarative')
-rw-r--r--repo/qt5-qtdeclarative/link-libatomic-on-rv64.patch11
-rw-r--r--repo/qt5-qtdeclarative/qt-musl-stackbottom.patch17
-rw-r--r--repo/qt5-qtdeclarative/qt5-qtdeclarative.xibuild51
3 files changed, 79 insertions, 0 deletions
diff --git a/repo/qt5-qtdeclarative/link-libatomic-on-rv64.patch b/repo/qt5-qtdeclarative/link-libatomic-on-rv64.patch
new file mode 100644
index 0000000..8530522
--- /dev/null
+++ b/repo/qt5-qtdeclarative/link-libatomic-on-rv64.patch
@@ -0,0 +1,11 @@
+--- ./src/qml/qml.pro.orig
++++ ./src/qml/qml.pro
+@@ -12,6 +12,8 @@
+
+ DEFINES += QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES
+
++unix:LIBS += -latomic
++
+ msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x66000000
+ msvc:DEFINES *= _CRT_SECURE_NO_WARNINGS
+ win32:!winrt:LIBS += -lshell32
diff --git a/repo/qt5-qtdeclarative/qt-musl-stackbottom.patch b/repo/qt5-qtdeclarative/qt-musl-stackbottom.patch
new file mode 100644
index 0000000..fdfc192
--- /dev/null
+++ b/repo/qt5-qtdeclarative/qt-musl-stackbottom.patch
@@ -0,0 +1,17 @@
+For musl libc the stackBottom for the main thread is recalculated
+just as it is for Android. See: https://bugreports.qt.io/browse/QTBUG-44268
+
+--- qtdeclarative/src/qml/jsruntime/qv4engine.cpp 2016-02-26 10:34:34.000000000 +0100
++++ qtdeclarative/src/qml/jsruntime/qv4engine.cpp 2016-04-04 21:52:43.780823136 +0200
+@@ -94,6 +94,11 @@
+ #include <valgrind/memcheck.h>
+ #endif
+
++#if defined(Q_OS_LINUX) && !defined(__GLIBC__)
++#include <sys/syscall.h>
++#define gettid() syscall(SYS_gettid)
++#endif
++
+ QT_BEGIN_NAMESPACE
+
+ using namespace QV4;
diff --git a/repo/qt5-qtdeclarative/qt5-qtdeclarative.xibuild b/repo/qt5-qtdeclarative/qt5-qtdeclarative.xibuild
new file mode 100644
index 0000000..135f6c3
--- /dev/null
+++ b/repo/qt5-qtdeclarative/qt5-qtdeclarative.xibuild
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+NAME="qt5-qtdeclarative"
+DESC="Qt5 - QtDeclarative component"
+
+MAKEDEPS=" python qt5-qtbase "
+
+PKG_VER=5.15.3_git20220209
+_commit="29ee9a0e9f02ec74153a2cf09dc63722bc273544"
+SOURCE="https://invent.kde.org/qt/qt/qtdeclarative/-/archive/$_commit/qtdeclarative-$_commit.tar.gz"
+
+ADDITIONAL="
+link-libatomic-on-rv64.patch
+qt-musl-stackbottom.patch
+"
+
+prepare() {
+ apply_patches
+ mkdir .git
+
+ export CFLAGS="$CFLAGS -O2"
+ export CPPFLAGS="$CPPFLAGS -O2"
+ export CXXFLAGS="$CXXFLAGS -O2"
+}
+
+
+build() {
+ # HACK so calls to "python" get what we want
+ ln -s /usr/bin/python3 python
+ export PATH="$(pwd):$PATH"
+
+ qmake-qt5
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make install INSTALL_ROOT="$PKG_DEST"
+
+ mkdir -p "$PKG_DEST"/usr/bin/
+ for i in "$PKG_DEST"/"$_qt5_prefix"/bin/*; do
+ ln -s ../lib/qt5/bin/${i##*/} "$PKG_DEST"/usr/bin/${i##*/}-qt5
+ done
+
+ # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
+ find "$PKG_DEST/usr/lib" -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
+}