Move port around, cleaner.

This commit is contained in:
espie 1999-08-20 19:53:03 +00:00
parent 8f495c03fa
commit 8f3f262939
33 changed files with 1727 additions and 0 deletions

44
lang/icon/interp/Makefile Normal file
View File

@ -0,0 +1,44 @@
# $OpenBSD: Makefile,v 1.1.1.1 1999/08/20 19:53:03 espie Exp $
DISTNAME= icon_interp-9.3.2
CATEGORIES= lang
MASTER_SITES= ftp://ftp.cs.arizona.edu:/icon/packages/unix/
DIST_SUBDIR= icon
DISTFILES= unix.tgz
MAINTAINER= espie@openbsd.org
NO_WRKSUBDIR= yes
USE_X11= yes
SCRIPTS_ENV= ARCH="${MACHINE_ARCH}"
MAKE_ENV= ARCH="${MACHINE_ARCH}"
CONF_DIR= ${WRKSRC}/config/unix/openbsd
ALL_TARGET= Icon-icont
pre-configure:
cp -R ${FILESDIR}/openbsd ${WRKSRC}/config/unix
if [ -f ${CONF_DIR}/${ARCH}_rswitch.c ] ; then \
${LN} -f ${CONF_DIR}/${ARCH}_rswitch.c ${CONF_DIR}/rswitch.c ;\
else \
touch ${CONF_DIR}/rswitch.c ;\
fi
# We put a wrapper around icont for finding the library files when
# they're installed
# The icon manpage is available separately... I've included it along
# with the package. Ludicrous to get through a ftp connexion for such
# a small file...
do-install:
perl ${SCRIPTDIR}/mk_icont ${PREFIX} >${WRKSRC}/icont
${INSTALL_PROGRAM} ${WRKSRC}/bin/icont ${PREFIX}/lib
${INSTALL_PROGRAM} ${WRKSRC}/bin/iconx ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/bin/rtt ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/icont ${PREFIX}/bin
${INSTALL_MAN} ${FILESDIR}/icon.1 ${PREFIX}/man/man1/icont.1
cd ${PREFIX}/man/man1 && ln icont.1 iconx.1
${INSTALL_DATA} ${WRKSRC}/bin/rt.h ${PREFIX}/include
cd ${PREFIX}/bin && ${WRKSRC}/bin/patchstr ${PREFIX}/lib/icont ${PREFIX}/bin/iconx
.include <bsd.port.mk>

View File

