summaryrefslogtreecommitdiff
path: root/emulators/advancemess/Makefile
blob: 5c3cedf8113c46d5e278e4e4f194a8a9f86cbd68 (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
63
64
65
66
67
68
# Created by: alepulver
# $FreeBSD$

PORTNAME=	advancemess
PORTVERSION=	1.4
CATEGORIES=	emulators
MASTER_SITES=	https://github.com/amadvance/advancemame/releases/download/${DISTNAME}/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	SDL MESS port with advanced TV and monitor video support

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libexpat.so:${PORTSDIR}/textproc/expat2
RUN_DEPENDS=	advancemame>=1.4:${PORTSDIR}/emulators/advancemame

USES=		gmake ncurses
USE_SDL=	sdl
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-svgalib --disable-fb --disable-alsa --enable-oss \
		--disable-kevent

CFLAGS+=	-idirafter ${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

PORTDOCS=	*
PLIST_FILES=	bin/advmess \
		man/man1/advmess.1.gz \
		share/advance/sysinfo.dat

MAKE_JOBS_UNSAFE=	yes

OPTIONS_DEFINE=		FREETYPE SLANG
OPTIONS_DEFINE_i386=	ASM
OPTIONS_DEFAULT=	FREETYPE
OPTIONS_DEFAULT_i386=	ASM

ASM_BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
ASM_USE=		gcc=any
ASM_CONFIGURE_ENABLE=	asm
FREETYPE_LIB_DEPENDS=	libfreetype.so:${PORTSDIR}/print/freetype2
FREETYPE_CONFIGURE_ENABLE=	freetype
SLANG_LIB_DEPENDS=	libslang.so:${PORTSDIR}/devel/libslang2
SLANG_CONFIGURE_ENABLE=	slang
SLANG_LDFLAGS=		-lncurses

BROKEN_powerpc=		Does not compile on powerpc

post-patch:
	@${REINPLACE_CMD} -e \
		's|@@|@|' ${WRKSRC}/Makefile.in
	@${REINPLACE_CMD} -e \
		'/WHOLE_CFLAGS_OPT/s|-O2|| ; \
		 /WHOLE_LDFLAGS/s|-s||' ${WRKSRC}/advance/advance.mak
	@${REINPLACE_CMD} -e \
		's|-lpthread|-pthread|' ${WRKSRC}/advance/emu.mak

do-install:
	(cd ${WRKSRC} && ${INSTALL_PROGRAM} advmess \
		${STAGEDIR}${PREFIX}/bin)
	(cd ${WRKSRC}/support && ${INSTALL_MAN} advmess.1 \
		${STAGEDIR}${MANPREFIX}/man/man1)
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/advance
	(cd ${WRKSRC}/support && ${INSTALL_DATA} sysinfo.dat \
		${STAGEDIR}${PREFIX}/share/advance)

.include <bsd.port.mk>