summaryrefslogtreecommitdiff
path: root/shells/heirloom-sh
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2023-01-13 18:03:20 +0900
committerHiroki Sato <hrs@FreeBSD.org>2023-01-13 18:03:55 +0900
commitddfcd8839887ffd4503495ffa8ca38a71cdbd064 (patch)
tree11f427f7549c563875e756e7544f1078b37a4dff /shells/heirloom-sh
parent3099c99b392dd0ca738f9c16db7c1280f31d74a5 (diff)
downloadfreebsd-ports-ddfcd8839887ffd4503495ffa8ca38a71cdbd064.zip
shells/heirloom-sh: Change the installation directory
- Use ${PREFIX}/heirloom as the installation directory - Add LICENSE - Use the standard do-install target - Take maintainership
Diffstat (limited to 'shells/heirloom-sh')
-rw-r--r--shells/heirloom-sh/Makefile35
-rw-r--r--shells/heirloom-sh/files/heirloom-sh.conf.in1
-rw-r--r--shells/heirloom-sh/files/patch-acct12
-rw-r--r--shells/heirloom-sh/files/patch-defs.h11
-rw-r--r--shells/heirloom-sh/files/patch-makefile44
5 files changed, 80 insertions, 23 deletions
diff --git a/shells/heirloom-sh/Makefile b/shells/heirloom-sh/Makefile
index 388ccf920532..3073c049d198 100644
--- a/shells/heirloom-sh/Makefile
+++ b/shells/heirloom-sh/Makefile
@@ -1,31 +1,44 @@
PORTNAME= heirloom-sh
PORTVERSION= 050706
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= shells
MASTER_SITES= SF/heirloom/${PORTNAME}/${PORTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= hrs@FreeBSD.org
COMMENT= Portable version of OpenSolaris' Bourne Shell
WWW= http://heirloom.sourceforge.net/sh.html
-BROKEN_aarch64= Fails to link: missing sbrk
-BROKEN_riscv64= Fails to link: missing sbrk
+LICENSE= CDDL
-USES= tar:bzip2
+BROKEN_aarch64= fails to link: missing sbrk
+BROKEN_riscv64= fails to link: missing sbrk
-CONFLICTS_INSTALL= clusterit schilyutils # bin/jsh
+USES= tar:bzip2
MAKEFILE= makefile
-PLIST_FILES= "@shell bin/jsh" \
- man/man1/jsh.1.gz
+MANPREFIX= ${PREFIX}/heirloom/share
+MAKE_ARGS= ROOT=${STAGEDIR} \
+ SV3BIN=${PREFIX}/heirloom/bin \
+ MANDIR=${MANPREFIX}/man \
+ UCBINST=${INSTALL}
+SUB_FILES= ${PORTNAME}.conf
+PLIST_FILES= "@shell heirloom/bin/sh" \
+ "@shell heirloom/bin/jsh" \
+ etc/man.d/${PORTNAME}.conf \
+ heirloom/share/man/man1/sh.1.gz \
+ heirloom/share/man/man1/jsh.1.gz
PORTDOCS= CALDERA.LICENSE OPENSOLARIS.LICENSE CHANGES README
OPTIONS_DEFINE= DOCS
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/jsh ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/sh.1.out ${STAGEDIR}${MANPREFIX}/man/man1/jsh.1
+pre-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
+
+post-install:
+ ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.conf \
+ ${STAGEDIR}${PREFIX}/etc/man.d
+
+post-install-DOCS-on:
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/shells/heirloom-sh/files/heirloom-sh.conf.in b/shells/heirloom-sh/files/heirloom-sh.conf.in
new file mode 100644
index 000000000000..620e3e11dfb5
--- /dev/null
+++ b/shells/heirloom-sh/files/heirloom-sh.conf.in
@@ -0,0 +1 @@
+MANPATH %%PREFIX%%/heirloom/share/man
diff --git a/shells/heirloom-sh/files/patch-acct b/shells/heirloom-sh/files/patch-acct
deleted file mode 100644
index 68caa7ebd7c7..000000000000
--- a/shells/heirloom-sh/files/patch-acct
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru heirloom-sh-050706/defs.h heirloom-sh-050706.new/defs.h
---- defs.h 2005-07-03 21:25:46.000000000 +0200
-+++ defs.h 2008-03-27 22:30:33.000000000 +0100
-@@ -148,7 +148,7 @@
- #define ENDARGS 0
-
- /* enable shell accounting */
--#define ACCT
-+/* #define ACCT */
-
- #include <unistd.h>
- #include "mac.h"
diff --git a/shells/heirloom-sh/files/patch-defs.h b/shells/heirloom-sh/files/patch-defs.h
new file mode 100644
index 000000000000..4069e548da27
--- /dev/null
+++ b/shells/heirloom-sh/files/patch-defs.h
@@ -0,0 +1,11 @@
+--- defs.h.orig 2005-07-03 19:25:46 UTC
++++ defs.h
+@@ -148,7 +148,7 @@ extern "C" {
+ #define ENDARGS 0
+
+ /* enable shell accounting */
+-#define ACCT
++/* #define ACCT */
+
+ #include <unistd.h>
+ #include "mac.h"
diff --git a/shells/heirloom-sh/files/patch-makefile b/shells/heirloom-sh/files/patch-makefile
new file mode 100644
index 000000000000..4518baf8175b
--- /dev/null
+++ b/shells/heirloom-sh/files/patch-makefile
@@ -0,0 +1,44 @@
+--- makefile.orig 2005-07-06 10:59:57 UTC
++++ makefile
+@@ -44,12 +44,12 @@ LNS=ln -s
+ #
+ # Compiler flags.
+ #
+-CFLAGS=-O
++#CFLAGS=-O
+
+ #
+ # Flags for the C preprocessor.
+ #
+-CFLAGS=-D_GNU_SOURCE
++CFLAGS+=-D_GNU_SOURCE
+
+ #
+ # A define for large file support, if necessary.
+@@ -59,12 +59,12 @@ LARGEF=-D_FILE_OFFSET_BITS=64L
+ #
+ # The compiler warning options.
+ #
+-WERROR=-Werror
++#WERROR=-Werror
+ WARN = -Wchar-subscripts -Wformat -Wno-format-y2k -Wimplicit \
+ -Wmissing-braces -Wsequence-point -Wreturn-type -Wtrigraphs \
+ -Wunused-function -Wunused-label -Wunused-variable -Wunused-value \
+ -Wuninitialized -Wmultichar -Wpointer-arith $(WERROR)
+-WARN=
++#WARN=
+
+ #
+ # End of adjustable settings.
+@@ -99,8 +99,9 @@ install: all
+ cd $(ROOT)$(SV3BIN) && $(LNS) sh jsh
+ test -d $(ROOT)$(MANDIR)/man1 || mkdir -p $(ROOT)$(MANDIR)/man1
+ $(UCBINST) -c -m 644 sh.1.out $(ROOT)$(MANDIR)/man1/sh.1
+- rm -f $(ROOT)$(MANDIR)/man1/jsh.1
+- cd $(ROOT)$(MANDIR)/man1 && $(LNS) sh.1 jsh.1
++ gzip $(ROOT)$(MANDIR)/man1/sh.1
++ rm -f $(ROOT)$(MANDIR)/man1/jsh.1.gz
++ cd $(ROOT)$(MANDIR)/man1 && $(LNS) sh.1.gz jsh.1.gz
+
+ maninstall: sh.1.out
+ $(UCBINST) -c -m 644 sh.1.out $(ROOT)$(MANDIR)/man1/sh.1