summaryrefslogtreecommitdiff
path: root/app-emacs/gap-mode
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-04 00:00:19 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-04 00:00:19 +0100
commit7f3fecbb5b871825fe9632f46659869cab6a3769 (patch)
treedd2be4fe7ee3475ca4ad093698f0f8fd1e0965dc /app-emacs/gap-mode
parenta98588cfddf3d6e88a5f17d7f399b695163c7a85 (diff)
gentoo auto-resync : 04:05:2024 - 00:00:19
Diffstat (limited to 'app-emacs/gap-mode')
-rw-r--r--app-emacs/gap-mode/Manifest5
-rw-r--r--app-emacs/gap-mode/files/50gap-mode-gentoo.el7
-rw-r--r--app-emacs/gap-mode/files/gap-mode-2.2.2-warnings.patch119
-rw-r--r--app-emacs/gap-mode/gap-mode-2.2.2.ebuild60
-rw-r--r--app-emacs/gap-mode/metadata.xml32
5 files changed, 223 insertions, 0 deletions
diff --git a/app-emacs/gap-mode/Manifest b/app-emacs/gap-mode/Manifest
new file mode 100644
index 000000000000..f08688766649
--- /dev/null
+++ b/app-emacs/gap-mode/Manifest
@@ -0,0 +1,5 @@
+AUX 50gap-mode-gentoo.el 373 BLAKE2B 4067e609871ac3f96a8a1aaeb43647f9aeb495465013133c4f54e2330ceaf242b0ceb8533fa59467ac981f9459e3e1fc61b0afed21a2a68d382e74ba59661868 SHA512 84cf4406e09a82c1983215728af6b05b0d17e5d1e214e81ee33123d51e373367d0bb2485944386e80790943d6ec9a91a602d178985824a8938b394642d20f499
+AUX gap-mode-2.2.2-warnings.patch 3670 BLAKE2B da52997b1dedd63241bb42a00a04cd7413058fedee0b79a3a3294738c4e935ce7b948b5f442a67b954cfa16000f051b21d7059716d9567e29fd531d796013f22 SHA512 f7c099b51a3009c4250976fed05f21397d822a665b8f1575d526b71d4450247509716105af78948a70dc0fc2748caec0d1effc474d558d8e15ebd2a655561dcb
+DIST gap-mode-8439c3622e1f9e2ec1a8ef21020eb55e917f4416.tar.bz2 28804 BLAKE2B e8f9bbeaea5903f25e2101b874a397f556a9cf039077e5bb2afb9dfadaef339ac7258065fc9ae943a09a26165bbff34667d5e8045a615584ad22e3c1b004464b SHA512 1c1409d0a00e2e36c271a6e8d390d01fa02e60a6431cfbc7c8a592abf2276cc37e2b7f4cb7b7c31f640b3a38bde2907c85148c2a512a897457ce9db7735bdc75
+EBUILD gap-mode-2.2.2.ebuild 1515 BLAKE2B 4617f2cd980e08bb1e9298fab92bf1dc780f9232019939533fafdb9fecc4daa887094337e54cf81dbe7a208b4136f3afc1abef13fe3868b9cc7bcfa4da89c495 SHA512 e6f40c943ebd377d629149c0a19a1229d59e144819efa2a6851312576faea6b8f7304f15eb68c9ef62d822621133c99525ce1bbdc93aa71bd9951d752668f400
+MISC metadata.xml 765 BLAKE2B bf6ee70c34b0265af577f09f9c11fda29e90d0116e5622abe31af68e51f8ed4517890abd6cebb4907fc80b6f4e157a35cb32331c15470fdffa3410a44e7eb006 SHA512 93bdd8f4fb05c8ea95d1b2d3c81a09f19ed89f31ae73521f16dc4e2e274221be2a705795277d48edd2a495511ba13396cf385cbf1b051330c39b9c576fdef6b1
diff --git a/app-emacs/gap-mode/files/50gap-mode-gentoo.el b/app-emacs/gap-mode/files/50gap-mode-gentoo.el
new file mode 100644
index 000000000000..d242a99ab3b5
--- /dev/null
+++ b/app-emacs/gap-mode/files/50gap-mode-gentoo.el
@@ -0,0 +1,7 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'gap-mode "gap-mode" "GAP editing mode" t)
+(autoload 'gap "gap-process" "Run GAP in emacs buffer" t)
+(add-to-list 'auto-mode-alist '("\\.g\\'" . gap-mode))
+(add-to-list 'auto-mode-alist '("\\.gap\\'" . gap-mode))
+(add-to-list 'auto-mode-alist '("\\.gd\\'" . gap-mode))
+(add-to-list 'auto-mode-alist '("\\.gi\\'" . gap-mode))
diff --git a/app-emacs/gap-mode/files/gap-mode-2.2.2-warnings.patch b/app-emacs/gap-mode/files/gap-mode-2.2.2-warnings.patch
new file mode 100644
index 000000000000..3122fefdcdda
--- /dev/null
+++ b/app-emacs/gap-mode/files/gap-mode-2.2.2-warnings.patch
@@ -0,0 +1,119 @@
+From 8238a8eaa6a11e9e0d8e10bb84ae87021b78ea2a Mon Sep 17 00:00:00 2001
+From: Ivan Andrus <iandrus@adobe.com>
+Date: Wed, 13 Mar 2024 10:12:10 -0600
+Subject: [PATCH] Fix unknown definitions warning
+
+---
+ gap-mode.el | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gap-mode.el b/gap-mode.el
+index 148664c..655519a 100644
+--- a/gap-mode.el
++++ b/gap-mode.el
+@@ -590,6 +590,7 @@ end;"
+ (when gap-using-smie
+ (defvar gap-smie-grammar)
+ (declare-function gap-smie-rules "gap-smie")
++ (declare-function smie-setup "smie")
+ (smie-setup gap-smie-grammar #'gap-smie-rules)))
+
+ ;;}}}
+--
+GitLab
+
+From f8c95d793b1e90e65ca758d10b780592fc9ee2dd Mon Sep 17 00:00:00 2001
+From: Ivan Andrus <iandrus@adobe.com>
+Date: Mon, 29 Apr 2024 19:57:02 -0600
+Subject: [PATCH] Fix unknown definitions warnings
+
+---
+ gap-process.el | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gap-process.el b/gap-process.el
+index 8fa3062..1161161 100644
+--- a/gap-process.el
++++ b/gap-process.el
+@@ -260,6 +260,8 @@ which is much like GAP's C-l (\\[recenter] can be used to recenter)."
+ (set (make-local-variable 'paragraph-separate) "\\'")
+ (set (make-local-variable 'paragraph-start) comint-prompt-regexp)
+ (require 'gap-mode) ;; for gap-syntax-table and gap-font-lock-keywords
++ (eval-when-compile
++ (defvar gap-syntax-table))
+ (set-syntax-table gap-syntax-table)
+ (set (make-local-variable 'font-lock-defaults) '(gap-font-lock-keywords))
+ (use-local-map gap-process-map)
+@@ -548,6 +550,7 @@ With FULL, send two TABs to GAP to get a full list of completions."
+ (if (not (looking-at "\\_>"))
+ (if (not (re-search-forward "\\_>" nil t))
+ (error "Complete what?")))
++ (declare-function gap-ident-around-point "gap-mode")
+ (setq gap-completion-ident (gap-ident-around-point))
+ (if (not full)
+ (progn
+@@ -613,6 +616,7 @@ With FULL, send two TABs to GAP to get a full list of completions."
+ (setq gap-send-state 'normal))))
+
+ (defun gap-completion-at-point-function ()
++ (declare-function gap-ident-around-point-pos "gap-mode")
+ (let ((region (gap-ident-around-point-pos)))
+ (when region
+ (list (car region)
+--
+GitLab
+
+From 9722c596b7cb8fe003bac0332bac23c1d98bbe67 Mon Sep 17 00:00:00 2001
+From: Ivan Andrus <iandrus@adobe.com>
+Date: Mon, 29 Apr 2024 18:55:15 -0600
+Subject: [PATCH] Fix reference to free variable warning
+
+---
+ gap-smie.el | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/gap-smie.el b/gap-smie.el
+index 0bc444a..05e64e7 100644
+--- a/gap-smie.el
++++ b/gap-smie.el
+@@ -76,6 +76,12 @@
+ (defun gap-smie-rules (kind token)
+ "SMIE indentation rules for the GAP language.
+ See `smie-rules-function' for meaning of KIND and TOKEN."
++ (require 'gap-mode)
++ (eval-when-compile
++ ;; These are defined in gap-mode which depends on this file
++ (defvar gap-debug-indent)
++ (defvar gap-indent-list)
++ (defvar gap-indent-step))
+ (when (and gap-debug-indent
+ (not (use-region-p)))
+ (message "%s %s" kind token))
+--
+GitLab
+
+From 09b4082b6e28141537696bb832c8ecc975ec57d8 Mon Sep 17 00:00:00 2001
+From: Ivan Andrus <iandrus@adobe.com>
+Date: Mon, 29 Apr 2024 19:11:34 -0600
+Subject: [PATCH] Fix unused lexical variable warning
+
+---
+ gap-company.el | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gap-company.el b/gap-company.el
+index abdcd98..725ef15 100644
+--- a/gap-company.el
++++ b/gap-company.el
+@@ -22,7 +22,7 @@
+
+ (defun company-gap-backend (command &optional arg &rest ignored)
+ (interactive (list 'interactive))
+-
++ (ignore ignored)
+ (cl-case command
+ (interactive (company-begin-backend 'company-gap-backend))
+
+--
+GitLab
+
diff --git a/app-emacs/gap-mode/gap-mode-2.2.2.ebuild b/app-emacs/gap-mode/gap-mode-2.2.2.ebuild
new file mode 100644
index 000000000000..7956482529f1
--- /dev/null
+++ b/app-emacs/gap-mode/gap-mode-2.2.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp
+
+# There are no proper releases, so we have to track down the commit
+# that last bumped the version.
+COMMIT=8439c3622e1f9e2ec1a8ef21020eb55e917f4416
+
+DESCRIPTION="Major mode for editing and running GAP programs"
+HOMEPAGE="https://gitlab.com/gvol/gap-mode"
+SRC_URI="https://gitlab.com/gvol/${PN}/-/archive/${COMMIT}/${PN}-${COMMIT}.tar.bz2"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="completion lint"
+
+# Both company-mode and flycheck are needed to byte-compile the source.
+BDEPEND="
+ completion? ( app-emacs/company-mode )
+ lint? ( app-emacs/flycheck )
+"
+
+# You could argue that company-mode and flycheck are not hard runtime
+# dependencies because gap-company.el and gap-flycheck.el will typically
+# only be loaded in company-mode or flycheck-mode, but if we want to
+# support (say) `M-x load-library gap-company.el` without being crashy,
+# then we'll need the corresponding company.el installed.
+RDEPEND="
+ ${BDEPEND}
+ lint? ( dev-gap/gaplint )
+"
+
+PATCHES=( "${FILESDIR}/${P}-warnings.patch" )
+
+SITEFILE="50${PN}-gentoo.el"
+
+DOCS=( README.md emacs.gaprc )
+
+src_prepare(){
+ default
+
+ if ! use completion; then
+ rm gap-company.el || die
+ fi
+
+ if ! use lint; then
+ rm gap-flycheck.el || die
+ fi
+
+ # This defaults to a /usr/local path and expects
+ # the user to configure it.
+ sed -e 's~/usr/local/algebra/bin/gap~gap~' \
+ -i gap-process.el || die
+}
diff --git a/app-emacs/gap-mode/metadata.xml b/app-emacs/gap-mode/metadata.xml
new file mode 100644
index 000000000000..f5396d3da99a
--- /dev/null
+++ b/app-emacs/gap-mode/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+
+ <maintainer type="project">
+ <email>gnu-emacs@gentoo.org</email>
+ <name>Gentoo GNU Emacs project</name>
+ </maintainer>
+
+ <stabilize-allarches/>
+
+ <use>
+ <flag name="completion">
+ Install GAP backend for <pkg>app-emacs/company-mode</pkg> to
+ "complete anything."
+ </flag>
+
+ <flag name="lint">
+ Support automatically linting GAP code via
+ <pkg>app-emacs/flycheck</pkg> and <pkg>dev-gap/gaplint</pkg>.
+ </flag>
+ </use>
+
+ <upstream>
+ <remote-id type="gitlab">gvol/gap-mode</remote-id>
+ </upstream>
+
+</pkgmetadata>