From 2e4fece2319bee38e08022d4f9db122763d06b46 Mon Sep 17 00:00:00 2001 From: Mark Wright Date: Sun, 27 Mar 2022 17:22:24 +1100 Subject: sci-mathematics/twelf: Fix ROOT in src_prepare, old-style backquotes Thanks to Sam James and Toralf Forster for reporting. Fix: calls svnversion command that does not exist, thanks to Agostino Sarubbo for reporting. Closes: https://bugs.gentoo.org/836112 Closes: https://bugs.gentoo.org/803296 Closes: https://bugs.gentoo.org/728028 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Mark Wright --- .../files/twelf-1.7.1-doc-guide-Makefile.patch | 8 +- ...f-1.7.1-emacs-fix-old-style-backquotes-p1.patch | 45 ++++++++ ...f-1.7.1-emacs-fix-old-style-backquotes-p2.patch | 36 +++++++ ...f-1.7.1-emacs-fix-old-style-backquotes-p3.patch | 13 +++ .../files/twelf-1.7.1-remove-svnversion.patch | 13 +++ sci-mathematics/twelf/twelf-1.7.1-r1.ebuild | 114 -------------------- sci-mathematics/twelf/twelf-1.7.1-r2.ebuild | 118 +++++++++++++++++++++ 7 files changed, 231 insertions(+), 116 deletions(-) create mode 100644 sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p1.patch create mode 100644 sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p2.patch create mode 100644 sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p3.patch create mode 100644 sci-mathematics/twelf/files/twelf-1.7.1-remove-svnversion.patch delete mode 100644 sci-mathematics/twelf/twelf-1.7.1-r1.ebuild create mode 100644 sci-mathematics/twelf/twelf-1.7.1-r2.ebuild diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch index 092b12b20dc0..a63735cbe917 100644 --- a/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch +++ b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch @@ -1,6 +1,6 @@ --- twelf-orig/doc/guide/Makefile 2002-09-24 13:59:23.000000000 +1000 -+++ twelf/doc/guide/Makefile 2012-12-10 00:51:02.758835185 +1100 -@@ -38,8 +38,8 @@ ++++ twelf/doc/guide/Makefile 2022-03-27 16:45:03.547456767 +1100 +@@ -38,10 +38,12 @@ twelf_toc.html : twelf.texi; @echo "---------- Creating HTML: twelf_*.html" @@ -10,4 +10,8 @@ +# $(texi2html) -check *.html; twelf.pdf : twelf.texi; ++ @echo "---------- Removing old files: twelf.{aux,log}" ++ rm -f twelf.{aux,log}; @echo "---------- Creating unindexed PDF: twelf.pdf" + $(pdftex) twelf.texi; + @echo "---------- Creating index twelf.cps" diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p1.patch b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p1.patch new file mode 100644 index 000000000000..b8d78d97e04e --- /dev/null +++ b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p1.patch @@ -0,0 +1,45 @@ +commit 141018e777eecc064909c6f5429c8a0d0c048b5a +Author: Kartik Singhal +Date: Sat Feb 27 16:13:35 2021 -0600 + + Fix old-style backquotes, following https://github.com/ProofGeneral/PG/commit/ca601291ddf22739847c629f2d687ab3f68b4786 + +diff --git a/emacs/twelf.el b/emacs/twelf.el +index 1e4d46f..57b9cee 100644 +--- a/emacs/twelf.el ++++ b/emacs/twelf.el +@@ -2884,7 +2884,7 @@ Mode map + (setq twelf-server-display-commands (not twelf-server-display-commands))) + + (defconst twelf-options-menu +- (` ("Options" ++ `("Options" + (, (toggle "Display Commands" '(twelf-toggle-server-display-commands) + 'twelf-server-display-commands)) + ("chatter" +@@ -2922,7 +2922,7 @@ Mode map + ("Table." + ["strategy" (twelf-set-parm "Table.strategy") t] + ["strengthen" (twelf-set-parm "Table.strengthen") t]) +- ["Reset Menubar" twelf-reset-menu t])) ++ ["Reset Menubar" twelf-reset-menu t]) + "Menu to change options in Twelf mode.") + + (defconst twelf-timers-menu +@@ -2939,12 +2939,12 @@ Mode map + "Fontify current buffer using font-lock minor mode.") + + (defconst twelf-syntax-menu +- (` ("Syntax Highlighting" ++ `("Syntax Highlighting" + ["Highlight Declaration" twelf-font-fontify-decl t] + ["Highlight Buffer" twelf-font-fontify-buffer t] +- ;(, (toggle "Immediate Highlighting" 'toggle-twelf-font-immediate +- ;'font-lock-mode)) +- )) ++ ;;(, (toggle "Immediate Highlighting" 'toggle-twelf-font-immediate ++ ;;'font-lock-mode)) ++ ) + "Menu for syntax highlighting in Twelf mode.") + + (easy-menu-define twelf-menu (list twelf-mode-map) diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p2.patch b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p2.patch new file mode 100644 index 000000000000..aae0ef7b75e3 --- /dev/null +++ b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p2.patch @@ -0,0 +1,36 @@ +commit c1bec0d0b9fa506e36bb364b1765191b159e6c4c +Author: Kartik Singhal +Date: Sat Feb 27 16:24:24 2021 -0600 + + Argh, two more places + +diff --git a/emacs/twelf.el b/emacs/twelf.el +index 57b9cee..0a04a35 100644 +--- a/emacs/twelf.el ++++ b/emacs/twelf.el +@@ -2833,13 +2833,13 @@ Mode map + "Menu for printing commands.") + + (defconst twelf-recon-menu +- (` ("Reconstruction" ++ `("Reconstruction" + (, (toggle "trace" '(twelf-toggle-recon-trace) + '(string-equal twelf-recon-trace "true"))) +- ["traceMode" (twelf-set-parm "Recon.traceMode") t]))) ++ ["traceMode" (twelf-set-parm "Recon.traceMode") t])) + + (defconst twelf-trace-menu +- (` ("Trace" ++ `("Trace" + ("trace" + ["All" twelf-trace-trace-all t] + ["None" twelf-trace-untrace t] +@@ -2852,7 +2852,7 @@ Mode map + ("detail" + (, (radio "0" '(twelf-set "Trace.detail" "0") '(equal twelf-trace-detail "0"))) + (, (radio "1*" '(twelf-set "Trace.detail" "1") '(equal twelf-trace-detail "1"))) +- (, (radio "2" '(twelf-set "Trace.detail" "2") '(equal twelf-trace-detail "2"))))))) ++ (, (radio "2" '(twelf-set "Trace.detail" "2") '(equal twelf-trace-detail "2")))))) + + (defconst twelf-server-state-menu + '("Server State" diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p3.patch b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p3.patch new file mode 100644 index 000000000000..b5f13b114456 --- /dev/null +++ b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-fix-old-style-backquotes-p3.patch @@ -0,0 +1,13 @@ +diff --git a/emacs/auc-menu.el b/emacs/auc-menu.el +index f6483b0..602c6fc 100644 +--- a/emacs/auc-menu.el ++++ b/emacs/auc-menu.el +@@ -92,7 +92,7 @@ + (defmacro easy-menu-define (symbol maps doc menu) + "Define SYMBOL to be a menu for keymaps MAPS. + DOC is the documentation string, and MENU is a Lucid style menu." +- (` (progn ++ `( (progn + (require 'auc-menu) ;For `easy-menu-do-define'. + (defvar (, symbol) nil (, doc)) + (easy-menu-do-define (quote (, symbol)) (, maps) (, doc) (, menu))))) diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-remove-svnversion.patch b/sci-mathematics/twelf/files/twelf-1.7.1-remove-svnversion.patch new file mode 100644 index 000000000000..64d29f3cba31 --- /dev/null +++ b/sci-mathematics/twelf/files/twelf-1.7.1-remove-svnversion.patch @@ -0,0 +1,13 @@ +diff --git a/bin/buildid b/bin/buildid +index bb60cd3..5972ac0 100755 +--- a/bin/buildid ++++ b/bin/buildid +@@ -5,7 +5,7 @@ + # William Lovas, 08-27-2010 + # + +-REV=`svnversion` ++REV="1813" + DATE=`date "+%m/%d/%y at %H:%M:%S"` + HOST=`hostname` + diff --git a/sci-mathematics/twelf/twelf-1.7.1-r1.ebuild b/sci-mathematics/twelf/twelf-1.7.1-r1.ebuild deleted file mode 100644 index 26846927797b..000000000000 --- a/sci-mathematics/twelf/twelf-1.7.1-r1.ebuild +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit elisp-common multilib - -MY_PN="${PN}-src" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="Implementation of the logical framework LF" -HOMEPAGE="http://twelf.org/" -SRC_URI="http://twelf.plparty.org/releases/${MY_P}.tar.gz" - -SLOT="0/${PV}" -KEYWORDS="~amd64 ~x86" -LICENSE="BSD-2" -IUSE="doc emacs examples" - -# tests reference non-existing directory TEST -RESTRICT="test" - -RDEPEND=" - >=dev-lang/mlton-20180207 - doc? ( - virtual/latex-base - app-text/texi2html - ) - emacs? ( - >=app-editors/emacs-23.1:* - )" -DEPEND="${RDEPEND}" - -S=${WORKDIR}/${PN} - -SITEFILE=50${PN}-gentoo.el - -PATCHES=( - "${FILESDIR}/${PN}-1.7.1-doc-guide-twelf-dot-texi.patch" - "${FILESDIR}/${PN}-1.7.1-doc-guide-Makefile.patch" - "${FILESDIR}/${PN}-1.7.1-emacs-twelf.patch" - "${FILESDIR}/${PN}-1.7.1-emacs-twelf-init.patch" - "${FILESDIR}/${PN}-1.7.1-Makefile.patch" - "${FILESDIR}/${PN}-1.7.1-mlton-mlb.patch" - "${FILESDIR}/${PN}-1.7.1-mlton-20180207.patch" -) - -src_prepare() { - default - sed \ - -e "s@/usr/bin@${ROOT}usr/bin@g" \ - -e "s@/usr/share@${ROOT}usr/share@" \ - -i "${S}"/emacs/twelf-init.el \ - || die "Could not set ROOT in ${S}/emacs/twelf-init.el" -} - -src_compile() { - emake mlton CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -fno-PIE" - if use emacs ; then - pushd "${S}/emacs" || die "Could change directory to emacs" - elisp-compile \ - auc-menu.el \ - twelf-font.el \ - twelf-init.el \ - twelf.el \ - || die "emacs elisp compile failed" - popd - fi - if use doc; then - pushd doc/guide - emake all - popd - fi -} - -ins_example_dir() { - insinto "/usr/share/${PN}/examples/${1}" - pushd "${S}/${1}" - doins -r * - popd -} - -src_install() { - if use emacs ; then - elisp-install ${PN} emacs/*.{el,elc} - cp "${FILESDIR}"/${SITEFILE} "${S}" - elisp-site-file-install ${SITEFILE} - fi - if use examples; then - ins_example_dir examples - ins_example_dir examples-clp - ins_example_dir examples-delphin - fi - dobin bin/twelf-server - if use doc; then - local DOCS=( doc/guide/twelf.dvi doc/guide/twelf.ps doc/guide/twelf.pdf ) - local HTML_DOCS=( doc/html/index.html doc/guide/twelf/. ) - doinfo doc/guide/twelf.info - einstalldocs - fi -} - -pkg_postinst() { - if use emacs; then - elisp-site-regen - ewarn "For twelf emacs, add this line to ~/.emacs" - ewarn "" - ewarn '(load (concat twelf-root "/twelf-init.el"))' - fi -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/sci-mathematics/twelf/twelf-1.7.1-r2.ebuild b/sci-mathematics/twelf/twelf-1.7.1-r2.ebuild new file mode 100644 index 000000000000..0a7237065277 --- /dev/null +++ b/sci-mathematics/twelf/twelf-1.7.1-r2.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit elisp-common + +MY_PN="${PN}-src" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Implementation of the logical framework LF" +HOMEPAGE="http://twelf.org/" +SRC_URI="http://twelf.plparty.org/releases/${MY_P}.tar.gz" + +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +LICENSE="BSD-2" +IUSE="doc emacs examples" + +# tests reference non-existing directory TEST +RESTRICT="test" + +RDEPEND=" + >=dev-lang/mlton-20180207 + doc? ( + virtual/latex-base + app-text/texi2html + ) + emacs? ( + >=app-editors/emacs-23.1:* + )" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${PN} + +SITEFILE=50${PN}-gentoo.el + +PATCHES=( + "${FILESDIR}"/${PN}-1.7.1-doc-guide-twelf-dot-texi.patch + "${FILESDIR}"/${PN}-1.7.1-doc-guide-Makefile.patch + "${FILESDIR}"/${PN}-1.7.1-emacs-twelf.patch + "${FILESDIR}"/${PN}-1.7.1-emacs-twelf-init.patch + "${FILESDIR}"/${PN}-1.7.1-Makefile.patch + "${FILESDIR}"/${PN}-1.7.1-mlton-mlb.patch + "${FILESDIR}"/${PN}-1.7.1-mlton-20180207.patch + "${FILESDIR}"/${PN}-1.7.1-remove-svnversion.patch # 728028 + "${FILESDIR}"/${PN}-1.7.1-emacs-fix-old-style-backquotes-p1.patch # 803296 + "${FILESDIR}"/${PN}-1.7.1-emacs-fix-old-style-backquotes-p2.patch + "${FILESDIR}"/${PN}-1.7.1-emacs-fix-old-style-backquotes-p3.patch +) + +src_prepare() { + default + sed \ + -e "s@/usr/bin@${PREFIX}/usr/bin@g" \ + -e "s@/usr/share@${PREFIIX}/usr/share@" \ + -i "${S}"/emacs/twelf-init.el \ + || die "Could not set PREFIX in ${S}/emacs/twelf-init.el" +} + +src_compile() { + emake mlton CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -fno-PIE" + if use emacs ; then + pushd "${S}/emacs" || die "Could change directory to emacs" + elisp-compile \ + auc-menu.el \ + twelf-font.el \ + twelf-init.el \ + twelf.el \ + || die "emacs elisp compile failed" + popd + fi + if use doc; then + pushd doc/guide + emake -j1 + popd + fi +} + +ins_example_dir() { + insinto "/usr/share/${PN}/examples/${1}" + pushd "${S}/${1}" + doins -r * + popd +} + +src_install() { + if use emacs ; then + elisp-install ${PN} emacs/*.{el,elc} + cp "${FILESDIR}"/${SITEFILE} "${S}" + elisp-site-file-install ${SITEFILE} + fi + if use examples; then + ins_example_dir examples + ins_example_dir examples-clp + ins_example_dir examples-delphin + fi + dobin bin/twelf-server + if use doc; then + local DOCS=( doc/guide/twelf.dvi doc/guide/twelf.ps doc/guide/twelf.pdf ) + local HTML_DOCS=( doc/html/index.html doc/guide/twelf/. ) + doinfo doc/guide/twelf.info + einstalldocs + fi +} + +pkg_postinst() { + if use emacs; then + elisp-site-regen + ewarn "For twelf emacs, add this line to ~/.emacs" + ewarn "" + ewarn '(load (concat twelf-root "/twelf-init.el"))' + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen +} -- cgit v1.2.3-65-gdbad