diff options
author | Thomas Danckaert <thomas.danckaert@gmail.com> | 2016-12-06 14:55:39 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-12-19 17:51:00 +0100 |
commit | 834d12226bed90800c0ee7886c0b90e65d070f97 (patch) | |
tree | d953ba1c64e772b43004356c36df1b4883084cc1 /gnu/packages/kde-frameworks.scm | |
parent | d343a60f93cecb789f3366bac1f068f281c38d9f (diff) | |
download | patches-834d12226bed90800c0ee7886c0b90e65d070f97.tar patches-834d12226bed90800c0ee7886c0b90e65d070f97.tar.gz |
gnu: kdbusaddons: Embed kinit store dir, avoid dependency cycles.
kdbusaddons needs to know the location of the kdeinit5 executable,
provided by kinit. kinit depends on kdbusaddons, so we add bootstrap
versions of all packages in the dependency chain from kinit to
kdbusaddons to avoid cyclic dependencies.
* gnu/packages/kde-frameworks.scm (kinit-bootstrap,
kdbusaddons-bootstrap): New variables.
(kdbusaddons)[inputs]: Add kinit-bootstrap.
[source,arguments]: Add patch and substitution to embed
kinit-bootstrap's store directory in the code.
* gnu/packages/patches/kdbusaddons-kinit-file-name.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/kde-frameworks.scm')
-rw-r--r-- | gnu/packages/kde-frameworks.scm | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index 8b841330b8..94145fb95d 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -25,6 +25,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages acl) #:use-module (gnu packages admin) #:use-module (gnu packages attr) @@ -50,7 +51,8 @@ #:use-module (gnu packages version-control) #:use-module (gnu packages web) #:use-module (gnu packages xml) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages xorg) + #:use-module (srfi srfi-1)) (define-public extra-cmake-modules (package @@ -516,7 +518,8 @@ many more.") name "-" version ".tar.xz")) (sha256 (base32 - "07mzb1xr8wyiid25p8kg6mjp6vq8ngvv1ikhq75zvd2cbax530c8")))) + "07mzb1xr8wyiid25p8kg6mjp6vq8ngvv1ikhq75zvd2cbax530c8")) + (patches (search-patches "kdbusaddons-kinit-file-name.patch")))) (build-system cmake-build-system) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) @@ -524,10 +527,18 @@ many more.") ("qttools" ,qttools))) (inputs `(("qtbase" ,qtbase) - ("qtx11extras" ,qtx11extras))) + ("qtx11extras" ,qtx11extras) + ("kinit" ,kinit-bootstrap))) ;; kinit-bootstrap: kinit package which does not depend on kdbusaddons. (arguments `(#:phases (modify-phases %standard-phases + (add-before + 'configure 'patch-source + (lambda* (#:key inputs #:allow-other-keys) + ;; look for the kdeinit5 executable in kinit's store directory, + ;; instead of the current application's directory: + (substitute* "src/kdeinitinterface.cpp" + (("@SUBSTITUTEME@") (assoc-ref inputs "kinit"))))) (replace 'check (lambda _ (setenv "DBUS_FATAL_WARNINGS" "0") @@ -2866,3 +2877,22 @@ setUrl, setUserAgent and call.") script engines.") ;; dual licensed (license (list license:gpl2+ license:lgpl2.1+)))) + +;; This version of kdbusaddons does not use kinit as an input, and is used to +;; build kinit-bootstrap, as well as bootstrap versions of all kinit +;; dependencies which also rely on kdbusaddons. +(define kdbusaddons-bootstrap + (package + (inherit kdbusaddons) + (source (origin + (inherit (package-source kdbusaddons)) + (patches '()))) + (inputs (alist-delete "kinit" (package-inputs kdbusaddons))) + (arguments + (substitute-keyword-arguments (package-arguments kdbusaddons) + ((#:phases phases) + `(modify-phases ,phases + (delete 'patch-source))))))) + +(define kinit-bootstrap + ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap))) kinit)) |