aboutsummaryrefslogtreecommitdiffstats
path: root/games/edge/Makefile
blob: bde800027e1442abd760934bb69b7feeb2d96874 (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
# Created by: alepulver
# $FreeBSD$

PORTNAME=   edge
PORTVERSION=    1.35
PORTREVISION=   3
CATEGORIES= games
MASTER_SITES=   SF/${PORTNAME}/EDGE%20Source%20Code/${PORTVERSION} \
        SF/${PORTNAME}/EDGE%20Binaries/${PORTVERSION}:wad
DISTFILES=  Edge-${PORTVERSION}-source${EXTRACT_SUFX} \
        Edge-${PORTVERSION}-linux.tar.gz:wad
EXTRACT_ONLY=   Edge-${PORTVERSION}-source${EXTRACT_SUFX}

MAINTAINER= ports@FreeBSD.org
COMMENT=    DOOM style engine aimed at the Total Conversion developer

LICENSE=    GPLv2 GPLv3
LICENSE_COMB=   dual

LIB_DEPENDS=    libvorbis.so:${PORTSDIR}/audio/libvorbis \
        libGLEW.so:${PORTSDIR}/graphics/glew \
        libjpeg.so:${PORTSDIR}/graphics/jpeg \
        libpng15.so:${PORTSDIR}/graphics/png

WRKSRC=     ${WRKDIR}/Edge-${PORTVERSION}-source

USES=       gmake tar:bzip2
USE_SDL=    sdl
MAKEFILE=   Makefile.linux

PORTDOCS=   *
PLIST_FILES=    bin/edge %%DMDIR%%/edge.wad
PLIST_DIRSTRY=  %%DMDIR%%

CFLAGS+=    -ffast-math

DEFINE_OPTIONS= DOCS

post-extract:
    @${TAR} -C ${WRKDIR} \
        --exclude "License.txt" \
        --exclude "edge_linux" \
        --exclude "demo-*" \
        --exclude "*.zip" \
        -x -f ${DISTDIR}/Edge-${PORTVERSION}-linux.tar.gz

post-patch:
    @${REINPLACE_CMD} -e \
        's|^CC=|CC?=| ; \
         s|^CXX=|CXX?=| ; \
         s|^CFLAGS=|CFLAGS?=| ; \
         s|-L$$(LIBDIR)/glew-1.4/lib||' ${WRKSRC}/Makefile.linux
    @${REINPLACE_CMD} -e \
        's|%%DMDIR%%|${DMDIR}|' ${WRKSRC}/src/e_main.cc

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/edge.linux ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
    @${MKDIR} ${STAGEDIR}${DMDIR}
    ${INSTALL_DATA} ${WRKDIR}/Edge-${PORTVERSION}/edge.wad ${STAGEDIR}${DMDIR}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKDIR}/Edge-${PORTVERSION}/*.txt ${STAGEDIR}${DOCSDIR}

.include "${.CURDIR}/../doom-data/Makefile.include"

.include <bsd.port.mk>