aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/stonx/Makefile
blob: 91e253327d76ee2bcedb514c2739ee0b1a1027cb (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# New ports collection makefile for:    STonX
# Date created:         3rd August, 1997
# Whom:                 Tobias Reifenberger <tr@freebsd.mayn.de>
#
# $FreeBSD$
#

PORTNAME=   stonx
PORTVERSION=    0.6.7e
CATEGORIES= emulators
MASTER_SITES=   ftp://ftp.complang.tuwien.ac.at/pub/nino/stonx-current/
DISTNAME=   STonX-0.6.7-epsilon

MAINTAINER= treif@mayn.de
COMMENT=    AtariST emulator

BUILD_DEPENDS=  bdftopcf:${X_CLIENTS_PORT}
RUN_DEPENDS=    mkfontdir:${X_CLIENTS_PORT}

RESTRICTED= "tos.img is copyrighted"

TOSIMG?=    tos.img
#USE_XLIB=  yes
USE_X_PREFIX=   yes
HAS_CONFIGURE=  yes

pre-build:
    ${CP} ${DISTDIR}/${TOSIMG} ${WRKSRC}/tos.img

post-build:
    (cd ${WRKSRC}; make fnttobdf fonts)

# Installing
#
BINDIR= ${PREFIX}/bin
LIBDIR= ${PREFIX}/lib/X11/STonX
FNTDIR= ${PREFIX}/lib/X11/fonts/misc

DATA=   tos.img cartridge.img Keysyms Keysyms.G atari/FLOPPY-4MB \
    atari/bench1.pas atari/bench1.prg atari/final.tos
DOCS=   ../COPYING DEBUGGING FONTS INSTALL PROGRAMS README RELEASE_NOTES \
    TOS-VERSIONS
FONTS=  System0-iso.pcf System0.pcf System1-iso.pcf System1.pcf \
    System2-iso.pcf System2.pcf

pre-install:
    @${ECHO_MSG} "#!/bin/sh" > ${WRKSRC}/stonx.script
    @${ECHO_MSG} "cd ${LIBDIR}" >> ${WRKSRC}/stonx.script
    @${ECHO_MSG} "${BINDIR}/stonx.bin -noaudio \
        -disk A:FLOPPY-4MB -fs C:." >> ${WRKSRC}/stonx.script

do-install:
    @${ECHO_MSG} "===> Installing programs"
    ${INSTALL_SCRIPT} ${WRKSRC}/stonx.script ${BINDIR}/stonx
    ${INSTALL_PROGRAM} ${WRKSRC}/stonx ${BINDIR}/stonx.bin

    @${ECHO_MSG} "===> Installing data"
    @${MKDIR} ${LIBDIR}
.for f in ${DATA}
    ${INSTALL_DATA} ${WRKSRC}/$f ${LIBDIR}
.endfor

    @${ECHO_MSG} "===> Installing fonts"
.for f in ${FONTS}
    ${INSTALL_DATA} ${WRKSRC}/data/$f ${FNTDIR}
    @${GZIP_CMD} ${FNTDIR}/$f
.endfor
    @mkfontdir ${FNTDIR}

.if !defined(NOPORTDOCS)
    @${ECHO_MSG} "===> Installing docs"
    @${MKDIR} ${LIBDIR}/docs
.for f in ${DOCS}
    ${INSTALL_DATA} ${WRKSRC}/docs/$f ${LIBDIR}/docs
.endfor
.endif

.if (defined(DISPLAY) && ${DISPLAY} != "")
post-install:
    @xset fp+ ${FNTDIR}
    @xset fp rehash
.endif

.include <bsd.port.pre.mk>

.if !exists(${DISTDIR}/${TOSIMG})
IGNORE="Please get a ROM dump from your AtariST and save it as"\
"\"${TOSIMG}\" in \"${DISTDIR}\" manually, and then make install again"
.endif

.if ${X_WINDOW_SYSTEM:L} == xorg
BUILD_DEPENDS+=     ${X11BASE}/lib/X11/fonts/misc/fonts.alias:${PORTSDIR}/x11-fonts/xorg-fonts-miscbitmaps
.endif

.include <bsd.port.post.mk>