[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: qtserialbus: Add libsocketcan support.
From: |
guix-commits |
Subject: |
02/02: gnu: qtserialbus: Add libsocketcan support. |
Date: |
Tue, 11 Aug 2020 00:13:37 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 12bb72fb0f8b8c35d46e439ba79f0a3a9f7703db
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Aug 10 16:37:26 2020 -0400
gnu: qtserialbus: Add libsocketcan support.
* gnu/packages/qt.scm (qtserialbus)[inputs]: Add libsocketcan.
[phases]{patch-libsocketcan-reference}: Add phase.
---
gnu/packages/qt.scm | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 17a2ad1..25f811a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -74,6 +75,7 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages maths)
+ #:use-module (gnu packages networking)
#:use-module (gnu packages ninja)
#:use-module (gnu packages nss)
#:use-module (gnu packages pciutils)
@@ -1077,8 +1079,22 @@ interacting with serial ports from within Qt.")))
(sha256
(base32
"14bahg82jciciqkl74q9hvf3a8kp3pk5v731vp2416k4b8bn4xqb"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments qtsvg)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-libsocketcan-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
+ (libcansocket.so (string-append libcansocket
+ "/lib/libsocketcan.so")))
+ (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
+ (("QStringLiteral\\(\"socketcan\"\\)")
+ (format #f "QStringLiteral(~s)" libcansocket.so)))
+ #t)))))))
(inputs
- `(("qtbase" ,qtbase)
+ `(("libsocketcan" ,libsocketcan)
+ ("qtbase" ,qtbase)
("qtserialport" ,qtserialport)))
(synopsis "Qt Serial Bus module")
(description "The Qt Serial Bus API provides classes and functions to