pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/pnut
Module Name: pkgsrc
Committed By: schmonz
Date: Wed Jul 24 11:48:59 UTC 2024
Added Files:
pkgsrc/lang/pnut: DESCR Makefile PLIST distinfo
pkgsrc/lang/pnut/patches: patch-Makefile
Log Message:
Add pnut: C compiler written in POSIX shell and generating POSIX shell scripts
Pnut compiles a reasonably large subset of C99 to human-readable POSIX
shell scripts. It can be used to generate portable shell scripts without
having to write shell.
Its main uses are:
- As a transpiler to write portable shell scripts in C
- As a way to bootstrap a compiler written in C with an executable
version that is still human readable
Main features:
- No new language to learn -- C code in, shell code out
- The human-readable shell script is easy to read and understand.
- A runtime library including file I/O and dynamic memory allocations
- A preprocessor
- Integrates easily with existing shell scripts
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/pnut/DESCR pkgsrc/lang/pnut/Makefile \
pkgsrc/lang/pnut/PLIST pkgsrc/lang/pnut/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/pnut/patches/patch-Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/lang/pnut/DESCR
diff -u /dev/null pkgsrc/lang/pnut/DESCR:1.1
--- /dev/null Wed Jul 24 11:48:59 2024
+++ pkgsrc/lang/pnut/DESCR Wed Jul 24 11:48:58 2024
@@ -0,0 +1,17 @@
+Pnut compiles a reasonably large subset of C99 to human-readable POSIX
+shell scripts. It can be used to generate portable shell scripts without
+having to write shell.
+
+Its main uses are:
+
+- As a transpiler to write portable shell scripts in C
+- As a way to bootstrap a compiler written in C with an executable
+ version that is still human readable
+
+Main features:
+
+- No new language to learn -- C code in, shell code out
+- The human-readable shell script is easy to read and understand.
+- A runtime library including file I/O and dynamic memory allocations
+- A preprocessor
+- Integrates easily with existing shell scripts
Index: pkgsrc/lang/pnut/Makefile
diff -u /dev/null pkgsrc/lang/pnut/Makefile:1.1
--- /dev/null Wed Jul 24 11:48:59 2024
+++ pkgsrc/lang/pnut/Makefile Wed Jul 24 11:48:58 2024
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2024/07/24 11:48:58 schmonz Exp $
+
+DISTNAME= pnut-${GITHUB_TAG}
+PKGNAME= pnut-0.0.20240724
+CATEGORIES= lang
+MASTER_SITES= ${MASTER_SITE_GITHUB:=udem-dlteam/}
+GITHUB_TAG= 1bc6a0d68de9e2284ddc2d9af889584cc6360616
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/udem-dlteam/pnut/
+COMMENT= C compiler written in POSIX shell and generating POSIX shell scripts
+LICENSE= 2-clause-bsd
+
+BUILD_TARGET= build/pnut.sh
+
+INSTALLATION_DIRS= bin share/doc/${PKGBASE}
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/lang/pnut/PLIST
diff -u /dev/null pkgsrc/lang/pnut/PLIST:1.1
--- /dev/null Wed Jul 24 11:48:59 2024
+++ pkgsrc/lang/pnut/PLIST Wed Jul 24 11:48:58 2024
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2024/07/24 11:48:58 schmonz Exp $
+bin/pnut
+bin/pnut.sh
+share/doc/pnut/README.md
Index: pkgsrc/lang/pnut/distinfo
diff -u /dev/null pkgsrc/lang/pnut/distinfo:1.1
--- /dev/null Wed Jul 24 11:48:59 2024
+++ pkgsrc/lang/pnut/distinfo Wed Jul 24 11:48:58 2024
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2024/07/24 11:48:58 schmonz Exp $
+
+BLAKE2s (pnut-1bc6a0d68de9e2284ddc2d9af889584cc6360616-1bc6a0d68de9e2284ddc2d9af889584cc6360616.tar.gz) = b391699b1c2c9b8f94f3d01770b45fd4409820c0be31fb1337b4d712369675a5
+SHA512 (pnut-1bc6a0d68de9e2284ddc2d9af889584cc6360616-1bc6a0d68de9e2284ddc2d9af889584cc6360616.tar.gz) =
d9789927e99bfa8aa6fb96cb3564a3b38354ea9644c5312d72d8a59d3c94170d56955aaaffadab2a6bcc365d880dd877c07abfd4fca14f7c090013b6b62acf2b
+Size (pnut-1bc6a0d68de9e2284ddc2d9af889584cc6360616-1bc6a0d68de9e2284ddc2d9af889584cc6360616.tar.gz) = 214075 bytes
+SHA1 (patch-Makefile) = 63b7c0d717952b4b1ae9b2b551e0ca4a7604915b
Index: pkgsrc/lang/pnut/patches/patch-Makefile
diff -u /dev/null pkgsrc/lang/pnut/patches/patch-Makefile:1.1
--- /dev/null Wed Jul 24 11:48:59 2024
+++ pkgsrc/lang/pnut/patches/patch-Makefile Wed Jul 24 11:48:59 2024
@@ -0,0 +1,38 @@
+$NetBSD: patch-Makefile,v 1.1 2024/07/24 11:48:59 schmonz Exp $
+
+Support DESTDIR.
+
+--- Makefile.orig 2024-07-24 11:40:54.704999845 +0000
++++ Makefile
+@@ -1,24 +1,24 @@
+-.PHONY: pnut-sh pnut.sh pnut-bootstrapped.sh install clean test
++.PHONY: install clean test
+
+ BUILD_DIR = build
+
+ BUILD_OPT_SH = -DRELEASE_PNUT_SH $(BUILD_OPT)
+
+-pnut-sh: pnut.c sh.c sh-runtime.c
++$(BUILD_DIR)/pnut-sh: pnut.c sh.c sh-runtime.c
+ mkdir -p $(BUILD_DIR)
+ gcc $(BUILD_OPT_SH) pnut.c -o $(BUILD_DIR)/pnut-sh
+
+-pnut.sh: pnut-sh
++$(BUILD_DIR)/pnut.sh: $(BUILD_DIR)/pnut-sh
+ ./$(BUILD_DIR)/pnut-sh $(BUILD_OPT_SH) pnut.c > $(BUILD_DIR)/pnut.sh
+ chmod +x $(BUILD_DIR)/pnut.sh
+
+-pnut-bootstrapped.sh: pnut-sh
++$(BUILD_DIR)/pnut-bootstrapped.sh: $(BUILD_DIR)/pnut-sh
+ $$SHELL $(BUILD_DIR)/pnut.sh $(BUILD_OPT_SH) pnut.c > $(BUILD_DIR)/pnut-bootstrapped.sh
+ diff $(BUILD_DIR)/pnut.sh $(BUILD_DIR)/pnut-bootstrapped.sh
+
+-install: pnut-sh pnut.sh
+- sudo cp $(BUILD_DIR)/pnut-sh /usr/local/bin/pnut
+- sudo cp $(BUILD_DIR)/pnut.sh /usr/local/bin/pnut.sh
++install: $(BUILD_DIR)/pnut-sh $(BUILD_DIR)/pnut.sh
++ sudo cp $(BUILD_DIR)/pnut-sh $(DESTDIR)$(PREFIX)/bin/pnut
++ sudo cp $(BUILD_DIR)/pnut.sh $(DESTDIR)$(PREFIX)/bin/pnut.sh
+
+ uninstall:
+ sudo $(RM) /usr/local/bin/pnut
Home |
Main Index |
Thread Index |
Old Index