git: 2b412b769e9f - main - shells/oksh: Update to 7.0

From: Tobias Kortkamp <tobik_at_FreeBSD.org>
Date: Tue, 12 Oct 2021 15:02:31 UTC
The branch main has been updated by tobik:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2b412b769e9fbc361f25afa757e0bfb68f78d792

commit 2b412b769e9fbc361f25afa757e0bfb68f78d792
Author:     Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-10-10 08:44:39 +0000
Commit:     Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-10-12 15:01:33 +0000

    shells/oksh: Update to 7.0
    
    - Add a static flavor and install in /rescue same as editors/mg@static
    
    Changes:        https://github.com/ibara/oksh/releases/tag/oksh-7.0
---
 shells/oksh/Makefile | 25 +++++++++++++++++++++----
 shells/oksh/distinfo |  6 +++---
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/shells/oksh/Makefile b/shells/oksh/Makefile
index b20851d6a119..cbc3c58f7b71 100644
--- a/shells/oksh/Makefile
+++ b/shells/oksh/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	oksh
-DISTVERSION=	6.9
+DISTVERSION=	7.0
 PORTEPOCH=	1
 CATEGORIES=	shells
 MASTER_SITES=	https://github.com/ibara/oksh/releases/download/oksh-${DISTVERSION}/
@@ -9,9 +9,22 @@ COMMENT=	Portable OpenBSD Korn shell
 
 LICENSE=	PD
 
-HAS_CONFIGURE=	yes
+FLAVORS=	dynamic static
+FLAVOR?=	${FLAVORS:[1]}
 
-OPTIONS_DEFINE=		CURSES STATIC
+static_PKGNAMESUFFIX=	-static
+.if ${FLAVOR} == static
+COMMENT+=		(rescue(8) version)
+.endif
+
+HAS_CONFIGURE=		yes
+.if ${FLAVOR} == static
+CONFIGURE_ARGS+=	--enable-static
+PLIST=			/dev/null
+PLIST_FILES=		"@shell /rescue/oksh"
+.endif
+
+OPTIONS_DEFINE=		CURSES
 OPTIONS_DEFAULT=	CURSES
 
 CURSES_DESC=	Use ncurses for screen clearing routines
@@ -19,6 +32,10 @@ CURSES_DESC=	Use ncurses for screen clearing routines
 CURSES_USES=			ncurses
 CURSES_CONFIGURE_ENABLE=	curses
 
-STATIC_CONFIGURE_ENABLE=	static
+.if ${FLAVOR} == static
+do-install:
+	@${MKDIR} ${STAGEDIR}/rescue
+	${INSTALL_PROGRAM} ${WRKSRC}/oksh ${STAGEDIR}/rescue
+.endif
 
 .include <bsd.port.mk>
diff --git a/shells/oksh/distinfo b/shells/oksh/distinfo
index e73a043997b5..b07a0ab6c869 100644
--- a/shells/oksh/distinfo
+++ b/shells/oksh/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1619847915
-SHA256 (oksh-6.9.tar.gz) = c08d97b2ac9ee5d88e9e508d27c75502b2d06c20d4c5ab87b496cb3b9951bd35
-SIZE (oksh-6.9.tar.gz) = 307338
+TIMESTAMP = 1633855474
+SHA256 (oksh-7.0.tar.gz) = 21d5891f38ffea3a5d1aa8c494f0a5579c93778535e0a92275b102dec3221da1
+SIZE (oksh-7.0.tar.gz) = 308707