1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Inform7 for FreeBSD is a CLI implementation of the Inform 7 programming

language and environment by Graham Nelson. Inform is a design system
for interactive fiction (IF) based on natural language.

PR:		ports/151196
Submitted by:	Andy Kosela <akosela@andykosela.com>
This commit is contained in:
Andrej Zverev 2010-10-06 05:16:46 +00:00
parent f5db2ecb9f
commit 848dcf1301
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=262504
7 changed files with 474 additions and 0 deletions

View File

@ -385,6 +385,7 @@
SUBDIR += ifm
SUBDIR += imaze
SUBDIR += inform
SUBDIR += inform7
SUBDIR += intensityengine
SUBDIR += interlogic
SUBDIR += ioquake3

50
games/inform7/Makefile Normal file
View File

@ -0,0 +1,50 @@
# New ports collection makefile for: inform7
# Date created: 23 September 2010
# Whom: Andy Kosela <akosela@andykosela.com>
#
# $FreeBSD$
#
PORTNAME= inform7
PORTVERSION= 6E72
CATEGORIES= games
MASTER_SITES= http://ftp.ifarchive.org/if-archive/infocom/compilers/inform7/source/:1 \
http://ifarchive.heanet.ie/if-archive/infocom/compilers/inform7/source/:1 \
http://ftp.ifarchive.org/if-archive/infocom/compilers/inform7/executables/:2 \
http://ifarchive.heanet.ie/if-archive/infocom/compilers/inform7/executables/:2
DISTFILES= inform6.zip:1 \
I7_6E72_FreeBSD.zip:2
MAINTAINER= akosela@andykosela.com
COMMENT= Inform 7 programming language (CLI edition)
RUN_DEPENDS= frotz:${PORTSDIR}/games/frotz
ONLY_FOR_ARCHS= i386 amd64
USE_ZIP= yes
SUB_FILES= i7.sh
MAN6= i7.6
.include <bsd.port.pre.mk>
do-build:
@cd ${WRKDIR} && ${CC} ${CFLAGS} -o inform6 *.c
do-install:
@${INSTALL_SCRIPT} ${WRKDIR}/i7.sh ${PREFIX}/bin/i7
@${INSTALL_PROGRAM} ${WRKDIR}/inform6 ${PREFIX}/bin/inform6
@${MKDIR} ${DATADIR}
@${CP} -R ${WRKDIR}/Extensions ${DATADIR}
@${INSTALL_MAN} ${FILESDIR}/i7.6 ${MAN6PREFIX}/man/man6
.if ${ARCH} == "i386"
@${INSTALL_PROGRAM} ${WRKDIR}/ni.i386 ${PREFIX}/bin/ni
.else
@${INSTALL_PROGRAM} ${WRKDIR}/ni.amd64 ${PREFIX}/bin/ni
.endif
.include <bsd.port.post.mk>

6
games/inform7/distinfo Normal file
View File

@ -0,0 +1,6 @@
MD5 (inform6.zip) = 0de11c601f0489963b687cb1862d0c2c
SHA256 (inform6.zip) = 7dc5a67c6db59d6b566a647e2321b0e23bf8571480da0a14161a6768d84e9b5d
SIZE (inform6.zip) = 262130
MD5 (I7_6E72_FreeBSD.zip) = 0502f4858539067493b7a12a51cce2b1
SHA256 (I7_6E72_FreeBSD.zip) = aff0917addc0a75efd8528de484f58f2c88f63372a7c21a198050ec1907c6a5e
SIZE (I7_6E72_FreeBSD.zip) = 2932108

148
games/inform7/files/i7.6 Normal file
View File

