From nobody Sun Feb 16 22:22:27 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yx0dw2qjLz5p1ky; Sun, 16 Feb 2025 22:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yx0dw01T3z45sm; Sun, 16 Feb 2025 22:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739744548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/s4sjZMv+BDRKliDY3N7FJt5f1ARMYN4OEHyktb0hYs=; b=fxTE+tCQ4txlk9p0WC3rf540nQWGUMop2pjTdNVY6qcTGXwE9g993nwiPRqfBFQghuUX4V nCt7aUQn2WZ6b68tDlJmL4l2lQouHdL6P9Ugkay7gkgOD/svTmeXviSN7/ByvNJ/fPsMiT CxHKtuHB5diI8qoK74ijaB+du0fcHLyTALr+kW/Mm+YYDC0ZlJz8v0qaXPjP7BGUzRgdb7 mfKUxXZOZoarwqDrlTxIknVNoaUu5Hc4ZFwtzbm0EJ/i0NfG+3h+GfX8oNTTD5N0VO6E2e +h0AF/pFTcTSf+ueLpiV09F2lVt5zk5A63Vfx6BXL8u+m/1NjcvOGxmHYvI9Pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739744548; a=rsa-sha256; cv=none; b=j1nYhsGHGvPJSPacB4TogQW/mrgy60dZl/0D/D0PLHSIAN3ACRNUDvLU6UStJVK3tXxRB0 qaSjL17Nky+EWBAEIyCX1JLOTq5chedO14AzeVvVJ0cTYWRH4EJHmWABBmkuzpSJM/NZAT mu/QKHFA55UhtVHw4fJHhyYGZRmEGKEC3M2+EaZ7KRIxApZPuUuO78vfVBQumukQxntXhS 2YdGuDoAueTcarGm6FOFsUWdrPEpiSxZhr//SLe0zesMgCTigt/T8ISh3xcLlsdJEhBGBr T6rmPwdmJssXcC60j3DiR+i1yLQZSK8k+l0xQuvPjPd3DZleW5D25llUJruPVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739744548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/s4sjZMv+BDRKliDY3N7FJt5f1ARMYN4OEHyktb0hYs=; b=vngnqPGaouB3GTb8iXZe7ZlkLLKA3dl6g8xc23ZwqyB/tZZq+cSytmnIXnerESmBdAWpGD ofs7/jQ9ElJU+u39ZbxVdjNnlUppjsKwkiCwKdDkhMs/GKd3VyDWiFJJlIBjXJnjTeDiFN jQZNMU7ihY1gx0FhPezya5LK7Cqx0NBqqLkESGTRtQ7sjCsE/bMEHTx1MTmwJOMd7e1wTR afiwpKNxxLLMJ8c5LI/XwUKnhG0tqKal24d8x1iWCq6XGKLg/K1gooyrVfvdEhHTPHhIqF MY53VFQHO9/9np3064RxGfOkSx3ks6ZT/n2veHlLR59PQIiTVE5t3MX3x0F/xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yx0dv6cLnz15qL; Sun, 16 Feb 2025 22:22:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51GMMRQF007845; Sun, 16 Feb 2025 22:22:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51GMMRp9007842; Sun, 16 Feb 2025 22:22:27 GMT (envelope-from git) Date: Sun, 16 Feb 2025 22:22:27 GMT Message-Id: <202502162222.51GMMRp9007842@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ashish SHUKLA Subject: git: 6874ce4f7140 - main - shells/schemesh: New port: Unix shell, and LISP repl List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ashish X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6874ce4f7140fec1945e5b6bfd23e7edd968e4a7 Auto-Submitted: auto-generated The branch main has been updated by ashish: URL: https://cgit.FreeBSD.org/ports/commit/?id=6874ce4f7140fec1945e5b6bfd23e7edd968e4a7 commit 6874ce4f7140fec1945e5b6bfd23e7edd968e4a7 Author: Ashish SHUKLA AuthorDate: 2025-02-16 22:04:51 +0000 Commit: Ashish SHUKLA CommitDate: 2025-02-16 22:22:18 +0000 shells/schemesh: New port: Unix shell, and LISP repl Schemesh is an interactive shell scriptable in Lisp. It is primarily intended as a user-friendly Unix login shell, replacing bash, zsh, pdksh etc. As such, it supports interactive line editing, autocompletion, history and the familiar Unix shell syntax: it can start commands, including redirections, pipelines, job concatenation with ; && ||, groups surrounded by { }, subshells surrounded by [ ], and manage foreground/background jobs. WWW: https://github.com/cosmos72/schemesh --- shells/Makefile | 1 + shells/schemesh/Makefile | 38 ++++++++++++++++++++++++++++++ shells/schemesh/distinfo | 3 +++ shells/schemesh/files/patch-posix_posix.c | 28 ++++++++++++++++++++++ shells/schemesh/files/patch-posix_signal.h | 16 +++++++++++++ shells/schemesh/pkg-descr | 10 ++++++++ 6 files changed, 96 insertions(+) diff --git a/shells/Makefile b/shells/Makefile index aad04461265f..6edba1d03e3c 100644 --- a/shells/Makefile +++ b/shells/Makefile @@ -55,6 +55,7 @@ SUBDIR += rubygem-shellwords SUBDIR += rush SUBDIR += sash + SUBDIR += schemesh SUBDIR += scponly SUBDIR += sheldon SUBDIR += shell-hist diff --git a/shells/schemesh/Makefile b/shells/schemesh/Makefile new file mode 100644 index 000000000000..19ae74a60477 --- /dev/null +++ b/shells/schemesh/Makefile @@ -0,0 +1,38 @@ +PORTNAME= schemesh +DISTVERSIONPREFIX= v +DISTVERSION= 0.7.5 +CATEGORIES= shells + +MAINTAINER= ashish@FreeBSD.org +COMMENT= Unix shell and Lisp REPL, fused together +WWW= https://github.com/cosmos72/schemesh + +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= chez-scheme:lang/chez-scheme +RUN_DEPENDS= chez-scheme:lang/chez-scheme +LIB_DEPENDS= liblz4.so:archivers/liblz4 \ + libuuid.so:misc/e2fsprogs-libuuid + +USES= gmake ncurses + +USE_GITHUB= yes +GH_ACCOUNT= cosmos72 +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +USE_LDCONFIG= yes + +PLIST_FILES= bin/schemesh \ + lib/schemesh/libschemesh_${DISTVERSION}.so + +post-patch: + @${REINPLACE_CMD} -e 's,chezscheme,chez-scheme,' \ + ${WRKSRC}/utils/find_chez_scheme_dir.sh + @${REINPLACE_CMD} -r -e 's/^CC=cc/CC=${CC}/' \ + -e 's,^(prefix.+)(=.+)$$,\1= ${PREFIX},' \ + -e '/^LDFLAGS/s|$$| ${LDFLAGS}|' \ + -e '/^CFLAGS/s|$$| ${CFLAGS}|' \ + ${WRKSRC}/Makefile + +.include diff --git a/shells/schemesh/distinfo b/shells/schemesh/distinfo new file mode 100644 index 000000000000..46817831aeaa --- /dev/null +++ b/shells/schemesh/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1739715894 +SHA256 (cosmos72-schemesh-v0.7.5_GH0.tar.gz) = 4ea282f29e21938cece5a8d3c3f3420ff91786cdc755f80f02af26544ecb4798 +SIZE (cosmos72-schemesh-v0.7.5_GH0.tar.gz) = 254799 diff --git a/shells/schemesh/files/patch-posix_posix.c b/shells/schemesh/files/patch-posix_posix.c new file mode 100644 index 000000000000..592842e2547a --- /dev/null +++ b/shells/schemesh/files/patch-posix_posix.c @@ -0,0 +1,28 @@ +--- posix/posix.c.orig 2025-02-16 14:38:30 UTC ++++ posix/posix.c +@@ -7,10 +7,6 @@ + * (at your option) any later version. + */ + +-#define _POSIX_C_SOURCE 200809L /* fstatat() */ +-#define _DEFAULT_SOURCE /* DT_* */ +-#define _BSD_SOURCE /* DT_* */ +- + #include "posix.h" + #include "../containers/containers.h" /* schemesh_Sbytevector() */ + #include "../eval.h" /* eval() */ +@@ -817,8 +813,14 @@ static ptr c_get_hostname(void) { + + /** return Scheme string, or Scheme integer on error */ + static ptr c_get_hostname(void) { ++#ifdef __FreeBSD__ ++ int len = sysconf(_SC_HOST_NAME_MAX) + 1; ++ char* buf = alloca(len); ++ if (gethostname(buf, len) != 0) { ++#else + char buf[HOST_NAME_MAX + 1]; + if (gethostname(buf, sizeof(buf)) != 0) { ++#endif + return Sinteger(c_errno()); + } + return schemesh_Sstring_utf8b(buf, -1); diff --git a/shells/schemesh/files/patch-posix_signal.h b/shells/schemesh/files/patch-posix_signal.h new file mode 100644 index 000000000000..28774e535214 --- /dev/null +++ b/shells/schemesh/files/patch-posix_signal.h @@ -0,0 +1,16 @@ +--- posix/signal.h.orig 2025-02-16 14:43:54 UTC ++++ posix/signal.h +@@ -138,11 +138,11 @@ static ptr c_signals_list(void) { + {SIGBUS, "sigbus"}, {SIGFPE, "sigfpe"}, {SIGKILL, "sigkill"}, + {SIGUSR1, "sigusr1"}, {SIGSEGV, "sigsegv"}, {SIGUSR2, "sigusr2"}, + {SIGPIPE, "sigpipe"}, {SIGALRM, "sigalrm"}, {SIGTERM, "sigterm"}, +- {SIGSTKFLT, "sigstkflt"}, {SIGCHLD, "sigchld"}, {SIGCONT, "sigcont"}, ++ /* {SIGSTKFLT, "sigstkflt"}, */ {SIGCHLD, "sigchld"}, {SIGCONT, "sigcont"}, + {SIGSTOP, "sigstop"}, {SIGTSTP, "sigtstp"}, {SIGTTIN, "sigttin"}, + {SIGTTOU, "sigttou"}, {SIGURG, "sigurg"}, {SIGXCPU, "sigxcpu"}, + {SIGXFSZ, "sigxfsz"}, {SIGVTALRM, "sigvtalrm"}, {SIGPROF, "sigprof"}, +- {SIGWINCH, "sigwinch"}, {SIGIO, "sigio"}, {SIGPWR, "sigpwr"}, ++ {SIGWINCH, "sigwinch"}, {SIGIO, "sigio"}, /* {SIGPWR, "sigpwr"}, */ + {SIGSYS, "sigsys"}}; + + ptr ret = Snil; diff --git a/shells/schemesh/pkg-descr b/shells/schemesh/pkg-descr new file mode 100644 index 000000000000..edd50f5c1a82 --- /dev/null +++ b/shells/schemesh/pkg-descr @@ -0,0 +1,10 @@ +Schemesh is an interactive shell scriptable in Lisp. + +It is primarily intended as a user-friendly Unix login shell, +replacing bash, zsh, pdksh etc. + +As such, it supports interactive line editing, autocompletion, history +and the familiar Unix shell syntax: it can start commands, including +redirections, pipelines, job concatenation with ; && ||, groups +surrounded by { }, subshells surrounded by [ ], and manage +foreground/background jobs.