Compare commits
42 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8caa8a9f69 | ||
|
|
91bcd98e44 | ||
|
|
3b048fcb37 | ||
|
|
b4c76f9a53 | ||
|
|
514c0430fb | ||
|
|
585fcc155a | ||
|
|
8baaa786df | ||
|
|
038733a4d2 | ||
|
|
3b2d62a20f | ||
|
|
6156d97ca7 | ||
|
|
2004733785 | ||
|
|
75773e6606 | ||
|
|
a8890f9765 | ||
|
|
b2f275ac7a | ||
|
|
262e998b29 | ||
|
|
680f81bce4 | ||
|
|
006f58a138 | ||
|
|
2f9fd6b99a | ||
|
|
12317652f3 | ||
|
|
442688e43d | ||
|
|
3936b0f4b5 | ||
|
|
59744aef62 | ||
|
|
735ea3cc3c | ||
|
|
14aefc94f9 | ||
|
|
bedcb62413 | ||
|
|
a8733e9b93 | ||
|
|
25a203f123 | ||
|
|
2a41db911d | ||
|
|
7b67394177 | ||
|
|
c65031ee31 | ||
|
|
e7d0043cec | ||
|
|
507e1bae41 | ||
|
|
8222fbcb4d | ||
|
|
c2d5a811c7 | ||
|
|
cb65b0edeb | ||
|
|
1e64061e6c | ||
|
|
cf0b4080a8 | ||
|
|
45a313a33c | ||
|
|
b8ab76acc8 | ||
|
|
8ad003b0a8 | ||
|
|
340027a976 | ||
|
|
69f6ed99cc |
12 changed files with 384 additions and 102 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -46,3 +46,5 @@
|
|||
/results_emacs/
|
||||
/emacs-30.1.tar.xz
|
||||
/emacs-30.1.tar.xz.sig
|
||||
/emacs-30.2.tar.xz
|
||||
/emacs-30.2.tar.xz.sig
|
||||
|
|
|
|||
31
0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch
Normal file
31
0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
From 164e45695f9784469ff2f66cafcd6bc927c246be Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oliver <git@mavit.org.uk>
|
||||
Date: Tue, 18 Mar 2025 13:16:15 +0000
|
||||
Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20specify=20StartupWMClass=20in?=
|
||||
=?UTF-8?q?=20emacs.desktop?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
See the explanation at
|
||||
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49505#67. In summary, the
|
||||
value we were providing doesn’t work on Wayland, and the default should
|
||||
be fine.
|
||||
|
||||
* etc/emacs.desktop: Don’t specify StartupWMClass
|
||||
---
|
||||
etc/emacs.desktop | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/etc/emacs.desktop b/etc/emacs.desktop
|
||||
index 0d7cac14da5..16ad3c7eb48 100644
|
||||
--- a/etc/emacs.desktop
|
||||
+++ b/etc/emacs.desktop
|
||||
@@ -9,4 +9,3 @@ Type=Application
|
||||
Terminal=false
|
||||
Categories=Development;TextEditor;
|
||||
StartupNotify=true
|
||||
-StartupWMClass=Emacs
|
||||
--
|
||||
2.48.1
|
||||
|
||||
106
0001-Support-Tree-sitter-version-0.26-and-later.patch
Normal file
106
0001-Support-Tree-sitter-version-0.26-and-later.patch
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
From 16f0be6354ea13331859c861fa7d423a0b54bec7 Mon Sep 17 00:00:00 2001
|
||||
From: Eli Zaretskii <eliz@gnu.org>
|
||||
Date: Fri, 17 Oct 2025 14:15:41 +0300
|
||||
Subject: [PATCH] Support Tree-sitter version 0.26 and later
|
||||
|
||||
* src/treesit.c (init_treesit_functions)
|
||||
[TREE_SITTER_LANGUAGE_VERSION >= 15]: Define prototype for, and
|
||||
load 'ts_language_abi_version' instead of the deprecated (and
|
||||
removed in tree-sitter 0.26) 'ts_language_version'.
|
||||
(ts_language_abi_version) [TREE_SITTER_LANGUAGE_VERSION >= 15]:
|
||||
Define on WINDOWSNT, instead of 'ts_language_version'.
|
||||
(treesit_language_abi_version): New compatibility function.
|
||||
(treesit_load_language, Ftreesit_language_abi_version): Use
|
||||
'treesit_language_abi_version' instead of 'ts_language_version'.
|
||||
(Bug#79627)
|
||||
---
|
||||
src/treesit.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/treesit.c b/src/treesit.c
|
||||
index e2986c186b8..4d6bf9a5dbd 100644
|
||||
--- a/src/treesit.c
|
||||
+++ b/src/treesit.c
|
||||
@@ -34,7 +34,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc.
|
||||
# include "w32common.h"
|
||||
|
||||
/* In alphabetical order. */
|
||||
+#if TREE_SITTER_LANGUAGE_VERSION >= 15
|
||||
+#undef ts_language_abi_version
|
||||
+#else
|
||||
#undef ts_language_version
|
||||
+#endif
|
||||
#undef ts_node_child
|
||||
#undef ts_node_child_by_field_name
|
||||
#undef ts_node_child_count
|
||||
@@ -89,7 +93,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc.
|
||||
#undef ts_tree_get_changed_ranges
|
||||
#undef ts_tree_root_node
|
||||
|
||||
+#if TREE_SITTER_LANGUAGE_VERSION >= 15
|
||||
+DEF_DLL_FN (uint32_t, ts_language_abi_version, (const TSLanguage *));
|
||||
+#else
|
||||
DEF_DLL_FN (uint32_t, ts_language_version, (const TSLanguage *));
|
||||
+#endif
|
||||
DEF_DLL_FN (TSNode, ts_node_child, (TSNode, uint32_t));
|
||||
DEF_DLL_FN (TSNode, ts_node_child_by_field_name,
|
||||
(TSNode, const char *, uint32_t));
|
||||
@@ -166,7 +174,11 @@ init_treesit_functions (void)
|
||||
if (!library)
|
||||
return false;
|
||||
|
||||
+#if TREE_SITTER_LANGUAGE_VERSION >= 15
|
||||
+ LOAD_DLL_FN (library, ts_language_abi_version);
|
||||
+#else
|
||||
LOAD_DLL_FN (library, ts_language_version);
|
||||
+#endif
|
||||
LOAD_DLL_FN (library, ts_node_child);
|
||||
LOAD_DLL_FN (library, ts_node_child_by_field_name);
|
||||
LOAD_DLL_FN (library, ts_node_child_count);
|
||||
@@ -224,7 +236,11 @@ init_treesit_functions (void)
|
||||
return true;
|
||||
}
|
||||
|
||||
+#if TREE_SITTER_LANGUAGE_VERSION >= 15
|
||||
+#define ts_language_abi_version fn_ts_language_abi_version
|
||||
+#else
|
||||
#define ts_language_version fn_ts_language_version
|
||||
+#endif
|
||||
#define ts_node_child fn_ts_node_child
|
||||
#define ts_node_child_by_field_name fn_ts_node_child_by_field_name
|
||||
#define ts_node_child_count fn_ts_node_child_count
|
||||
@@ -632,6 +648,22 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name,
|
||||
}
|
||||
}
|
||||
|
||||
+/* This function is a compatibility shim. Tree-sitter 0.25 introduced
|
||||
+ ts_language_abi_version as a replacement for ts_language_version, and
|
||||
+ tree-sitter 0.26 removed ts_language_version. Here we use the fact
|
||||
+ that 0.25 bumped TREE_SITTER_LANGUAGE_VERSION to 15, to use the new
|
||||
+ function instead of the old one, when Emacs is compiled against
|
||||
+ tree-sitter version 0.25 or newer. */
|
||||
+static uint32_t
|
||||
+treesit_language_abi_version (const TSLanguage *ts_lang)
|
||||
+{
|
||||
+#if TREE_SITTER_LANGUAGE_VERSION >= 15
|
||||
+ return ts_language_abi_version (ts_lang);
|
||||
+#else
|
||||
+ return ts_language_version (ts_lang);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
/* Load the dynamic library of LANGUAGE_SYMBOL and return the pointer
|
||||
to the language definition.
|
||||
|
||||
@@ -817,7 +849,7 @@ DEFUN ("treesit-language-abi-version", Ftreesit_language_abi_version,
|
||||
&signal_data);
|
||||
if (ts_language == NULL)
|
||||
return Qnil;
|
||||
- uint32_t version = ts_language_version (ts_language);
|
||||
+ uint32_t version = treesit_language_abi_version (ts_language);
|
||||
return make_fixnum((ptrdiff_t) version);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.52.0
|
||||
|
||||
16
default.el
16
default.el
|
|
@ -1,7 +1,13 @@
|
|||
;;; default.el - loaded after ".emacs" on startup
|
||||
;;;
|
||||
;;; Setting `inhibit-default-init' non-nil in "~/.emacs"
|
||||
;;; prevents loading of this file. Also the "-q" option to emacs
|
||||
;;; prevents both "~/.emacs" and this file from being loaded at startup.
|
||||
;;; default.el --- loaded after ".emacs" on startup -*- lexical-binding: t -*-
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Setting `inhibit-default-init' non-nil in "~/.emacs"
|
||||
;; prevents loading of this file. Also the "-q" option to "emacs"
|
||||
;; prevents both "~/.emacs" and this file from being loaded at startup.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(setq-default smime-CA-directory "/etc/ssl/certs")
|
||||
|
||||
;;; default.el ends here
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
;; .emacs
|
||||
;;; -*- lexical-binding: t -*-
|
||||
|
||||
(custom-set-variables
|
||||
;; uncomment to always end a file with a newline
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
From 90e902854c53c6ab5ef8711af27f42fbc77d9ffe Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oliver <git@mavit.org.uk>
|
||||
Date: Mon, 10 Apr 2023 20:55:54 +0100
|
||||
Subject: [PATCH] Use a wrapper to avoid the pure GTK build on X11, where it is
|
||||
unsupported.
|
||||
|
||||
---
|
||||
etc/emacs.desktop | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/etc/emacs.desktop b/etc/emacs.desktop
|
||||
index 0d7cac14da5..eabc78bb884 100644
|
||||
--- a/etc/emacs.desktop
|
||||
+++ b/etc/emacs.desktop
|
||||
@@ -3,7 +3,7 @@ Name=Emacs
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
-Exec=emacs %F
|
||||
+Exec=emacs-desktop %F
|
||||
Icon=emacs
|
||||
Type=Application
|
||||
Terminal=false
|
||||
--
|
||||
2.39.2
|
||||
|
||||
|
|
@ -1,16 +1,39 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/bash
|
||||
|
||||
# The pure GTK build of emacs is not supported on X11, so try to avoid
|
||||
# using if there is an alternative.
|
||||
# using it there if there is another alternative.
|
||||
|
||||
if [ "$XDG_SESSION_TYPE" = 'x11' ]; then
|
||||
case "$(readlink -f /usr/bin/emacs)" in
|
||||
*/emacs-*.*-pgtk)
|
||||
if type emacs-gtk+x11 >/dev/null; then
|
||||
exec emacs-gtk+x11 "$@"
|
||||
elif type emacs-lucid >/dev/null; then
|
||||
exec emacs-lucid "$@"
|
||||
fi
|
||||
preferred="$(readlink -f /usr/bin/emacs)"
|
||||
|
||||
if [[ $XDG_SESSION_TYPE == 'x11' ]]; then
|
||||
case "$preferred" in
|
||||
*-pgtk)
|
||||
for variant in gtk+x11 lucid; do
|
||||
if type "emacs-$variant" >/dev/null; then
|
||||
exec -a emacs "emacs-$variant" "$@"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*/emacs-desktop)
|
||||
# If this wrapper script is itself the preferred alternative,
|
||||
# select something suitable from the options available.
|
||||
for variant in gtk+x11 lucid pgtk nw; do
|
||||
if type "emacs-$variant" >/dev/null; then
|
||||
exec -a emacs "emacs-$variant" "$@"
|
||||
fi
|
||||
done
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case "$preferred" in
|
||||
*/emacs-desktop)
|
||||
for variant in pgtk gtk+x11 lucid nw; do
|
||||
if type "emacs-$variant" >/dev/null; then
|
||||
exec -a emacs "emacs-$variant" "$@"
|
||||
fi
|
||||
done
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
|
|||
191
emacs.spec
191
emacs.spec
|
|
@ -8,11 +8,11 @@
|
|||
Summary: GNU Emacs text editor
|
||||
Name: emacs
|
||||
Epoch: 1
|
||||
Version: 30.1
|
||||
Version: 30.2
|
||||
Release: %autorelease
|
||||
License: GPL-3.0-or-later AND CC0-1.0
|
||||
URL: https://www.gnu.org/software/emacs/
|
||||
%if %{lua: print(select(3, string.find(rpm.expand('%version'), '%d+%.(%d+)')))} == 0
|
||||
%if %{lua: print(select(3, string.find(rpm.expand('%version'), '%d+%.%d+%.(%d+)')) or 0)} >= 90
|
||||
Source0: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz
|
||||
Source1: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz.sig
|
||||
%else
|
||||
|
|
@ -28,6 +28,9 @@ Source5: site-start.el
|
|||
Source6: default.el
|
||||
Source9: emacs-desktop.sh
|
||||
|
||||
Source10: emacs_lisp.attr
|
||||
Source11: emacs_lisp.rec
|
||||
|
||||
# Avoid trademark issues
|
||||
Patch: 0001-Pong-and-Tetris-are-excluded.patch
|
||||
|
||||
|
|
@ -40,8 +43,8 @@ Patch: emacs-system-crypto-policies.patch
|
|||
# => remove it if we stop using this patch
|
||||
Patch: emacs-libdir-vs-systemd.patch
|
||||
|
||||
# Avoid using the pure GTK build on X11 where it is unsupported:
|
||||
Patch: emacs-desktop.patch
|
||||
# Hint what to do to avoid using the pure GTK build on X11, where it is
|
||||
# unsupported:
|
||||
Patch: emacs-pgtk-on-x-error-message.patch
|
||||
|
||||
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2276822
|
||||
|
|
@ -49,6 +52,16 @@ Patch: emacs-pgtk-on-x-error-message.patch
|
|||
# gets any new backends, this patch may need extending.
|
||||
Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch
|
||||
|
||||
# Don't override StartupWMClass. The overriding value doesn't work on
|
||||
# Wayland, and the default should be fine.
|
||||
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49505#67
|
||||
Patch: 0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch
|
||||
|
||||
# Don't wait for Emacs 31 before updating to Tree-sitter 0.26.
|
||||
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63555
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2420305
|
||||
Patch: 0001-Support-Tree-sitter-version-0.26-and-later.patch
|
||||
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: atk-devel
|
||||
BuildRequires: autoconf
|
||||
|
|
@ -118,16 +131,6 @@ BuildRequires: util-linux
|
|||
%global marker ()(64bit)
|
||||
%endif
|
||||
|
||||
# Emacs doesn't run without a font, rhbz#732422
|
||||
Requires: google-noto-sans-mono-vf-fonts
|
||||
|
||||
Requires(preun): /usr/sbin/alternatives
|
||||
Requires(posttrans): /usr/sbin/alternatives
|
||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||
Requires: libpixbufloader-xpm.so%{?marker}
|
||||
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
||||
Supplements: ((libwayland-server and emacs-common) unless emacs-nw)
|
||||
|
||||
%define site_lisp %{_datadir}/emacs/site-lisp
|
||||
%define site_start_d %{site_lisp}/site-start.d
|
||||
%define pkgconfig %{_datadir}/pkgconfig
|
||||
|
|
@ -140,23 +143,75 @@ editor. It contains special code editing features, a scripting language
|
|||
the editor.
|
||||
}
|
||||
|
||||
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
||||
Requires: (emacs-pgtk = %{epoch}:%{version}-%{release} or emacs-gtk+x11 = %{epoch}:%{version}-%{release} or emacs-lucid = %{epoch}:%{version}-%{release} or emacs-nw = %{epoch}:%{version}-%{release})
|
||||
|
||||
Suggests: (emacs-nw if fedora-release-identity-basic)
|
||||
Suggests: (emacs-nw if fedora-release-cloud)
|
||||
Suggests: (emacs-nw if fedora-release-container)
|
||||
Suggests: (emacs-nw if fedora-release-coreos)
|
||||
Suggests: (emacs-gtk+x11 if fedora-release-i3)
|
||||
Suggests: (emacs-nw if fedora-release-iot)
|
||||
Suggests: (emacs-gtk+x11 if fedora-release-matecompiz)
|
||||
Suggests: (emacs-pgtk if fedora-release-miraclewm)
|
||||
Suggests: (emacs-pgtk if fedora-release-miraclewm-atomic)
|
||||
Suggests: (emacs-pgtk if fedora-release-mobility)
|
||||
Suggests: (emacs-nw if fedora-release-server)
|
||||
Suggests: (emacs-pgtk if fedora-release-silverblue)
|
||||
Suggests: (emacs-pgtk if fedora-release-sway)
|
||||
Suggests: (emacs-pgtk if fedora-release-sway-atomic)
|
||||
Suggests: (emacs-nw if fedora-release-toolbx)
|
||||
Suggests: (emacs-pgtk if fedora-release-workstation)
|
||||
Suggests: (emacs-gtk+x11 if fedora-release-xfce)
|
||||
|
||||
## If you know the best variant for these editions, please fill
|
||||
## them in.
|
||||
# Suggests: (emacs- if fedora-release-budgie)
|
||||
# Suggests: (emacs- if fedora-release-budgie-atomic)
|
||||
# Suggests: (emacs- if fedora-release-cinnamon)
|
||||
# Suggests: (emacs- if fedora-release-compneuro)
|
||||
# Suggests: (emacs- if fedora-release-cosmic)
|
||||
# Suggests: (emacs- if fedora-release-cosmic-atomic)
|
||||
# Suggests: (emacs- if fedora-release-designsuite)
|
||||
# Suggests: (emacs- if fedora-release-kde)
|
||||
# Suggests: (emacs- if fedora-release-kde-mobile)
|
||||
# Suggests: (emacs- if fedora-release-kinoite)
|
||||
# Suggests: (emacs- if fedora-release-kinoite-mobile)
|
||||
# Suggests: (emacs- if fedora-release-lxqt)
|
||||
# Suggests: (emacs- if fedora-release-soas)
|
||||
# Suggests: (emacs- if fedora-release-wsl)
|
||||
|
||||
%description
|
||||
%desc
|
||||
This package provides an emacs binary with support for Wayland, using the
|
||||
|
||||
|
||||
%package pgtk
|
||||
Summary: GNU Emacs text editor with GTK toolkit for Wayland
|
||||
|
||||
# Emacs doesn't run without a font, rhbz#732422
|
||||
Requires: google-noto-sans-mono-vf-fonts
|
||||
|
||||
Requires(preun): /usr/sbin/alternatives
|
||||
Requires(posttrans): /usr/sbin/alternatives
|
||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||
Requires: libpixbufloader-xpm.so%{?marker}
|
||||
Supplements: ((libwayland-server and emacs) unless emacs-nw)
|
||||
|
||||
%description pgtk
|
||||
%desc
|
||||
This package provides an emacs-pgtk binary with support for Wayland, using the
|
||||
GTK toolkit.
|
||||
|
||||
|
||||
%if %{with gtkx11}
|
||||
%package gtk+x11
|
||||
Summary: GNU Emacs text editor with GTK toolkit X support
|
||||
Summary: GNU Emacs text editor with GTK toolkit for X11
|
||||
Requires: google-noto-sans-mono-vf-fonts
|
||||
Requires(preun): /usr/sbin/alternatives
|
||||
Requires(posttrans): /usr/sbin/alternatives
|
||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||
Requires: libpixbufloader-xpm.so%{?marker}
|
||||
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
||||
Supplements: ((xorg-x11-server-Xorg and emacs-common) unless emacs-nw)
|
||||
Supplements: ((xorg-x11-server-Xorg and emacs) unless emacs-nw)
|
||||
|
||||
%description gtk+x11
|
||||
%desc
|
||||
|
|
@ -167,12 +222,11 @@ Window System, using the GTK toolkit.
|
|||
|
||||
%if %{with lucid}
|
||||
%package lucid
|
||||
Summary: GNU Emacs text editor with Lucid toolkit X support
|
||||
Summary: GNU Emacs text editor with Lucid toolkit for X11
|
||||
Requires: google-noto-sans-mono-vf-fonts
|
||||
Requires(preun): /usr/sbin/alternatives
|
||||
Requires(posttrans): /usr/sbin/alternatives
|
||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description lucid
|
||||
%desc
|
||||
|
|
@ -187,7 +241,6 @@ Summary: GNU Emacs text editor with no window system support
|
|||
Requires(preun): /usr/sbin/alternatives
|
||||
Requires(posttrans): /usr/sbin/alternatives
|
||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||
Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
||||
Provides: emacs-nox = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: emacs-nox < 1:30
|
||||
|
||||
|
|
@ -200,9 +253,7 @@ support, for running on a terminal only.
|
|||
|
||||
%package -n emacsclient
|
||||
Summary: Remotely control GNU Emacs
|
||||
|
||||
# This is a moving target whilst Fedora 40 is still receivng updates:
|
||||
Conflicts: emacs-common < %{epoch}:%{version}-%{release}
|
||||
Conflicts: emacs-common < 1:29.4-12
|
||||
|
||||
%description -n emacsclient
|
||||
%desc
|
||||
|
|
@ -218,16 +269,16 @@ License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND BSD-3-Cl
|
|||
Requires(preun): /usr/sbin/alternatives
|
||||
Requires(posttrans): /usr/sbin/alternatives
|
||||
Requires: /usr/bin/readlink
|
||||
Requires: %{name}-filesystem
|
||||
Requires: %{name}-filesystem >= 1:30.2
|
||||
Requires: emacsclient
|
||||
Requires: libgccjit
|
||||
Recommends: (emacs or emacs-gtk+x11 or emacs-lucid or emacs-nw)
|
||||
Recommends: emacs = %{epoch}:%{version}-%{release}
|
||||
Recommends: enchant2
|
||||
Recommends: info
|
||||
Provides: %{name}-el = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: emacs-el < 1:24.3-29
|
||||
# transient.el is provided by emacs in lisp/transient.el
|
||||
Provides: emacs-transient = 0.3.7
|
||||
Provides: emacs-transient = 0.7.2.2
|
||||
# the existing emacs-transient package is obsoleted by emacs 28+, last package
|
||||
# version as of the release of emacs 28.1 is obsoleted
|
||||
Obsoletes: emacs-transient < 0.3.0-4
|
||||
|
|
@ -238,7 +289,10 @@ Recommends: /usr/bin/git
|
|||
Recommends: gcc
|
||||
Recommends: (gcc-c++ if libtree-sitter < 0.24.0)
|
||||
|
||||
Recommends: libtree-sitter-java
|
||||
%global _local_file_attrs emacs_lisp
|
||||
%{load:%SOURCE10}
|
||||
%global __emacs_lisp_recommends \
|
||||
%{_builddir}/%{name}-%{version}/build-pgtk/src/emacs -x %SOURCE11
|
||||
|
||||
%description common
|
||||
%desc
|
||||
|
|
@ -415,11 +469,37 @@ cat > macros.emacs << EOF
|
|||
%%_emacs_version %{version}
|
||||
%%_emacs_ev %{?epoch:%{epoch}:}%{version}
|
||||
%%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
%%_emacs_archsitelispdir %%{_libdir}/emacs/site-lisp
|
||||
%%_emacs_sitelispdir %{site_lisp}
|
||||
%%_emacs_sitestartdir %{site_start_d}
|
||||
%%_emacs_bytecompile(W) /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%*
|
||||
EOF
|
||||
|
||||
cat > 00-dynamic-module-dir.el << 'EOF'
|
||||
;;; 00-dynamic-module-dir.el --- Add arch-specifc dir to load-path -*- lexical-binding: t -*-
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This directory is for installing Emacs dynamic modules into. See
|
||||
;; also RPM macro %%_emacs_archsitelispdir.
|
||||
|
||||
(add-to-list 'load-path "%{_libdir}/emacs/site-lisp")
|
||||
|
||||
;;; 00-dynamic-module-dir.el ends here
|
||||
EOF
|
||||
|
||||
cat > 10-source-directory.el << 'EOF'
|
||||
;;; 10-source-directory.el --- Set source-directory -*- lexical-binding: t -*-
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This solves rhbz#474958; Function `update-directory-autoloads' now
|
||||
;; finally works.
|
||||
|
||||
(setq source-directory "%{_datadir}/emacs/%{version}/")
|
||||
|
||||
;;; 10-source-directory.el ends here
|
||||
EOF
|
||||
|
||||
%install
|
||||
%if %{with nw}
|
||||
|
|
@ -474,24 +554,18 @@ ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nox
|
|||
# Make sure movemail isn't setgid
|
||||
chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
|
||||
|
||||
mkdir -p %{buildroot}%{site_lisp}
|
||||
mkdir -p %{buildroot}%{site_lisp} %{buildroot}%{site_start_d}
|
||||
install -p -m 0644 %SOURCE5 %{buildroot}%{site_lisp}/site-start.el
|
||||
install -p -m 0644 %SOURCE6 %{buildroot}%{site_lisp}
|
||||
install -p -m 0644 00-dynamic-module-dir.el %{buildroot}%{site_start_d}/
|
||||
install -p -m 0644 10-source-directory.el %{buildroot}%{site_start_d}/
|
||||
|
||||
# This solves bz#474958, "update-directory-autoloads" now finally
|
||||
# works the path is different each version, so we'll generate it here
|
||||
echo "(setq source-directory \"%{_datadir}/emacs/%{version}/\")" \
|
||||
>> %{buildroot}%{site_lisp}/site-start.el
|
||||
|
||||
mv %{buildroot}%{_bindir}/{etags,etags.emacs}
|
||||
mv %{buildroot}%{_mandir}/man1/{ctags.1.gz,gctags.1.gz}
|
||||
mv %{buildroot}%{_mandir}/man1/{etags.1.gz,etags.emacs.1.gz}
|
||||
mv %{buildroot}%{_bindir}/{ctags,gctags}
|
||||
|
||||
# BZ 927996
|
||||
mv %{buildroot}%{_infodir}/{info.info.gz,info.gz}
|
||||
|
||||
mkdir -p %{buildroot}%{site_lisp}/site-start.d
|
||||
|
||||
# Default initialization file
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/skel
|
||||
install -p -m 0644 %SOURCE4 %{buildroot}%{_sysconfdir}/skel/.emacs
|
||||
|
|
@ -500,9 +574,14 @@ install -p -m 0644 %SOURCE4 %{buildroot}%{_sysconfdir}/skel/.emacs
|
|||
mkdir -p %{buildroot}/%{pkgconfig}
|
||||
install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig}
|
||||
|
||||
# Install rpm macro definition file
|
||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
|
||||
install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||
# Install rpm macros
|
||||
mkdir -p \
|
||||
%{buildroot}%{_fileattrsdir} \
|
||||
%{buildroot}%{_rpmconfigdir} \
|
||||
%{buildroot}%{_rpmmacrodir}
|
||||
install -p -m 0644 %SOURCE10 %{buildroot}%{_fileattrsdir}
|
||||
install -p -m 0755 %SOURCE11 %{buildroot}%{_rpmconfigdir}
|
||||
install -p -m 0644 macros.emacs %{buildroot}%{_rpmmacrodir}
|
||||
|
||||
# After everything is installed, remove info dir
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
|
|
@ -615,12 +694,14 @@ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xm
|
|||
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
|
||||
|
||||
|
||||
%preun
|
||||
%preun pgtk
|
||||
if [ $1 = 0 ]; then
|
||||
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-desktop || :
|
||||
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-pgtk || :
|
||||
fi
|
||||
|
||||
%posttrans
|
||||
%posttrans pgtk
|
||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-desktop 85 || :
|
||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-pgtk 80 || :
|
||||
|
||||
%if %{with lucid}
|
||||
|
|
@ -660,7 +741,7 @@ if [ $1 = 0 ]; then
|
|||
fi
|
||||
|
||||
%posttrans nw
|
||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 70 || :
|
||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 65 || :
|
||||
# The preun scriptlet of packages before 29.4-5 will remove this symlink
|
||||
# after it has been installed, so we may need to put it back:
|
||||
if [ $1 = 2 -a ! -h %{_bindir}/emacs-nw ]; then
|
||||
|
|
@ -669,17 +750,14 @@ fi
|
|||
%endif
|
||||
|
||||
%preun common
|
||||
if [ $1 = 0 ]; then
|
||||
/usr/sbin/alternatives --remove emacs.etags %{_bindir}/etags.emacs || :
|
||||
fi
|
||||
|
||||
%posttrans common
|
||||
/usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
||||
--slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || :
|
||||
/usr/sbin/alternatives --remove emacs.etags %{_bindir}/etags.emacs || :
|
||||
|
||||
|
||||
%files -f pgtk-filelist -f pgtk-dirlist
|
||||
%files
|
||||
|
||||
%files pgtk -f pgtk-filelist -f pgtk-dirlist
|
||||
%ghost %{_bindir}/emacs
|
||||
%{_bindir}/emacs-desktop
|
||||
%{_bindir}/emacs-%{version}-pgtk
|
||||
%{_bindir}/emacs-pgtk
|
||||
%{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
|
||||
|
|
@ -714,12 +792,13 @@ fi
|
|||
|
||||
%files common -f common-filelist -f info-filelist
|
||||
%config(noreplace) %{_sysconfdir}/skel/.emacs
|
||||
%{_fileattrsdir}/emacs_lisp.attr
|
||||
%{_rpmconfigdir}/emacs_lisp.rec
|
||||
%{_rpmconfigdir}/macros.d/macros.emacs
|
||||
%license build-pgtk/etc/COPYING
|
||||
%doc build-pgtk/doc/NEWS build-pgtk/BUGS build-pgtk/README
|
||||
%{_bindir}/ebrowse
|
||||
%{_bindir}/emacs-desktop
|
||||
%{_bindir}/etags.emacs
|
||||
%{_bindir}/etags
|
||||
%{_bindir}/gctags
|
||||
%{_datadir}/applications/emacs.desktop
|
||||
%{_datadir}/applications/emacs-mail.desktop
|
||||
|
|
@ -730,12 +809,11 @@ fi
|
|||
%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg
|
||||
%{_mandir}/man1/ebrowse.1*
|
||||
%{_mandir}/man1/emacs.1*
|
||||
%{_mandir}/man1/etags.emacs.1*
|
||||
%{_mandir}/man1/etags.1*
|
||||
%{_mandir}/man1/gctags.1*
|
||||
%dir %{_datadir}/emacs/%{version}
|
||||
%{_datadir}/emacs/%{version}/etc
|
||||
%{_datadir}/emacs/%{version}/site-lisp
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %{_libdir}/%{name}/%{version}
|
||||
%dir %{native_lisp}
|
||||
%dir %{_libexecdir}/emacs
|
||||
|
|
@ -749,6 +827,7 @@ fi
|
|||
%attr(0644,root,root) %config %{site_lisp}/site-start.el
|
||||
%{pkgconfig}/emacs.pc
|
||||
|
||||
|
||||
%files devel
|
||||
%{_includedir}/emacs-module.h
|
||||
|
||||
|
|
|
|||
5
emacs_lisp.attr
Normal file
5
emacs_lisp.attr
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# -*- rpm-spec -*-
|
||||
|
||||
%__emacs_lisp_recommends %{_rpmconfigdir}/emacs_lisp.rec
|
||||
%__emacs_lisp_path %{_datadir}/emacs/.+\.el(\.gz)?$
|
||||
%__emacs_lisp_protocol multifile
|
||||
49
emacs_lisp.rec
Executable file
49
emacs_lisp.rec
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/emacs -x
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Inspect Emacs Lisp files for usage of Tree-sitter parsers, and
|
||||
;; generate RPM Recommends for those.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(setq backtrace-on-error-noninteractive nil
|
||||
jka-compr-verbose nil)
|
||||
|
||||
(condition-case nil
|
||||
(while (setq filename (read-from-minibuffer ""))
|
||||
(when (string-match-p (rx ".el" (optional ".gz") line-end)
|
||||
filename)
|
||||
(condition-case err
|
||||
(let* ((symlink-target (file-symlink-p filename))
|
||||
(source-filename
|
||||
(if (and (stringp symlink-target)
|
||||
(string-match-p (rx line-start "/")
|
||||
symlink-target))
|
||||
(file-name-concat (getenv "RPM_BUILD_ROOT")
|
||||
symlink-target)
|
||||
filename)))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents source-filename)
|
||||
(setq parsers ())
|
||||
(while
|
||||
(search-forward-regexp
|
||||
(rx "(" (or "treesit-ensure-installed"
|
||||
"treesit-parser-create"
|
||||
"treesit-ready-p")
|
||||
" '")
|
||||
nil t)
|
||||
(add-to-list 'parsers (thing-at-point 'symbol t)))
|
||||
(when parsers
|
||||
(princ (concat ";" filename "\n"))
|
||||
(dolist (parser parsers)
|
||||
(princ (concat "tree-sitter(" parser ")" "\n"))))))
|
||||
|
||||
;; Missing files are probably caused by "broken" symlinks
|
||||
;; (which may actually be fulfilled by some other package).
|
||||
(file-missing (message "warning: %s" (error-message-string err))))))
|
||||
(end-of-file nil))
|
||||
|
||||
;;; emacs_lisp.rec ends here
|
||||
|
|
@ -1,9 +1,16 @@
|
|||
;;; loaded before user's ".emacs" file and default.el
|
||||
;;; site-start.el --- loaded before user's ".emacs" file and default.el -*- lexical-binding: t -*-
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup
|
||||
(mapc
|
||||
'load
|
||||
(delete-dups
|
||||
(mapcar 'file-name-sans-extension
|
||||
(directory-files
|
||||
"/usr/share/emacs/site-lisp/site-start.d" t "\\.elc?\\'"))))
|
||||
|
||||
;;; site-start.el ends here
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (emacs-30.1.tar.xz) = 511a6a1d2a170a207913692e1349344b70a0b5202b8d1ae27dc7256e589c77ae9e35da16fc2a098bf9f1b8d0f60233f452ed8d6744b70b907f3484c42f2d7d7f
|
||||
SHA512 (emacs-30.1.tar.xz.sig) = 59ef724ff765fb76b9b9cfb8bd3853e001e9e6cefa65e2c49822238c11d619f916284f5b118cefff1bcd6c70f4ebcc1e420754cc225002164b56ced3caa954bd
|
||||
SHA512 (emacs-30.2.tar.xz) = 313432d11e95c74f8cd35c5b1da442e6223f5d40f9173c55883c0339ecbfb97a0bedf79177ef8902afd3e33c078a233777bed01f5caffa1e7524f17d58bfc9a2
|
||||
SHA512 (emacs-30.2.tar.xz.sig) = ab5b5d0624b37ac662cf9914e8807fc37ee273c107f1a19ca75a527b6b9a85ce35f9436d03d8a988876cce7e7bebcc6c4a1251b0ceb08785b56bf42743f246e1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue