diff options
Diffstat (limited to 'games/freeminer/Makefile')
-rw-r--r-- | games/freeminer/Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/games/freeminer/Makefile b/games/freeminer/Makefile index 6784b2417b84..2d1966bb7577 100644 --- a/games/freeminer/Makefile +++ b/games/freeminer/Makefile @@ -11,8 +11,7 @@ COMMENT= Open source sandbox game inspired by Minecraft LICENSE= LGPL21 -LIB_DEPENDS= libIrrlicht.so:${PORTSDIR}/x11-toolkits/irrlicht \ - libsqlite3.so:${PORTSDIR}/databases/sqlite3 +LIB_DEPENDS= libsqlite3.so:${PORTSDIR}/databases/sqlite3 USE_GITHUB= yes GH_ACCOUNT= ${PORTNAME} @@ -40,7 +39,8 @@ LUAJIT_DESC= LuaJIT support CLIENT_CMAKE_ON= -DBUILD_CLIENT=1 CLIENT_CMAKE_OFF= -DBUILD_CLIENT=0 CLIENT_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ - libpng.so:${PORTSDIR}/graphics/png + libpng.so:${PORTSDIR}/graphics/png \ + libIrrlicht.so:${PORTSDIR}/x11-toolkits/irrlicht CLIENT_USE= GL=gl XORG=x11 SERVER_CMAKE_ON= -DBUILD_SERVER=1 SERVER_CMAKE_OFF= -DBUILD_SERVER=0 @@ -74,6 +74,14 @@ USERS= minetest # reuse, as freeminer is a fork of GROUPS= minetest .endif +# hacky way to not bring irrlicht and X11 depends for server only +.if ! ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSERVER} +BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/x11-toolkits/irrlicht:patch +IRRLICHT_INCLUDE_DIR= `${MAKE} -C ${PORTSDIR}/x11-toolkits/irrlicht -V WRKSRC`/include +CMAKE_ARGS+= -DIRRLICHT_INCLUDE_DIR:STRING="${IRRLICHT_INCLUDE_DIR}" +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-irrlichtdepend +.endif + post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ ${WRKSRC}/cmake/Modules/*.cmake |