Skip to content

Commit

Permalink
addpkg(x11/qt6-qttools): 6.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 authored and TomJo2000 committed May 28, 2024
1 parent e51ef33 commit 4193ab3
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
63 changes: 63 additions & 0 deletions x11-packages/qt6-qttools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
TERMUX_PKG_DESCRIPTION="Qt Development Tools (Linguist, Assistant, Designer, etc.)"
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/qttools-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=0953cddf6248f3959279a10904892e8a98eb3e463d729a174b6fc47febd99824
TERMUX_PKG_DEPENDS="libc++, qt6-qtbase, zstd"
TERMUX_PKG_BUILD_DEPENDS="qt6-qtdeclarative"
TERMUX_PKG_RECOMMENDS="qt6-qtdeclarative"
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
# disable clang, can not find libclangBasic.a
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DCMAKE_DISABLE_FIND_PACKAGE_Clang=ON
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS
-DCMAKE_SYSTEM_NAME=Linux
-DINSTALL_PUBLICBINDIR=${TERMUX_PREFIX}/bin
-DQT_HOST_PATH=${TERMUX_PREFIX}/opt/qt6/cross
"

termux_step_host_build() {
termux_setup_cmake
termux_setup_ninja

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

mkdir -p ${TERMUX_PREFIX}/opt/qt6/cross/bin
find "$PWD" -type f -name user_facing_tool_links.txt \
-exec echo "{}" \; \
-exec cat "{}" \; \
-exec sed -e "s|^${TERMUX_PREFIX}/opt/qt6/cross|..|g" -i "{}" \;
cat $PWD/user_facing_tool_links.txt | xargs -P${TERMUX_MAKE_PROCESSES} -L1 ln -sv
}

termux_step_pre_configure() {
termux_setup_cmake
termux_setup_ninja
}

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

termux_step_post_make_install() {
find ${TERMUX_PKG_BUILDDIR} -type f -name user_facing_tool_links.txt \
-exec echo "{}" \; \
-exec cat "{}" \;
}
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 4193ab3

Please sign in to comment.