File size: 2,481 Bytes
e5a3ec0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
# Standalone build script for LabPlot (KDE/Qt5 data visualization app).
# Reproduces the entire build from scratch. Runs as root, no sudo.
set -euo pipefail

export DEBIAN_FRONTEND=noninteractive

REPO_URL="https://invent.kde.org/education/labplot.git"
REPO_COMMIT="b187116f4"        # pinned 2.11.1 final
SRC_DIR="/workspace/repo"
BUILD_DIR="$SRC_DIR/build"
INSTALL_PREFIX="/workspace/install"

# ---------------------------------------------------------------------------
# 1. Install dependencies
# ---------------------------------------------------------------------------
apt-get update -qq
apt-get install -y \
  git build-essential cmake extra-cmake-modules bison flex gettext \
  qtbase5-dev qtbase5-private-dev libqt5svg5-dev qttools5-dev qttools5-dev-tools \
  libqt5serialport5-dev \
  libkf5archive-dev libkf5completion-dev libkf5config-dev libkf5configwidgets-dev \
  libkf5coreaddons-dev libkf5crash-dev libkf5doctools-dev libkf5i18n-dev \
  libkf5iconthemes-dev libkf5kio-dev libkf5textwidgets-dev libkf5widgetsaddons-dev \
  libkf5xmlgui-dev libkf5newstuff-dev libkf5service-dev libkf5parts-dev \
  libkf5purpose-dev libkf5syntaxhighlighting-dev \
  libgsl-dev libfftw3-dev libhdf5-dev libnetcdf-dev libcfitsio-dev libcerf-dev \
  zlib1g-dev liblz4-dev libmatio-dev libeigen3-dev libpoppler-qt5-dev \
  libspectre-dev

# ---------------------------------------------------------------------------
# 2. Fetch sources (only clone if not already present at the pinned commit)
# ---------------------------------------------------------------------------

# ---------------------------------------------------------------------------
# 3. Configure & build (Release, install to /workspace/install)
# ---------------------------------------------------------------------------
rm -rf "$BUILD_DIR"
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"

cmake .. \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
  -DENABLE_TESTS=OFF \
  -DENABLE_SDK=OFF \
  -DENABLE_CANTOR=OFF \
  -DLOCAL_DBC_PARSER=ON \
  -DLOCAL_VECTOR_BLF=ON

make -j"$(nproc)"
make install

# ---------------------------------------------------------------------------
# 4. Make the install tree world-readable/executable so unprivileged users
#    (downstream testgen/eval stages) can run the app.
# ---------------------------------------------------------------------------
chmod -R a+rX "$INSTALL_PREFIX"

echo "Build complete. Executable: $INSTALL_PREFIX/bin/labplot2"