summaryrefslogtreecommitdiff
path: root/emulators/atari800/Makefile
blob: 2644ff9e2d1537b275d06a47016a51af3ebc88fb (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# New ports collection makefile for:   Atari800
# Date created:		29th April, 1997
# Whom:			Joel Sutton <jsutton@webnet.com.au>
#
# $FreeBSD$
#

PORTNAME=	atari800
PORTVERSION=	0.8.6
CATEGORIES=	emulators
MASTER_SITES=	http://www.signus.demon.co.uk/Software/Portable/Atari800e/ \
		http://cas3.zlin.vutbr.cz/~stehlik/a800/
DISTNAME=	Atari800-${PORTVERSION}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${EXTRA_FILES}

MAINTAINER=	jsutton@bbcon.com.au

BUILD_DEPENDS=	unzip:${PORTSDIR}/archivers/unzip

DIST_SUBDIR=	atari
EXTRA_FILES=	xf25.zip
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

ALL_TARGET=	freebsd-x11

RESTRICTED=	"xf25 contains copyright ROMs and cannot be distributed."
NO_PACKAGE=	${RESTRICTED}

ATARI_DOC=	${PREFIX}/share/doc/atari
ATARI_XF=	ataribas.rom atariosb.rom atarixl.rom demos1.xfd \
		demos2.xfd dos25.xfd mydos45d.atr
ATARI_LIB=	${PREFIX}/lib/atari
SED_CONFIG=	${ATARI_LIB:S/\//\\\//g}
DOC_FILES= 	BUGS CHANGES COPYING CREDITS INSTALL README TODO USAGE

MAN1=		atari800.1

post-extract:
	@${ECHO_MSG} "===>  Unzipping ROM files"
	unzip -Lo ${DISTDIR}/${DIST_SUBDIR}/${EXTRA_FILES} ${ATARI_XF}\
		-d ${WRKSRC}/
	@${ECHO_MSG} "===>  Processing configuration file"
	${SED} "s/GUMBY/${SED_CONFIG}/g" < ${FILESDIR}/atari800.cfg \
		> ${WRKSRC}/atari800.cfg

	@${ECHO_MSG} "===>  Copying config.h to work directory"
	${CP} ${FILESDIR}/config.h ${WRKSRC}/

	@${ECHO_MSG} "===>  Copying UNIX makefile"
	${CP} ${WRKSRC}/Makefile.unix ${WRKSRC}/Makefile

post-patch:
	@${ECHO_MSG} "===>  Processing another configuration file"
	${CP} ${WRKSRC}/rt-config.c ${WRKSRC}/rt-config.c.temp
	${SED} "s/GUMBY/${SED_CONFIG}/g" <${WRKSRC}/rt-config.c.temp \
		> ${WRKSRC}/rt-config.c

# Install roms, extra docs and config file.
#
post-install:
	@${ECHO_MSG} "===>  Installing files from xf25.zip"
	-${MKDIR} ${ATARI_LIB}
	for file in ${ATARI_XF} ; do \
		${INSTALL_DATA} ${WRKSRC}/$$file ${ATARI_LIB}/ ;\
	done

	@${ECHO_MSG} "===>  Installing configuration file"
	${INSTALL} -c -o root -g wheel -m 664 ${WRKSRC}/atari800.cfg \
		${ATARI_LIB}/

.if (!defined(NOPORTDOCS))
	@${ECHO_MSG} "===>  Installing distribution document files"
	-${MKDIR} ${ATARI_DOC}
	for file in ${DOC_FILES} ; do \
		${INSTALL_DATA} ${WRKSRC}/$$file ${ATARI_DOC}/ ;\
	done
	${INSTALL_DATA} ${DESCR} ${ATARI_DOC}/README.FreeBSD
.endif

.include <bsd.port.mk>