From 3dbada64198c288ce34802ef75f82f19cf49dc42 Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Wed, 4 Jul 2018 16:20:19 -0400 Subject: [PATCH] setup: Make the setup script work with cmake-installed kdesrc-build. This entails installing the sample rc files, and allowing kdesrc-build-setup to find the right path to those files. Note that to fix this bug you'd have to reinstall kdesrc-build and re-run kdesrc-build-setup. BUG:396027 FIXED-IN:18.08 --- CMakeLists.txt | 8 +++++++- kdesrc-build-setup | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) 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 <