From 24a1ffe3db96a1c2f858565073c48162a05bcc50 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 17 Jan 2022 19:11:59 -0500 Subject: development/pli: Added (Iron Spring PL/I Compiler). Signed-off-by: Willy Sudiarto Raharjo --- development/pli/README | 10 ++ development/pli/README_SBo.txt | 37 +++++++ development/pli/pli.SlackBuild | 87 +++++++++++++++++ development/pli/pli.info | 12 +++ development/pli/plic.1 | 216 +++++++++++++++++++++++++++++++++++++++++ development/pli/plic.rst | 190 ++++++++++++++++++++++++++++++++++++ development/pli/slack-desc | 19 ++++ 7 files changed, 571 insertions(+) create mode 100644 development/pli/README create mode 100644 development/pli/README_SBo.txt create mode 100644 development/pli/pli.SlackBuild create mode 100644 development/pli/pli.info create mode 100644 development/pli/plic.1 create mode 100644 development/pli/plic.rst create mode 100644 development/pli/slack-desc (limited to 'development/pli') diff --git a/development/pli/README b/development/pli/README new file mode 100644 index 000000000000..af91d36bdbe8 --- /dev/null +++ b/development/pli/README @@ -0,0 +1,10 @@ +pli (Iron Spring PL/I Compiler for Linux) + +pli is a compiler for the PL/I programming language, which implements +most of the "PL/I General-Purpose Subset" (aka "Subset G"). The +compiler itself is closed-source, but it may be used and copied +freely. The runtime library (libprf.a) is released under the GNU LGPL, +so that programs linked with it can be distributed freely. + +The package ships with extensive documentation. Also, see +README_SBo.txt for Slackware-specific details. diff --git a/development/pli/README_SBo.txt b/development/pli/README_SBo.txt new file mode 100644 index 000000000000..20c1a27c1443 --- /dev/null +++ b/development/pli/README_SBo.txt @@ -0,0 +1,37 @@ +SBo development/pli notes +========================= + +The package is called pli, but the actual compiler binary is plic. +I've written a man page for it, but it's not very detailed. You should +read the HTML and PDF docs in /usr/doc/pli-$VERSION. + +The compiler doesn't have a default include path. The documentation +claims that it looks in the current directory, but it won't even do +that without "-i ." on the command line. + +PL/I doesn't seem to rely as heavily on includes as C does (very +few of the samples/ programs include anything at all). This package +installs the includes in /usr/lib/pli-$VERSION/include, which +gets symlinked as /usr/lib/pli/include. That's what you should +use for plic's -i option in your Makefile for a PL/I project. + +x86_64 notes +------------ + +The package will always have i586 architecture, which might confuse +sbopkg and/or sbotools. However, it can be installed and run on pure +64-bit Slackware (without multilib). + +The compiler is a fully statically linked 32-bit x86 executable. This +means it can be run on an x86_64 Slackware system even without +multilib. When compiling PL/I code to standalone executables (that +don't use the C library), the resulting binaries are also statically +linked 32-bit, and will run on non-multilib x86_64. For examples +of standalone use, see: + + /usr/doc/pli-$VERSION/samples/SA_make + +What you *can't* do on x86_64 without multilib is link with the C +library (LC_make and LCC_make in samples/), or use the alt/ library +to use the C malloc() and free() for the PL/I heap. This means that +trying to build the samples will fail. diff --git a/development/pli/pli.SlackBuild b/development/pli/pli.SlackBuild new file mode 100644 index 000000000000..6b737a06479b --- /dev/null +++ b/development/pli/pli.SlackBuild @@ -0,0 +1,87 @@ +#!/bin/bash + +# Slackware build script for pli + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=pli +VERSION=${VERSION:-0.9.10d} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# static binary and library are for this arch. +ARCH=i586 + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# wrapper/frontend script version. +PLICLVER=${PLICLVER:-0.0.1} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tgz +cd $PRGNAM-$VERSION +chown -R root:root . + +# permissions are bad, please don't revert this to template. +find . -type f -a -exec chmod 644 {} \+ -o -exec chmod 755 {} \+ + +# binary-only software, no compilation, just install it where it goes. +# AUR has a pli build: +# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pli-bin +# but they don't include the includes, or the ISAM stuff (libpbl), +# or the alt/ dir. + +# thought about stripping the plic binary, but I'm not sure it's wise. +# plus, it's 2.6MB, and stripping it only removes 18KB (or, it only +# gets 0.07% smaller), so no point anyway. + +PKGLIB=$PKG/usr/lib +PRIVLIB=$PKGLIB/$PRGNAM-$VERSION +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +PKGMAN=$PKG/usr/man/man1 +mkdir -p $PKG/usr/bin $PRIVLIB $PKGDOC $PKGMAN + +install -oroot -groot -m0755 plic $PRIVLIB/plic +install -oroot -groot -m0644 lib/libprf.a $PRIVLIB/libprf.a +install -oroot -groot -m0644 lib/libpbl.a $PRIVLIB/libpbl.a +cp -a lib/{alt,include,source} $PRIVLIB + +ln -s $PRGNAM-$VERSION $PKG/usr/lib/$PRGNAM +ln -s ../lib/$PRGNAM/plic $PKG/usr/bin/plic +ln -s $PRGNAM/libprf.a $PKGLIB/libprf.a +ln -s $PRGNAM/libpbl.a $PKGLIB/libpbl.a + +gzip -9c < $CWD/plic.1 > $PKGMAN/plic.1.gz + +# wrapper script. written by the SlackBuild author, but not +# Slackware-specific, so it's not kept in SBo's git repo. +install -oroot -groot -m0755 $CWD/plicl-$PLICLVER $PKG/usr/bin/plicl +sh $CWD/plicl-$PLICLVER --man | gzip -9c > $PKGMAN/plicl.1.gz + +# don't need 2 copies of the lgpl +rm -f lib/lgpl.html +cp -a *.gif *.pdf *.html lib/*.html samples $PKGDOC +cat $CWD/README_SBo.txt > $PKGDOC/README_SBo.txt +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/pli/pli.info b/development/pli/pli.info new file mode 100644 index 000000000000..e3fce2dbe193 --- /dev/null +++ b/development/pli/pli.info @@ -0,0 +1,12 @@ +PRGNAM="pli" +VERSION="0.9.10d" +HOMEPAGE="http://www.iron-spring.com/" +DOWNLOAD="http://www.iron-spring.com/pli-0.9.10d.tgz \ + https://slackware.uk/~urchlay/src/plicl-0.0.1" +MD5SUM="8671caaaff737eb8a8f5ba7095ac96f4 \ + 43cef380d335b102f52524874d59d324" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/development/pli/plic.1 b/development/pli/plic.1 new file mode 100644 index 000000000000..6e2bd2a6d931 --- /dev/null +++ b/development/pli/plic.1 @@ -0,0 +1,216 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "PLIC" 1 "2022-01-17" "0.9.10d" "SlackBuilds.org" +.SH NAME +plic \- Iron Spring PL/I Compiler for x86 Linux +.\" RST source for plic(1) man page. Convert with: +. +.\" rst2man.py plic.rst > plic.1 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.\" This is mostly copypasta from prog_guide.html, with a bit +. +.\" of commentary explaining things that aren't entirely clear. +. +.SH SYNOPSIS +.sp +plic [\fIoptions\fP] [\fI\-o\fP output\-file] +.SH DESCRIPTION +.sp +\fBplic\fP is a compiler for the PL/I language. +.sp +This man page doesn\(aqt attempt to fully document \fBplic\fP\&. It\(aqs just +intended as a reference for the command\-line options and arguments. +For full documentation, see: /usr/doc/pli\-0.9.10d/prog_guide.html +.sp +\&...and the other HTML and PDF documents found in the same directory. +.sp +One major difference between \fBplic\fP and other compilers for other +languages you may have used: \fBplic\fP doesn\(aqt link executables +nor call \fBld\fP(1) to link them as e.g. \fBgcc\fP(1) does. \fBplic\fP +produces object files (named with \fI\&.o\fP extension), which must then be +linked with a separate \fBld\fP command. The full documentation explains +this, and there is also a sample Makefile for building a simple +PL/I application, found in: /usr/doc/pli\-0.9.10d/samples/SA_make +.sp +The \fBpli\fP SlackBuilds.org package also includes a \fBplicl\fP wrapper +script, which does compiling and linking in one step, at least for +simple PL/I programs. It has its own man page. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-V +Print version and copyright info to stderr (not stdout!) and exit. +.TP +.B \-S +Generate assembler (symbolic) output. Default output filename is +the input filename with the extension changed to \fI\&.asm\fP (use \fB\-o\fP to +change it). +.TP +.B \-C +Generate compiled (object code) output. Default object filename is +the input filename with the extension changed to \fI\&.o\fP (use \fB\-o\fP to +change it). A listing file (extension \fI\&.lst\fP) is also created. This +option should always be used when compiling; without it, \fBplic\fP +still generates an object file, but confusingly, its extension will +be \fI\&.exe\fP, and no \fI\&.lst\fP file will be created. +.TP +.B \-N +Generate statement number tables to provide information for run\-time +error messages. +.UNINDENT +.INDENT 0.0 +.TP +.B \fB\-o\fP \fIfile\fP +Set the output filename. The space between the option and argument +is optional. +.TP +.B \fB\-i\fP \fIdirectory\fP +Use \fIdirectory\fP as the absolute or relative path to a directory to +be searched for %INCLUDE files. This option may be used more than once on the +command line, and directories will be searched in the order listed. +The space between the option and argument is optional. Note that +you must use \fB\-i .\fP if you want to search for include files in the +current directory. +.TP +.B \fB\-l[saxgmov]\fP +Listing options. One or more of [saxgmov] may be entered, in any +order, e.g. \fB\-lsx\fP\&. +.INDENT 7.0 +.TP +.BI \-l\fB s +list source +.TP +.BI \-l\fB a +list attributes +.TP +.BI \-l\fB x +list cross\-reference +.TP +.BI \-l\fB g +list aggregates +.TP +.BI \-l\fB m +list generated code in a format similar to a disassembly. +.TP +.BI \-l\fB o +list procedure map (statement offset table) +.TP +.BI \-l\fB v +list additional warning messages +.UNINDENT +.TP +.B \fB\-m(start[,end])\fP +This option defines the first and last positions of each +input line that contain input for the compiler. If this +option is omitted the source is assumed to be the entire line. +This option is included for compatibility with mainframe compilers +which would use, for example, \-m(2,72). +.TP +.B \fB\-cn()\fP, \fB\-co()\fP +These options define up to four characters each to be used as +substitutions for the NOT(¬) [\-cn()] and/or OR(|) [\-co()] +operator IN ADDITION TO the defaults. Parentheses are metacharacters +in most Linux shells, so quote these options with either single\- or +double\-quotes. +.TP +.B \fB\-e[wsd]\fP +Error options. Can be combined, e.g. \-ewd. Normally, the compiler\(aqs +exit status is 4 if only warnings were issued, and 8 for any errors +in the code [but, exit status is 0 for errors like "Input file not found"]. +These options are useful when the compiler is run from a script or Makefile. +.INDENT 7.0 +.TP +.BI \-e\fB w +Tells the compiler to exit with 0 status if only warning messages +were issued. +.TP +.BI \-e\fB s +Tells the compiler to exit with 0 status if any errors \fIor\fP +warnings were issued. +.TP +.BI \-e\fB d +Display messages on stderr, as well as stdout. Normally, stdout +is the .lst file, so this option allows you to see any compile +errors/warnings immediately, without scrolling through the +listing. +.UNINDENT +.TP +.B \fB\-d