public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emacs/geiser-mit/, app-emacs/geiser-mit/files/
@ 2022-08-31 23:37 Maciej Barć
  0 siblings, 0 replies; only message in thread
From: Maciej Barć @ 2022-08-31 23:37 UTC (permalink / raw
  To: gentoo-commits

commit:     fd0f35d3a5010ffcaf74976e8f464ec66b74ba0a
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 31 23:32:16 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Wed Aug 31 23:37:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd0f35d3

app-emacs/geiser-mit: new package; add version 0.15

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-emacs/geiser-mit/Manifest                      |  1 +
 app-emacs/geiser-mit/files/50geiser-mit-gentoo.el  |  5 ++
 .../geiser-mit/files/geiser-mit-src-dir.patch      | 13 ++++++
 app-emacs/geiser-mit/geiser-mit-0.15.ebuild        | 54 ++++++++++++++++++++++
 app-emacs/geiser-mit/metadata.xml                  | 17 +++++++
 5 files changed, 90 insertions(+)

diff --git a/app-emacs/geiser-mit/Manifest b/app-emacs/geiser-mit/Manifest
new file mode 100644
index 000000000000..ba55cbe2ce89
--- /dev/null
+++ b/app-emacs/geiser-mit/Manifest
@@ -0,0 +1 @@
+DIST geiser-mit-0.15.tar.gz 6216 BLAKE2B d14f412730e86ef580bb13426e3af558403acc00cd1c742507f66f80369a644581c98310803430439ff09b1c13eefe550f6dbc3289897ae86e6471b7197d73cc SHA512 e2d7a81a66293e5232f510eb4cf1707c3ab64ac77a36c29b55d17275a2d0141302e28d29e4280e388f3107db3a961e757e9127219e36b76b1680fa54fee48593

diff --git a/app-emacs/geiser-mit/files/50geiser-mit-gentoo.el b/app-emacs/geiser-mit/files/50geiser-mit-gentoo.el
new file mode 100644
index 000000000000..ede47a83779c
--- /dev/null
+++ b/app-emacs/geiser-mit/files/50geiser-mit-gentoo.el
@@ -0,0 +1,5 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'run-mit "geiser-mit"
+  "Start a Geiser MIT/GNU Scheme REPL." t)
+(autoload 'switch-to-mit "geiser-mit"
+  "Start a Geiser MIT/GNU Scheme REPL, or switch to a running one." t)

diff --git a/app-emacs/geiser-mit/files/geiser-mit-src-dir.patch b/app-emacs/geiser-mit/files/geiser-mit-src-dir.patch
new file mode 100644
index 000000000000..9d0c26f43def
--- /dev/null
+++ b/app-emacs/geiser-mit/files/geiser-mit-src-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/geiser-mit.el b/geiser-mit.el
+index 53edf0e..2dfe9fa 100644
+--- a/geiser-mit.el
++++ b/geiser-mit.el
+@@ -61,7 +61,7 @@
+     geiser-mit-binary))
+ 
+ (defvar geiser-mit-scheme-dir
+-  (expand-file-name "src" (file-name-directory load-file-name))
++  (expand-file-name "src" "@SITEETC@")
+   "Directory where the MIT scheme geiser package is installed.")
+ 
+ (defun geiser-mit--parameters ()

diff --git a/app-emacs/geiser-mit/geiser-mit-0.15.ebuild b/app-emacs/geiser-mit/geiser-mit-0.15.ebuild
new file mode 100644
index 000000000000..06d56c668e75
--- /dev/null
+++ b/app-emacs/geiser-mit/geiser-mit-0.15.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NEED_EMACS=24.4
+
+inherit elisp
+
+DESCRIPTION="MIT/GNU Scheme's implementation of the Geiser protocols"
+HOMEPAGE="https://gitlab.com/emacs-geiser/mit/"
+SRC_URI="https://gitlab.com/emacs-geiser/mit/-/archive/${PV}/mit-${PV}.tar.gz
+	-> ${P}.tar.gz"
+S="${WORKDIR}"/mit-${PV}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+	app-emacs/geiser
+	dev-scheme/mit-scheme
+"
+BDEPEND="${RDEPEND}"
+
+DOCS=( readme.org )
+PATCHES=( "${FILESDIR}"/${PN}-src-dir.patch )
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+	elisp_src_prepare
+
+	sed "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" -i ${PN}.el || die
+}
+
+src_compile() {
+	elisp_src_compile
+
+	local scms=$(find "${S}" -type f -name "*.scm")
+	local opts=(
+		--interactive
+		--eval "(for-each (lambda (s) (load (symbol->string s))) '(${scms}))"
+		--eval "(for-each (lambda (s) (cf (symbol->string s))) '(${scms}))"
+		--eval "(exit)"
+	)
+	mit-scheme "${opts[@]}" || die "failed to compile scheme source files"
+}
+
+src_install() {
+	elisp_src_install
+
+	insinto ${SITEETC}/${PN}
+	doins -r src
+}

diff --git a/app-emacs/geiser-mit/metadata.xml b/app-emacs/geiser-mit/metadata.xml
new file mode 100644
index 000000000000..ff6c7d9aad3c
--- /dev/null
+++ b/app-emacs/geiser-mit/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+  <maintainer type="project">
+    <email>gnu-emacs@gentoo.org</email>
+    <name>Gentoo GNU Emacs project</name>
+  </maintainer>
+  <maintainer type="project">
+    <email>scheme@gentoo.org</email>
+    <name>Gentoo Scheme Project</name>
+  </maintainer>
+  <upstream>
+    <bugs-to>https://gitlab.com/emacs-geiser/mit/-/issues/</bugs-to>
+    <remote-id type="gitlab">emacs-geiser/mit</remote-id>
+  </upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-31 23:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 23:37 [gentoo-commits] repo/gentoo:master commit in: app-emacs/geiser-mit/, app-emacs/geiser-mit/files/ Maciej Barć

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox