From 978085e31e2e843e0b5c77a872a92cb57c96ca0d Mon Sep 17 00:00:00 2001 From: Li-Wen Hsu Date: Tue, 16 Mar 2021 10:36:51 +0000 Subject: [PATCH] Add editors/sly-named-readtables SLY support for multiple named readtables in the same file PR: 253993 Submitted by: Olivier Certner --- editors/Makefile | 1 + editors/sly-named-readtables/Makefile | 58 +++++++++++++++++++ editors/sly-named-readtables/distinfo | 3 + .../files/patch-sly-named-readtables.el | 12 ++++ editors/sly-named-readtables/pkg-descr | 4 ++ editors/sly-named-readtables/pkg-message | 26 +++++++++ editors/sly-named-readtables/pkg-plist | 4 ++ 7 files changed, 108 insertions(+) create mode 100644 editors/sly-named-readtables/Makefile create mode 100644 editors/sly-named-readtables/distinfo create mode 100644 editors/sly-named-readtables/files/patch-sly-named-readtables.el create mode 100644 editors/sly-named-readtables/pkg-descr create mode 100644 editors/sly-named-readtables/pkg-message create mode 100644 editors/sly-named-readtables/pkg-plist 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 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: <