File indexing completed on 2024-06-02 04:19:45
0001 #!/bin/bash 0002 0003 # Script to build extra libraries using Linux host. 0004 # This script must be run as sudo 0005 # 0006 # SPDX-FileCopyrightText: 2015-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0007 # 0008 # SPDX-License-Identifier: BSD-3-Clause 0009 # 0010 0011 # Halt and catch errors 0012 set -eE 0013 trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG 0014 trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR 0015 0016 ################################################################################################# 0017 # Manage script traces to log file 0018 0019 mkdir -p ./logs 0020 exec > >(tee ./logs/build-extralibs.full.log) 2>&1 0021 0022 ################################################################################################# 0023 0024 echo "02-build-extralibs.sh : build extra libraries." 0025 echo "----------------------------------------------" 0026 0027 ################################################################################################# 0028 # Pre-processing checks 0029 0030 . ./common.sh 0031 . ./config.sh 0032 ChecksRunAsRoot 0033 StartScript 0034 ChecksCPUCores 0035 HostAdjustments 0036 RegisterRemoteServers 0037 0038 ORIG_WD="`pwd`" 0039 0040 ################################################################################################# 0041 0042 cd $BUILDING_DIR 0043 0044 rm -rf $BUILDING_DIR/* || true 0045 0046 cmake $ORIG_WD/../3rdparty \ 0047 -DCMAKE_INSTALL_PREFIX:PATH=/usr \ 0048 -DINSTALL_ROOT=/usr \ 0049 -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR \ 0050 -DEXTERNALS_BUILD_DIR=$BUILDING_DIR \ 0051 -DKA_VERSION=$DK_KA_VERSION \ 0052 -DKP_VERSION=$DK_KP_VERSION \ 0053 -DKDE_VERSION=$DK_KDE_VERSION \ 0054 -DENABLE_QTVERSION=$DK_QTVERSION \ 0055 -DENABLE_QTWEBENGINE=$DK_QTWEBENGINE 0056 0057 # NOTE: The order to compile each component here is very important. 0058 0059 # core KF5 frameworks dependencies 0060 cmake --build . --config RelWithDebInfo --target ext_extra-cmake-modules -- -j$CPU_CORES 0061 cmake --build . --config RelWithDebInfo --target ext_kconfig -- -j$CPU_CORES 0062 cmake --build . --config RelWithDebInfo --target ext_breeze-icons -- -j$CPU_CORES 0063 cmake --build . --config RelWithDebInfo --target ext_kcoreaddons -- -j$CPU_CORES 0064 cmake --build . --config RelWithDebInfo --target ext_kwindowsystem -- -j$CPU_CORES 0065 cmake --build . --config RelWithDebInfo --target ext_solid -- -j$CPU_CORES 0066 cmake --build . --config RelWithDebInfo --target ext_threadweaver -- -j$CPU_CORES 0067 cmake --build . --config RelWithDebInfo --target ext_karchive -- -j$CPU_CORES 0068 cmake --build . --config RelWithDebInfo --target ext_kdbusaddons -- -j$CPU_CORES 0069 cmake --build . --config RelWithDebInfo --target ext_ki18n -- -j$CPU_CORES 0070 cmake --build . --config RelWithDebInfo --target ext_kcrash -- -j$CPU_CORES 0071 cmake --build . --config RelWithDebInfo --target ext_kcodecs -- -j$CPU_CORES 0072 cmake --build . --config RelWithDebInfo --target ext_kauth -- -j$CPU_CORES 0073 cmake --build . --config RelWithDebInfo --target ext_kguiaddons -- -j$CPU_CORES 0074 cmake --build . --config RelWithDebInfo --target ext_kwidgetsaddons -- -j$CPU_CORES 0075 cmake --build . --config RelWithDebInfo --target ext_kitemviews -- -j$CPU_CORES 0076 cmake --build . --config RelWithDebInfo --target ext_kcompletion -- -j$CPU_CORES 0077 0078 if [[ $DK_QTVERSION == 6 ]] ; then 0079 0080 cmake --build . --config RelWithDebInfo --target ext_kcolorscheme -- -j$CPU_CORES 0081 0082 fi 0083 0084 cmake --build . --config RelWithDebInfo --target ext_kconfigwidgets -- -j$CPU_CORES 0085 cmake --build . --config RelWithDebInfo --target ext_kiconthemes -- -j$CPU_CORES 0086 cmake --build . --config RelWithDebInfo --target ext_kservice -- -j$CPU_CORES 0087 cmake --build . --config RelWithDebInfo --target ext_kglobalaccel -- -j$CPU_CORES 0088 cmake --build . --config RelWithDebInfo --target ext_kxmlgui -- -j$CPU_CORES 0089 cmake --build . --config RelWithDebInfo --target ext_kbookmarks -- -j$CPU_CORES 0090 cmake --build . --config RelWithDebInfo --target ext_kimageformats -- -j$CPU_CORES 0091 0092 # Extra support for digiKam 0093 0094 # Desktop integration support 0095 cmake --build . --config RelWithDebInfo --target ext_knotifications -- -j$CPU_CORES 0096 cmake --build . --config RelWithDebInfo --target ext_kjobwidgets -- -j$CPU_CORES 0097 cmake --build . --config RelWithDebInfo --target ext_kio -- -j$CPU_CORES 0098 cmake --build . --config RelWithDebInfo --target ext_knotifyconfig -- -j$CPU_CORES 0099 cmake --build . --config RelWithDebInfo --target ext_sonnet -- -j$CPU_CORES 0100 cmake --build . --config RelWithDebInfo --target ext_ktextwidgets -- -j$CPU_CORES 0101 0102 # libksane support 0103 if [[ $DK_QTVERSION == 6 ]] ; then 0104 0105 cmake --build . --config RelWithDebInfo --target ext_qca -- -j$CPU_CORES 0106 cmake --build . --config RelWithDebInfo --target ext_kwallet -- -j$CPU_CORES 0107 cmake --build . --config RelWithDebInfo --target ext_ksanecore -- -j$CPU_CORES 0108 0109 fi 0110 0111 cmake --build . --config RelWithDebInfo --target ext_libksane -- -j$CPU_CORES 0112 0113 # Calendar support 0114 cmake --build . --config RelWithDebInfo --target ext_kcalendarcore -- -j$CPU_CORES 0115 0116 # Platform Input Context Qt plugin 0117 cmake --build . --config RelWithDebInfo --target ext_fcitx-qt -- -j$CPU_CORES 0118 0119 # Breeze style support 0120 cmake --build . --config RelWithDebInfo --target ext_breeze -- -j$CPU_CORES 0121 0122 ################################################################################################# 0123 0124 if [[ $DK_QTVERSION == 6 ]] ; then 0125 0126 KF6_GITREV_LST=$ORIG_WD/data/kf6_manifest.txt 0127 0128 echo "List git sub-module revisions in $KF6_GITREV_LST" 0129 0130 if [ -f $KF6_GITREV_LST ] ; then 0131 rm -f $KF6_GITREV_LST 0132 fi 0133 0134 currentDate=`date +"%Y-%m-%d"` 0135 echo "+KF6 Snapshot $currentDate" > $KF6_GITREV_LST 0136 0137 # --- List git revisions for all sub-modules 0138 0139 DIRS=$(find $BUILDING_DIR/ext_kf6/ -name "ext_*-prefix") 0140 0141 for ITEM in $DIRS ; do 0142 0143 COMPONENT=$(echo $ITEM | cut -d'_' -f 1 | cut -d'-' -f 2) 0144 SUBDIR=$BUILDING_DIR/ext_kf6/$ITEM/src/$COMPONENT 0145 cd $SUBDIR 0146 echo "$(basename "$SUBDIR"):$(git rev-parse HEAD)" >> $KF6_GITREV_LST 0147 cd $ORIG_WD 0148 0149 done 0150 0151 cat $KF6_GITREV_LST 0152 0153 fi 0154 0155 TerminateScript