Update games/xonotic to version 0.8.2_1
[dports.git] / games / legend-of-edgar / Makefile
1 # Created by: Rusmir Dusko <nemysis@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       edgar
5 DISTVERSION=    1.26
6 CATEGORIES=     games
7 PKGNAMEPREFIX=  legend-of-
8
9 MAINTAINER=     nemysis@FreeBSD.org
10 COMMENT=        2D platform game with a persistent world
11
12 LICENSE=        GPLv2
13
14 USES=           gmake
15 USE_SDL=        image mixer sdl ttf
16 WITH_ZLIB=      yes
17 MAKEFILE=       makefile
18
19 USE_GITHUB=     yes
20 GH_ACCOUNT=     riksweeney
21
22 PORTDOCS=       *
23
24 INSTALLS_ICONS= yes
25
26 OPTIONS_DEFINE= DOCS NLS
27
28 OPTIONS_SUB=    yes
29
30 NLS_USES=               gettext
31
32 .include <bsd.port.options.mk>
33
34 post-patch:
35         @${REINPLACE_CMD} -e 's|CC       = gcc|CC       = ${CC}|; \
36                 s|$$(DESTDIR)/usr|$$(DESTDIR)/usr/local|; \
37                 s|$$(PREFIX)/games/|$$(PREFIX)/bin/|; \
38                 s|/share/games/edgar/|/share/edgar/|; \
39                 s|/share/man/|/man/|; \
40                 s|-Wall ||; \
41                 s|sdl-config|${SDL_CONFIG}|; \
42                 s|-s ||' \
43                 ${WRKSRC}/makefile
44         @${REINPLACE_CMD} -e 's|SDL/SDL|${LOCALBASE}/include/SDL/SDL|g' \
45                 ${WRKSRC}/src/headers.h
46         @${REINPLACE_CMD} -e 's|png.h|${LOCALBASE}/include/png.h|g' \
47                 ${WRKSRC}/src/graphics/save_png.c
48         @${REINPLACE_CMD} -e 's|self->dirY =- 13|self->dirY -= 13|g' \
49                 ${WRKSRC}/src/boss/golem_boss.c
50         @${REINPLACE_CMD} -e 's|Categories=Game|Categories=Game;ArcadeGame;|' \
51                 ${WRKSRC}/icons/${PORTNAME}.desktop
52
53 .if ! ${PORT_OPTIONS:MDOCS}
54         @${REINPLACE_CMD} -i '' -e '/mkdir -p $$(DOC_DIR)/d' \
55                 -i '' -e '/cp $$(DOCS) $$(DOC_DIR)/d' \
56                 ${WRKSRC}/makefile
57 .endif
58
59 .if ! ${PORT_OPTIONS:MNLS}
60         @${REINPLACE_CMD} -e 's|^LOCALE_MO =.*|LOCALE_MO =|' \
61                 ${WRKSRC}/makefile
62 .endif
63
64 post-install:
65         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
66         ${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
67                 ${STAGEDIR}${PREFIX}/share/pixmaps/
68
69 .include <bsd.port.mk>