Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add specific version of kf5 to appimage #514

Merged
merged 5 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions scripts/appimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#
FROM centos/devtoolset-7-toolchain-centos7 as intermediate

ARG QT_VERSION=5.15.7
ARG KDDockWidgets_VERSION=1.6
ARG QT_VERSION=5.15.11
ARG KF5_VERSION v5.110.0
ARG KDDockWidgets_VERSION=1.7
ARG QCustomPlot_VERSION=2.1.1
ARG rust_demangler_VERSION=0.1.21
ARG rust_demangler_VERSION=0.1.23
ARG d_demangler_VERSION=0.0.2

USER root
Expand Down Expand Up @@ -96,18 +97,26 @@ RUN cd /opt && mkdir dlang && cd dlang && \
make && mv libd_demangle.so /usr/lib/ && \
deactivate && cd /opt && rm -Rf dlang && mv /usr/bin/gpg{~,} && mv /usr/bin/gpg2{~,}

# kdesrc-build dependencies
RUN yum install -y libcanberra-devel && \
cpan YAML::Syck

# kde frameworks
RUN cd /opt && git clone https://invent.kde.org/sdk/kdesrc-build.git && \
# everything after this commit requires a dbus session
cd kdesrc-build && git checkout 6c2c8a83ee25d53bdae91dce4ab3efaaac838a11
COPY kdesrc-buildrc /opt/kdesrc-build/
COPY kf5-frameworks-build-include /opt/kdesrc-build/
RUN ldconfig && \
cd /opt/kdesrc-build && sed -i -e "s/FULL_NPROC/$(nproc)/g" -e "s/HALF_NPROC/$(($(nproc)/2))/g" kdesrc-buildrc && \
cpan YAML::Syck && \
cd /opt/kdesrc-build && \
sed -i -e "s/FULL_NPROC/$(nproc)/g" -e "s/HALF_NPROC/$(($(nproc)/2))/g" kdesrc-buildrc && \
sed -i -e "s/%VERSION%/${KF5_VERSION}/g" kdesrc-buildrc && \
sed -i -e "s/%VERSION%/${KF5_VERSION}/g" kf5-frameworks-build-include && \
./kdesrc-build --metadata-only && \
# fix compile error in kwallet
./kdesrc-build --include-dependencies qca && \
./kdesrc-build --include-dependencies threadweaver kconfigwidgets kcoreaddons kitemviews kitemmodels solid \
./kdesrc-build --include-dependencies threadweaver kconfigwidgets kcoreaddons \
kitemviews kitemmodels solid breeze-icons \
kwindowsystem knotifications kiconthemes karchive syntax-highlighting kio kparts && \
# without extra dependencies
./kdesrc-build kgraphviewer && \
Expand Down
2 changes: 2 additions & 0 deletions scripts/appimage/build_appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ gitversion=$(git -C "$srcdir" describe)
. /opt/rh/devtoolset-11/enable

mkdir -p "$buildir" && cd "$buildir"
# KGraphViewer triggers strange crashes in the AppImage, disable it
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_PREFIX_PATH=/opt/rh/devtoolset-11/root/ \
-DCMAKE_DISABLE_FIND_PACKAGE_KGraphViewerPart=ON \
-DAPPIMAGE_BUILD=ON "-DCMAKE_INSTALL_PREFIX=/usr" "$srcdir"

make -j
Expand Down
2 changes: 1 addition & 1 deletion scripts/appimage/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
set -e

cd $(dirname $0)
docker build --rm -t ghcr.io/kdab/kdesrc-build .
docker build --ulimit nofile=1024:262144 --rm -t ghcr.io/kdab/kdesrc-build .
4 changes: 4 additions & 0 deletions scripts/appimage/kdesrc-buildrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ end options
options sonnet
cmake-options -DSONNET_USE_QML=OFF
end options

options extra-cmake-modules
tag %VERSION%
end options
37 changes: 37 additions & 0 deletions scripts/appimage/kf5-frameworks-build-include
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# kdesrc-build itself, and some "kdesupport" modules needed by KF5, workspace or apps.
module-set kf5-build-support
repository kde-projects
use-modules kdesrc-build kde-dev-scripts extra-cmake-modules polkit-qt-1 qca
end module-set

module-set phonon
repository kde-projects
use-modules phonon phonon-vlc
end module-set

options phonon
cmake-options -DPHONON_BUILD_QT5=ON -DPHONON_BUILD_QT6=OFF
end options

module-set kdesupport
repository kde-projects
use-modules kdesupport/plasma-wayland-protocols
end module-set

# ============================= KDE Frameworks ========================

module-set frameworks
repository kde-projects
use-modules frameworks

tag %VERSION%
branch kf5
ignore-modules kdewebkit
end module-set

module grantlee
repository https://github.com/steveire/grantlee.git
branch master
end module

include kf5-common-options-build-include
8 changes: 4 additions & 4 deletions scripts/compile-test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildBase()
distro=$1
tag=$(toLower $distro)

docker build -t hotspot-$tag-base \
docker build --ulimit nofile=1024:262144 -t hotspot-$tag-base \
-f scripts/compile-test/Base$distro $extraArgs .
}

Expand All @@ -32,7 +32,7 @@ buildDependencies()
suffix=Qt6
fi

docker build -t hotspot-$tag-dependencies \
docker build --ulimit nofile=1024:262144 -t hotspot-$tag-dependencies \
--build-arg BASEIMAGE=hotspot-$tag-base \
-f scripts/compile-test/BuildDependencies$suffix $extraArgs .
}
Expand All @@ -48,7 +48,7 @@ buildHotspotWithPresets()
fi

buildDependencies $distro
docker build -t hotspot-$tag \
docker build --ulimit nofile=1024:262144 -t hotspot-$tag \
--build-arg BASEIMAGE=hotspot-$tag-dependencies \
-f scripts/compile-test/BuildHotspotWithPresets$suffix $extraArgs .
}
Expand All @@ -59,7 +59,7 @@ buildHotspotWithoutPresets()
tag=$(toLower $distro)

buildDependencies $distro
docker build -t hotspot-$tag \
docker build --ulimit nofile=1024:262144 -t hotspot-$tag \
--build-arg BASEIMAGE=hotspot-$tag-dependencies \
-f scripts/compile-test/BuildHotspotWithoutPresets $extraArgs .
}
Expand Down