@ -0,0 +1,148 @@
.\" Copyright (c) 2010 Andy Kosela <akosela@andykosela.com>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in
.\" the documentation and/or other materials provided with the
.\" distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"
.Dd October 2, 2010
.Dt I7 6
.Os
.Sh NAME
.Nm i7
.Nd Inform 7 programming language (CLI edition)
.Sh SYNOPSIS
.Nm
.Ar story.ni
.Nm
.Op Fl 8g
.Ar story.ni
.Nm
.Op Fl k
.Ar story.key story.z5
.Nm
.Op Fl r
.Ar story.scr story.z5
.Nm
.Op Fl h
.Pp
.Sh DESCRIPTION
Inform7 for FreeBSD is a CLI implementation of the Inform 7 programming
language and environment by Graham Nelson. Inform is a design system
for interactive fiction (IF) based on natural language.
Interactive fiction is a literary form which involves programming a
computer so that it presents a reader with a text which can be explored.
Inform aims to make the burden of learning to program such texts as
light as possible. It is a tool for writers intrigued by computing, and
computer programmers intrigued by writing. Perhaps these are not so
very different pursuits, in their rewards and pleasures:
The sheer joy of making things... the fascination of fashioning
complex puzzle-like objects of interlocking moving parts and
watching them work in subtle cycles... the delight of working in
such a tractable medium. The programmer, like the poet, works only
slightly removed from pure thought-stuff. He builds his castles in
the air, from air, creating by exertion of the imagination.
(Frederick P. Brooks, "The Mythical Man-Month", 1972)
More resources:
http://www.inform7.com
http://www.brasslantern.com
http://www.ifarchive.org
http://en.wikipedia.org/wiki/Interactive_fiction
Inform7 for FreeBSD (CLI edition) implements the same basic features of
the GUI edition. You can write, compile, debug, and replay your own
interactive fiction stories.
.Sh OPTIONS
The following command line arguments are supported:
.Bl -tag -width Fl
.It Fl
create Z-code v5 release.
.It Fl 8
create Z-code v8 release.
.It Fl g
create Glulx release.
.It Fl h
show usage.
.It Fl k
replay game from a keys or solution file.
.It Fl r
replay game from a transcript file.
.Sh EXAMPLES
.nf
The most basic use of Inform7 for FreeBSD is:
$ i7 story.ni
which compiles your source story file into a Z-code v5 release.
If you have a transcript file from game, you can use the -r option to
replay it in story.z5
$ i7 -r story.scr story.z5
You will receive three files.
story.$$.scr - new transcript file
story.$$.key - keys file
story.$$.sav - save game from a transcript file
You can also construct a simple keys file and then automatically replay
its sequence of commands in your stories.
Example of a story.key
VERBOSE
L
N
W
GET LAMP
SCORE
A keys file can be very short, meant just to test some sequence of
commands within your story, or it can be a full solution walkthrough.
$ i7 -k story.key story.z5
Once again you will receive three files.
story.$$.scr - new transcript file
story.$$.key - keys file
story.$$.sav - save game from a keys file
.fi
.Sh FILES
.Bl -tag -width ".Pa /usr/local"
.It Pa /usr/local/share/inform7/Extensions
Directory where Inform extensions are stored.
.Sh SEE ALSO
.Xr frotz 6
.Sh AUTHORS
.An Graham Nelson <graham@gnelson.demon.co.uk> -- Inform programming
language and compilers
.An Andy Kosela <akosela@andykosela.com> -- CLI edition for FreeBSD
.Sh CONTRIBUTORS
.An Adam Thornton, Emily Short, David Fisher
.Sh THANKS TO
Will Crowther and Don Woods for creating the original Adventure, Infocom
for the Z-machine standard and memorable titles like Zork, Graham Nelson
for designing this beautiful engine for creating worlds in text, Adam
Thornton for many suggestions and help with FreeBSD porting.
rec.arts.int-fiction and rec.games.int-fiction community of IF authors
and enthusiasts.

View File

