~cypheon/pkgsrc-wip

pkgsrc-wip/openfodder/Makefile -rw-r--r-- 1.5 KiB
5f1bf4f5 — Johann Rudloff Subst PLIST paths for platform specific files for other architectures 6 months ago
                                                                                
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
# $NetBSD$

GITHUB_PROJECT=	openfodder
DISTNAME=	1.6.0
PKGNAME=	${GITHUB_PROJECT}-${DISTNAME}
CATEGORIES=	games
MASTER_SITES=	${MASTER_SITE_GITHUB:=OpenFodder/}
DIST_SUBDIR=	${GITHUB_PROJECT}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://openfodder.com
COMMENT=	Engine for the Cannon Fodder game
LICENSE=	gnu-gpl-v3

WRKSRC=		${WRKDIR}/openfodder-${PKGVERSION_NOREV}
USE_LANGUAGES=	c++14

CXXFLAGS+=	-D OPENFODDER_DATADIR=\"${PREFIX}/share/\"
CXXFLAGS+=	-I${WRKSRC}/Source
CXXFLAGS+=	`sdl2-config --cflags`
LIBS+=		`sdl2-config --libs`
LIBS+=		-lSDL2_mixer
LIBS+=		${X11_LDFLAGS}

DEPENDS+=	openfodder-data-1.7.0:../../wip/openfodder-data

FODDER_SRCDIRS=	Source Source/Amiga Source/Map Source/PC Source/Structures Source/Utils
FODDER_SRCS=	${FODDER_SRCDIRS:=/*.cpp}

INSTALLATION_DIRS+=	bin share/doc/OpenFodder share/examples/OpenFodder

do-build:
	${ECHO} 'const char* gitversion="pkgsrc-${PKGVERSION_NOREV}";' > ${WRKSRC}/Source/gitver.hpp
	cd ${WRKSRC} && ${CXX} ${CXXFLAGS} -o OpenFodder ${FODDER_SRCS} ${LIBS}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/OpenFodder ${DESTDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/INSTALL.md ${DESTDIR}${PREFIX}/share/doc/OpenFodder/
	${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/OpenFodder/
	${INSTALL_DATA} ${WRKSRC}/openfodder.ini.example ${DESTDIR}${PREFIX}/share/examples/OpenFodder/

.include "../../audio/SDL2_mixer/buildlink3.mk"
.include "../../devel/SDL2/buildlink3.mk"
.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"