@ -0,0 +1,244 @@
.co \" IPD244d: Manual page for Version 9 icon(1)
.ds I \fHicont\fR and \fHiconc\fR
.TH ICON 1 "29 November 1996 IPD244d"
.SH NAME
icon \- interpret or compile Icon programs
.SH SYNOPSIS
\fHicont\fR [ option ... ] file ... [ \fH\-x\fR arg ... ]
.br
\fHiconc\fR [ option ... ] file ... [ \fH\-x\fR arg ... ]
.SH DESCRIPTION
\*I each convert an Icon source program into executable form.
\fHicont\fR translates quickly and provides interpretive execution.
\fHiconc\fR takes longer to compile but produces programs that
execute faster.
\fHicont\fR and \fHiconc\fR for the most part can be used interchangeably.
.PP
This manual page describes both \*I. Where there
there are differences in usage between \*I, these are noted.
.PP
\fBFile Names:\fR Files whose names end in \fH.icn\fR are assumed
to be Icon source files. The \fH.icn\fR suffix may be omitted;
if it is not present, it is supplied. The character \fH\-\fR can
be used to indicate an Icon source file given in standard input.
Several source files can be given on the same command line; if so, they
are combined to produce a single program.
.PP
The name of the executable file is the base name of the
first input file,
formed by deleting the suffix, if present. \fHstdin\fR is used for
source programs given in standard input.
.PP
\fBProcessing:\fR As noted in the synopsis above, \*I accept options followed
by file names, optionally followed by \fH\-x\fR and arguments. If \fH\-x\fR
is given, the program is executed automatically and any following
arguments are passed to it.
.PP
\fHicont\fR: The processing performed by \fHicont\fR consists of two phases:
\fItranslation\fR and \fIlinking\fR. During translation,
each Icon source file is translated into an intermediate language called
\fIucode\fR. Two ucode files are produced for each
source file, with base names from the
source file and suffixes \fH.u1\fR and \fH.u2\fR.
During linking, the one or more pairs of ucode files are combined to
produce a single
\fIicode\fR file.
The ucode files are deleted after the icode file is created.
.PP
Processing by \fHicont\fR can be terminated after translation by the
\fH\-c\fR option. In this case, the ucode files are not deleted.
The names of \fH.u1\fR files from previous translations can be given on the
\fHicont\fR command line.
These files and the corresponding \fH.u2\fR
files are included in the linking phase after the translation of any source
files.
The suffix \fH.u\fR can be used in place of \fH.u1\fR; in this case
the \fH1\fR is supplied automatically.
Ucode files that are explicitly named are not deleted.
.PP
\fHiconc\fR: The processing performed by \fHiconc\fR consists of two
phases: \fIcode generation\fR and \fIcompilation and linking\fR. The
code generation phase produces C code, consisting of a \fH.c\fR and a \fH.h\fR
file, with the base name of the first source file. These files are
then compiled and linked to produce an executable binary file.
The C files normally are deleted after compilation and linking.
.PP
Processing by \fHiconc\fR can be terminated after code generation by
the \fH\-c\fR option. In this case, the C files are not deleted.
.SH OPTIONS
The following options are recognized by \*I:
.TP 4
\fH\-c\fR
Stop after producing intermediate files and do not delete them.
.TP 4
\fH\-e\fR \fIfile\fR
Redirect standard error output to \fIfile\fR.
.TP
\fH\-f s\fR
Enable full string invocation.
.TP
\fH\-o \fIname\fR
Name the output file \fIname\fR.
.TP
\fH\-s\fR
Suppress informative messages.
Normally, both informative messages and error messages are sent
to standard error output.
.TP
\fH\-t\fR
Arrange for \fH&trace\fR to have an initial value of \-1
when the program is executed and for \fHiconc\fR enable debugging features.
.TP
\fH\-u\fR
Issue warning messages for undeclared identifiers in the program.
.TP
\fH\-v \fIi\fR
Set verbosity level of informative messages to \fIi\fH
.TP
\fH\-E\fR
Direct the results of preprocessing to standard output and inhibit
further processing.
.PP
The following additional options are recognized by \fHiconc\fR:
.TP 4
\fH\-f \fIstring\fR
Enable features as indicated by the letters in \fIstring\fR:
.TP 8
\fHa\fR
all, equivalent to \fHdelns\fR
.TP 8
\fHd\fR
enable debugging features: \fHdisplay()\fR,
\fHname()\fR, \fHvariable()\fR, error
trace back, and the effect of \fH\-f n\fR (see below)
.TP 8
\fHe\fR
enable error conversion
.TP 8
\fHl\fR
enable large-integer arithmetic
.TP 8
\fHn\fR
produce code that keeps track of line numbers and file names in the source code
.TP 8
\fHs\fR
enable full string invocation
.TP 4
\fH\-n \fIstring\fR
Disable specific optimizations. These are indicated by the
letters in \fIstring\fR:
.TP 8
\fHa\fR
all, equivalent to \fHcest\fR
.TP 8
\fHc\fR
control flow optimizations other than switch statement optimizations
.TP 8
\fHe\fR
expand operations in-line when reasonable
(keywords are always put in-line)
.TP 8
\fHs\fR
optimize switch statements associated with operation invocations
.TP 8
\fHt\fR
type inference
.TP 4
\fH\-p \fIarg\fR
Pass \fIarg\fR on to the C compiler used by \fHiconc\fR
.TP 4
\fH\-r \fIpath\fR
Use the run-time system at \fIpath\fR, which must end with a slash.
.TP 4
.TP 4
\fH\-C \fIprg\fR
Have \fHiconc\fR use the C compiler given by \fIprg\fH
.SH "ENVIRONMENT VARIABLES"
When an Icon program is executed, several environment variables
are examined to determine certain execution parameters.
Values in parentheses are the default values.
.TP 4
\fHBLKSIZE\fR (500000)
The initial size of the allocated block region, in bytes.
.TP
\fHCOEXPSIZE\fR (2000)
The size, in words, of each co-expression block.
.TP
\fHDBLIST\fR
The location of data bases
for \fHiconc\fR to search before the standard one.
The value of \fHDBLIST\fR should be a blank-separated
string of the form \fIp1\0p2 ...\0 pn\fR where the \fIpi\fR name directories.
.TP
\fHICONCORE\fR
If set, a core dump is produced for error termination.
.TP 4
\fHICONX\fR
The location of \fHiconx\fR, the executor for icode files, is
built into an icode file when it
is produced. This location can be overridden by setting the
environment variable \fHICONX\fR.
If \fHICONX\fR is set, its value is used in place of the location
built into the icode file.
.TP 4
\fHIPATH\fR
The location of ucode files
specified in link declarations for \fHicont\fR.
\fHIPATH\fR is a blank-separated list of directories.
The current directory is always searched first, regardless of the value of
\fHIPATH\fR.
.TP 4
\fHLPATH\fR
The location of source files
specified in preprocessor \fH$include\fR directives and in link
declarations for \fHiconc\fR.
\fHLPATH\fR is otherwise similar to \fHIPATH\fR.
.TP
\fHMSTKSIZE\fR (10000)
The size, in words, of the main interpreter stack for \fHicont\fR.
.TP
\fHNOERRBUF\fR
By default, \fH&errout\fR is buffered. If this variable is set, \fH&errout\fR
is not buffered.
.TP
\fHQLSIZE\fR (5000)
The size, in bytes, of the region used for pointers
to strings during garbage collection.
.TP
\fHSTRSIZE\fR (500000)
The initial size of the string space, in bytes.
.TP
\fHTRACE\fR
The initial value of \fH&trace\fR.
If this variable has a value, it overrides the translation-time
\fH\-t\fR
option.
.SH FILES
.ta \w'\fHicont\fR 'u
\fHicont\fR Icon translator
.br
\fHiconc\fR Icon compiler
.br
\fHiconx\fR Icon executor
.br
.SH SEE ALSO
\fIThe Icon Programming Language\fR,
Ralph E. Griswold and Madge T. Griswold,
Peer-to-Peer Communications, Inc., Third Edition, 1996.
.LP
\fIVersion 9.3 of Icon\fR, Ralph E. Griswold, Clinton L. Jeffery,
and Gregg M. Townsend, IPD278,
Department of Computer Science, The University of Arizona, 1996.
.LP
\fIVersion 9 of the Icon Compiler\fR,
Ralph E. Griswold, IPD237, Department of Computer Science,
The University of Arizona, 1995.
.LP
icon_vt(1)
.SH "LIMITATIONS AND BUGS"
.LP
The icode files for the
interpreter do not stand alone; the Icon run-time system (\fHiconx\fR) must be
present.
.LP
Stack overflow is checked using a heuristic that is not always effective.

