File indexing completed on 2025-01-19 03:59:49

0001 #!/bin/bash
0002 
0003 # Script to install extra libs dependency pass as name as first argument (ex: "kimageformats")
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 if [ -z "$1" ] ; then
0017 
0018     echo "Pass the name of extra libs dependency to install as first argument (aka 'kimageformats' for ex.)"
0019     exit
0020 fi
0021 
0022 #################################################################################################
0023 # Pre-processing checks
0024 
0025 . ../common.sh
0026 . ../config.sh
0027 ChecksRunAsRoot
0028 StartScript
0029 ChecksCPUCores
0030 HostAdjustments
0031 RegisterRemoteServers
0032 
0033 ORIG_WD="`pwd`/.."
0034 
0035 #################################################################################################
0036 
0037 cd $BUILDING_DIR
0038 
0039 rm -rf $BUILDING_DIR/* || true
0040 
0041 cmake $ORIG_WD/../3rdparty \
0042       -DCMAKE_INSTALL_PREFIX:PATH=/usr \
0043       -DINSTALL_ROOT=/usr \
0044       -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR \
0045       -DKA_VERSION=$DK_KA_VERSION \
0046       -DKDE_VERSION=$DK_KDE_VERSION \
0047       -DENABLE_QTVERSION=$DK_QTVERSION \
0048       -DENABLE_QTWEBENGINE=$DK_QTWEBENGINE
0049 
0050 cmake --build . --config RelWithDebInfo --target ext_$1 -- -j$CPU_CORES
0051 
0052 #################################################################################################
0053 
0054 TerminateScript