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