Skip to content

Commit

Permalink
addpkg(x11): qt6-shadertools
Browse files Browse the repository at this point in the history
  • Loading branch information
truboxl committed May 25, 2024
1 parent 3fcd4c7 commit 13e74a0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
49 changes: 49 additions & 0 deletions x11-packages/qt6-shadertools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
TERMUX_PKG_DESCRIPTION="Qt6 Shader Tools"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="6.7.1"
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/${TERMUX_PKG_VERSION%.*}/${TERMUX_PKG_VERSION}/submodules/qtshadertools-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=e585e3a985b2e2bad8191a84489a04e69c3defc6022a8e746aad22a1f17910c2
TERMUX_PKG_DEPENDS="libc++, qt6-qtbase"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS
-DCMAKE_SYSTEM_NAME=Linux
"

termux_step_host_build() {
termux_setup_cmake
termux_setup_ninja

cmake \
-G Ninja \
-S ${TERMUX_PKG_SRCDIR} \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=${TERMUX_PREFIX}/opt/qt6/cross \
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS
ninja \
-j ${TERMUX_MAKE_PROCESSES} \
install
}

termux_step_pre_configure() {
termux_setup_cmake
termux_setup_ninja
}

termux_step_make_install() {
cmake \
--install "${TERMUX_PKG_BUILDDIR}" \
--prefix "${TERMUX_PREFIX}" \
--verbose

# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "${TERMUX_PREFIX}/lib" -type f -name "libQt6ShaderTools*.prl" \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;

# Remove *.la files
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TERMUX_SUBPKG_DESCRIPTION="Tools for cross build on the host (NOT for Termux)"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
TERMUX_SUBPKG_INCLUDE="
opt/qt6/cross
"

0 comments on commit 13e74a0

Please sign in to comment.