aboutsummaryrefslogtreecommitdiffstats
path: root/games/kiki/Makefile
blob: 780ace6e5a32bc095943e5fe533136f3d64699b5 (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
# New ports collection makefile for:    kiki
# Date created:     24 Oct 2006
# Whom:         Dmitry Marakasov <amdmi3@amdmi3.ru>
#
# $FreeBSD$
#

PORTNAME=   kiki
PORTVERSION=    1.0.2
PORTREVISION=   14
CATEGORIES= games
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}-src/${PORTVERSION}
EXTRACT_SUFX=   -src.tgz

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    Kiki the nanobot is a 3-D puzzle game

BUILD_DEPENDS=  swig:${PORTSDIR}/devel/swig13

USE_PYTHON= 2.5+
USE_GMAKE=  yes
USE_GL=     gl glu glut
USE_SDL=    sdl mixer image
USE_DOS2UNIX=   kodilib/linux/Makefile src/main/KikiController.cpp linux/Makefile kodilib/src/types/KVector.h src/main/KikiPythonWidget.h
MAKE_ENV=   PYTHON_VER=${PYTHON_VERSION:C/^python//}
MAKE_JOBS_SAFE= yes

WRKSRC=     ${WRKDIR}/kiki

DESKTOP_ENTRIES="kiki the nanobot" \
        "3-D puzzle game" \
        "" \
        "kiki" \
        "Game;LogicGame;" \
        false

post-patch:
    @${REINPLACE_CMD} -e '/^CXXFLAGS/ s|.*|CXXFLAGS+=$$(KODI_INCLUDES) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags`|' ${WRKSRC}/kodilib/linux/Makefile
    @${REINPLACE_CMD} -e 's|getenv("KIKI_HOME")|"${DATADIR}"|' ${WRKSRC}/src/main/KikiController.cpp

do-build:
    cd ${WRKSRC}/SWIG && swig -c++ -python -globals kiki -o KikiPy_wrap.cpp KikiPy.i
    cd ${WRKSRC}/kodilib/linux && ${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS}
    cd ${WRKSRC}/linux && ${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS}

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/linux/kiki ${PREFIX}/bin
    ${MKDIR} ${DATADIR}
    cd ${WRKSRC} && ${COPYTREE_SHARE} "py sound" ${DATADIR}/

.include <bsd.port.mk>