summaryrefslogtreecommitdiff
path: root/gnu/packages/emacs-xyz.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2022-05-17 21:38:06 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-05-17 21:42:36 +0200
commit665dd8211cb5c7556f0fb83944d33215accf957a (patch)
tree872de2db4707058f5a37383cf79bad7c86131074 /gnu/packages/emacs-xyz.scm
parent140bdbc29fe92eb2e571c1641eb1af773665d14b (diff)
gnu: emacs-libgit: Fix build.
* gnu/packages/emacs-xyz.scm (emacs-libgit)[source]: Drop bundled emacs-module header. [#:phases]: Add “patch-source” phase to fix build failure when building against Emacs 28.
Diffstat (limited to 'gnu/packages/emacs-xyz.scm')
-rw-r--r--gnu/packages/emacs-xyz.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7d014ac02a..529e9329d6 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -789,7 +789,11 @@ on stdout instead of using a socket as the Emacsclient does.")
(patches (search-patches
;; Submitted for inclusion upstream (see:
;; https://github.com/magit/libegit2/pull/96).
- "emacs-libgit-use-system-libgit2.patch"))))
+ "emacs-libgit-use-system-libgit2.patch"))
+ (snippet
+ #~(begin
+ ;; bundled, use the one shipped with emacs instead
+ (delete-file "src/emacs-module.h")))))
;; Use the cmake-build-system as it provides support for cross builds.
(build-system cmake-build-system)
(arguments
@@ -804,6 +808,13 @@ on stdout instead of using a socket as the Emacsclient does.")
(guix build utils))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ ;; Use Emacs 28 unibyte strings.
+ ;; XXX: This now breaks if linked against Emacs <= 26, probably
+ ;; also 27.
+ (substitute* "src/egit-blob.c"
+ (("make_string") "make_unibyte_string"))))
(add-after 'unpack 'set-libgit--module-file
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))