aboutsummaryrefslogtreecommitdiff
path: root/games/freeminer
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2014-02-13 20:45:30 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2014-02-13 20:45:30 +0000
commit1f64955a940d7f40e051aa497925ff6fc00beb19 (patch)
tree1e386d946c9a447534eac75fc3399f8c38f8d56c /games/freeminer
parenta12693b82c93ffd987181b35ced6b8e81ba71490 (diff)
downloadports-1f64955a940d7f40e051aa497925ff6fc00beb19.tar.gz
ports-1f64955a940d7f40e051aa497925ff6fc00beb19.zip
- Make server-only installation not bring in X11 depends
Notes
Notes: svn path=/head/; revision=344143
Diffstat (limited to 'games/freeminer')
-rw-r--r--games/freeminer/Makefile14
-rw-r--r--games/freeminer/files/extra-patch-irrlichtdepend11
2 files changed, 22 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
diff --git a/games/freeminer/files/extra-patch-irrlichtdepend b/games/freeminer/files/extra-patch-irrlichtdepend
new file mode 100644
index 000000000000..085acc379ef8
--- /dev/null
+++ b/games/freeminer/files/extra-patch-irrlichtdepend
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2014-01-22 21:36:09.000000000 +0400
++++ CMakeLists.txt 2014-02-14 00:36:49.874504157 +0400
+@@ -58,7 +58,7 @@
+ include(${CMAKE_SOURCE_DIR}/cmake/Modules/misc.cmake)
+
+ # This is done here so that relative search paths are more reasnable
+-find_package(Irrlicht)
++set(IRRLICHT_LIBRARY "")
+
+ #
+ # Installation