new package: qt5-qtgraphicaleffects

This commit is contained in:
Tee KOBAYASHI 2022-12-09 03:44:10 +09:00 committed by xtkoba
parent e281d88f65
commit b364900f0c
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,15 @@
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
TERMUX_PKG_DESCRIPTION="Qt Graphical Effects Module"
TERMUX_PKG_LICENSE="LGPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=5.15.7
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/5.15/${TERMUX_PKG_VERSION}/submodules/qtgraphicaleffects-everywhere-opensource-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=97779699e2ea0f0a6c2a79cc6167024d0d863d24e9b0538fbdb281f88c680180
TERMUX_PKG_DEPENDS="libc++, qt5-qtbase, qt5-qtdeclarative"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools, qt5-qtdeclarative-cross-tools"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_configure () {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}

View File

@ -0,0 +1,37 @@
--- a/qtgraphicaleffects.pro
+++ b/qtgraphicaleffects.pro
@@ -1,5 +1,4 @@
requires(qtHaveModule(quick))
-requires(contains(QT_CONFIG, opengl))
qtHaveModule(quick) {
QT_FOR_CONFIG += quick-private
--- a/src/effects/private/qgfxshaderbuilder.cpp
+++ b/src/effects/private/qgfxshaderbuilder.cpp
@@ -65,13 +65,18 @@
// The following code makes the assumption that an OpenGL context the GUI
// thread will get the same capabilities as the render thread's OpenGL
// context. Not 100% accurate, but it works...
+#ifndef QT_NO_OPENGL
QOpenGLContext context;
if (!context.create()) {
+#else
+ if (true) {
+#endif
qDebug() << "failed to acquire GL context to resolve capabilities, using defaults..";
m_maxBlurSamples = 8; // minimum number of varyings in the ES 2.0 spec.
return;
}
+#ifndef QT_NO_OPENGL
QOffscreenSurface surface;
// In very odd cases, we can get incompatible configs here unless we pass the
// GL context's format on to the offscreen format.
@@ -102,6 +107,7 @@
qDebug() << "failed to acquire GL context to resolve capabilities, using defaults..";
m_maxBlurSamples = 8; // minimum number of varyings in the ES 2.0 spec.
}
+#endif
}
/*