diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2014-02-14 04:45:30 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2014-02-14 04:45:30 +0800 |
commit | b4a0528044e6e8afde944c1198b27622ccb1e1cb (patch) | |
tree | 1e386d946c9a447534eac75fc3399f8c38f8d56c | |
parent | d1e1a9863f881035aa0c02d293f05b09cc787a29 (diff) | |
download | freebsd-ports-gnome-b4a0528044e6e8afde944c1198b27622ccb1e1cb.tar.gz freebsd-ports-gnome-b4a0528044e6e8afde944c1198b27622ccb1e1cb.tar.zst freebsd-ports-gnome-b4a0528044e6e8afde944c1198b27622ccb1e1cb.zip |
- Make server-only installation not bring in X11 depends
-rw-r--r-- | games/freeminer/Makefile | 14 | ||||
-rw-r--r-- | games/freeminer/files/extra-patch-irrlichtdepend | 11 |
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 |