From: tim@maths.tcd.ie (Timothy Murphy)
Subject: MacPerl
Summary: A port of Perl to the Macintosh
Keywords: Perl Macintosh Think-C
Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
Date: Fri, 2 Oct 1992 17:41:59 GMT


I recently ported perl-4.035 to the Macintosh, using Think C.

The application may be found in the directory "pub/Mac"
at "ftp.maths.tcd.ie" in the file "perl.hqx".

The source code -- or rather, the diff-files
from the standard distribution --
may be found in the directory "pub/Mac/perl-4.035".
The "Posix" library in "pub/Mac/ThinkCPosix-1.1"
will also be required.

The present documentation is rather scanty;
I hope to complete it soon.
The following file gives the gist of things.

===================== MacPerl.tex ===================== 

\documentstyle[rcs,a4,12pt]{article}

% The style file rcs.sty is available from ftp.uni-stuttgart.de
% in the directory soft/tex/latex-style-supported .

\RCS$Revision: 1.1 $
\RCS$Date: 1992/09/14 14:28:23 $

\def\program{perl}
\def\Program{Perl}
\def\version{4.035}

\def\ConfigurationFile{config.h}

\catcode`\"=\active
\def"#1"{{\tt #1}}

\begin{document}

\title{Perl on the Mac}

\author{Timothy Murphy\\
Trinity College Dublin\\
("tim@maths.tcd.ie")}

\date{\RCSDate\\[2mm]
(Version \RCSRevision)}

\maketitle

\begin{abstract}
This note descibes an implementation of Perl
on the Macintosh, using Symantec's Think C.
\end{abstract}

\section{Status}

The software consists of patches
to the standard GNU \Program\ distribution,
and is therefore subject to the usual GNU licensing conditions%
\footnote{As prescribed in the file "COPYING" in the GNU distribution.}.

\section{Availability}

The application and Mac-specific source code
can be retrieved by anonymous FTP
from "ftp.maths.tcd.ie" in the directory "pub/Mac".

The application is contained in the BinHex-ed StuffIt file "\program.hqx".
The patch-files and other source files (as descibed below)
may be found in the directory "pub/Mac/\program-\version".

\section{Requirements}

To compile this implementation of \program,
you will need:

\begin{enumerate}

\item
The Think C compiler.
The author used version 5,
but version 4 should be equally good.

\item
The official \program\ distribution (version \version).
This is available from the official GNU archive site,
"prep.ai.mit.edu", in the directory "pub/gnu";
but it is also available at many other archive sites.

\item
The "ThinkCPosix" library,
available from "ftp.maths.tcd.ie"
in the directory "pub/Mac/ThinkCPosix-m.n".
(At present "m.n" = 1.1.)

The document "ThinkCPosix.tex"
describes how to compile and install this library.

Alternatively, the compiled library is available
in the same directory in BinHex-ed StuffIt format,
as "Posix.hqx".
(This was compiled under Think C version 5;
the author is not sure if such a library
is compatible with version 4,
or if it has to be re-compiled.)

\item
The utilities "patch", "decompress", "detar" and "UnStuffIt".
These are available from "ftp.maths.tcd.ie"
in the directory "pub/Mac"
as "patch.hqx", "decompress.hqx", "detar.hqx" and "unstuffit.hqx"
(in BinHex-ed StuffIt format).

The sources for the first 3 programs may be found in the subdirectories
"patch-m.n", "compress" and "detar".
There are several other de-compressing and de-tarring programs
available around the net;
they will certainly be at least as good as those given here.

Actually, "decompress" and "detar" are only needed
to un-archive the official distribution.
This could equally well be done on a {\sc Unix} system,
and the resulting files be brought down to the Mac.)

\item
The patch file "\program-\version.patch".

\item
The Mac-specific file "\ConfigurationFile",
which may be found with the patch file
at "ftp.maths.tcd.ie".

(It is difficult to give a patch for this file,
since there is no standard version to base it on;
on {\sc Unix} systems the file is created
by running a shell-script.)

\item
The files "perly.c" and "perly.h",
which may be also be found with the patch file.

These are not necessary if you have "bison" or some equivalent,
since they can (and perhaps should) be created from "perly.y".
This will probably result in files "y.tab.c" and "y.tab.h";
these should be renamed "perly.c" and "perly.h".

(The application "bison" is available as "bison.hqx" in "pub/Mac".)

\end{enumerate}

\section{Compilation}

\begin{enumerate}

\item
Create a folder, say "perl", on the Mac
to hold all the software for the program.
Bring the official distribution to the folder
as "\program.tar.Z", say.
Uncompress and de-tar this file.

A simple decompression program can be found
in the directory "pub/Mac" at TCD
in the file "uncompress.hqx".
Similarly a ``de-tarring'' program can be found
in "detar.hqx".

This should result in some 30--40 ".c" and ".h" files,
as well as one Yacc file "perly.y".

To avoid confusion, delete (or move) the file "config.H",
since it will shortly be over-written by "config.h".

\item
Bring the 4 files
"perl-\version.patch",
"config.h",
"perly.c"
and "perly.h"
to the folder.

\item
Apply the patch to the standard distribution.
The patch program can be found in the file
"patch.hqx" in the directory "pub/Mac" at TCD.
To apply it, double click on the application "patch"
and divert ``Standard input'' to the patch file
"perl-\version.patch".

\item
UnStuffIt the project "perl-project.hqx",
and run it,
choosing the Build application option in the Project menu.

The author has all the ANSI options turned on,
as well as "Require prototypes".
The 4-byte int option and 68020 option are turned off.

\end{enumerate}

\end{document}
=======================================================


-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Newsgroups: comp.lang.perl