From 0e5fac6b660ffada04f1ac66ee503acd7ef88143 Mon Sep 17 00:00:00 2001 From: Maciej Barć Date: Fri, 21 Jan 2022 16:19:50 +0100 Subject: app-emacs/racket-mode: install racket files to SITEETC; BDEPEND for raco MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Maciej Barć --- .../racket-mode/files/50racket-mode-gentoo.el | 3 ++ .../files/racket-mode-racket-util.el-defvar.patch | 12 ++++++ .../racket-mode/racket-mode-20220120-r1.ebuild | 48 ++++++++++++++++++++++ app-emacs/racket-mode/racket-mode-20220120.ebuild | 47 --------------------- 4 files changed, 63 insertions(+), 47 deletions(-) create mode 100644 app-emacs/racket-mode/files/racket-mode-racket-util.el-defvar.patch create mode 100644 app-emacs/racket-mode/racket-mode-20220120-r1.ebuild delete mode 100644 app-emacs/racket-mode/racket-mode-20220120.ebuild (limited to 'app-emacs') diff --git a/app-emacs/racket-mode/files/50racket-mode-gentoo.el b/app-emacs/racket-mode/files/50racket-mode-gentoo.el index 79223161d42b..fd53f002f73a 100644 --- a/app-emacs/racket-mode/files/50racket-mode-gentoo.el +++ b/app-emacs/racket-mode/files/50racket-mode-gentoo.el @@ -4,3 +4,6 @@ (add-to-list 'auto-mode-alist '("\\.rkt\\'" . racket-mode)) (add-to-list 'auto-mode-alist '("\\.rktd\\'" . racket-mode)) (add-to-list 'auto-mode-alist '("\\.rktl\\'" . racket-mode)) + +(setq racket--rkt-source-dir (expand-file-name "./racket/" "@SITEETC@")) +(setq racket--run.rkt (expand-file-name "main.rkt" racket--rkt-source-dir)) diff --git a/app-emacs/racket-mode/files/racket-mode-racket-util.el-defvar.patch b/app-emacs/racket-mode/files/racket-mode-racket-util.el-defvar.patch new file mode 100644 index 000000000000..d9d65c44bb89 --- /dev/null +++ b/app-emacs/racket-mode/files/racket-mode-racket-util.el-defvar.patch @@ -0,0 +1,12 @@ +index 0992711..a8897b4 100644 +--- a/racket-util.el ++++ b/racket-util.el +@@ -93,7 +93,7 @@ When installed as a package, this can be found from the variable + `load-file-name'. When developing interactively, get it from the + .el buffer file name.") + +-(defconst racket--rkt-source-dir ++(defvar racket--rkt-source-dir + (expand-file-name "./racket/" racket--el-source-dir) + "Path to dir of our Racket source files. ") + diff --git a/app-emacs/racket-mode/racket-mode-20220120-r1.ebuild b/app-emacs/racket-mode/racket-mode-20220120-r1.ebuild new file mode 100644 index 000000000000..57ecaaeeaa9a --- /dev/null +++ b/app-emacs/racket-mode/racket-mode-20220120-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +H=59b227b1aab315cdaa798648e47c4c4a8f71ddba +NEED_EMACS=25.1 + +inherit elisp + +DESCRIPTION="Emacs modes for Racket: edit, REPL, check-syntax, debug, profile, and more" +HOMEPAGE="https://github.com/greghendershott/racket-mode/" +SRC_URI="https://github.com/greghendershott/${PN}/archive/${H}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${H}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="dev-scheme/racket:=" +BDEPEND="${RDEPEND}" + +DOCS=( CONTRIBUTING.md README.md THANKS.md ) +ELISP_TEXINFO="doc/racket-mode.texi" +PATCHES=( "${FILESDIR}/${PN}-racket-util.el-defvar.patch" ) +SITEFILE="50${PN}-gentoo.el" + +src_compile() { + elisp_src_compile + + # Equivalent to compiling from Emacs with "racket-mode-start-faster", + # as this is installed globally we compile it now. + ebegin "Compiling Racket source files" + find "${S}/racket" -type f -name "*.rkt" -exec raco make -v {} + + eend $? "failed to compile Racket source files" || die +} + +src_test() { + emake test-racket +} + +src_install() { + elisp_src_install + + # Install Racket files + insinto "${SITEETC}/${PN}" + doins -r racket +} diff --git a/app-emacs/racket-mode/racket-mode-20220120.ebuild b/app-emacs/racket-mode/racket-mode-20220120.ebuild deleted file mode 100644 index f5a0c1b1896a..000000000000 --- a/app-emacs/racket-mode/racket-mode-20220120.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -H=59b227b1aab315cdaa798648e47c4c4a8f71ddba -NEED_EMACS=25.1 - -inherit elisp - -DESCRIPTION="Emacs modes for Racket: edit, REPL, check-syntax, debug, profile, and more" -HOMEPAGE="https://github.com/greghendershott/racket-mode/" -SRC_URI="https://github.com/greghendershott/${PN}/archive/${H}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${H}" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -RDEPEND="dev-scheme/racket:=" -DEPEND="${RDEPEND}" - -DOCS=( CONTRIBUTING.md README.md THANKS.md ) -ELISP_TEXINFO="doc/racket-mode.texi" -SITEFILE="50${PN}-gentoo.el" - -src_compile() { - elisp_src_compile - - # Equivalent to compiling from Emacs with "racket-mode-start-faster", - # as this is installed globally we compile it now. - ebegin "Compiling Racket source files" - find "${S}/racket" -type f -name "*.rkt" -exec raco make -v {} + - eend $? "failed to compile Racket source files" || die -} - -src_test() { - emake test-racket -} - -src_install() { - elisp_src_install - - # Install Racket files - insinto "${SITELISP}/${PN}" - doins -r racket -} -- cgit v1.2.3-65-gdbad