From a04537df062a4149d0a518c1d68e54f7757f1020 Mon Sep 17 00:00:00 2001 From: Gleb Popov Date: Mon, 15 Aug 2022 16:06:51 +0300 Subject: math/hs-Agda: Unbreak and enable compiling emacs mode files. --- math/hs-Agda/Makefile | 13 +++++-------- .../files/patch-src_data_emacs-mode_agda2-mode.el | 22 ++++++++++++++++++++++ math/hs-Agda/pkg-plist | 8 ++++++++ 3 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 math/hs-Agda/files/patch-src_data_emacs-mode_agda2-mode.el diff --git a/math/hs-Agda/Makefile b/math/hs-Agda/Makefile index 4d8a1bce5991..fa372c306e69 100644 --- a/math/hs-Agda/Makefile +++ b/math/hs-Agda/Makefile @@ -1,6 +1,6 @@ PORTNAME= Agda PORTVERSION= 2.6.2.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= math haskell MAINTAINER= haskell@FreeBSD.org @@ -82,18 +82,15 @@ USE_CABAL= OneTuple-0.3.1_2 \ witherable-0.4.2_2 \ zlib-0.6.3.0 -EXECUTABLES= agda-mode agda -CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES} +CABAL_EXECUTABLES= agda-mode agda +CABAL_WRAPPER_SCRIPTS= ${CABAL_EXECUTABLES} agda_DATADIR_VARS= Agda agda-mode_DATADIR_VARS= Agda -post-build: -# Do not compile Emacs mode files until https://github.com/agda/agda/issues/4610 is fixed -# ${SETENV} Agda_datadir=${WRKSRC}/src/data $$(find ${WRKSRC}/dist-newstyle -name agda-mode -type f -perm +111) compile - post-install: + ${SETENV} Agda_datadir=${WRKSRC}/src/data ${STAGEDIR}${PREFIX}/libexec/cabal/agda-mode compile + find ${WRKSRC}/src/data/lib/prim/Agda -name '*.agda' -exec ${SETENV} Agda_datadir=${WRKSRC}/src/data ${STAGEDIR}${PREFIX}/libexec/cabal/agda {} \; ${MKDIR} ${STAGEDIR}${DATADIR}/lib/prim/Agda - find ${WRKSRC}/src/data/lib/prim/Agda -name '*.agda' -exec ${SETENV} ${PORTNAME}_datadir=${WRKSRC}/src/data ${STAGEDIR}${PREFIX}/libexec/cabal/agda {} \; cd ${WRKSRC}/src/data && ${COPYTREE_SHARE} lib ${STAGEDIR}${DATADIR} cd ${WRKSRC}/src/data && ${COPYTREE_SHARE} emacs-mode ${STAGEDIR}${DATADIR} diff --git a/math/hs-Agda/files/patch-src_data_emacs-mode_agda2-mode.el b/math/hs-Agda/files/patch-src_data_emacs-mode_agda2-mode.el new file mode 100644 index 000000000000..6f42665200dc --- /dev/null +++ b/math/hs-Agda/files/patch-src_data_emacs-mode_agda2-mode.el @@ -0,0 +1,22 @@ +--- src/data/emacs-mode/agda2-mode.el.orig 2001-09-09 01:46:40 UTC ++++ src/data/emacs-mode/agda2-mode.el +@@ -1306,7 +1306,8 @@ top-level scope." + + (agda2-maybe-normalised + agda2-elaborate-give +- "Elaborate check the given expression against the hole's type and fill in hole with the elaborated term" ++ "Elaborate check the given expression against the hole's type and fill ++in hole with the elaborated term" + "Cmd_elaborate_give" + "expression to elaborate and give") + +@@ -1324,7 +1325,8 @@ top-level scope." + + (agda2-maybe-normalised + agda2-goal-and-context-and-checked +- "Shows the context, the goal and check the given expression's against the hole's type" ++ "Shows the context, the goal and check the given expression's against ++the hole's type" + "Cmd_goal_type_context_check" + "expression to type") + diff --git a/math/hs-Agda/pkg-plist b/math/hs-Agda/pkg-plist index 694d4e40fe2e..4060154a17ae 100644 --- a/math/hs-Agda/pkg-plist +++ b/math/hs-Agda/pkg-plist @@ -1,12 +1,20 @@ %%DATADIR%%/emacs-mode/agda-input.el +%%DATADIR%%/emacs-mode/agda-input.elc %%DATADIR%%/emacs-mode/agda2-abbrevs.el +%%DATADIR%%/emacs-mode/agda2-abbrevs.elc %%DATADIR%%/emacs-mode/agda2-highlight.el +%%DATADIR%%/emacs-mode/agda2-highlight.elc %%DATADIR%%/emacs-mode/agda2-mode-pkg.el %%DATADIR%%/emacs-mode/agda2-mode.el +%%DATADIR%%/emacs-mode/agda2-mode.elc %%DATADIR%%/emacs-mode/agda2-queue.el +%%DATADIR%%/emacs-mode/agda2-queue.elc %%DATADIR%%/emacs-mode/agda2.el +%%DATADIR%%/emacs-mode/agda2.elc %%DATADIR%%/emacs-mode/annotation.el +%%DATADIR%%/emacs-mode/annotation.elc %%DATADIR%%/emacs-mode/eri.el +%%DATADIR%%/emacs-mode/eri.elc %%DATADIR%%/lib/prim/Agda/Builtin/Bool.agda %%DATADIR%%/lib/prim/Agda/Builtin/Bool.agdai %%DATADIR%%/lib/prim/Agda/Builtin/Char.agda -- cgit v1.2.3