summaryrefslogtreecommitdiff
path: root/emulators/pearpc/Makefile
blob: 96caecc6a49b33af69f8b19c3c6322d0e3678b1e (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
59
60
61
62
# $NetBSD: Makefile,v 1.2 2004/09/30 22:59:47 xtraeme Exp $
#

DISTNAME=		pearpc-0.3.1
CATEGORIES=		emulators
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=pearpc/}
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		dotz@irc.pl
HOMEPAGE=		http://pearpc.sourceforge.net/
COMMENT=		PowerPC emulator

GNU_CONFIGURE=		yes
USE_BUILDLINK3=		yes
USE_LANGUAGES+=		c++
USE_PKGINSTALL=		yes
USE_X11=		yes

EGDIR=			${PREFIX}/share/examples/${PKGBASE}
CONF_FILES=		${EGDIR}/ppccfg.example ${PKG_SYSCONFDIR}/ppccfg.conf

.include "../../mk/bsd.prefs.mk"

.if !empty(MACHINE_ARCH:Mi386)
BUILD_DEPENDS+=		nasm-[0-9]*:../../devel/nasm
CONFIGURE_ARGS+=	--enable-cpu=jitc_x86
.endif

CONFIGURE_ARGS+=	--disable-debug

INSTALLATION_DIRS=	share/${PKGBASE} bin

do-install:
	${SED}	-e "s,@PREFIX@,${PREFIX}," \
		-e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR}," \
		${FILESDIR}/pearpc.sh > ${WRKSRC}/pearpc.sh
	${INSTALL_SCRIPT} ${WRKSRC}/pearpc.sh ${PREFIX}/bin/pearpc
	${INSTALL_PROGRAM} ${WRKSRC}/src/ppc ${PREFIX}/share/${PKGBASE}
	${INSTALL_DATA} ${WRKSRC}/video.x ${PREFIX}/share/${PKGBASE}
	${INSTALL_DATA_DIR} ${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/ppccfg.example ${EGDIR}

SUBST_CLASSES=		conf
SUBST_STAGE.conf=	post-patch
SUBST_FILES.conf=	ppccfg.example
SUBST_SED.conf=		-e "s|\"nvram\"|\"/tmp/nvram\"|"
SUBST_MESSAGE.conf=	"Fixing configuration file."

PKG_OPTIONS_VAR=	PKG_OPTIONS.pearpc
PKG_SUPPORTED_OPTIONS=	sdl

.include "../../mk/bsd.options.mk"

.if empty(PKG_OPTIONS:Msdl)
CONFIGURE_ARGS+=	--enable-ui=x11
.else
CONFIGURE_ARGS+=	--enable-ui=sdl
.  include "../../devel/SDL/buildlink3.mk"
.endif

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"