pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang Import lang/fennel as fennel version 1.2.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/79ee83d56414
branches:  trunk
changeset: 391615:79ee83d56414
user:      nikita <nikita%pkgsrc.org@localhost>
date:      Tue Jan 10 21:51:29 2023 +0000

description:
Import lang/fennel as fennel version 1.2.1

Packaged by charlotte@ in wip.

Fennel is a lisp that compiles to Lua. It aims to be easy to use,
expressive, and has almost zero overhead compared to writing Lua directly.

Features:
- Full Lua compatibility: Easily call any Lua function or library from
  Fennel and vice-versa.
- Zero overhead: Compiled code should be just as efficient as hand-written
  Lua.
- Compile-time macros: Ship compiled code with no runtime dependency
  on Fennel.
- Embeddable: Fennel is a one-file library as well as an executable.
  Embed it in other programs to support runtime extensibility and interactive
  development.

diffstat:

 lang/Makefile                      |   3 +-
 lang/fennel/ALTERNATIVES           |   1 +
 lang/fennel/DESCR                  |  13 ++++++++++
 lang/fennel/Makefile               |  46 ++++++++++++++++++++++++++++++++++++++
 lang/fennel/PLIST                  |   4 +++
 lang/fennel/distinfo               |   6 ++++
 lang/fennel/patches/patch-Makefile |  15 ++++++++++++
 7 files changed, 87 insertions(+), 1 deletions(-)

diffs (126 lines):

diff -r 8e6927b4994c -r 79ee83d56414 lang/Makefile
--- a/lang/Makefile     Tue Jan 10 21:35:44 2023 +0000
+++ b/lang/Makefile     Tue Jan 10 21:51:29 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.670 2022/12/24 13:48:10 wiz Exp $
+# $NetBSD: Makefile,v 1.671 2023/01/10 21:51:29 nikita Exp $
 #
 
 COMMENT=       Programming languages
@@ -55,6 +55,7 @@
 SUBDIR+=       erlang21
 SUBDIR+=       execline
 SUBDIR+=       f2c
+SUBDIR+=       fennel
 SUBDIR+=       ficl
 SUBDIR+=       focal
 SUBDIR+=       fort77
diff -r 8e6927b4994c -r 79ee83d56414 lang/fennel/ALTERNATIVES
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/fennel/ALTERNATIVES  Tue Jan 10 21:51:29 2023 +0000
@@ -0,0 +1,1 @@
+bin/fennel @PREFIX@/bin/fennel-@LUADOTVER@
diff -r 8e6927b4994c -r 79ee83d56414 lang/fennel/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/fennel/DESCR Tue Jan 10 21:51:29 2023 +0000
@@ -0,0 +1,13 @@
+Fennel is a lisp that compiles to Lua. It aims to be easy to use,
+expressive, and has almost zero overhead compared to writing Lua directly.
+
+Features:
+- Full Lua compatibility: Easily call any Lua function or library from
+  Fennel and vice-versa.
+- Zero overhead: Compiled code should be just as efficient as hand-written
+  Lua.
+- Compile-time macros: Ship compiled code with no runtime dependency
+  on Fennel.
+- Embeddable: Fennel is a one-file library as well as an executable.
+  Embed it in other programs to support runtime extensibility and interactive
+  development.
diff -r 8e6927b4994c -r 79ee83d56414 lang/fennel/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/fennel/Makefile      Tue Jan 10 21:51:29 2023 +0000
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1 2023/01/10 21:51:30 nikita Exp $
+
+DISTNAME=      1.2.1
+PKGNAME=       ${LUA_PKGPREFIX}-fennel-1.2.1
+CATEGORIES=    lang
+MASTER_SITES=  https://git.sr.ht/~technomancy/fennel/archive/
+DIST_SUBDIR=   fennel
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://fennel-lang.org/
+COMMENT=       The Fennel programming language
+LICENSE=       mit
+
+USE_LANGUAGES= c
+USE_TOOLS+=    gmake
+NO_CONFIGURE=  yes
+
+WRKSRC=                ${WRKDIR}/fennel-${PKGVERSION_NOREV}
+
+DEPENDS+=      ${LUA_BASEDEPENDS}
+
+BUILD_TARGET=  build
+
+# We can't use lang/lua/application.mk's 'REPLACE_LUA' facility because that
+# is evaluated at configure-time -- which won't work because the shebang
+# statement we're trying to fix is written to our script afterwards, at
+# *build* time.
+#
+# Therefore, use this modification we've made to the Makefile, where we pass
+# in the LUA_INTERPRETER directly.
+MAKE_FLAGS+=   LUA_INTERPRETER=${LUA_INTERPRETER}
+
+INSTALL_MAKE_FLAGS+=   PREFIX=${PREFIX}
+INSTALL_MAKE_FLAGS+=   MAN_DIR=${PREFIX}/${PKGMANDIR}/man1
+
+PLIST_SUBST+=  LUADOTVER=${_LUA_DOT_VERSION}
+FILES_SUBST+=  LUADOTVER=${_LUA_DOT_VERSION}
+
+post-install:
+       # also manpage?
+       ${MV} ${DESTDIR}${PREFIX}/bin/fennel ${DESTDIR}${PREFIX}/bin/fennel-${_LUA_DOT_VERSION}
+
+.include "../../lang/lua/application.mk"
+.include "../../lang/lua/tool.mk"
+.include "../../mk/alternatives.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 8e6927b4994c -r 79ee83d56414 lang/fennel/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/fennel/PLIST Tue Jan 10 21:51:29 2023 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2023/01/10 21:51:30 nikita Exp $
+bin/fennel-${LUADOTVER}
+man/man1/fennel.1
+share/lua/${LUADOTVER}/fennel.lua
diff -r 8e6927b4994c -r 79ee83d56414 lang/fennel/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/fennel/distinfo      Tue Jan 10 21:51:29 2023 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2023/01/10 21:51:30 nikita Exp $
+
+BLAKE2s (fennel/1.2.1.tar.gz) = 6ea5293da80dde5dcdb7a376d0c9aff318ecf45dbad1908f9f7468864ac87308
+SHA512 (fennel/1.2.1.tar.gz) = dc8c99c1708457d1d84f5755145b66e691040ac06bf218e4140e1b3eb614b41b0b7211e304f9bae51304a78c1ec82595d32cf497085fcae4805c51f245620f55
+Size (fennel/1.2.1.tar.gz) = 271590 bytes
+SHA1 (patch-Makefile) = 7d5bc78b33725551ce9ce1cb11570377daeb99a3
diff -r 8e6927b4994c -r 79ee83d56414 lang/fennel/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/fennel/patches/patch-Makefile        Tue Jan 10 21:51:29 2023 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile,v 1.1 2023/01/10 21:51:30 nikita Exp $
+
+Let pkgsrc add the shebang to the fennel launcher script
+
+--- Makefile.orig      2022-05-05 21:57:31.282820992 -0700
++++ Makefile   2022-05-05 21:57:36.826751085 -0700
+@@ -41,7 +41,7 @@
+ 
+ # All-in-one pure-lua script:
+ fennel: src/launcher.fnl $(SRC)
+-      echo "#!/usr/bin/env $(LUA)" > $@
++      echo "#!$(LUA_INTERPRETER)" > $@
+       $(LAUNCHER) --no-metadata --require-as-include --compile $< >> $@
+       chmod 755 $@
+ 



Home | Main Index | Thread Index | Old Index