Skip to content

Commit

Permalink
Don't hard-code emacs version in native-comp.patch
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Murray <[email protected]>
  • Loading branch information
alexmurray committed May 2, 2023
1 parent c39c949 commit 8cdd708
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions native-comp.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/usr/share/emacs/29.0.90/lisp/emacs-lisp/comp.el b/usr/share/emacs/29.0.90/lisp/emacs-lisp/comp.el
diff --git a/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el b/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el
index e97832455b9..b04cfa00c33 100644
--- a/usr/share/emacs/29.0.90/lisp/emacs-lisp/comp.el
+++ b/usr/share/emacs/29.0.90/lisp/emacs-lisp/comp.el
--- a/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el
+++ b/usr/share/emacs/@@VERSION@@/lisp/emacs-lisp/comp.el
@@ -186,8 +186,7 @@ and above."
:type '(repeat string)
:version "28.1")
Expand Down
4 changes: 3 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ parts:
# snap
rm -f usr/share/emacs/*/lisp/emacs-lisp/comp.elc
gunzip -f usr/share/emacs/*/lisp/emacs-lisp/comp.el.gz
patch -p1 < $SNAPCRAFT_PROJECT_DIR/native-comp.patch
# ensure we use the right path in the patch file
VERSION=$(echo usr/share/emacs/*/lisp/emacs-lisp/comp.el | cut -d / -f 4)
sed s/@@VERSION@@/$VERSION/g $SNAPCRAFT_PROJECT_DIR/native-comp.patch | patch -p1
../parts/emacs/build/src/emacs -batch -f batch-byte-compile usr/share/emacs/*/lisp/emacs-lisp/comp.el
gzip usr/share/emacs/*/lisp/emacs-lisp/comp.el
site-lisp:
Expand Down

0 comments on commit 8cdd708

Please sign in to comment.