aboutsummaryrefslogtreecommitdiff
path: root/games/inform/Makefile
blob: d5720b475eefd41a8af4571734973b893a0f42c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# New ports collection makefile for:	inform
# Version required:			6.21 (Library: 6/9)
# Date created:				28 June 1998
# Whom:					Matthew Hunt <mph@FreeBSD.org>
#
# $Id: Makefile,v 1.5 1999/05/02 19:11:30 mharo Exp $
#

DISTNAME=	inform-6.21
CATEGORIES=	games
MASTER_SITES=  	ftp://ftp.gmd.de/if-archive/infocom/compilers/inform6/source/ \
		ftp://ftp.gmd.de/if-archive/infocom/compilers/inform6/library/
DISTFILES=	inform621_source.zip inform_library69.zip

MAINTAINER=	mph@freebsd.org

.if !defined(NOPORTDOCS)
MASTER_SITES+=	ftp://ftp.gmd.de/if-archive/infocom/compilers/inform6/manuals/
DISTFILES+=	designers_manual_html.zip
.endif

DIST_SUBDIR=	inform
NO_WRKSUBDIR=	yes

EXTRACT_ONLY=	inform621_source.zip
USE_ZIP=	yes

# I can hardly believe it, but the ".c" and ".h" extensions are
# not present on the source files.
post-extract:
	@${MV} ${WRKSRC}/header ${WRKSRC}/header.h
.for file in arrays asm bpatch chars directs errors expressc expressp \
	files inform lexer linker memory objects states symbols syntax \
	tables text veneer verbs
	@${MV} ${WRKSRC}/${file} ${WRKSRC}/${file}.c
.endfor
	@${CP} ${FILESDIR}/Makefile.inform ${WRKSRC}/Makefile

# Install the library files in ${PREFIX}/share/inform.  The compiler
# is configured to use extensions under Unix, so we need to tack ".h"
# onto each filename.  Set perms and ownership, because they're odd in
# the archive.  Many games include "VerbLib" instead of "Verblib" so
# make a symlink.  Finally, install documentation if appropriate.

post-install:
	@${MKDIR} ${PREFIX}/share/inform
	@(cd ${PREFIX}/share/inform && \
		unzip -qq ${DISTDIR}/${DIST_SUBDIR}/inform_library69.zip)
.for file in English Grammar Parser Verblib infix linklpa linklv parserm \
		verblibm
	@${MV} ${PREFIX}/share/inform/${file} ${PREFIX}/share/inform/${file}.h
	@ chmod ${SHAREMODE} ${PREFIX}/share/inform/${file}.h
	@ chown ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/inform/${file}.h
.endfor
	@${LN} -s Verblib.h ${PREFIX}/share/inform/VerbLib.h
	@ chown ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/inform/VerbLib.h
.if !defined(NOPORTDOCS)
	@ (umask 222 && unzip -qq -d ${PREFIX}/share/doc \
		${DISTDIR}/${DIST_SUBDIR}/designers_manual_html.zip)
	@${MV} ${PREFIX}/share/doc/dman ${PREFIX}/share/doc/inform
	@ chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/inform
.endif

.include <bsd.port.mk>