View File

@ -0,0 +1,3 @@
MD5 (icon/unix.tgz) = 3147586808024239962390cfa78a00a8
RMD160 (icon/unix.tgz) = 13fb301eae467ec1a69b55afce7b88c13a015147
SHA1 (icon/unix.tgz) = 153c59210b6d2df17a6411ae6ba453210016f565

View File

@ -0,0 +1,10 @@
# The -D$D option to CFLAGS makes it possible to specify a definition
# at the Make command level without revising the Makefile, as
# in
#
# make D=Debug
#
D=NOTHING
CFLAGS+= -D$D -I/usr/X11R6/include
SHELL=/bin/sh
RSWITCH=rswitch.c

View File

@ -0,0 +1,3 @@
#include "../../../src/h/define.h"
#include "paths.h"
#include "../Generic/copybin.h"

View File

@ -0,0 +1,29 @@
#define Standard
#define IconGcvt
#define IconEcvt
#define index strchr
#define rindex strrchr
#define GetHost
#define Hz 100
#define MaxHdr 13400
#define MaxStatSize 20480
/* to implement on some architectures yet ... */
#if defined(__i386__)
#else
#define NoCoexpr
#endif
#define GenericBSD
#define BSD_4_4_LITE 1 /* This is new, for 4.4Lite specific stuff */
#define UNIX 1
#define LoadFunc
/* #define ExecImages */
#define KeyboardFncs
#define HaveTioc
#define USE_OLD_TTY
#define AllowConst
#define SysOpt
#define CComp "gcc"
#define COpts "-O2 -I/usr/X11R6/include"

