Skip to content

Commit

Permalink
Disable features of Qt Declarative that are not used under Android
Browse files Browse the repository at this point in the history
Especially the additional Qt Quick Controls 2 styles make the APK
significantly bigger and one cannot just leave those libraries out
at the time of deployment.
  • Loading branch information
Martchus committed Jan 19, 2025
1 parent 53e8401 commit c015663
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 9 deletions.
12 changes: 10 additions & 2 deletions qt6-declarative/android-aarch64/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _android_arch=aarch64
pkgname=android-$_android_arch-qt6-declarative
_qtver=6.8.1
pkgver=${_qtver/-/}
pkgrel=1
pkgrel=2
arch=(any)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
Expand Down Expand Up @@ -47,7 +47,15 @@ build() {
-DANDROID_SDK_ROOT=${ANDROID_HOME} \
-DANDROID_NDK_ROOT=${ANDROID_NDK_HOME} \
-DANDROID_STL="c++_shared" \
-DFEATURE_pkg_config=ON
-DFEATURE_pkg_config=ON \
-DFEATURE_quickcontrols2_quick_designer=OFF \
-DFEATURE_quickcontrols2_fusion=OFF \
-DFEATURE_quickcontrols2_imagine=OFF \
-DFEATURE_quickcontrols2_universal=OFF \
-DFEATURE_quickcontrols2_fluentwinui3=OFF \
-DFEATURE_quickcontrols2_macos=OFF \
-DFEATURE_quickcontrols2_ios=OFF \
-DFEATURE_quickcontrols2_windows=OFF
cmake --build build-$_android_arch
}

Expand Down
14 changes: 13 additions & 1 deletion qt6-declarative/android-aarch64/PKGBUILD.sh.ep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
\
_qtver=6.8.1
pkgver=${_qtver/-/}
pkgrel=1
pkgrel=2
arch=(any)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
Expand All @@ -13,3 +13,15 @@ optdepends=('qt6-declarative: development tools')
conflicts=(<%== qt6deps qw(quickcontrols2) %>)
provides=(<%== qt6deps qw(quickcontrols2) %>)
replaces=(<%== qt6deps qw(quickcontrols2) %>)
% \
% content_for additional_cmake_args => begin
\\
-DFEATURE_quickcontrols2_quick_designer=OFF \\
-DFEATURE_quickcontrols2_fusion=OFF \\
-DFEATURE_quickcontrols2_imagine=OFF \\
-DFEATURE_quickcontrols2_universal=OFF \\
-DFEATURE_quickcontrols2_fluentwinui3=OFF \\
-DFEATURE_quickcontrols2_macos=OFF \\
-DFEATURE_quickcontrols2_ios=OFF \\
-DFEATURE_quickcontrols2_windows=OFF\
% end
12 changes: 10 additions & 2 deletions qt6-declarative/android-armv7a-eabi/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _android_arch=armv7a-eabi
pkgname=android-$_android_arch-qt6-declarative
_qtver=6.8.1
pkgver=${_qtver/-/}
pkgrel=1
pkgrel=2
arch=(any)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
Expand Down Expand Up @@ -47,7 +47,15 @@ build() {
-DANDROID_SDK_ROOT=${ANDROID_HOME} \
-DANDROID_NDK_ROOT=${ANDROID_NDK_HOME} \
-DANDROID_STL="c++_shared" \
-DFEATURE_pkg_config=ON
-DFEATURE_pkg_config=ON \
-DFEATURE_quickcontrols2_quick_designer=OFF \
-DFEATURE_quickcontrols2_fusion=OFF \
-DFEATURE_quickcontrols2_imagine=OFF \
-DFEATURE_quickcontrols2_universal=OFF \
-DFEATURE_quickcontrols2_fluentwinui3=OFF \
-DFEATURE_quickcontrols2_macos=OFF \
-DFEATURE_quickcontrols2_ios=OFF \
-DFEATURE_quickcontrols2_windows=OFF
cmake --build build-$_android_arch
}

Expand Down
12 changes: 10 additions & 2 deletions qt6-declarative/android-x86-64/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _android_arch=x86-64
pkgname=android-$_android_arch-qt6-declarative
_qtver=6.8.1
pkgver=${_qtver/-/}
pkgrel=1
pkgrel=2
arch=(any)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
Expand Down Expand Up @@ -47,7 +47,15 @@ build() {
-DANDROID_SDK_ROOT=${ANDROID_HOME} \
-DANDROID_NDK_ROOT=${ANDROID_NDK_HOME} \
-DANDROID_STL="c++_shared" \
-DFEATURE_pkg_config=ON
-DFEATURE_pkg_config=ON \
-DFEATURE_quickcontrols2_quick_designer=OFF \
-DFEATURE_quickcontrols2_fusion=OFF \
-DFEATURE_quickcontrols2_imagine=OFF \
-DFEATURE_quickcontrols2_universal=OFF \
-DFEATURE_quickcontrols2_fluentwinui3=OFF \
-DFEATURE_quickcontrols2_macos=OFF \
-DFEATURE_quickcontrols2_ios=OFF \
-DFEATURE_quickcontrols2_windows=OFF
cmake --build build-$_android_arch
}

Expand Down
12 changes: 10 additions & 2 deletions qt6-declarative/android-x86/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _android_arch=x86
pkgname=android-$_android_arch-qt6-declarative
_qtver=6.8.1
pkgver=${_qtver/-/}
pkgrel=1
pkgrel=2
arch=(any)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
Expand Down Expand Up @@ -47,7 +47,15 @@ build() {
-DANDROID_SDK_ROOT=${ANDROID_HOME} \
-DANDROID_NDK_ROOT=${ANDROID_NDK_HOME} \
-DANDROID_STL="c++_shared" \
-DFEATURE_pkg_config=ON
-DFEATURE_pkg_config=ON \
-DFEATURE_quickcontrols2_quick_designer=OFF \
-DFEATURE_quickcontrols2_fusion=OFF \
-DFEATURE_quickcontrols2_imagine=OFF \
-DFEATURE_quickcontrols2_universal=OFF \
-DFEATURE_quickcontrols2_fluentwinui3=OFF \
-DFEATURE_quickcontrols2_macos=OFF \
-DFEATURE_quickcontrols2_ios=OFF \
-DFEATURE_quickcontrols2_windows=OFF
cmake --build build-$_android_arch
}

Expand Down

0 comments on commit c015663

Please sign in to comment.