aboutsummaryrefslogtreecommitdiff
path: root/games/SRB2/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'games/SRB2/Makefile')
-rw-r--r--games/SRB2/Makefile28
1 files changed, 19 insertions, 9 deletions
diff --git a/games/SRB2/Makefile b/games/SRB2/Makefile
index 553ed6daf616..c1eca9dd382e 100644
--- a/games/SRB2/Makefile
+++ b/games/SRB2/Makefile
@@ -1,7 +1,7 @@
PORTNAME= SRB2
-PORTVERSION= 2.2.9
+PORTVERSION= 2.2.13
DISTVERSIONPREFIX= SRB2_release_
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= https://github.com/STJr/SRB2/releases/download/SRB2_release_${PORTVERSION}/:assets
DISTFILES+= SRB2-v${PORTVERSION:C/\.//g}-Full.zip:assets
@@ -19,7 +19,12 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
libopenmpt.so:audio/libopenmpt \
libpng.so:graphics/png
-USES= cmake sdl
+USES= cmake localbase:ldflags sdl
+CMAKE_ARGS+= -DSRB2_CONFIG_ASSET_DIRECTORY=${WRKSRC}/assets/installer/ \
+ -DSRB2_SDL2_EXE_NAME=${EXE_NAME}
+
+CMAKE_ON= SRB2_CONFIG_SYSTEM_LIBRARIES
+CMAKE_OFF= SRB2_CONFIG_ENABLE_TESTS
USE_GITHUB= yes
GH_ACCOUNT= STJr
@@ -29,20 +34,25 @@ USE_SDL= mixer2 sdl2
CXXFLAGS+= -DDEFAULTWADLOCATION5=${DATADIR}
LDFLAGS+= -lexecinfo -lm
+EXE_NAME= srb2
+
post-extract:
@${MKDIR} ${WRKSRC}/assets/installer
- @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v229-Full.zip srb2.pk3
- @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v229-Full.zip player.dta
- @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v229-Full.zip zones.pk3
- @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v229-Full.zip patch.pk3
+ @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v${PORTVERSION:S/.//g}-Full.zip srb2.pk3
+ @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v${PORTVERSION:S/.//g}-Full.zip models.dat
+ @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v${PORTVERSION:S/.//g}-Full.zip music.dta
+ @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v${PORTVERSION:S/.//g}-Full.zip player.dta
+ @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v${PORTVERSION:S/.//g}-Full.zip zones.pk3
+ @cd ${WRKSRC}/assets/installer && ${UNZIP_NATIVE_CMD} ${DISTDIR}/SRB2-v${PORTVERSION:S/.//g}-Full.zip patch.pk3
post-install:
@${MKDIR} ${STAGEDIR}/${DATADIR}
@${MV} ${STAGEDIR}/${PREFIX}/srb2.pk3 ${STAGEDIR}/${DATADIR}
+ @${MV} ${STAGEDIR}/${PREFIX}/models.dat ${STAGEDIR}/${DATADIR}
+ @${MV} ${STAGEDIR}/${PREFIX}/music.dta ${STAGEDIR}/${DATADIR}
@${MV} ${STAGEDIR}/${PREFIX}/player.dta ${STAGEDIR}/${DATADIR}
@${MV} ${STAGEDIR}/${PREFIX}/zones.pk3 ${STAGEDIR}/${DATADIR}
@${MV} ${STAGEDIR}/${PREFIX}/patch.pk3 ${STAGEDIR}/${DATADIR}
- @${MV} ${STAGEDIR}/${PREFIX}/srb2 ${STAGEDIR}/${PREFIX}/bin
- @${MV} ${STAGEDIR}/${PREFIX}/srb2-${PORTVERSION} ${STAGEDIR}/${PREFIX}/bin
+ @${MV} ${STAGEDIR}/${PREFIX}/${EXE_NAME} ${STAGEDIR}/${PREFIX}/bin
.include <bsd.port.mk>