aboutsummaryrefslogtreecommitdiffstats
path: root/devel/love/Makefile
blob: 69e00ff29ef61d0514703e5e1d36c75c1fff7859 (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
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$

PORTNAME=   love
PORTVERSION=    0.9.1
PORTREVISION=   2
CATEGORIES= devel games
MASTER_SITES=   https://bitbucket.org/rude/love/downloads/ \
        http://mirror.amdmi3.ru/distfiles/
DISTNAME=   ${PORTNAME}-${PORTVERSION}-linux-src

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    Open-source 2D game engine

LICENSE=    ZLIB
LICENSE_FILE=   ${WRKSRC}/license.txt

LIB_DEPENDS=    libIL.so:${PORTSDIR}/graphics/devil \
        libmodplug.so:${PORTSDIR}/audio/libmodplug \
        libmpg123.so:${PORTSDIR}/audio/mpg123 \
        libvorbisfile.so:${PORTSDIR}/audio/libvorbis \
        libphysfs.so:${PORTSDIR}/devel/physfs \
        libfreetype.so:${PORTSDIR}/print/freetype2

USES=           gmake openal libtool pkgconfig compiler:c++11-lib \
        desktop-file-utils shared-mime-info
USE_SDL=    sdl2
USE_GL=     gl glu
GNU_CONFIGURE=  yes
WRKSRC=     ${WRKDIR}/love-${PORTVERSION}
INSTALL_TARGET= install-strip

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PORTDOCS=   *

OPTIONS_DEFINE= DOCS LUAJIT
OPTIONS_DEFAULT_i386=   LUAJIT
OPTIONS_DEFAULT_amd64=  LUAJIT

LUAJIT_DESC=    Use luajit
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:${PORTSDIR}/lang/luajit
LUAJIT_CONFIGURE_ON=    --with-lua=luajit
LUAJIT_USES_OFF=    lua
LUAJIT_CONFIGURE_OFF=   --with-lua=lua \
            --with-luaversion="${LUA_VER}"
LUAJIT_CONFIGURE_ENV_OFF=LUA_EXECUTABLE="${LUA_CMD}"

post-patch-LUAJIT-off:
    @${REINPLACE_CMD} -e 's|$${with_lua}$${with_luaversion}|$${with_lua}-$${with_luaversion}|g' \
        ${WRKSRC}/configure

post-install-DOCS-on:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in changes.txt readme.md
    ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.mk>