aboutsummaryrefslogtreecommitdiffstats
path: root/games/childsplay/Makefile
blob: 6d2f4c4233721338972d8ca4d9b406f0ff377cfb (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
# Created by: bruno
# $FreeBSD$

PORTNAME=   childsplay
PORTVERSION=    2.6.5
PORTREVISION=   2
CATEGORIES= games
MASTER_SITES=   SAVANNAH

MAINTAINER= ports@FreeBSD.org
COMMENT=    Educative games for children

LICENSE=    GPLv3 # only
LICENSE_FILE=   ${WRKSRC}/gpl-3.0.txt

BUILD_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game
RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}sqlalchemy10>0:databases/py-sqlalchemy10 \
        ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game

NO_BUILD=   yes

USES=       gettext shebangfix tar:tgz python:2
USE_GNOME=  pygtk2

SHEBANG_FILES=  childsplay.py
.for i in buttons funcs text dialogs gtk_widgets base
SHEBANG_FILES+= SPWidgets/$i.py
.endfor

DESKTOP_ENTRIES="Childsplay" "" "" "${PORTNAME}" "Game;Education;" ""

CHILDSPLAYDIR=  ${PYTHONPREFIX_SITELIBDIR}/childsplay

post-patch:
    @${REINPLACE_CMD} -e \
        '/NoGtk/s|True|False|' ${WRKSRC}/SPConstants.py
    @${REINPLACE_CMD} -e \
        's|/usr/local|${PREFIX}|' ${WRKSRC}/pangofont.py

do-configure:
    @${ECHO_CMD} "#!${SH}" > ${WRKDIR}/childsplay.sh
    @${ECHO_CMD} >> ${WRKDIR}/childsplay.sh
    @${ECHO_CMD} 'cd "${CHILDSPLAYDIR}"' >> ${WRKDIR}/childsplay.sh
    @${ECHO_CMD} 'exec ${PYTHON_CMD} childsplay.py "$$@"' \
        >> ${WRKDIR}/childsplay.sh

do-install:
    ${INSTALL_SCRIPT} ${WRKDIR}/childsplay.sh \
        ${STAGEDIR}${PREFIX}/bin/childsplay
    @${MKDIR} ${STAGEDIR}${CHILDSPLAYDIR}
    ${INSTALL_DATA} ${WRKSRC}/*.py ${STAGEDIR}${CHILDSPLAYDIR}
    (cd ${WRKSRC} && ${COPYTREE_SHARE} "SPWidgets alphabetsounds lib" \
        ${STAGEDIR}${CHILDSPLAYDIR})
    (cd ${WRKSRC} && ${COPYTREE_SHARE} locale ${STAGEDIR}${PREFIX}/share)
    ${INSTALL_DATA} ${WRKSRC}/sp_content.db ${STAGEDIR}${CHILDSPLAYDIR}
    (cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -m compileall \
        -d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})

.include <bsd.port.mk>