@ -0,0 +1,123 @@
#!/bin/sh
# $FreeBSD$
#
# Copyright (c) 2010 Andy Kosela <akosela@andykosela.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ni=%%PREFIX%%/bin/ni
inform=%%PREFIX%%/bin/inform6
rules=%%DATADIR%%/Extensions
main()
{
mkdir -p $pkg.inform/Build $pkg.inform/Source $pkg.inform/Index
cp $pkg.ni $pkg.inform/Source
$ni --release --rules $rules --extension=$zsuf --package $pkg.inform
mv "$pkg.inform/Build/Debug log.txt" debug.log
if [ -s $pkg.inform/Build/auto.inf ]; then
echo ""
$inform $zopts $pkg.inform/Build/auto.inf -o $pkg.$zsuf
mv $pkg.inform/Build/Map.eps ${pkg}_map.eps
fi
rm gameinfo.dbg 2>/dev/null
rm -rf $pkg.inform "$pkg Materials" 2>/dev/null
exit 0
}
replay()
{
story=$3
[ -z `echo "$story"` ] && story=`echo $pkg.[zu]*`
if [ -z "`grep 'script off' $pkg.$$.key`" ]; then
echo -e "\$a\nscript off\n.\nw" | ed - $pkg.$$.key
fi
echo -e \
"0a\nscript\n$pkg.$$.scr\n.\n\$a\nsave\n$pkg.$$.sav\nquit\ny\ny\n.\nw" |
ed - $pkg.$$.key
cat $pkg.$$.key | frotz -S 72 $story 1>/dev/null 2>&1
echo -e \
"g/^script/d\ng/^quit/d\ng/^save/d\ng/.sav/d\ng/.scr/d\ng/^y$/d\nw" |
ed - $pkg.$$.key
echo "$pkg.$$.scr -- replay transcript file"
echo "$pkg.$$.sav -- replay save file"
echo "$pkg.$$.key -- replay keys file"
exit 0
}
usage()
{
echo "Usage: i7 story.ni"
echo " i7 [-8g] story.ni"
echo " i7 [-k] story.key story.z5"
echo " i7 [-r] story.scr story.z5"
echo ""
echo " -8 : create Z-code v8 release"
echo " -g : create Glulx release"
echo " -k : replay game from a keys or solution file"
echo " -r : replay game from a transcript file"
echo ""
echo "By default i7 creates Z-code v5 releases."
exit 0
}
# Start of script
if [ ! -z `echo $1 | grep '.ni'` ]; then
zsuf=z5
zopts=-kE2w~S~DC0xv5
pkg=`basename $1 | cut -d. -f1 2>/dev/null`
main
elif [ -z "$1" ]; then
usage
fi
while getopts 8:g:k:r:h opts
do
pkg=`basename $OPTARG | cut -d. -f1 2>/dev/null`
case $opts in
8) zsuf=z8
zopts=-kE2w~S~DC0xv8
main
;;
g) zsuf=ulx
zopts=-kE2w~S~DC0xG
main
;;
h) usage
;;
k) cp `basename $OPTARG` $pkg.$$.key
replay
;;
r) grep '>' `basename $OPTARG` | cut -d'>' -f2 > $pkg.$$.key
replay
;;
*) usage
;;
esac
done

8
games/inform7/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
Inform7 for FreeBSD is a CLI implementation of the Inform 7 programming
language and environment by Graham Nelson. Inform is a design system
for interactive fiction (IF) based on natural language.
-- Andy Kosela
<akosela@andykosela.com>
WWW: http://www.inform7.com/

138
games/inform7/pkg-plist Normal file
View File

