File indexing completed on 2024-05-05 03:51:25

0001 #!/bin/bash
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 # SPDX-FileCopyrightText: 2020-2022 Volker Krause <vkrause@kde.org>
0004 set -x
0005 
0006 function build-static-qt-module() {
0007     local module=$1
0008     shift
0009     pushd ${HOME}
0010     git clone https://invent.kde.org/qt/qt/$module
0011     cd $module
0012     git checkout kde/5.15
0013     mkdir build
0014     cd build
0015     if [ $module == "qtbase" ]; then
0016         ../configure -prefix ${HOME}/qt-inst $@
0017     else
0018         ${HOME}/qt-inst/bin/qmake .. $@
0019     fi
0020     make -j 4
0021     make install
0022     popd
0023 }
0024 
0025 build-static-qt-module qtbase --release -qpa offscreen -no-pch -no-icu -no-dbus -no-glib -openssl-linked -no-feature-vulkan -no-feature-sql-mysql -no-feature-sql-psql -no-feature-sql-odbc -no-feature-sha3-fast -static -confirm-license -opensource -make libs -make tools
0026 build-static-qt-module qtdeclarative -- -no-feature-qml-debug -no-feature-qml-devtools -no-feature-qml-preview -no-feature-qml-profiler
0027 build-static-qt-module qtsvg
0028 
0029 mkdir build
0030 pushd build
0031 cmake -DSTATIC_BUILD=1 \
0032     -DCMAKE_PREFIX_PATH=${HOME}/qt-inst \
0033     -DMARBLE_NO_WEBKITWIDGETS=TRUE \
0034     -DMARBLE_NO_DBUS=TRUE \
0035     -DBUILD_MARBLE_TOOLS=ON \
0036     -DBUILD_MARBLE_APPS=OFF \
0037     -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \
0038     -DCMAKE_BUILD_TYPE=Release ..
0039 
0040 make -j 4
0041 popd