pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang lang: Add janet.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/771ead8711e5
branches:  trunk
changeset: 424007:771ead8711e5
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Mar 03 09:44:02 2020 +0000

description:
lang: Add janet.

Janet is a functional and imperative programming language.

Janet makes a good system scripting language, or a language to embed in
other programs. Think Lua or Guile. Janet also can be used for rapid
prototying, dynamic systems, and other domains where lisp shines.

diffstat:

 lang/Makefile                     |   3 +-
 lang/janet/DESCR                  |   5 +++
 lang/janet/Makefile               |  33 ++++++++++++++++++++
 lang/janet/PLIST                  |  13 ++++++++
 lang/janet/buildlink3.mk          |  12 +++++++
 lang/janet/distinfo               |   7 ++++
 lang/janet/patches/patch-Makefile |  62 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 134 insertions(+), 1 deletions(-)

diffs (173 lines):

diff -r 83dbbe1aa9e3 -r 771ead8711e5 lang/Makefile
--- a/lang/Makefile     Tue Mar 03 09:18:30 2020 +0000
+++ b/lang/Makefile     Tue Mar 03 09:44:02 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.543 2020/02/27 14:32:57 bsiegert Exp $
+# $NetBSD: Makefile,v 1.544 2020/03/03 09:44:02 nia Exp $
 #
 
 COMMENT=       Programming languages
@@ -118,6 +118,7 @@
 SUBDIR+=       intercal
 SUBDIR+=       ja-gawk
 SUBDIR+=       jamvm
+SUBDIR+=       janet
 SUBDIR+=       japhar
 SUBDIR+=       jasmin
 SUBDIR+=       java-lang-spec
