From 07ecef2a9c7d5d7356204e5140eb4763a7054c20 Mon Sep 17 00:00:00 2001 From: Jacek Migacz Date: Thu, 22 Aug 2024 21:17:27 +0200 Subject: [PATCH 1/7] Unset custom linker flags --- emacs.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/emacs.spec b/emacs.spec index 67be675..8060406 100644 --- a/emacs.spec +++ b/emacs.spec @@ -319,8 +319,6 @@ export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" mkdir build-lucid && cd build-lucid ln -s ../configure . -LDFLAGS=-Wl,-z,relro; export LDFLAGS; - %configure --with-cairo \ --with-dbus \ --with-gif \ @@ -370,8 +368,6 @@ cd .. mkdir build-gtk+x11 && cd build-gtk+x11 ln -s ../configure . -LDFLAGS=-Wl,-z,relro; export LDFLAGS; - %configure --with-cairo \ --with-dbus \ --with-gif \ @@ -401,8 +397,6 @@ cd .. mkdir build-pgtk && cd build-pgtk ln -s ../configure . -LDFLAGS=-Wl,-z,relro; export LDFLAGS; - %configure --with-cairo \ --with-dbus \ --with-gif \ From 1d7139dcc20dfe988689b976592a29f161a9d1a8 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 28 Aug 2024 12:35:08 +0100 Subject: [PATCH 2/7] Relax libtree-sitter requirement. --- emacs.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 8060406..81d03ed 100644 --- a/emacs.spec +++ b/emacs.spec @@ -244,7 +244,6 @@ Obsoletes: emacs-transient < 0.3.0-4 # https://github.com/tree-sitter/tree-sitter/issues/3296 Requires: libtree-sitter >= 0.22.5 -Requires: libtree-sitter < 0.23 # Ideally, we'd package all tree-sitter parsers as RPMs, but, in the # meantime, we need the following packages for From 66296574a243bc1c30b80a5fd6261f3d608bc17c Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 22 Sep 2024 19:49:58 +0100 Subject: [PATCH 3/7] Drop WebKit, since recent versions are incompatible with Emacs https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66068 --- emacs.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/emacs.spec b/emacs.spec index 81d03ed..4f6748a 100644 --- a/emacs.spec +++ b/emacs.spec @@ -1,8 +1,6 @@ # This file is encoded in UTF-8. -*- coding: utf-8 -*- %bcond gpm %[!(0%{?rhel} >= 10)] -%bcond webkit %[!(0%{?rhel} >= 10)] - %bcond_without gtkx11 %bcond_without lucid %bcond_without nw @@ -104,10 +102,6 @@ BuildRequires: zlib-devel BuildRequires: gpm-devel %endif -%if %{with webkit} -BuildRequires: webkit2gtk4.1-devel -%endif - %if %{with lucid} || %{with gtkx11} BuildRequires: libX11-devel BuildRequires: libXau-devel @@ -385,7 +379,6 @@ ln -s ../configure . --with-x-toolkit=gtk3 \ --with-xinput2 \ --with-xpm \ - %{?with_webkit:--with-xwidgets} %{setarch} %make_build bootstrap %{setarch} %make_build rm src/emacs-%{version}.* @@ -413,7 +406,6 @@ ln -s ../configure . --with-tree-sitter \ --with-webp \ --with-xpm \ - %{?with_webkit:--with-xwidgets} %{setarch} %make_build bootstrap %{setarch} %make_build rm src/emacs-%{version}.* From 88a3c703535663905c2943a90be7fa4ac0980359 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 22 Sep 2024 21:59:29 +0100 Subject: [PATCH 4/7] Fix typo. --- emacs.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs.spec b/emacs.spec index 4f6748a..a2b716c 100644 --- a/emacs.spec +++ b/emacs.spec @@ -378,7 +378,7 @@ ln -s ../configure . --with-webp \ --with-x-toolkit=gtk3 \ --with-xinput2 \ - --with-xpm \ + --with-xpm %{setarch} %make_build bootstrap %{setarch} %make_build rm src/emacs-%{version}.* @@ -405,7 +405,7 @@ ln -s ../configure . --with-tiff \ --with-tree-sitter \ --with-webp \ - --with-xpm \ + --with-xpm %{setarch} %make_build bootstrap %{setarch} %make_build rm src/emacs-%{version}.* From cf88b767de5d9b5151130d340442b0b108497af6 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 24 Sep 2024 12:33:14 +0100 Subject: [PATCH 5/7] Rebuild against tree-sitter-0.23.0-2.fc41. From 155673080c59b0ec73fcab658b652b7ef3eb3692 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 26 Sep 2024 14:45:55 +0100 Subject: [PATCH 6/7] =?UTF-8?q?Don=E2=80=99t=20mention=20removed=20games?= =?UTF-8?q?=20in=20menus=20or=20documentation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 0001-Pong-and-Tetris-are-excluded.patch | 86 +++++++++++++++++++++++++ emacs.spec | 17 +++-- 2 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 0001-Pong-and-Tetris-are-excluded.patch diff --git a/0001-Pong-and-Tetris-are-excluded.patch b/0001-Pong-and-Tetris-are-excluded.patch new file mode 100644 index 0000000..989764a --- /dev/null +++ b/0001-Pong-and-Tetris-are-excluded.patch @@ -0,0 +1,86 @@ +From 6f29ac0393bb0bb70c8122d9f1bda0ae5d8cee24 Mon Sep 17 00:00:00 2001 +From: Peter Oliver +Date: Thu, 26 Sep 2024 13:20:06 +0100 +Subject: [PATCH] Pong and Tetris are excluded. + +--- + doc/emacs/ack.texi | 2 +- + doc/emacs/misc.texi | 7 +------ + lisp/menu-bar.el | 6 ------ + test/src/doc-tests.el | 4 ++-- + 4 files changed, 4 insertions(+), 15 deletions(-) + +diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi +index 5ec5cd53fa6..26f174831ca 100644 +--- a/doc/emacs/ack.texi ++++ b/doc/emacs/ack.texi +@@ -228,7 +228,7 @@ Acknowledgments + + @item + Glynn Clements provided @file{gamegrid.el} and a couple of games that +-use it, Snake and Tetris. ++use it, including Snake. + + @item + Andrew Cohen wrote @file{spam-wash.el}, to decode and clean email before +diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi +index 41e37fd094e..38e281bf59c 100644 +--- a/doc/emacs/misc.texi ++++ b/doc/emacs/misc.texi +@@ -3248,14 +3248,9 @@ Amusements + nato-region} converts the text in the region to NATO phonetic + alphabet; @kbd{M-x denato-region} converts it back. + +-@findex pong +-@cindex Pong game +-@findex tetris +-@cindex Tetris + @findex snake + @cindex Snake +- @kbd{M-x pong}, @kbd{M-x snake} and @kbd{M-x tetris} are +-implementations of the well-known Pong, Snake and Tetris games. ++ @kbd{M-x snake} is an implementation of the well-known Snake game. + + @findex solitaire + @cindex solitaire +diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el +index bcfa83cf8e4..1b0a0bce6a5 100644 +--- a/lisp/menu-bar.el ++++ b/lisp/menu-bar.el +@@ -1658,18 +1658,12 @@ menu-bar-games-menu + (bindings--define-key menu [zone] + '(menu-item "Zone Out" zone + :help "Play tricks with Emacs display when Emacs is idle")) +- (bindings--define-key menu [tetris] +- '(menu-item "Tetris" tetris +- :help "Falling blocks game")) + (bindings--define-key menu [solitaire] + '(menu-item "Solitaire" solitaire + :help "Get rid of all the stones")) + (bindings--define-key menu [snake] + '(menu-item "Snake" snake + :help "Move snake around avoiding collisions")) +- (bindings--define-key menu [pong] +- '(menu-item "Pong" pong +- :help "Bounce the ball to your opponent")) + (bindings--define-key menu [mult] + '(menu-item "Multiplication Puzzle" mpuz + :help "Exercise brain with multiplication")) +diff --git a/test/src/doc-tests.el b/test/src/doc-tests.el +index b41a7ac5fb6..24befb737bc 100644 +--- a/test/src/doc-tests.el ++++ b/test/src/doc-tests.el +@@ -34,8 +34,8 @@ doc-tests-documentation/autoloaded-macro + + (ert-deftest doc-tests-documentation/autoloaded-defun () + (skip-unless noninteractive) +- (should (autoloadp (symbol-function 'tetris))) +- (should (stringp (documentation 'tetris)))) ; See Bug#52969. ++ (should (autoloadp (symbol-function 'doctor))) ++ (should (stringp (documentation 'doctor)))) ; See Bug#52969. + + (ert-deftest doc-tests-quoting-style () + (should (memq (text-quoting-style) '(grave straight curve)))) +-- +2.46.1 + diff --git a/emacs.spec b/emacs.spec index a2b716c..a6db4f7 100644 --- a/emacs.spec +++ b/emacs.spec @@ -24,6 +24,9 @@ Source7: emacs-terminal.desktop Source8: emacs-terminal.sh Source9: emacs-desktop.sh +# Avoid trademark issues +Patch: 0001-Pong-and-Tetris-are-excluded.patch + # rhbz#713600 Patch: emacs-spellchecker.patch @@ -279,18 +282,14 @@ Development header files for Emacs. cat '%{SOURCE2}' '%{SOURCE3}' > keyring %{gpgverify} --keyring=keyring --signature='%{SOURCE1}' --data='%{SOURCE0}' rm keyring + %autosetup -p1 -autoconf - # Avoid trademark issues -grep -v "tetris.elc" lisp/Makefile.in > lisp/Makefile.in.new \ - && mv lisp/Makefile.in.new lisp/Makefile.in -grep -v "pong.elc" lisp/Makefile.in > lisp/Makefile.in.new \ - && mv lisp/Makefile.in.new lisp/Makefile.in -rm -f lisp/play/tetris.el lisp/play/tetris.elc -rm -f lisp/play/pong.el lisp/play/pong.elc -sed -i "s/'tetris/'doctor/" test/src/doc-tests.el +rm lisp/play/pong.el lisp/play/pong.elc \ + lisp/play/tetris.el lisp/play/tetris.elc + +autoconf %ifarch %{ix86} %define setarch setarch %{_arch} -R From 78d229edc10ab70c03da3d34fcf1511b36ca9f12 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 3 Oct 2024 11:58:28 +0100 Subject: [PATCH 7/7] RPM git-core is sufficient for fetching Tree-sitter grammar source (#2316238) --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index a6db4f7..a3a06a9 100644 --- a/emacs.spec +++ b/emacs.spec @@ -247,7 +247,7 @@ Requires: libtree-sitter >= 0.22.5 # treesit-install-language-grammar to be able to build the parsers for # us at runtime: Recommends: ((gcc and gcc-c++) or clang) -Recommends: git +Recommends: /usr/bin/git Recommends: libtree-sitter-java