devel/heirloom-devtools: New port: OpenSolaris yacc, lex, m4, make, SCCS

This commit is contained in:
Hiroki Sato 2023-01-14 02:56:36 +09:00
parent 80502c020b
commit 18999e9e85
No known key found for this signature in database
GPG key ID: DBB07DC66F1F737F
13 changed files with 306 additions and 0 deletions

View file

@ -931,6 +931,7 @@
SUBDIR += hcs12mem
SUBDIR += heaptrack
SUBDIR += heimdall
SUBDIR += heirloom-devtools
SUBDIR += hexcompare
SUBDIR += hexd
SUBDIR += hgreviewboard

View file

@ -0,0 +1,53 @@
PORTNAME= heirloom-devtools
PORTVERSION= 070527
CATEGORIES= devel
MASTER_SITES= SF/heirloom/${PORTNAME}/${PORTVERSION}
MAINTAINER= hrs@FreeBSD.org
COMMENT= OpenSolaris yacc, lex, m4, make, and SCCS
WWW= https://heirloom.sourceforge.net/devtools.html
LICENSE= CDDL
USES= tar:bzip2
ALL_TARGET= #empty
MAKE_ARGS+= INSTALL="${INSTALL}" \
BINDIR=${BINDIR} \
SUSBIN=${SUSBIN} \
LIBDIR=${LIBDIR} \
HDRSDIR=${HDRSDIR} \
MANDIR=${MANDIR} \
ROOT=${STAGEDIR}
MAKEFILE= makefile
CFLAGS+= -fcommon
SUB_FILES= ${PORTNAME}.conf
PLIST_SUB= LIBEXECDIR=heirloom/libexec
MANPREFIX= ${PREFIX}/heirloom/share
DATADIR= ${PREFIX}/heirloom/share
BINDIR?= ${PREFIX}/heirloom/bin
SUSBIN?= ${PREFIX}/heirloom/bin/posix
LIBDIR?= ${PREFIX}/heirloom/libexec
HDRSDIR?= ${DATADIR}/lib/make
MANDIR?= ${MANPREFIX}/man
PORTDOCS= *
MAKE_JOBS_UNSAFE= yes
OPTIONS_DEFINE= DOCS
post-install:
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/man.d
pre-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
post-install-DOCS-on:
cd ${WRKSRC} && ${INSTALL_DATA} CHANGES README ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${COPYTREE_SHARE} LICENSE ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1673601154
SHA256 (heirloom-devtools-070527.tar.bz2) = 9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba
SIZE (heirloom-devtools-070527.tar.bz2) = 381054

View file

@ -0,0 +1 @@
MANPATH %%PREFIX%%/heirloom/share/man

View file

