pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ats2 ats2: Build emacs mode.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5adf43799617
branches:  trunk
changeset: 376924:5adf43799617
user:      nikita <nikita%pkgsrc.org@localhost>
date:      Thu Apr 14 20:13:19 2022 +0000

description:
ats2: Build emacs mode.

diffstat:

 lang/ats2/MESSAGE    |   9 +++++++++
 lang/ats2/Makefile   |  15 ++++++++++++++-
 lang/ats2/PLIST      |   4 +++-
 lang/ats2/options.mk |  13 +++++++++++++
 4 files changed, 39 insertions(+), 2 deletions(-)

diffs (74 lines):

diff -r bccd1a0f25fc -r 5adf43799617 lang/ats2/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ats2/MESSAGE Thu Apr 14 20:13:19 2022 +0000
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2022/04/14 20:13:19 nikita Exp $
+
+To use the Emacs ats mode add the following to your .emacs file:
+
+  (load-file "/usr/pkg/share/emacs/site-lisp/ats2-mode/ats2-mode.el")
+  (require 'ats-mode)
+
+===========================================================================
diff -r bccd1a0f25fc -r 5adf43799617 lang/ats2/Makefile
--- a/lang/ats2/Makefile        Thu Apr 14 18:52:21 2022 +0000
+++ b/lang/ats2/Makefile        Thu Apr 14 20:13:19 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2022/04/14 17:29:10 nikita Exp $
+# $NetBSD: Makefile,v 1.2 2022/04/14 20:13:19 nikita Exp $
 
 DISTNAME=      ATS2-Postiats-0.4.2
+PKGNAME=       ${DISTNAME:S/ATS2-Postiats/ats2/}
 CATEGORIES=    lang
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=ats2-lang/}
 EXTRACT_SUFX=  .tgz
@@ -16,4 +17,16 @@
 # build is not job safe
 MAKE_JOBS_SAFE=        no
 
+.include "options.mk"
+
+.if ${PKG_OPTIONS:Memacs}
+.include "../../editors/emacs/modules.mk"
+# flycheck is not packaged, only build ats-mode.
+pre-configure:
+       cd ${WRKSRC}/utils/emacs && ${EMACS_BIN} -batch -f batch-byte-compile ats2-mode.el
+       ${INSTALL_DATA_DIR} ${DESTDIR}${EMACS_LISPPREFIX}/ats2-mode
+       ${INSTALL_DATA} ${WRKSRC}/utils/emacs/ats2-mode.e* \
+               ${DESTDIR}${EMACS_LISPPREFIX}/ats2-mode
+.endif
+
 .include "../../mk/bsd.pkg.mk"
diff -r bccd1a0f25fc -r 5adf43799617 lang/ats2/PLIST
--- a/lang/ats2/PLIST   Thu Apr 14 18:52:21 2022 +0000
+++ b/lang/ats2/PLIST   Thu Apr 14 20:13:19 2022 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2022/04/14 17:29:10 nikita Exp $
+@comment $NetBSD: PLIST,v 1.2 2022/04/14 20:13:19 nikita Exp $
 bin/myatscc
 bin/patscc
 bin/patsopt
@@ -1724,3 +1724,5 @@
 @pkgdir lib/ats2-postiats-${PKGVERSION}/ccomp/atslib/output
 @pkgdir lib/ats2-postiats-${PKGVERSION}/ccomp/atslib/lib64
 @pkgdir lib/ats2-postiats-${PKGVERSION}/ccomp/atslib/lib32
+${PLIST.emacs}${EMACS_LISPPREFIX}/ats2-mode/ats2-mode.el
+${PLIST.emacs}${EMACS_LISPPREFIX}/ats2-mode/ats2-mode.elc
diff -r bccd1a0f25fc -r 5adf43799617 lang/ats2/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ats2/options.mk      Thu Apr 14 20:13:19 2022 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.1 2022/04/14 20:13:19 nikita Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.ats2
+
+PKG_SUPPORTED_OPTIONS+=                emacs
+PKG_SUGGESTED_OPTIONS=
+
+.include "../../mk/bsd.options.mk"
+
+.if ${PKG_OPTIONS:Memacs}
+PLIST_VARS+=   emacs
+PLIST.emacs=   yes
+.endif



Home | Main Index | Thread Index | Old Index