aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2021-03-16 10:36:51 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2021-03-16 10:36:51 +0000
commit978085e31e2e843e0b5c77a872a92cb57c96ca0d (patch)
tree56f1417c0a4f4dda38593dd59f095abf6fbe81d3 /editors
parent17ef49165a1f975ecc8523ce8073e4ffeb8eb589 (diff)
downloadports-978085e31e2e843e0b5c77a872a92cb57c96ca0d.tar.gz
ports-978085e31e2e843e0b5c77a872a92cb57c96ca0d.zip
Add editors/sly-named-readtables
SLY support for multiple named readtables in the same file PR: 253993 Submitted by: Olivier Certner <olivier.freebsd@free.fr>
Notes
Notes: svn path=/head/; revision=568550
Diffstat (limited to 'editors')
-rw-r--r--editors/Makefile1
-rw-r--r--editors/sly-named-readtables/Makefile58
-rw-r--r--editors/sly-named-readtables/distinfo3
-rw-r--r--editors/sly-named-readtables/files/patch-sly-named-readtables.el12
-rw-r--r--editors/sly-named-readtables/pkg-descr4
-rw-r--r--editors/sly-named-readtables/pkg-message26
-rw-r--r--editors/sly-named-readtables/pkg-plist4
7 files changed, 108 insertions, 0 deletions
diff --git a/editors/Makefile b/editors/Makefile
index ed9573123831..1b9bc60e526d 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -232,6 +232,7 @@
SUBDIR += shed
SUBDIR += slime
SUBDIR += sly
+ SUBDIR += sly-named-readtables
SUBDIR += ssed
SUBDIR += sted
SUBDIR += tamago
diff --git a/editors/sly-named-readtables/Makefile b/editors/sly-named-readtables/Makefile
new file mode 100644
index 000000000000..2f20abdc0015
--- /dev/null
+++ b/editors/sly-named-readtables/Makefile
@@ -0,0 +1,58 @@
+# $FreeBSD$
+
+PORTNAME= sly-named-readtables
+PORTVERSION= 20191013
+CATEGORIES= editors elisp
+PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX}
+
+MAINTAINER= olce.freebsd.ports@certner.fr
+COMMENT= Support different readtables in the same file for SLY
+
+LICENSE= PD
+
+MY_DEPENDS= ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/sly/sly.el:editors/sly
+BUILD_DEPENDS= ${MY_DEPENDS}
+RUN_DEPENDS= ${MY_DEPENDS}
+
+USES= emacs
+USE_GITHUB= yes
+GH_ACCOUNT= joaotavora
+GH_TAGNAME= a5a42674ccffa97ccd5e4e9742beaf3ea719931f
+
+NO_ARCH= yes
+
+EMACS_COMPILE= ${EMACS_CMD} --batch --no-site-file -L ${WRKSRC} -f batch-byte-compile
+
+PLIST_THIS_LISPDIR= ${EMACS_VERSION_SITE_LISPDIR}/${PORTNAME}
+THIS_LISPDIR= ${PREFIX}/${PLIST_THIS_LISPDIR}
+PLIST_SUB+= THIS_LISPDIR=${PLIST_THIS_LISPDIR}
+
+# File is buggy and can't be used as documented upstream
+EXCLUDED_FILES= ${PORTNAME}-autoloads.el
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+PORTDOCS= README.md screenshot.png
+PORTEXAMPLES= example.lisp
+
+do-build:
+ cd ${WRKSRC} && ${EMACS_COMPILE} sly-*.el
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${THIS_LISPDIR}
+ (cd ${WRKSRC} && \
+ ${COPYTREE_SHARE} . ${STAGEDIR}${THIS_LISPDIR} \
+ "! ( -depth 1 ( ${EXCLUDED_FILES:C/^(.*)$/-name \1 -o/} \
+ ${PORTDOCS:C/^(.*)$/-name \1 -o/} \
+ ${PORTEXAMPLES:C/^(.*)$/-name \1 -o/} \
+ -name LICENSE -o -name *\.md -o -name \.[^.]* ) )")
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:%=${WRKSRC}/%} ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${PORTEXAMPLES:%=${WRKSRC}/%} ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>
diff --git a/editors/sly-named-readtables/distinfo b/editors/sly-named-readtables/distinfo
new file mode 100644
index 000000000000..f27b193d71aa
--- /dev/null
+++ b/editors/sly-named-readtables/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1613660267
+SHA256 (joaotavora-sly-named-readtables-20191013-a5a42674ccffa97ccd5e4e9742beaf3ea719931f_GH0.tar.gz) = 4ec6067b74a2126ddae5275629358a6d58fe85a4de63717b66b80af121858183
+SIZE (joaotavora-sly-named-readtables-20191013-a5a42674ccffa97ccd5e4e9742beaf3ea719931f_GH0.tar.gz) = 28276
diff --git a/editors/sly-named-readtables/files/patch-sly-named-readtables.el b/editors/sly-named-readtables/files/patch-sly-named-readtables.el
new file mode 100644
index 000000000000..244a2ddce669
--- /dev/null
+++ b/editors/sly-named-readtables/files/patch-sly-named-readtables.el
@@ -0,0 +1,12 @@
+--- sly-named-readtables.el.orig 2019-10-13 21:38:43 UTC
++++ sly-named-readtables.el
+@@ -107,9 +107,5 @@
+ (defun sly-named-readtables--pass-readtable ()
+ (list :named-readtable (sly-named-readtables--grok-current-table)))
+
+-;;;###autoload
+-(with-eval-after-load 'sly
+- (add-to-list 'sly-contribs 'sly-named-readtables 'append))
+-
+ (provide 'sly-named-readtables)
+ ;;; sly-named-readtables.el ends here
diff --git a/editors/sly-named-readtables/pkg-descr b/editors/sly-named-readtables/pkg-descr
new file mode 100644
index 000000000000..f588581c3152
--- /dev/null
+++ b/editors/sly-named-readtables/pkg-descr
@@ -0,0 +1,4 @@
+sly-named-readtables is an external contrib for SLY that enables
+different readtables to be active in different parts of the same file.
+
+WWW: https://github.com/joaotavora/sly-named-readtables
diff --git a/editors/sly-named-readtables/pkg-message b/editors/sly-named-readtables/pkg-message
new file mode 100644
index 000000000000..1704c974af5f
--- /dev/null
+++ b/editors/sly-named-readtables/pkg-message
@@ -0,0 +1,26 @@
+[
+{ type: install
+ message: <<EOM
+To use the sly-named-readtables contrib, you must:
+1. Register sly-named-readtables into SLY. You just have to add this line to
+ some init file:
+(require 'sly-named-readtables)
+ Doing this is not strictly necessary if you want to automatically activate
+ this contrib using `sly-contribs' (see below), but it never hurts.
+ This contrib's automatic activation at load was disabled, contrary to what
+ upstream does. Upstream's autoloads file is consequently not necessary, and
+ not included in this package.
+2. Ensure that system NAMED-READTABLES is loaded by your Common Lisp
+ implementation.
+
+If you want sly-named-readtables to be automatically activated on each new SLY
+session, put it in the `sly-contribs' list. E.g., you can add something like
+this in some Emacs' init file:
+(setq sly-contribs '(sly-fancy sly-named-readtables))
+or customize the variable.
+
+To enable it on demand in already running SLY sessions instead, just use the
+`sly-enable-contrib' command, or modify `sly-contribs' and run `sly-setup'.
+EOM
+}
+]
diff --git a/editors/sly-named-readtables/pkg-plist b/editors/sly-named-readtables/pkg-plist
new file mode 100644
index 000000000000..609f7b6f4f3a
--- /dev/null
+++ b/editors/sly-named-readtables/pkg-plist
@@ -0,0 +1,4 @@
+%%THIS_LISPDIR%%/sly-named-readtables.el
+%%THIS_LISPDIR%%/sly-named-readtables.elc
+%%THIS_LISPDIR%%/slynk-named-readtables.asd
+%%THIS_LISPDIR%%/slynk-named-readtables.lisp