@ -0,0 +1,138 @@
bin/i7
bin/inform6
bin/ni
%%DATADIR%%/Extensions/Emily Short/Glulx Entry Points.i7x
%%DATADIR%%/Extensions/Emily Short/Plurality.i7x
%%DATADIR%%/Extensions/Emily Short/._Basic Screen Effects.i7x
%%DATADIR%%/Extensions/Emily Short/._Basic Help Menu.i7x
%%DATADIR%%/Extensions/Emily Short/._Plurality.i7x
%%DATADIR%%/Extensions/Emily Short/Punctuation Removal.i7x
%%DATADIR%%/Extensions/Emily Short/Locksmith.i7x
%%DATADIR%%/Extensions/Emily Short/._Glulx Text Effects.i7x
%%DATADIR%%/Extensions/Emily Short/._Glulx Image Centering.i7x
%%DATADIR%%/Extensions/Emily Short/Menus.i7x
%%DATADIR%%/Extensions/Emily Short/._Locksmith.i7x
%%DATADIR%%/Extensions/Emily Short/Glulx Text Effects.i7x
%%DATADIR%%/Extensions/Emily Short/Case Management.i7x
%%DATADIR%%/Extensions/Emily Short/Complex Listing.i7x
%%DATADIR%%/Extensions/Emily Short/Glulx Image Centering.i7x
%%DATADIR%%/Extensions/Emily Short/._Complex Listing.i7x
%%DATADIR%%/Extensions/Emily Short/._Punctuation Removal.i7x
%%DATADIR%%/Extensions/Emily Short/._Glulx Entry Points.i7x
%%DATADIR%%/Extensions/Emily Short/._Menus.i7x
%%DATADIR%%/Extensions/Emily Short/Basic Help Menu.i7x
%%DATADIR%%/Extensions/Emily Short/._Case Management.i7x
%%DATADIR%%/Extensions/Emily Short/Basic Screen Effects.i7x
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/._parchment.css
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/jquery.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/._(manifest).txt
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/parchment.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/._gnusto.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/parchment.css
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/gnusto.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/._zmachine.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/zmachine.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/._parchment.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/(manifest).txt
%%DATADIR%%/Extensions/Reserved/Templates/Parchment/._jquery.min.js
%%DATADIR%%/Extensions/Reserved/Templates/Standard/._index.html
%%DATADIR%%/Extensions/Reserved/Templates/Standard/source.html
%%DATADIR%%/Extensions/Reserved/Templates/Standard/play.html
%%DATADIR%%/Extensions/Reserved/Templates/Standard/._play.html
%%DATADIR%%/Extensions/Reserved/Templates/Standard/._source.html
%%DATADIR%%/Extensions/Reserved/Templates/Standard/._style.css
%%DATADIR%%/Extensions/Reserved/Templates/Standard/style.css
%%DATADIR%%/Extensions/Reserved/Templates/Standard/index.html
%%DATADIR%%/Extensions/Reserved/Templates/Classic/index.html
%%DATADIR%%/Extensions/Reserved/Templates/Classic/source.html
%%DATADIR%%/Extensions/Reserved/Templates/Classic/._source.html
%%DATADIR%%/Extensions/Reserved/Templates/Classic/._index.html
%%DATADIR%%/Extensions/Reserved/Templates/._Parchment
%%DATADIR%%/Extensions/Reserved/WorldModel.i6t
%%DATADIR%%/Extensions/Reserved/Utilities.i6t
%%DATADIR%%/Extensions/Reserved/UnicodeData.i6t
%%DATADIR%%/Extensions/Reserved/Time.i6t
%%DATADIR%%/Extensions/Reserved/DefaultCover.jpg
%%DATADIR%%/Extensions/Reserved/Tests.i6t
%%DATADIR%%/Extensions/Reserved/Tables.i6t
%%DATADIR%%/Extensions/Reserved/._DefaultCover.jpg
%%DATADIR%%/Extensions/Reserved/._Templates
%%DATADIR%%/Extensions/Reserved/StoredAction.i6t
%%DATADIR%%/Extensions/Reserved/IntroductionToIF.pdf
%%DATADIR%%/Extensions/Reserved/._Cover.jpg
%%DATADIR%%/Extensions/Reserved/Sort.i6t
%%DATADIR%%/Extensions/Reserved/WinExtensionFileModel.html
%%DATADIR%%/Extensions/Reserved/._ExtensionFileModel.html
%%DATADIR%%/Extensions/Reserved/Rulebooks.i6t
%%DATADIR%%/Extensions/Reserved/._WinExtensionsModel.html
%%DATADIR%%/Extensions/Reserved/Relations.i6t
%%DATADIR%%/Extensions/Reserved/RelationKind.i6t
%%DATADIR%%/Extensions/Reserved/RegExp.i6t
%%DATADIR%%/Extensions/Reserved/WinExtensionsModel.html
%%DATADIR%%/Extensions/Reserved/RTP.i6t
%%DATADIR%%/Extensions/Reserved/Printing.i6t
%%DATADIR%%/Extensions/Reserved/definitions.html
%%DATADIR%%/Extensions/Reserved/Parser.i6t
%%DATADIR%%/Extensions/Reserved/Output.i6t
%%DATADIR%%/Extensions/Reserved/Small Cover.jpg
%%DATADIR%%/Extensions/Reserved/OutOfWorld.i6t
%%DATADIR%%/Extensions/Reserved/OrderOfPlay.i6t
%%DATADIR%%/Extensions/Reserved/ExtensionsModel.html
%%DATADIR%%/Extensions/Reserved/Number.i6t
%%DATADIR%%/Extensions/Reserved/Main.i6t
%%DATADIR%%/Extensions/Reserved/._WinExtensionFileModel.html
%%DATADIR%%/Extensions/Reserved/MStack.i6t
%%DATADIR%%/Extensions/Reserved/Load-Times.i6t
%%DATADIR%%/Extensions/Reserved/._IntroductionToIF.pdf
%%DATADIR%%/Extensions/Reserved/Cover.jpg
%%DATADIR%%/Extensions/Reserved/Load-Sounds.i6t
%%DATADIR%%/Extensions/Reserved/Lists.i6t
%%DATADIR%%/Extensions/Reserved/Load-Scenes.i6t
%%DATADIR%%/Extensions/Reserved/Load-Files.i6t
%%DATADIR%%/Extensions/Reserved/Load-Figures.i6t
%%DATADIR%%/Extensions/Reserved/Load-Core.i6t
%%DATADIR%%/Extensions/Reserved/Load-Actions.i6t
%%DATADIR%%/Extensions/Reserved/CblorbModel.html
%%DATADIR%%/Extensions/Reserved/._ExtensionsModel.html
%%DATADIR%%/Extensions/Reserved/ListWriter.i6t
%%DATADIR%%/Extensions/Reserved/Light.i6t
%%DATADIR%%/Extensions/Reserved/Language.i6t
%%DATADIR%%/Extensions/Reserved/Introduction.i6t
%%DATADIR%%/Extensions/Reserved/IndexedText.i6t
%%DATADIR%%/Extensions/Reserved/Glulx.i6t
%%DATADIR%%/Extensions/Reserved/Flex.i6t
%%DATADIR%%/Extensions/Reserved/ExtensionFileModel.html
%%DATADIR%%/Extensions/Reserved/._Small Cover.jpg
%%DATADIR%%/Extensions/Reserved/FileIO.i6t
%%DATADIR%%/Extensions/Reserved/Figures.i6t
%%DATADIR%%/Extensions/Reserved/Definitions.i6t
%%DATADIR%%/Extensions/Reserved/Combinations.i6t
%%DATADIR%%/Extensions/Reserved/._CblorbModel.html
%%DATADIR%%/Extensions/Reserved/Chronology.i6t
%%DATADIR%%/Extensions/Reserved/Char.i6t
%%DATADIR%%/Extensions/Reserved/BlockValues.i6t
%%DATADIR%%/Extensions/Reserved/Activities.i6t
%%DATADIR%%/Extensions/Reserved/Actions.i6t
%%DATADIR%%/Extensions/Reserved/ZMachine.i6t
%%DATADIR%%/Extensions/David Fisher/English.i7x
%%DATADIR%%/Extensions/David Fisher/._English.i7x
%%DATADIR%%/Extensions/Graham Nelson/._Standard Rules.i7x
%%DATADIR%%/Extensions/Graham Nelson/Rideable Vehicles.i7x
%%DATADIR%%/Extensions/Graham Nelson/._Metric Units.i7x
%%DATADIR%%/Extensions/Graham Nelson/Metric Units.i7x
%%DATADIR%%/Extensions/Graham Nelson/Standard Rules.i7x
%%DATADIR%%/Extensions/Graham Nelson/._Rideable Vehicles.i7x
%%DATADIR%%/Extensions/._Graham Nelson
%%DATADIR%%/Extensions/._Emily Short
%%DATADIR%%/Extensions/._David Fisher
%%DATADIR%%/Extensions/._Reserved
@dirrmtry %%DATADIR%%/Extensions/Reserved/Templates/Standard
@dirrmtry %%DATADIR%%/Extensions/Reserved/Templates/Parchment
@dirrmtry %%DATADIR%%/Extensions/Reserved/Templates/Classic
@dirrmtry %%DATADIR%%/Extensions/Reserved/Templates
@dirrmtry %%DATADIR%%/Extensions/Reserved
@dirrmtry %%DATADIR%%/Extensions/Graham\ Nelson
@dirrmtry %%DATADIR%%/Extensions/Emily\ Short
@dirrmtry %%DATADIR%%/Extensions/David\ Fisher
@dirrmtry %%DATADIR%%/Extensions
@dirrmtry %%DATADIR%%