diff -r 83dbbe1aa9e3 -r 771ead8711e5 lang/janet/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/janet/DESCR  Tue Mar 03 09:44:02 2020 +0000
@@ -0,0 +1,5 @@
+Janet is a functional and imperative programming language.
+
+Janet makes a good system scripting language, or a language to embed in
+other programs. Think Lua or Guile. Janet also can be used for rapid
+prototying, dynamic systems, and other domains where lisp shines.
diff -r 83dbbe1aa9e3 -r 771ead8711e5 lang/janet/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/janet/Makefile       Tue Mar 03 09:44:02 2020 +0000
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2020/03/03 09:44:02 nia Exp $
+
+DISTNAME=      janet-1.7.0
+CATEGORIES=    lang
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=janet-lang/}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://janet-lang.org/
+COMMENT=       Functional and imperative programming language
+LICENSE=       mit
+
+USE_TOOLS+=    gmake
+USE_LANGUAGES= c99
+
+BUILD_TARGET=  all build/janet.pc
+
+MAKE_FLAGS+=   PREFIX=${PREFIX}
+MAKE_FLAGS+=   MANPATH=${PREFIX}/${PKGMANDIR}/man1
+MAKE_FLAGS+=   PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
+MAKE_FLAGS+=   JANET_BUILD='"\"pkgsrc\""'
+
+CFLAGS.NetBSD+=        -D_NETBSD_SOURCE
+
+REPLACE_INTERPRETER+=  janet
+REPLACE.janet.old=     .*
+REPLACE.janet.new=     ${PREFIX}/bin/janet
+REPLACE_FILES.janet=   auxbin/jpm
+
+PKGCONFIG_OVERRIDE_STAGE=      pre-install
+PKGCONFIG_OVERRIDE+=           build/janet.pc
+
+.include "../../mk/bsd.pkg.mk"
diff -r 83dbbe1aa9e3 -r 771ead8711e5 lang/janet/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/janet/PLIST  Tue Mar 03 09:44:02 2020 +0000
@@ -0,0 +1,13 @@
+@comment $NetBSD: PLIST,v 1.1 2020/03/03 09:44:02 nia Exp $
+bin/janet
+bin/jpm
+include/janet/janet.h
+include/janet/janetconf.h
+lib/libjanet.a
+lib/libjanet.so
+lib/libjanet.so.1
+lib/libjanet.so.${PKGVERSION}
+lib/pkgconfig/janet.pc
+man/man1/janet.1
+man/man1/jpm.1
+@pkgdir lib/janet
diff -r 83dbbe1aa9e3 -r 771ead8711e5 lang/janet/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/janet/buildlink3.mk  Tue Mar 03 09:44:02 2020 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/03/03 09:44:02 nia Exp $
+
+BUILDLINK_TREE+=       janet
+
+.if !defined(JANET_BUILDLINK3_MK)
+JANET_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.janet+=  janet>=1.7.0
+BUILDLINK_PKGSRCDIR.janet?=    ../../lang/janet
+.endif # JANET_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -janet
diff -r 83dbbe1aa9e3 -r 771ead8711e5 lang/janet/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/janet/distinfo       Tue Mar 03 09:44:02 2020 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/03/03 09:44:02 nia Exp $
+
+SHA1 (janet-1.7.0.tar.gz) = 53413dd922e153dba02b91ad81c90c51ec6b86e6
+RMD160 (janet-1.7.0.tar.gz) = 403ae429dfff85657b4bd430cd66976225e2d9bd
+SHA512 (janet-1.7.0.tar.gz) = c180172f3016d1ca55ac39f2116789027bf622f08f585bf702b17acadd99d07bf91320e09ce21be76c3a1e60d1a8923591d0e07acc90884dac823a2c414f65e7
+Size (janet-1.7.0.tar.gz) = 968936 bytes
+SHA1 (patch-Makefile) = 01ef4c95761425c749a5c712fa63282fbe3ac51b
diff -r 83dbbe1aa9e3 -r 771ead8711e5 lang/janet/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/janet/patches/patch-Makefile Tue Mar 03 09:44:02 2020 +0000
@@ -0,0 +1,62 @@
+$NetBSD: patch-Makefile,v 1.1 2020/03/03 09:44:02 nia Exp $
+
+DESTDIR support
+
+--- Makefile.orig      2020-02-02 05:35:17.000000000 +0000
++++ Makefile
+@@ -246,32 +246,32 @@ build/janet.pc: $(JANET_TARGET)
+       echo 'Libs.private: $(CLIBS)' >> $@
+ 
+ install: $(JANET_TARGET) build/janet.pc
+-      mkdir -p '$(BINDIR)'
+-      cp $(JANET_TARGET) '$(BINDIR)/janet'
+-      mkdir -p '$(INCLUDEDIR)/janet'
+-      cp -rf $(JANET_HEADERS) '$(INCLUDEDIR)/janet'
+-      mkdir -p '$(JANET_PATH)'
+-      mkdir -p '$(LIBDIR)'
+-      cp $(JANET_LIBRARY) '$(LIBDIR)/libjanet.so.$(shell $(JANET_TARGET) -e '(print janet/version)')'
+-      cp $(JANET_STATIC_LIBRARY) '$(LIBDIR)/libjanet.a'
+-      ln -sf $(SONAME) '$(LIBDIR)/libjanet.so'
+-      ln -sf libjanet.so.$(shell $(JANET_TARGET) -e '(print janet/version)') $(LIBDIR)/$(SONAME)
+-      cp -rf auxbin/* '$(BINDIR)'
+-      mkdir -p '$(MANPATH)'
+-      cp janet.1 '$(MANPATH)'
+-      cp jpm.1 '$(MANPATH)'
+-      mkdir -p '$(PKG_CONFIG_PATH)'
+-      cp build/janet.pc '$(PKG_CONFIG_PATH)/janet.pc'
++      mkdir -p '$(DESTDIR)$(BINDIR)'
++      cp $(JANET_TARGET) '$(DESTDIR)$(BINDIR)/janet'
++      mkdir -p '$(DESTDIR)$(INCLUDEDIR)/janet'
++      cp -rf $(JANET_HEADERS) '$(DESTDIR)$(INCLUDEDIR)/janet'
++      mkdir -p '$(DESTDIR)$(JANET_PATH)'
++      mkdir -p '$(DESTDIR)$(LIBDIR)'
++      cp $(JANET_LIBRARY) '$(DESTDIR)$(LIBDIR)/libjanet.so.$(shell $(JANET_TARGET) -e '(print janet/version)')'
++      cp $(JANET_STATIC_LIBRARY) '$(DESTDIR)$(LIBDIR)/libjanet.a'
++      ln -sf $(SONAME) '$(DESTDIR)$(LIBDIR)/libjanet.so'
++      ln -sf libjanet.so.$(shell $(JANET_TARGET) -e '(print janet/version)') $(DESTDIR)$(LIBDIR)/$(SONAME)
++      cp -rf auxbin/* '$(DESTDIR)$(BINDIR)'
++      mkdir -p '$(DESTDIR)$(MANPATH)'
++      cp janet.1 '$(DESTDIR)$(MANPATH)'
++      cp jpm.1 '$(DESTDIR)$(MANPATH)'
++      mkdir -p '$(DESTDIR)$(PKG_CONFIG_PATH)'
++      cp build/janet.pc '$(DESTDIR)$(PKG_CONFIG_PATH)/janet.pc'
+       -$(LDCONFIG)
+ 
+ uninstall:
+-      -rm '$(BINDIR)/janet'
+-      -rm '$(BINDIR)/jpm'
+-      -rm -rf '$(INCLUDEDIR)/janet'
+-      -rm -rf '$(LIBDIR)'/libjanet.*
+-      -rm '$(PKG_CONFIG_PATH)/janet.pc'
+-      -rm '$(MANPATH)/janet.1'
+-      -rm '$(MANPATH)/jpm.1'
++      -rm '$(DESTDIR)$(BINDIR)/janet'
++      -rm '$(DESTDIR)$(BINDIR)/jpm'
++      -rm -rf '$(DESTDIR)$(INCLUDEDIR)/janet'
++      -rm -rf '$(DESTDIR)$(LIBDIR)'/libjanet.*
++      -rm '$(DESTDIR)$(PKG_CONFIG_PATH)/janet.pc'
++      -rm '$(DESTDIR)$(MANPATH)/janet.1'
++      -rm '$(DESTDIR)$(MANPATH)/jpm.1'
+       # -rm -rf '$(JANET_PATH)'/* - err on the side of correctness here
+ 
+ #################



Home | Main Index | Thread Index | Old Index