@ -0,0 +1,11 @@
--- make/bsd/bsd.cc.orig 2023-01-13 17:10:06 UTC
+++ make/bsd/bsd.cc
@@ -50,7 +50,7 @@
extern SIG_PF
bsdsignal (int Signal, SIG_PF Handler)
{
- auto SIG_PF previous_handler;
+ SIG_PF previous_handler;
#ifdef SUN5_0
#ifdef sun
previous_handler = sigset (Signal, Handler);

View file

@ -0,0 +1,21 @@
--- make/mksh/dosys.cc.orig 2007-03-07 00:12:07 UTC
+++ make/mksh/dosys.cc
@@ -99,6 +99,9 @@
/*
* typedefs & structs
*/
+#if defined(__FreeBSD__)
+extern char **environ;
+#endif /* __FreeBSD__ */
/*
* Static variables
@@ -809,7 +812,7 @@ sh_command2string(register String command, register St
int status;
Boolean command_generated_output = false;
- command->text.p = (int) nul_char;
+ command->text.p[0] = (int) nul_char;
WCSTOMBS(mbs_buffer, command->buffer.start);
if ((fd = popen(mbs_buffer, "r")) == NULL) {
WCSTOMBS(mbs_buffer, command->buffer.start);

View file

@ -0,0 +1,8 @@
--- make/src/Makefile.mk.orig 2023-01-13 17:38:46 UTC
+++ make/src/Makefile.mk
@@ -1,4 +1,4 @@
-HDRSDIR = $(PREFIX)/share/lib/make
+HDRSDIR ?= $(PREFIX)/share/lib/make
OBJ = ar.o depvar.o dist.o dmake.o doname.o dosys.o files.o globals.o \
implicit.o macro.o main.o make.o misc.o nse.o nse_printdep.o \

View file

@ -0,0 +1,12 @@
--- make/src/main.cc.orig 2023-01-13 17:33:36 UTC
+++ make/src/main.cc
@@ -128,6 +128,9 @@ extern void job_adjust_fini();
/*
* typedefs & structs
*/
+#if defined(__FreeBSD__)
+extern char **environ;
+#endif /* __FreeBSD__ */
/*
* Static variables

View file

@ -0,0 +1,29 @@
--- make/vroot/lock.cc.orig 2023-01-13 17:29:24 UTC
+++ make/vroot/lock.cc
@@ -53,7 +53,7 @@ extern char *sys_errlist[];
extern int sys_nerr;
#endif
-static void file_lock_error(char *msg, char *file, char *str, int arg1, int arg2);
+static void file_lock_error(char *msg, char *file, char *str, char *arg1, char *arg2);
#define BLOCK_INTERUPTS sigfillset(&newset) ; \
sigprocmask(SIG_SETMASK, &newset, &oldset)
@@ -123,7 +123,7 @@ file_lock(char *name, char *lockname, int *file_locked
if (errno != EEXIST) {
file_lock_error(msg, name, NOCATGETS("symlink(%s, %s)"),
- (int) name, (int) lockname);
+ name, lockname);
fprintf(stderr, "%s", msg);
return errno;
}
@@ -171,7 +171,7 @@ file_lock(char *name, char *lockname, int *file_locked
* Format a message telling why the lock could not be created.
*/
static void
-file_lock_error(char *msg, char *file, char *str, int arg1, int arg2)
+file_lock_error(char *msg, char *file, char *str, char *arg1, char *arg2)
{
int len;

View file

@ -0,0 +1,82 @@
--- mk.config.orig 2023-01-13 17:03:48 UTC
+++ mk.config
@@ -17,32 +17,32 @@ POSIX_SHELL = /bin/sh
#
# A BSD-compatible install command.
#
-INSTALL=/usr/ucb/install
+INSTALL?=/usr/ucb/install
#
# Prefix.
#
-PREFIX=/usr/ccs
+PREFIX?=/usr/ccs
#
# Where to place binaries.
#
-BINDIR=$(PREFIX)/bin
+BINDIR?=$(PREFIX)/bin
#
# Where to place additional binaries that aim at POSIX conformance.
#
-SUSBIN=/usr/5bin/posix
+SUSBIN?=/usr/5bin/posix
#
# Where to place libraries.
#
-LIBDIR=$(PREFIX)/lib
+LIBDIR?=$(PREFIX)/lib
#
# Where to place manual pages.
#
-MANDIR=$(PREFIX)/share/man
+MANDIR?=$(PREFIX)/share/man
#
# Binaries are stripped with this command after installation.
@@ -52,13 +52,13 @@ STRIP=strip
#
# C++ compiler.
#
-CXX = c++
+CXX ?= c++
#
# Compiler flags.
#
-CFLAGS=-O
-CXXFLAGS=-O
+CFLAGS?=-O
+CXXFLAGS?=-O
#
# C preprocessor flags.
@@ -66,7 +66,7 @@ CXXFLAGS=-O
# Use -D_GNU_SOURCE for Linux with GNU libc.
# Use -D_INCLUDE__STDC_A1_SOURCE for HP-UX.
#
-CPPFLAGS=-D_GNU_SOURCE
+CPPFLAGS+=-D_GNU_SOURCE
#
# Warning flags for the compiler.
@@ -76,12 +76,12 @@ WARN=
#
# Linker flags.
#
-LDFLAGS=
+#LDFLAGS=
#
# Additional libraries to link with.
#
-LIBS=
+#LIBS=
#
# It may be necessary to define AR on some systems, e.g. on HP-UX.

View file

@ -0,0 +1,12 @@
--- sccs/src/vc.c.orig 2023-01-13 17:08:38 UTC
+++ sccs/src/vc.c
@@ -36,6 +36,9 @@
* Sccsid @(#)vc.c 1.4 (gritter) 3/25/07
*/
/* from OpenSolaris "sccs:cmd/vc.c" */
+#if defined(__FreeBSD__)
+# include <limits.h> /* MB_LEN_MAX */
+#endif /* __FreeBSD__ */
# include <defines.h>
# include <locale.h>

View file

@ -0,0 +1,5 @@
The Heirloom Development Tools package provides yacc, lex, m4, make,
and SCCS as portable derivatives of the utilities released by Sun
as part of OpenSolaris. The OpenSolaris utilities were in turn
derived from the original Unix versions, and are assumed be conforming
implementations of the POSIX standard.

View file

@ -0,0 +1,68 @@
etc/man.d/heirloom-devtools.conf
heirloom/bin/admin
heirloom/bin/cdc
heirloom/bin/comb
heirloom/bin/delta
heirloom/bin/get
heirloom/bin/help
heirloom/bin/lex
heirloom/bin/m4
heirloom/bin/make
heirloom/bin/posix/m4
heirloom/bin/posix/make
heirloom/bin/prs
heirloom/bin/prt
heirloom/bin/rmdel
heirloom/bin/sact
heirloom/bin/sccs
heirloom/bin/sccsdiff
heirloom/bin/unget
heirloom/bin/val
heirloom/bin/vc
heirloom/bin/what
heirloom/bin/yacc
heirloom/libexec/help/ad
heirloom/libexec/help/bd
heirloom/libexec/help/bu
heirloom/libexec/help/cb
heirloom/libexec/help/cm
heirloom/libexec/help/cmds
heirloom/libexec/help/co
heirloom/libexec/help/de
heirloom/libexec/help/default
heirloom/libexec/help/ge
heirloom/libexec/help/he
heirloom/libexec/help/prs
heirloom/libexec/help/rc
heirloom/libexec/help/un
heirloom/libexec/help/ut
heirloom/libexec/help/vc
heirloom/libexec/lex/nceucform
heirloom/libexec/lex/ncform
heirloom/libexec/lex/nrform
heirloom/libexec/libl.a
heirloom/libexec/liby.a
heirloom/libexec/svr4.make
heirloom/libexec/yaccpar
heirloom/share/lib/make/make.rules
heirloom/share/lib/make/svr4.make.rules
heirloom/share/man/man1/admin.1.gz
heirloom/share/man/man1/cdc.1.gz
heirloom/share/man/man1/comb.1.gz
heirloom/share/man/man1/delta.1.gz
heirloom/share/man/man1/get.1.gz
heirloom/share/man/man1/help.1.gz
heirloom/share/man/man1/lex.1.gz
heirloom/share/man/man1/make.1.gz
heirloom/share/man/man1/prs.1.gz
heirloom/share/man/man1/rmdel.1.gz
heirloom/share/man/man1/sact.1.gz
heirloom/share/man/man1/sccsdiff.1.gz
heirloom/share/man/man1/unget.1.gz
heirloom/share/man/man1/val.1.gz
heirloom/share/man/man1/vc.1.gz
heirloom/share/man/man1/what.1.gz
heirloom/share/man/man1/yacc.1.gz
heirloom/share/man/man1b/prt.1b.gz
heirloom/share/man/man1b/sccs.1b.gz
heirloom/share/man/man5/sccsfile.5.gz