File indexing completed on 2025-01-05 04:00:17
0001 #! /bin/bash 0002 0003 # Script to install extra libs dependency pass as name as first argument (ex: "kimageformats") 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 if [ -z "$1" ] ; then 0016 0017 echo "Pass the name of extra libs dependency to install as first argument (aka 'kimageformats' for ex.)" 0018 exit 0019 fi 0020 0021 ################################################################################################# 0022 # Pre-processing checks 0023 0024 cd .. 0025 0026 . ./config.sh 0027 . ./common.sh 0028 StartScript 0029 ChecksCPUCores 0030 RegisterRemoteServers 0031 0032 ################################################################################################# 0033 0034 # Paths rules 0035 ORIG_PATH="$PATH" 0036 ORIG_WD="`pwd`" 0037 0038 export PATH=$MXE_BUILDROOT/usr/bin:$MXE_INSTALL_PREFIX/qt5/bin:$PATH 0039 0040 ################################################################################################# 0041 0042 # Create the build dir for the 3rdparty deps 0043 if [ ! -d $BUILDING_DIR ] ; then 0044 mkdir $BUILDING_DIR 0045 fi 0046 0047 if [ ! -d $DOWNLOAD_DIR ] ; then 0048 mkdir $DOWNLOAD_DIR 0049 fi 0050 0051 cd $BUILDING_DIR 0052 rm -rf $BUILDING_DIR/* || true 0053 0054 ${MXE_BUILD_TARGETS}-cmake $ORIG_WD/../3rdparty \ 0055 -DMXE_TOOLCHAIN=${MXE_TOOLCHAIN} \ 0056 -DMXE_BUILDROOT=${MXE_BUILDROOT} \ 0057 -DMXE_BUILD_TARGETS=${MXE_BUILD_TARGETS} \ 0058 -DMXE_ARCHBITS=${MXE_ARCHBITS} \ 0059 -DMXE_INSTALL_PREFIX=${MXE_INSTALL_PREFIX} \ 0060 -DCMAKE_BUILD_TYPE=RelWithDebInfo \ 0061 -DCMAKE_COLOR_MAKEFILE=ON \ 0062 -DCMAKE_INSTALL_PREFIX=${MXE_INSTALL_PREFIX} \ 0063 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ 0064 -DCMAKE_TOOLCHAIN_FILE=${MXE_TOOLCHAIN} \ 0065 -DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH} \ 0066 -DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include \ 0067 -DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include \ 0068 -DCMAKE_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib \ 0069 -DZLIB_ROOT=${CMAKE_PREFIX_PATH} \ 0070 -DINSTALL_ROOT=${MXE_INSTALL_PREFIX} \ 0071 -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR \ 0072 -DKA_VERSION=$DK_KA_VERSION \ 0073 -DKDE_VERSION=$DK_KDE_VERSION \ 0074 -DENABLE_QTVERSION=$DK_QTVERSION \ 0075 -DENABLE_QTWEBENGINE=$DK_QTWEBENGINE 0076 0077 ${MXE_BUILD_TARGETS}-cmake --build . --config RelWithDebInfo --target ext_$1 -- -j$CPU_CORES 0078 0079 TerminateScript