Skip to content

Commit

Permalink
Fix appimage docker file generation, esp. make kdesrc-build run
Browse files Browse the repository at this point in the history
We need to skip gpgme and build a kgraphviewer branch that's
compatible with KF5. Then we also modernize the kdesrc-build
usage in general, allowing us to set the tag option on the
frameworks module-set directly. That means we can get rid of
the custom kf5-frameworks-build-include copy and use the upstream
metadata definition directly
  • Loading branch information
milianw committed Apr 24, 2024
1 parent 2a1969d commit 776a239
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 47 deletions.
13 changes: 6 additions & 7 deletions scripts/appimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ARG KDDockWidgets_VERSION=2.0
ARG QCustomPlot_VERSION=2.1.1
ARG rust_demangler_VERSION=0.1.23
ARG d_demangler_VERSION=0.0.2
ARG KGraphViewer_VERSION=v2.4.3a

This comment has been minimized.

Copy link
@GitMensch

GitMensch Apr 25, 2024

Contributor

Should we have the feature #318 now also in the appimage?` If yes: where to find it, if no: how to enable that?
... and in any case: could you adjust the README to showcase this feature as well?

This comment has been minimized.

Copy link
@milianw

milianw Apr 26, 2024

Author Member

I think it's still disabled at compile time, so it's not used for now. I haven't found the time to investigate the strange crashes we saw in the past


USER root

Expand Down Expand Up @@ -98,26 +99,24 @@ RUN cd /opt && mkdir dlang && cd dlang && \
deactivate && cd /opt && rm -Rf dlang && mv /usr/bin/gpg{~,} && mv /usr/bin/gpg2{~,}

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

# kde frameworks
RUN cd /opt && git clone https://invent.kde.org/sdk/kdesrc-build.git
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 && \
sed -i -e "s/%VERSION%/${KF5_VERSION}/g" kdesrc-buildrc && \
sed -i -e "s/%VERSION%/${KF5_VERSION}/g" kf5-frameworks-build-include && \
sed -i -e "s/FULL_NPROC/$(nproc)/g" \
-e "s/HALF_NPROC/$(($(nproc)/2))/g" -e "s/%VERSION%/${KF5_VERSION}/g" kdesrc-buildrc && \
./kdesrc-build --metadata-only && \
# fix compile error in kwallet
./kdesrc-build --include-dependencies qca && \
./kdesrc-build --include-dependencies threadweaver kconfigwidgets kcoreaddons \
./kdesrc-build --ignore-modules=gpgme --include-dependencies threadweaver kconfigwidgets kcoreaddons \
kitemviews kitemmodels solid breeze-icons \
kwindowsystem knotifications kiconthemes karchive syntax-highlighting kio kparts && \
# without extra dependencies
./kdesrc-build kgraphviewer && \
./kdesrc-build --revision ${KGraphViewer_VERSION} --no-include-dependencies kgraphviewer && \
cd /opt && rm -Rf kdesrc-build kde && ldconfig

# kddockwidgets
Expand Down
8 changes: 5 additions & 3 deletions scripts/appimage/kdesrc-buildrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ end global
# suit, and when you update kdesrc-build you will automatically pick up the
# needed changes.

# NOTE: You MUST change the path below to include the actual path to your
# kdesrc-build installation.
include /opt/kdesrc-build/kf5-qt5-build-include
include ${module-definitions-dir}/kf5-qt5.ksb

# If you wish to maintain the module list yourself that is possible, simply
# look at the files pointed to above and use the "module-set" declarations that
# they use, with your own changes.

options frameworks
tag %VERSION%
end options

# It is possible to change the options for modules loaded from the file
# included above (since it's not possible to add a module that's already been
# included), e.g.
Expand Down
37 changes: 0 additions & 37 deletions scripts/appimage/kf5-frameworks-build-include

This file was deleted.

0 comments on commit 776a239

Please sign in to comment.