aboutsummaryrefslogtreecommitdiff
path: root/emulators/catapult/Makefile
blob: 0fa48e30220b7a9725eecf4c4442129fd5c41153 (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
# Created by: Martin Tournoij <carpetsmoker@xs4all.nl>
# $FreeBSD$

PORTNAME=	catapult
PORTVERSION=	0.9.1
PORTREVISION=	1
CATEGORIES=	emulators
MASTER_SITES=	SF/openmsx/openmsx/${PORTVERSION}
DISTNAME=	openmsx-${PORTNAME}-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	GUI for openMSX

LICENSE=	GPLv2

BUILD_DEPENDS=	openmsx:${PORTSDIR}/emulators/openmsx
LIB_DEPENDS=	mspack:${PORTSDIR}/archivers/libmspack \
		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
		pcre:${PORTSDIR}/devel/pcre \
		cairo:${PORTSDIR}/graphics/cairo \
		jbig:${PORTSDIR}/graphics/jbigkit \
		jpeg:${PORTSDIR}/graphics/jpeg \
		png15:${PORTSDIR}/graphics/png \
		tiff:${PORTSDIR}/graphics/tiff \
		freetype:${PORTSDIR}/print/freetype2 \
		expat:${PORTSDIR}/textproc/expat2 \
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig \
		xcb:${PORTSDIR}/x11/libxcb
RUN_DEPENDS=	openmsx:${PORTSDIR}/emulators/openmsx

OPTIONS_DEFINE=	DEBUG DOCS

USE_GNOME=	gdkpixbuf2 glib20 gtk20 libxml2
USE_WX=		2.6+
USE_PYTHON_BUILD=yes
USE_GMAKE=	yes
USE_GETTEXT=	yes
USE_ICONV=	yes
USE_XORG=	ice pixman sm x11 xau xcomposite xcursor xdamage xdmcp \
		xext xfixes xi xinerama xrandr xrender xxf86vm
MAKEFILE=	GNUmakefile
MAKE_ARGS=	INSTALL_BASE="${PREFIX}" \
		INSTALL_SHARE_DIR="${DATADIR}" \
		CATAPULT_FLAVOUR="portbld" \
		CATAPULT_OPENMSX_BINARY="${LOCALBASE}/bin/openmsx" \
		CATAPULT_OPENMSX_SHARE="${LOCALBASE}/share/openmsx" \
		SYMLINK_FOR_BINARY="false"
MAKE_JOBS_SAFE=	yes

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS}
MAKE_ARGS+=	INSTALL_DOC_DIR="${DOCSDIR}"
.else
# Use dummy target rather than rewriting makefile
MAKE_ARGS+=	INSTALL_DOC_DIR="${WRKSRC}/dummy"
.endif

.if ${PORT_OPTIONS:MDEBUG}
CFLAGS+=	-DDEBUG
CATAPULT_STRIP=	false
.else
CFLAGS+=	-DNDEBUG
CATAPULT_STRIP=	true
.endif

post-patch:
	@${REINPLACE_CMD} 's|INSTALL_BASE|INSTALL_SHARE_DIR|' \
		${WRKSRC}/build/info2code.mk
	@${REINPLACE_CMD} '/--no-strict-aliasing/s|^CXXFLAGS|#CXXFLAGS| ; \
		 /--cxx/s|^CXX|#CXX| ; \
		 s|@$$(CXX)|$$(CXX)|' ${WRKSRC}/build/main.mk
	@${REINPLACE_CMD} 's|wx-config --|${WX_CONFIG:T} --|g' \
		${WRKSRC}/build/probe.mk
	@${ECHO_CMD} > ${WRKSRC}/build/flavour-portbld.mk
	@${ECHO_CMD} 'CXXFLAGS+=${CXXFLAGS}' \
		>> ${WRKSRC}/build/flavour-portbld.mk
	@${ECHO_CMD} 'CATAPULT_STRIP:=${CATAPULT_STRIP}' \
		>> ${WRKSRC}/build/flavour-portbld.mk

.include <bsd.port.mk>