1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/games/motogt/Makefile
Tijl Coosemans 1ee4da6dd1 Let USES=localbase add -L${LOCALBASE}/lib to LIBS instead of LDFLAGS.
USES=localbase:ldflags can be used to set LDFLAGS.  Normally LDFLAGS
appears too early on the command line causing some ports to link with
their own libraries in LOCALBASE (if installed) instead of WRKSRC.

Also make use of _USES_POST so -L${LOCALBASE}/lib is added as late as
possible after anything a port Makefile might set.  Use _USES_POST
instead of .include in libedit.mk and libarchive.mk so things like
'USES=libedit localbase:ldflags' work correctly.

Fix some issues with LIBS in some ports.

Switch ports that don't support LIBS to localbase:ldflags.

PR:		212987
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2016-09-30 19:24:30 +00:00

44 lines
1.1 KiB
Makefile

# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$
PORTNAME= motogt
PORTVERSION= 20110505
PORTREVISION= 6
CATEGORIES= games
MASTER_SITES= SF/motogt/MotoGT1/
DISTNAME= MotoGT-${PORTVERSION}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= 2D top-viewed motorcycle racing game
LIB_DEPENDS= libsfml1-system.so:devel/sfml1 \
libpng.so:graphics/png
LICENSE= GPLv2 CC-BY-SA-3.0
LICENSE_COMB= multi
LICENSE_FILE_GPLv20= ${WRKSRC}/doc/gpl.txt
LICENSE_FILE_CC-BY-SA-3.0= ${WRKSRC}/doc/cc-by-sa.txt
USES= localbase:ldflags zip
USE_GL= gl
BUILD_WRKSRC= ${WRKSRC}/src
MAKEFILE= Makefile.lnx
MAKE_JOBS_UNSAFE= yes
SUB_FILES= motogt
PLIST_FILES= bin/${PORTNAME} libexec/MotoGT.bin
PORTDATA= *
WRKSRC= ${WRKDIR}/MotoGT
post-patch:
@${REINPLACE_CMD} -e '/#include/ s|SFML|&1|' ${WRKSRC}/data/src/editor.cpp ${WRKSRC}/src/*.h
@${REINPLACE_CMD} -e 's|-lsfml|&1|g' ${WRKSRC}/src/Makefile.lnx
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/MotoGT.bin ${STAGEDIR}${PREFIX}/libexec/
${INSTALL_SCRIPT} ${WRKDIR}/motogt ${STAGEDIR}${PREFIX}/bin/
cd ${WRKSRC} && ${COPYTREE_SHARE} data ${STAGEDIR}${DATADIR}/
.include <bsd.port.mk>