View File

@ -0,0 +1,28 @@
/*
* This is the co-expression context switch for the Intel 80386
* under Microport Unix System V/386
*/
/*
* coswitch
*/
coswitch(old_cs, new_cs, first)
int *old_cs, *new_cs;
int first;
{
asm(" movl 8(%ebp),%eax");
asm(" movl %esp,0(%eax)");
asm(" movl %ebp,4(%eax)");
asm(" movl 12(%ebp),%eax");
if (first == 0) { /* this is the first activation */
asm(" movl 0(%eax),%esp");
asm(" movl $0,%ebp");
new_context(0, 0);
syserr("interp() returned in coswitch");
}
else {
asm(" movl 0(%eax),%esp");
asm(" movl 4(%eax),%ebp");
}
}

View File

@ -0,0 +1,2 @@
#include "paths.h"
#include "../Generic/icon_pi.h"

View File

@ -0,0 +1,9 @@
# The -D$D option to CFLAGS makes it possible to specify a definition
# at the Make command level without revising the Makefile, as
# in
#
# make D=Debug
#
D=NOTHING
CFLAGS+= -D$D -I/usr/X11R6/include
SHELL=/bin/sh

View File

@ -0,0 +1,2 @@
SHELL=/bin/sh
CFLAGS+=-I/usr/X11R6/include

View File

@ -0,0 +1,7 @@
SHELL=/bin/sh
# the seek stuff is defined in a header file that they don't
# include. This is the easiest. -Dconst= causes const to
# be ignored. This is needed because otherwise we get complaints
# due to stdio.h defining some functions with const when they
# are not defined that way in Icon's header files
RSWITCH=rswitch.c

View File

@ -0,0 +1,3 @@
#define RootPath "/usr/local"
#define IcontPath "/usr/local/lib/icon/icont"
#define IconxPath "/usr/local/lib/icon/iconx"

View File

@ -0,0 +1,2 @@
SHELL=/bin/sh
CFLAGS+=-DPersInterp -I/usr/X11R6/include

View File

@ -0,0 +1,10 @@
# The -D$D option to CFLAGS makes it possible to specify a definition
# at the Make command level without revising the Makefile, as
# in
#
# make D=Debug
#
D=NOTHING
CC=cc
CFLAGS+= -O -D$D
SHELL=/bin/sh

View File

@ -0,0 +1,2 @@
CFLAGS+= -DTokDotH="\"../rtt/ltoken.h\"" -O2 -I/usr/X11R6/include
SHELL=/bin/sh

View File

@ -0,0 +1,3 @@
SHELL=/bin/sh
CFLAGS+=-I/usr/X11R6/include
LIBS=-lm

View File

@ -0,0 +1,2 @@
#include "paths.h"
#include "../Generic/setpath.h"

View File

@ -0,0 +1,29 @@
System configuration:
OpenBSD >= 2.4
Latest Icon version:
Version 9.3.1
Installer:
Marc Espie
<espie@openbsd.org>
Missing features:
Executable images, coexpr (on some archs)
Known bugs:
None.
Comments:
Some things to check yet, like building dynamic libraries, and
jpeg/giff/png support
Date:
September 29, 1998

