File indexing completed on 2024-05-19 04:43:19
0001 #!/bin/bash 0002 # SPDX-License-Identifier: BSD-2-Clause 0003 # SPDX-FileCopyrightText: 2020-2022 Volker Krause <vkrause@kde.org> 0004 set -e 0005 set -x 0006 0007 PROTOBUF_VERSION=21.x 0008 KF_VERSION="master" 0009 GEAR_VERSION="master" 0010 0011 function build_cmake_module() { 0012 local repo=$1 0013 shift 0014 local module=$1 0015 shift 0016 local version=$1 0017 shift 0018 0019 mkdir -p $BUILD_ROOT 0020 mkdir -p $STAGING_ROOT 0021 pushd $BUILD_ROOT 0022 0023 if ! [ -d $BUILD_ROOT/$module ]; then 0024 git clone --branch $version --depth 1 $repo $module 0025 fi 0026 cd $module 0027 0028 mkdir build 0029 cd build 0030 cmake -DBUILD_SHARED=ON \ 0031 -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF \ 0032 -DCMAKE_PREFIX_PATH=$STAGING_ROOT \ 0033 -DCMAKE_INSTALL_PREFIX=$STAGING_ROOT \ 0034 -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \ 0035 -DZLIB_USE_STATIC_LIBS=ON \ 0036 $@ -DCMAKE_BUILD_TYPE=Release .. 0037 0038 make -j 4 0039 make install/fast 0040 0041 popd 0042 } 0043 0044 function build_kde_module() { 0045 local module=$1 0046 shift 0047 build_cmake_module https://invent.kde.org/$module $module $GEAR_VERSION $@ 0048 } 0049 0050 function build_kf_module() { 0051 local module=$1 0052 shift 0053 build_cmake_module https://invent.kde.org/$module $module $KF_VERSION $@ 0054 } 0055 0056 build_cmake_module https://github.com/protocolbuffers/protobuf protobuf $PROTOBUF_VERSION \ 0057 -Dprotobuf_BUILD_TESTS=OFF 0058 0059 # KDE Frameworks 0060 build_kf_module frameworks/extra-cmake-modules 0061 0062 export CXXFLAGS="-static-libstdc++ -static-libgcc" 0063 build_kde_module $CI_PROJECT_PATH -DBUILD_TOOLS_ONLY=ON -DBUILD_WITH_QT6=ON