File indexing completed on 2025-01-05 04:00:17
0001 #! /bin/bash 0002 0003 # Script to build extra libraries using MXE. 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 using MXE." 0024 echo "--------------------------------------------------------" 0025 0026 ################################################################################################# 0027 # Pre-processing checks 0028 0029 . ./config.sh 0030 . ./common.sh 0031 StartScript 0032 ChecksCPUCores 0033 RegisterRemoteServers 0034 0035 ################################################################################################# 0036 0037 # Paths rules 0038 ORIG_PATH="$PATH" 0039 ORIG_WD="`pwd`" 0040 0041 export PATH=$MXE_BUILDROOT/usr/bin:$MXE_INSTALL_PREFIX/qt5/bin:$PATH 0042 0043 ################################################################################################# 0044 0045 # Create the build dir for the 3rdparty deps 0046 if [ ! -d $BUILDING_DIR ] ; then 0047 mkdir $BUILDING_DIR 0048 fi 0049 0050 if [ ! -d $DOWNLOAD_DIR ] ; then 0051 mkdir $DOWNLOAD_DIR 0052 fi 0053 0054 cd $BUILDING_DIR 0055 rm -rf $BUILDING_DIR/* || true 0056 0057 ${MXE_BUILD_TARGETS}-cmake $ORIG_WD/../3rdparty \ 0058 -DMXE_TOOLCHAIN=${MXE_TOOLCHAIN} \ 0059 -DMXE_BUILDROOT=${MXE_BUILDROOT} \ 0060 -DMXE_BUILD_TARGETS=${MXE_BUILD_TARGETS} \ 0061 -DMXE_ARCHBITS=${MXE_ARCHBITS} \ 0062 -DMXE_INSTALL_PREFIX=${MXE_INSTALL_PREFIX} \ 0063 -DCMAKE_BUILD_TYPE=RelWithDebInfo \ 0064 -DCMAKE_COLOR_MAKEFILE=ON \ 0065 -DCMAKE_INSTALL_PREFIX=${MXE_INSTALL_PREFIX} \ 0066 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ 0067 -DCMAKE_TOOLCHAIN_FILE=${MXE_TOOLCHAIN} \ 0068 -DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH} \ 0069 -DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include \ 0070 -DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include \ 0071 -DCMAKE_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib \ 0072 -DZLIB_ROOT=${CMAKE_PREFIX_PATH} \ 0073 -DINSTALL_ROOT=${MXE_INSTALL_PREFIX} \ 0074 -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR \ 0075 -DKA_VERSION=$DK_KA_VERSION \ 0076 -DKP_VERSION=$DK_KP_VERSION \ 0077 -DKDE_VERSION=$DK_KDE_VERSION \ 0078 -DENABLE_QTVERSION=$DK_QTVERSION \ 0079 -DENABLE_QTWEBENGINE=$DK_QTWEBENGINE 0080 0081 # NOTE: The order to compile each component here is very important. 0082 0083 # core KF5 frameworks dependencies 0084 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_extra-cmake-modules -- -j$CPU_CORES 0085 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kconfig -- -j$CPU_CORES 0086 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_breeze-icons -- -j$CPU_CORES 0087 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcoreaddons -- -j$CPU_CORES 0088 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kwindowsystem -- -j$CPU_CORES 0089 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_solid -- -j$CPU_CORES 0090 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_sonnet -- -j$CPU_CORES 0091 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_threadweaver -- -j$CPU_CORES 0092 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_karchive -- -j$CPU_CORES 0093 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kdbusaddons -- -j$CPU_CORES 0094 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_ki18n -- -j$CPU_CORES 0095 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcrash -- -j$CPU_CORES 0096 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcodecs -- -j$CPU_CORES 0097 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kguiaddons -- -j$CPU_CORES 0098 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kwidgetsaddons -- -j$CPU_CORES 0099 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kitemviews -- -j$CPU_CORES 0100 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcompletion -- -j$CPU_CORES 0101 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kconfigwidgets -- -j$CPU_CORES 0102 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kiconthemes -- -j$CPU_CORES 0103 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kservice -- -j$CPU_CORES 0104 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kxmlgui -- -j$CPU_CORES 0105 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kbookmarks -- -j$CPU_CORES 0106 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kimageformats -- -j$CPU_CORES 0107 0108 # Extra support for digiKam 0109 0110 # Calendar support 0111 #${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_kcalendarcore -- -j$CPU_CORES 0112 0113 # Breeze style support 0114 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_breeze -- -j$CPU_CORES 0115 0116 ################################################################################################# 0117 0118 cd "$ORIG_WD" 0119 0120 export PATH=$ORIG_PATH 0121 0122 TerminateScript