[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / ports / games / tome4

File: [local] / ports / games / tome4 / Makefile (download)

Revision 1.32, Mon Jan 15 18:45:45 2024 UTC (4 months, 2 weeks ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.31: +1 -2 lines

update to tome4 1.7.6;  OK thfr

# tome4 ships embedded copy of luajit wich is known to
# work on the arches listed below.
# Other arches will fail with
# ../src/luajit2/src/lj_arch.h:55:2: error: #error "No support for
# this architecture (yet)"
ONLY_FOR_ARCHS = i386 amd64
USE_NOBTCFI =	Yes

COMMENT-main =	graphical sdl rogue-like game
COMMENT-data =	data for Tales of Maj'Eyal

V =		1.7.6
PKGNAME =	tome4-${V}
CATEGORIES =	games x11

SITES =		https://te4.org/dl/t-engine/

DISTNAME =	t-engine4-src-${V}
EXTRACT_SUFX =	.tar.bz2
HOMEPAGE =	https://te4.org/

MULTI_PACKAGES =-main -data

# GPLV3+ and bundled MIT, zlib, BSD in games/thirdparty/licenses/
PERMIT_PACKAGE =	Yes

WANTLIB-main =	GL GLU SDL2 SDL2_image SDL2_ttf openal c c++ m \
		png pthread vorbisfile

BUILD_DEPENDS =	devel/premake4

LIB_DEPENDS-main =	devel/sdl2 \
			devel/sdl2-image \
			devel/sdl2-ttf \
			audio/libvorbis \
			audio/openal

RUN_DEPENDS-main =	games/tome4,-data

LIB_DEPENDS-data =
WANTLIB-data =

COMPILER =	base-clang ports-gcc
COMPILER_LANGS =	c

# c++abi certainly pulled out by luajit when using clang
.include <bsd.port.arch.mk>
.if ${PROPERTIES:Mclang}
WANTLIB-main += c++abi
PATCH_LIST =	patch-* lld-linking
.endif

CONFIGURE_STYLE =	simple
CONFIGURE_SCRIPT =	${LOCALBASE}/bin/premake4
CONFIGURE_ARGS =	${MAKE_PROGRAM}

NO_TEST =	Yes

USE_GMAKE =	Yes
MAKE_FLAGS =	verbose=1 CC='${CC}'
MAKE_ENV =	config=release

GAMEDIR =	${PREFIX}/share/tome4
SUBST_VARS +=	GAMEDIR V

post-patch:
	sed -i 's/gcc /${CC} /g' ${WRKSRC}/build/te4core.lua
	${SUBST_CMD} ${WRKSRC}/src/getself.c ${WRKSRC}/premake4.lua

do-install:
	${INSTALL_PROGRAM} ${WRKBUILD}/t-engine ${PREFIX}/bin/tome4
	${INSTALL_DATA_DIR} ${GAMEDIR}
	cd ${WRKSRC} && pax -rw -s,*${PATCHORIG},, \
	    -s,game/modules/example\*,, bootstrap/ game/ ${GAMEDIR}

.include <bsd.port.mk>