aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/bsvc/Makefile
blob: e58a76752a4e9dfc187313e5973484b43f8ff102 (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
# New ports collection Makefile for:    bsvc
# Date created:     03-Mar-1997
# Whom:         tenser@spitfire.ecsel.psu.edu
#
# $FreeBSD$
#

PORTNAME=   bsvc
PORTVERSION=    2.1
CATEGORIES= emulators tk82
MASTER_SITES=   ftp://ftp.redlinelabs.com/pub/bsvc/ \
        ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/emulators
DISTFILES=  ${DISTNAME}-src${EXTRACT_SUFX}

MAINTAINER= ports@FreeBSD.org
COMMENT=    An extensible hardware simulation framework with MC68K support

RUN_DEPENDS=    wish8.2:${PORTSDIR}/x11-toolkits/tk82

WRKSRC=     ${WRKDIR}/${DISTNAME}/src

USE_REINPLACE=  yes

MAKE_ENV=   PROJECT_BASE=${PREFIX} WRKSRC=${WRKSRC}

.include <bsd.port.pre.mk>

pre-patch:
    @${CP} ${WRKSRC}/Makefile.Linux ${WRKSRC}/Makefile

post-patch:

.for cfile in codegen.c listing.c object.c main.c
    @${REINPLACE_CMD} -e 's|exit()|exit(1)|g' ${WRKSRC}/Assemblers/68kasm/${cfile}
.endfor
    @${REINPLACE_CMD} -e 's|^#endif.*$$|#endif|g' \
        ${WRKSRC}/Assemblers/68kasm/instlookup.c

    @${FIND} ${WRKSRC} -name "*.[ch]xx" -exec \
        ${REINPLACE_CMD} -e \
            's/iostream\.h/iostream/; \
             s/strstream\.h/strstream/; \
             s/fstream\.h/fstream/' \{\} \;
    @${FIND} ${WRKSRC} -name Makefile -exec \
        ${REINPLACE_CMD} -e 's/make/$(MAKE)/' \{\} \;

.include <bsd.port.post.mk>