diff options
author | B. Watson <yalhcru@gmail.com> | 2022-01-17 19:11:59 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-01-22 08:23:02 +0700 |
commit | 24a1ffe3db96a1c2f858565073c48162a05bcc50 (patch) | |
tree | ee19e0b483804613b72119f6322821d1a188aa4e /development/pli | |
parent | 1691770678adc4c079896515752372c967db3381 (diff) |
development/pli: Added (Iron Spring PL/I Compiler).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/pli')
-rw-r--r-- | development/pli/README | 10 | ||||
-rw-r--r-- | development/pli/README_SBo.txt | 37 | ||||
-rw-r--r-- | development/pli/pli.SlackBuild | 87 | ||||
-rw-r--r-- | development/pli/pli.info | 12 | ||||
-rw-r--r-- | development/pli/plic.1 | 216 | ||||
-rw-r--r-- | development/pli/plic.rst | 190 | ||||
-rw-r--r-- | development/pli/slack-desc | 19 |
7 files changed, 571 insertions, 0 deletions
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] <input\-files> [\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(<list>)\fP, \fB\-co(<list>)\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<option>\fP +<options> is a character string, with or without enclosing quotes. +.INDENT 7.0 +.TP +.BI \-d\fB LIB +Tells the compiler it is compiling a standard run\-time library procedure. +.TP +.BI \-d\fB ELF +Causes the compiler to generate ELF object files (already the default, on Linux). +.TP +.BI \-d\fB OMF +Causes the compiler to generate OMF object files (this is the default on OS/2). +.UNINDENT +.UNINDENT +.\" FILES +. +.\" ===== +. +.\" ENVIRONMENT +. +.\" =========== +. +.\" EXIT STATUS +. +.\" =========== +. +.\" BUGS +. +.\" ==== +. +.\" EXAMPLES +. +.\" ======== +. +.SH COPYRIGHT +.sp +See the file /usr/doc/pli\-0.9.10d/readme_linux.html for license information. +.SH AUTHORS +.sp +plic is copyright Iron Spring Software. +.sp +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. +.SH SEE ALSO +.sp +\fBplicl\fP(1), \fBld\fP(1) +.sp +\fI\%http://www.iron\-spring.com/\fP +.\" Generated by docutils manpage writer. +. diff --git a/development/pli/plic.rst b/development/pli/plic.rst new file mode 100644 index 000000000000..c710080ea005 --- /dev/null +++ b/development/pli/plic.rst @@ -0,0 +1,190 @@ +.. 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. + +.. |version| replace:: 0.9.10d +.. |date| date:: + +==== +plic +==== + +--------------------------------------- +Iron Spring PL/I Compiler for x86 Linux +--------------------------------------- + +:Manual section: 1 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +plic [*options*] <input-files> [*-o* output-file] + +DESCRIPTION +=========== + +**plic** is a compiler for the PL/I language. + +This man page doesn't attempt to fully document **plic**. It's just +intended as a reference for the command-line options and arguments. +For full documentation, see: /usr/doc/pli-|version|/prog_guide.html + +...and the other HTML and PDF documents found in the same directory. + +One major difference between **plic** and other compilers for other +languages you may have used: **plic** doesn't link executables +nor call **ld**\(1) to link them as e.g. **gcc**\(1) does. **plic** +produces object files (named with *.o* extension), which must then be +linked with a separate **ld** 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-|version|/samples/SA_make + +The **pli** SlackBuilds.org package also includes a **plicl** wrapper +script, which does compiling and linking in one step, at least for +simple PL/I programs. It has its own man page. + +OPTIONS +======= + +-V + Print version and copyright info to stderr (not stdout!) and exit. + +-S + Generate assembler (symbolic) output. Default output filename is + the input filename with the extension changed to *.asm* (use **-o** to + change it). + +-C + Generate compiled (object code) output. Default object filename is + the input filename with the extension changed to *.o* (use **-o** to + change it). A listing file (extension *.lst*) is also created. This + option should always be used when compiling; without it, **plic** + still generates an object file, but confusingly, its extension will + be *.exe*, and no *.lst* file will be created. + +-N + Generate statement number tables to provide information for run-time + error messages. + +**-o** *file* + Set the output filename. The space between the option and argument + is optional. + +**-i** *directory* + Use *directory* 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 **-i .** if you want to search for include files in the + current directory. + +**-l[saxgmov]** + Listing options. One or more of [saxgmov] may be entered, in any + order, e.g. **-lsx**. + + -ls + list source + + -la + list attributes + + -lx + list cross-reference + + -lg + list aggregates + + -lm + list generated code in a format similar to a disassembly. + + -lo + list procedure map (statement offset table) + -lv + list additional warning messages + +**-m(start[,end])** + 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). + +**-cn(<list>)**, **-co(<list>)** + 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. + +**-e[wsd]** + Error options. Can be combined, e.g. -ewd. Normally, the compiler's + 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. + + -ew + Tells the compiler to exit with 0 status if only warning messages + were issued. + + -es + Tells the compiler to exit with 0 status if any errors *or* + warnings were issued. + + -ed + 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. + +**-d<option>** + <options> is a character string, with or without enclosing quotes. + + -dLIB + Tells the compiler it is compiling a standard run-time library procedure. + + -dELF + Causes the compiler to generate ELF object files (already the default, on Linux). + + -dOMF + Causes the compiler to generate OMF object files (this is the default on OS/2). + +.. FILES +.. ===== + +.. ENVIRONMENT +.. =========== + +.. EXIT STATUS +.. =========== + +.. BUGS +.. ==== + +.. EXAMPLES +.. ======== + +COPYRIGHT +========= + +See the file /usr/doc/pli-|version|/readme_linux.html for license information. + +AUTHORS +======= + +plic is copyright Iron Spring Software. + +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. + +SEE ALSO +======== + +**plicl**\(1), **ld**\(1) + +http://www.iron-spring.com/ diff --git a/development/pli/slack-desc b/development/pli/slack-desc new file mode 100644 index 000000000000..0e99bcd5e1bd --- /dev/null +++ b/development/pli/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +pli: pli (Iron Spring PL/I Compiler for Linux) +pli: +pli: pli is a compiler for the PL/I programming language, which implements +pli: most of the "PL/I General-Purpose Subset" (aka "Subset G"). The +pli: compiler itself is closed-source, but it may be used and copied +pli: freely. The runtime library (libprf.a) is released under the GNU LGPL, +pli: so that programs linked with it can be distributed freely. +pli: +pli: +pli: +pli: |