View File

@ -0,0 +1,2 @@
SHELL=/bin/sh
CFLAGS+= -DVarTran

View File

@ -0,0 +1,3 @@
# If you define EventMon, add the -lgmon below to get profil(2) under Linux
#XLIB= -lX11 -lgmon
XLIB= -L/usr/X11R6/lib -lX11

View File

@ -0,0 +1 @@
DEFINES= -DZPIPE

View File

@ -0,0 +1,13 @@
--- config/unix/Config/common.make.orig Fri Feb 13 15:13:56 1998
+++ config/unix/Config/common.make Tue Sep 29 22:08:51 1998
@@ -11,9 +11,7 @@
cp patchstr ../../bin
xpm:
- cd ../xpm; $(MAKE) libXpm.a
- cp ../xpm/libXpm.a ../../bin
- -(test -f ../../NoRanlib) || (ranlib ../../bin/libXpm.a)
+ touch xpm
$(OBJS): ../h/define.h ../h/config.h ../h/cstructs.h ../h/mproto.h ../h/path.h\
../h/typedefs.h ../h/proto.h ../h/cpuconf.h

View File

@ -0,0 +1,13 @@
--- src/h/sys.h.orig Thu Jul 1 19:36:34 1999
+++ src/h/sys.h Tue Jul 13 22:14:22 1999
@@ -190,7 +190,9 @@
#undef VMS
#ifdef HaveXpmFormat
- #include "../xpm/xpm.h"
+ #undef AMIGA
+ #include <X11/xpm.h>
+ #define AMIGA 0
#else /* HaveXpmFormat */
#include <X11/Xlib.h>
#endif /* HaveXpmFormat */

View File

@ -0,0 +1 @@
programming language with generators, X11 graphics and more

View File

@ -0,0 +1,19 @@
Icon is a program language that looks superficially like Pascal,
but which supports generators. It also include some very reasonable
X11 support.
The port has not yet been tested on all architectures. In particular,
most will need coexpr support (see openbsd/${ARCH}_coexpr.c and
openbsd/define.h), but we can probably steal that from an existing
architecture.
The graphics picture loader can also be improved to handle gifs, jpeg, png,
tiff, along with xpm.
The icon compiler is actually no longer supported by the icon project,
though it is nice to have it along.
The icon variant translators could be rather simply installed.
There is a patch floating around for some unix functions support (sockets,
mainly) that is crying to be adapted...

View File

@ -0,0 +1,7 @@
bin/icont
lib/icont
bin/iconx
man/man1/icont.1
man/man1/iconx.1
bin/rtt
include/rt.h

1
lang/icon/interp/scripts/configure vendored Normal file
View File

@ -0,0 +1 @@
cd ${WRKSRC} && make X-Configure name=openbsd

View File

@ -0,0 +1,13 @@
#!/usr/bin/perl
$PREFIX=shift;
# This small script does build a suitable shell wrapper that calls
# icont, according to env variables.
print <<"EOF";
#!/bin/sh
IPATH="\${IPATH-} $PREFIX/share/ipl/ucode"
LPATH="\${LPATH-} $PREFIX/share/ipl/ginclude $PREFIX/share/ipl/include"
export IPATH LPATH
exec $PREFIX/lib/icont "\$@"
EOF

62
lang/icon/lib/Makefile Normal file
View File

