1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#!/bin/bash
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-FileCopyrightText: 2020-2022 Volker Krause <vkrause@kde.org>
set -e
set -x
PROTOBUF_VERSION=21.x
KF_VERSION="v6.8.0"
GEAR_VERSION="master"
function build_cmake_module() {
local repo=$1
shift
local module=$1
shift
local version=$1
shift
mkdir -p $BUILD_ROOT
mkdir -p $STAGING_ROOT
pushd $BUILD_ROOT
if ! [ -d $BUILD_ROOT/$module ]; then
git clone --branch $version --depth 1 $repo $module
fi
cd $module
mkdir build
cd build
cmake -DBUILD_SHARED=ON \
-DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_PREFIX_PATH=$STAGING_ROOT \
-DCMAKE_INSTALL_PREFIX=$STAGING_ROOT \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \
-DZLIB_USE_STATIC_LIBS=ON \
$@ -DCMAKE_BUILD_TYPE=Release ..
make -j 4
make install/fast
popd
}
function build_kde_module() {
local module=$1
shift
build_cmake_module https://invent.kde.org/$module $module $GEAR_VERSION $@
}
function build_kf_module() {
local module=$1
shift
build_cmake_module https://invent.kde.org/$module $module $KF_VERSION $@
}
build_cmake_module https://github.com/protocolbuffers/protobuf protobuf $PROTOBUF_VERSION \
-Dprotobuf_BUILD_TESTS=OFF
# KDE Frameworks
build_kf_module frameworks/extra-cmake-modules
export CXXFLAGS="-static-libstdc++ -static-libgcc"
build_kde_module $CI_PROJECT_PATH -DBUILD_TOOLS_ONLY=ON -DBUILD_WITH_QT6=ON
|