summaryrefslogtreecommitdiff
path: root/emulators/atari800/Makefile
blob: c31f0f20811c7e7c20b3c102736e7ba0dc6b3e98 (plain)
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
# $NetBSD: Makefile,v 1.9 2001/03/27 03:19:54 hubertf Exp $

DISTNAME=	Atari800-0.9.9a
PKGNAME=	atari800-0.9.9a
CATEGORIES=	emulators
MASTER_SITES=	ftp://ftp.sophics.cz/pub/Atari800/src/pre-1.0/ \
		http://www.signus.demon.co.uk/Software/Portable/Atari800e/
DISTFILES=	a800s099a.zip xf25.zip

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://cas3.zlin.vutbr.cz/~stehlik/a800.htm
COMMENT=	Atari 8-bit computer, 5200 console emulator

BUILD_DEPENDS=	unzip-*:../../archivers/unzip

RESTRICTED=		"copyrighted ROM images"
NO_SRC_ON_FTP=		${RESTRICTED}
NO_SRC_ON_CDROM=	${RESTRICTED}
NO_BIN_ON_FTP=		${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}

USE_X11=		yes
EXTRACT_CMD=	unzip -Loq ${DOWNLOADED_DISTFILE}
MAKE_FLAGS=	LDFLAGS="${LDFLAGS} -L${X11BASE}/lib" OBJ="atari_x11.o" \
		CFLAGS="-c ${CFLAGS} -DPREFIX=\\\"${PREFIX}\\\""
#override HOME to avoid picking up a bad ${HOME}/.atari800 during the build
MAKE_ENV+=      HOME=${WRKSRC}

post-extract:
	@${FIND} ${WRKDIR} -type f -print | xargs ${CHMOD} 0644
	@${MV} ${WRKDIR}/Atari800-0.9.9a/* ${WRKSRC}/

do-build:
	@printf 'n\nn\ny\n' | (cd ${WRKSRC} && \
		${MAKE} ${MAKE_FLAGS} -f Makefile.unix config.h >/dev/null)
	@${RM} -f ${WRKSRC}/atari_x11.o
	@cd ${WRKSRC} && ${MAKE} CPPFLAGS="-I${X11BASE}/include -DSHM" \
		LDLIBS="-lX11 -lXext -lm -lossaudio" ${MAKE_FLAGS} \
		-f Makefile.unix atari800
	${MV} ${WRKSRC}/atari800 ${WRKSRC}/atari800-shm
	@${RM} -f ${WRKSRC}/atari_x11.o
	@cd ${WRKSRC} && ${MAKE} CPPFLAGS="-I${X11BASE}/include" \
		LDLIBS="-lX11 -lm -lossaudio" ${MAKE_FLAGS} \
		-f Makefile.unix atari800
	${SED} -e 's,@PREFIX@,${PREFIX},g' <${FILESDIR}/atari800.cfg \
		>${WRKSRC}/atari800.cfg

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/atari800 ${PREFIX}/share/doc/atari800
	${INSTALL_PROGRAM} ${WRKSRC}/atari800-shm ${WRKSRC}/atari800 \
		${PREFIX}/bin/
	${INSTALL_DATA} ${WRKDIR}/*.rom ${WRKDIR}/*.xfd ${WRKDIR}/*.atr \
		${WRKSRC}/atari800.cfg ${PREFIX}/share/atari800/
	${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/USAGE \
		${PREFIX}/share/doc/atari800
	${INSTALL_DATA} ${WRKSRC}/atari800.man ${PREFIX}/man/man1/atari800.1

.include "../../mk/bsd.pkg.mk"