Skip to content

Instantly share code, notes, and snippets.

@LVladymyr
Created October 15, 2018 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LVladymyr/9e64701b8ba72a7be1b19bc1ff7306a7 to your computer and use it in GitHub Desktop.
Save LVladymyr/9e64701b8ba72a7be1b19bc1ff7306a7 to your computer and use it in GitHub Desktop.
Fix to aur kdesrc-configuration package issue with kdesrc-build-setup tool
diff --git a/PKGBUILD b/PKGBUILD
index aa15470..513c577 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,6 +16,8 @@ md5sums=('SKIP')
prepare() {
mkdir -p build
+ cd kdesrc-build
+ git apply ../../patches/kdesrc-build-setup.patch
}
build() {
diff --git a/patches/kdesrc-build-setup.patch b/patches/kdesrc-build-setup.patch
new file mode 100644
index 0000000..81c98cf
--- /dev/null
+++ b/patches/kdesrc-build-setup.patch
@@ -0,0 +1,41 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 43e67b4..8e762ae 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -91,7 +91,13 @@ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/kdesrc-build-setup DESTINATION ${KD
+ install(PROGRAMS
+ ${CMAKE_SOURCE_DIR}/sample-kde-env-master.sh
+ ${CMAKE_SOURCE_DIR}/sample-xsession.sh
+- DESTINATION ${KDE_INSTALL_DATADIR}/kdesrc-build)
++ ${CMAKE_SOURCE_DIR}/kf5-applications-build-include
++ ${CMAKE_SOURCE_DIR}/kf5-extragear-build-include
++ ${CMAKE_SOURCE_DIR}/kf5-frameworks-build-include
++ ${CMAKE_SOURCE_DIR}/kf5-kdepim-build-include
++ ${CMAKE_SOURCE_DIR}/kf5-qt5-build-include
++ ${CMAKE_SOURCE_DIR}/kf5-workspace-build-include
++ DESTINATION ${KDE_INSTALL_DATADIR}/kdesrc-build)
+
+ if (ECM_FOUND)
+ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+diff --git a/kdesrc-build-setup b/kdesrc-build-setup
+index fdf8fe0..2999c70 100755
+--- a/kdesrc-build-setup
++++ b/kdesrc-build-setup
+@@ -374,6 +374,16 @@ EOF
+ # Assume we can refer to files present alongside kdesrc-build in the source
+ # directory
+ my $basedir = dirname(abs_path($0));
++if (! -e "$basedir/kf5-frameworks-build-include") {
++ # Check if it's installed to a share/ prefix
++ $basedir = abs_path(dirname($0) . "/../share/kdesrc-build/");
++
++ if (! -e "$basedir/kf5-frameworks-build-include") {
++ close $output;
++ showInfo("Unable to find kdesrc-build installation to build a configuration!");
++ exit 1;
++ }
++}
+
+ if (grep /^frameworks$/, @chosenModules) {
+ print $output <<EOF;
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment