aboutsummaryrefslogtreecommitdiffstats
path: root/games/quantumminigolf/Makefile
blob: 1782a07c6adc3c9fc7ad5628cf89c6d9c8e951dc (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
# New ports collection makefile for:    quantumminigolf
# Date created:     13 Sep 2007
# Whom:         Dmitry Marakasov <amdmi3@amdmi3.ru>
#
# $FreeBSD$
#

PORTNAME=   quantumminigolf
PORTVERSION=    1.1.1
PORTREVISION=   1
CATEGORIES= games
MASTER_SITES=   SF
DISTNAME=   ${PORTNAME}-${PORTVERSION}.src

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    A computer game visualizing quantum mechanics

LIB_DEPENDS=    fftw3f:${PORTSDIR}/math/fftw3-float \
        fftw3:${PORTSDIR}/math/fftw3

USE_GMAKE=  yes
USE_SDL=    sdl ttf
MAKE_ARGS=  CXX=${CXX}

PORTDOCS=   README THANKS

DESKTOP_ENTRIES="Quantum Minigolf" \
        "A game of minigolf where the ball obeys the laws of quantum mechanics" \
        "${DATADIR}/gfx/icon.bmp" \
        "quantumminigolf" \
        "Game;ArcadeGame;" \
        false

OPTIONS=    OCFLAGS "Use optimized compiler flags" on

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_OCFLAGS)
CXXFLAGS+=  -O3 -fomit-frame-pointer -finline-functions -funroll-all-loops
.   if ${ARCH} == "i386"
CXXFLAGS+=  -malign-double
.   endif
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|gfx/|${DATADIR}/&|' ${WRKSRC}/Renderer.cpp
    @${REINPLACE_CMD} -e 's|fonts/|${DATADIR}/&|' ${WRKSRC}/Renderer.cpp
    @${REINPLACE_CMD} -e 's|tracks/|${DATADIR}/&|' ${WRKSRC}/TrackSelector.cpp
    @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/QuantumSimulator.h

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/quantumminigolf ${PREFIX}/bin
    ${MKDIR} ${DATADIR}/gfx ${DATADIR}/fonts ${DATADIR}/tracks
    ${INSTALL_DATA} ${WRKSRC}/gfx/*.bmp ${DATADIR}/gfx
    ${INSTALL_DATA} ${WRKSRC}/fonts/*.ttf ${DATADIR}/fonts
    ${INSTALL_DATA} ${WRKSRC}/tracks/*.bmp ${WRKSRC}/tracks/*.cfg \
        ${DATADIR}/tracks

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for f in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>