@ -0,0 +1,62 @@
# Icon library port
# $OpenBSD: Makefile,v 1.1.1.1 1999/08/20 19:53:44 espie Exp $
DISTNAME=icon_lib-9.3.2
DIST_SUBDIR=icon
CATEGORIES=lang
MAINTAINER=espie@openbsd.org
# if you really want, the ipl.tgz file holds precompiled u1/u2 files
# however, you will still have to grab the source for the necessary
# includes, especially for the graphics API.
# Anyway, since source is available, using pre-compiled binaries is not
# OpenBSD policy...
MASTER_SITES=
DISTFILES=bipl.tgz gipl.tgz info.tgz
USE_X11=yes
NO_WRKSUBDIR=yes
MASTER_SITES=ftp://ftp.cs.arizona.edu:/icon/library/
BUILD_DEPENDS=${PREFIX}/bin/icont:${PORTSDIR}/lang/icon
RUN_DEPENDS=${PREFIX}/bin/iconx:${PORTSDIR}/lang/icon
# temporary values for building programs
IPATH=${WRKSRC}/gprocs ${WRKSRC}/procs
LPATH=${WRKSRC}/gincl ${WRKSRC}/incl
BUILDENV=IPATH="${IPATH}" LPATH="${LPATH}"; export IPATH LPATH;
IPL=${PREFIX}/share/ipl
do-build:
# first build library
${BUILDENV} cd ${WRKSRC} && /bin/sh Ucode && /bin/sh Ugcode
# then build programs using library
${BUILDENV} cd ${WRKSRC} && /bin/sh Icode && /bin/sh Igcode
# finally build some supplementary packages
${BUILDENV} cd ${WRKSRC}/gpacks/vib && make
${BUILDENV} cd ${WRKSRC}/gpacks/xtiles && icont xtiles.icn
do-install:
${INSTALL_DATA_DIR} ${IPL}/ucode
${INSTALL_DATA} ${WRKSRC}/procs/*.u[12] ${IPL}/ucode
${INSTALL_DATA} ${WRKSRC}/gprocs/*.u[12] ${IPL}/ucode
${INSTALL_DATA_DIR} ${IPL}/incl
${INSTALL_DATA} ${WRKSRC}/incl/* ${IPL}/incl
${INSTALL_DATA_DIR} ${IPL}/gincl
${INSTALL_DATA} ${WRKSRC}/gincl/* ${IPL}/gincl
${INSTALL_PROGRAM_DIR} ${IPL}/bin
${INSTALL_PROGRAM} ${WRKSRC}/gpacks/vib/vib ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/gpacks/xtiles/xtiles ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/gpacks/xtiles/xtiles.6 ${PREFIX}/man/man6
# we separate icon sample program from the rest of the world, especially
# as we can share them between architectures
find ${WRKSRC}/progs -type f -perm -a+x -exec ${INSTALL_SCRIPT} {} ${IPL}/bin \;
find ${WRKSRC}/gprogs -type f -perm -a+x -exec ${INSTALL_SCRIPT} {} ${IPL}/bin \;
.include <bsd.port.mk>

9
lang/icon/lib/files/md5 Normal file
View File

@ -0,0 +1,9 @@
MD5 (icon/bipl.tgz) = 13e3a0659016c88873ec91cae6c89523
MD5 (icon/gipl.tgz) = 7885db634caa4be7da4a0ea31f804172
MD5 (icon/info.tgz) = 56e2488e05115bbc0477ae8463fadfd8
RMD160 (icon/bipl.tgz) = 5850b69524981e94f2b0c41b0b6521f8301c6403
RMD160 (icon/gipl.tgz) = e933e11c270cb18a1992afeaa0dbff9ad7172a4b
RMD160 (icon/info.tgz) = 5d2623368ae35d032241335bf544942e50b549a2
SHA1 (icon/bipl.tgz) = 9acbd21a94764daf5ad7c3ee538aa52143df541c
SHA1 (icon/gipl.tgz) = 5cb0951e3fdb8e7e6c03ca0f65a5a1d0f83e9386
SHA1 (icon/info.tgz) = 521eeb2bb0affb32e253753fb91a02374955ad67

View File

@ -0,0 +1 @@
useful and interesting programs for Icon

3
lang/icon/lib/pkg/DESCR Normal file
View File

@ -0,0 +1,3 @@
Icon normally comes with this program library, that ranges from simple
example programs to parts of the graphics interface to X, which actually
can be said to be a part of Icon, proper

1147
lang/icon/lib/pkg/PLIST Normal file

File diff suppressed because it is too large Load Diff