aboutsummaryrefslogtreecommitdiffstats
path: root/games/djgame2/Makefile
blob: def0675094115810f4388eaa98b7d8d766443731 (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
# New ports collection makefile for:    djgame2
# Date created:     4 May 2007
# Whom:         Yinghong.Liu <liuyh@gmx.net>
#
# $FreeBSD$
#

PORTNAME=   djgame2
PORTVERSION=    3.1.2
CATEGORIES= games
MASTER_SITES=   http://www.bluedj.com/download/src/
DISTNAME=   source-${PORTVERSION}
#EXTRACT_SUFX=  .zip

MAINTAINER= liu_yinghong@yahoo.com.cn
COMMENT=    bluedj contains many popular online games

NO_BUILD=   yes
USE_ZIP=    yes
USE_QT_VER= 4
QT_COMPONENTS=  qmake gui moc qt3support uic rcc

QMAKE?=     qmake-qt4
QMAKESPEC?= ${LOCALBASE}/share/qt4/mkspecs/freebsd-g++
MAKE_ENV=   QMAKESPEC="{QMAKESPEC}"

WRKSRC=     ${WRKDIR}/${DISTNAME}
DATADIR=    ${PREFIX}/share/djgame2

post-patch:
    ${RM} -f ${WRKSRC}/Hall/HallRes/platform/x11/install
    @${SED} -e 's|%%DATADIR%%|${DATADIR}|' \
        < ${FILESDIR}/djgame2.desktop.in > ${WRKDIR}/djgame2.desktop
    @${SED} -e 's|%%DATADIR%%|${DATADIR}|' \
        < ${FILESDIR}/startdjg.in > ${WRKDIR}/startdjg
    @${REINPLACE_CMD} -e 's|linux/soundcard.h|sys/soundcard.h|g' \
        ${WRKSRC}/Base/src/PlayWave.cpp
    @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' \
        ${WRKSRC}/makelinux
    @${REINPLACE_CMD} -e 's|qmake|${QMAKE}|' \
        ${WRKSRC}/makelinux
    @${ECHO_CMD} "INCLUDEPATH += ${X11BASE}/include" \
        >> ${WRKSRC}/Base/Base.pro
    @${ECHO_CMD} "INCLUDEPATH += ${X11BASE}/include" \
        >> ${WRKSRC}/Hall/Hall.pro
    @${CHMOD} a+x ${WRKSRC}/makelinux

do-configure:
    @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./makelinux

do-install:
    ${MKDIR} ${DATADIR}
    (cd ${WRKSRC}/Hall/release; ${TAR} -cf - *) | \
    ${TAR}  -xf - -C ${DATADIR}
    ${MKDIR} ${PREFIX}/share/applications
    ${INSTALL_DATA} ${WRKDIR}/djgame2.desktop ${PREFIX}/share/applications
    ${INSTALL_SCRIPT} ${WRKDIR}/startdjg ${PREFIX}/bin

.include <bsd.port.mk>