diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2011-06-30 14:53:26 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2011-06-30 14:53:26 +0000 |
commit | 3aa105bc2e9a75d5b01e7db8ecd98a1a399888d4 (patch) | |
tree | aee15f316befaf7edba761df29f6e8267443802b /games/minetest | |
parent | - Fix WWW in pkg-descr (diff) |
An InfiniMiner/Minecraft inspired game.
WWW: http://celeron.55.lt/~celeron55/minetest/
Diffstat (limited to 'games/minetest')
-rw-r--r-- | games/minetest/Makefile | 75 | ||||
-rw-r--r-- | games/minetest/distinfo | 2 | ||||
-rw-r--r-- | games/minetest/files/patch-CMakeLists.txt | 11 | ||||
-rw-r--r-- | games/minetest/files/patch-src-CMakeLists.txt | 37 | ||||
-rw-r--r-- | games/minetest/files/patch-src-debug.cpp | 20 | ||||
-rw-r--r-- | games/minetest/files/patch-src-porting.cpp | 22 | ||||
-rw-r--r-- | games/minetest/pkg-descr | 3 | ||||
-rw-r--r-- | games/minetest/pkg-plist | 65 |
8 files changed, 235 insertions, 0 deletions
diff --git a/games/minetest/Makefile b/games/minetest/Makefile new file mode 100644 index 000000000000..4a78d61657fe --- /dev/null +++ b/games/minetest/Makefile @@ -0,0 +1,75 @@ +# New ports collection makefile for: minetest +# Date created: 19 Jun 2011 +# Whom: Dmitry Marakasov <amdmi3@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= minetest +PORTVERSION= r20110623 +CATEGORIES= games +MASTER_SITES= http://mirror.amdmi3.ru/distfiles/ +# https://bitbucket.org/celeron55/minetest/get/ + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= An Infiniminer/Minecraft inspired game + +BUILD_DEPENDS= ${LOCALBASE}/lib/libIrrlicht.so:${PORTSDIR}/x11-toolkits/irrlicht +RUN_DEPENDS= ${LOCALBASE}/lib/libIrrlicht.so:${PORTSDIR}/x11-toolkits/irrlicht + +USE_BZIP2= yes +USE_CMAKE= yes +USE_GL= gl +MAKE_JOBS_SAFE= yes + +WRKSRC= ${WRKDIR}/celeron55-minetest-9bc10c75dff2 + +PORTDOCS= * +PORTEXAMPLES= * + +OPTIONS= CLIENT "Build client" on \ + SERVER "Build server" on \ + OPTIMIZED_CFLAGS "Enabled additional optimizations" on + +.include <bsd.port.options.mk> + +.if defined(WITH_OPTIMIZED_CFLAGS) +CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -funroll-loops +CXXFLAGS+= -O3 -ffast-math -fomit-frame-pointer -funroll-loops +.endif + +.if !defined(WITHOUT_CLIENT) +LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \ + png.6:${PORTSDIR}/graphics/png +CMAKE_ARGS+= -DBUILD_CLIENT=1 +PLIST_SUB+= CLIENT="" +.else +CMAKE_ARGS+= -DBUILD_CLIENT=0 +PLIST_SUB+= CLIENT="@comment " +.endif + +.if !defined(WITHOUT_SERVER) +CMAKE_ARGS+= -DBUILD_SERVER=1 +PLIST_SUB+= SERVER="" +.else +CMAKE_ARGS+= -DBUILD_SERVER=0 +PLIST_SUB+= SERVER="@comment " +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \ + ${WRKSRC}/src/porting.cpp + @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ + ${WRKSRC}/cmake/Modules/FindIrrlicht.cmake + +post-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/README.txt ${DOCSDIR}/ +.endif +.if !defined(NOPORTEXAMPLES) + ${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/minetest.conf.example ${EXAMPLESDIR}/ +.endif + +.include <bsd.port.mk> diff --git a/games/minetest/distinfo b/games/minetest/distinfo new file mode 100644 index 000000000000..4de29aeaf510 --- /dev/null +++ b/games/minetest/distinfo @@ -0,0 +1,2 @@ +SHA256 (minetest-r20110623.tar.bz2) = e87b6efdd1067f5116b54fb2237f21a6c196cbd0470a9599eb1109d96ce2201b +SIZE (minetest-r20110623.tar.bz2) = 321021 diff --git a/games/minetest/files/patch-CMakeLists.txt b/games/minetest/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..162a96b033cd --- /dev/null +++ b/games/minetest/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2011-06-23 15:10:46.000000000 +0400 ++++ CMakeLists.txt 2011-06-30 04:30:39.000000000 +0400 +@@ -59,8 +59,6 @@ + set(EXAMPLE_CONF_DIR "share/doc/minetest") + endif() + +-install(FILES "doc/README.txt" DESTINATION "${DOCDIR}") +-install(FILES "minetest.conf.example" DESTINATION "${DOCDIR}") + + # + # Subdirectories diff --git a/games/minetest/files/patch-src-CMakeLists.txt b/games/minetest/files/patch-src-CMakeLists.txt new file mode 100644 index 000000000000..faaed3aa15b2 --- /dev/null +++ b/games/minetest/files/patch-src-CMakeLists.txt @@ -0,0 +1,37 @@ +--- src/CMakeLists.txt.orig 2011-06-23 15:10:46.000000000 +0400 ++++ src/CMakeLists.txt 2011-06-30 18:07:30.000000000 +0400 +@@ -48,7 +48,7 @@ + endif(APPLE) + endif(BUILD_CLIENT) + find_package(ZLIB REQUIRED) +- set(PLATFORM_LIBS -lpthread) ++ set(PLATFORM_LIBS -pthread) + #set(CLIENT_PLATFORM_LIBS -lXxf86vm) + # This way Xxf86vm is found on OpenBSD too + find_library(XXF86VM_LIBRARY Xxf86vm) +@@ -192,16 +192,12 @@ + set(RELEASE_WARNING_FLAGS "") + endif() + +- if(NOT APPLE) +- set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-unused-but-set-variable") +- endif() +- + if(APPLE) + set(CMAKE_OSX_ARCHITECTURES i386 CACHE STRING "do not build for 64-bit" FORCE) + set(ARCH i386) + endif() + +- set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} -O3 -ffast-math -Wall -fomit-frame-pointer -pipe -funroll-loops") ++ set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} -Wall -pipe") + set(CMAKE_CXX_FLAGS_DEBUG "-g -O1 -Wall ${WARNING_FLAGS}") + + if(USE_GPROF) +@@ -223,7 +219,6 @@ + # + + # Example configuration file +-install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../minetest.conf.example" DESTINATION ${EXAMPLE_CONF_DIR}) + + if(BUILD_CLIENT) + install(TARGETS minetest DESTINATION ${BINDIR}) diff --git a/games/minetest/files/patch-src-debug.cpp b/games/minetest/files/patch-src-debug.cpp new file mode 100644 index 000000000000..bc035d596ca8 --- /dev/null +++ b/games/minetest/files/patch-src-debug.cpp @@ -0,0 +1,20 @@ +--- src/debug.cpp.orig 2011-06-18 23:31:24.000000000 +0400 ++++ src/debug.cpp 2011-06-23 19:58:10.000000000 +0400 +@@ -70,7 +70,7 @@ + { + DEBUGPRINT("\nIn thread %x:\n" + "%s:%d: %s: Assertion '%s' failed.\n", +- (unsigned int)get_current_thread_id(), ++ (unsigned int)(intptr_t)get_current_thread_id(), + file, line, function, assertion); + + debug_stacks_print(); +@@ -96,7 +96,7 @@ + void DebugStack::print(FILE *file, bool everything) + { + fprintf(file, "DEBUG STACK FOR THREAD %x:\n", +- (unsigned int)threadid); ++ (unsigned int)(intptr_t)threadid); + + for(int i=0; i<stack_max_i; i++) + { diff --git a/games/minetest/files/patch-src-porting.cpp b/games/minetest/files/patch-src-porting.cpp new file mode 100644 index 000000000000..803599ab7c96 --- /dev/null +++ b/games/minetest/files/patch-src-porting.cpp @@ -0,0 +1,22 @@ +--- src/porting.cpp.orig 2011-06-18 23:31:24.000000000 +0400 ++++ src/porting.cpp 2011-06-19 13:53:48.000000000 +0400 +@@ -194,17 +194,10 @@ + /* + Linux + */ +- #elif defined(linux) ++ #elif defined(linux) || defined (__FreeBSD__) + #include <unistd.h> + +- char buf[BUFSIZ]; +- memset(buf, 0, BUFSIZ); +- // Get path to executable +- assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1); +- +- pathRemoveFile(buf, '/'); +- +- path_data = std::string(buf) + "/../share/" + APPNAME; ++ path_data = std::string("/usr/local/share/") + APPNAME; + //path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME; + + path_userdata = std::string(getenv("HOME")) + "/." + APPNAME; diff --git a/games/minetest/pkg-descr b/games/minetest/pkg-descr new file mode 100644 index 000000000000..9468b8c2535e --- /dev/null +++ b/games/minetest/pkg-descr @@ -0,0 +1,3 @@ +An InfiniMiner/Minecraft inspired game. + +WWW: http://celeron.55.lt/~celeron55/minetest/ diff --git a/games/minetest/pkg-plist b/games/minetest/pkg-plist new file mode 100644 index 000000000000..608a58f75fdd --- /dev/null +++ b/games/minetest/pkg-plist @@ -0,0 +1,65 @@ +%%CLIENT%%bin/minetest +%%SERVER%%bin/minetestserver +%%CLIENT%%%%DATADIR%%/chest_front.png +%%CLIENT%%%%DATADIR%%/chest_side.png +%%CLIENT%%%%DATADIR%%/chest_top.png +%%CLIENT%%%%DATADIR%%/cloud.png +%%CLIENT%%%%DATADIR%%/cobble.png +%%CLIENT%%%%DATADIR%%/crack.png +%%CLIENT%%%%DATADIR%%/fontlucida.png +%%CLIENT%%%%DATADIR%%/furnace_front.png +%%CLIENT%%%%DATADIR%%/furnace_side.png +%%CLIENT%%%%DATADIR%%/glass.png +%%CLIENT%%%%DATADIR%%/grass.png +%%CLIENT%%%%DATADIR%%/grass_footsteps.png +%%CLIENT%%%%DATADIR%%/grass_side.png +%%CLIENT%%%%DATADIR%%/heart.png +%%CLIENT%%%%DATADIR%%/item_fence.png +%%CLIENT%%%%DATADIR%%/leaves.png +%%CLIENT%%%%DATADIR%%/lump_of_coal.png +%%CLIENT%%%%DATADIR%%/lump_of_iron.png +%%CLIENT%%%%DATADIR%%/menulogo.png +%%CLIENT%%%%DATADIR%%/mese.png +%%CLIENT%%%%DATADIR%%/mineral_coal.png +%%CLIENT%%%%DATADIR%%/mineral_iron.png +%%CLIENT%%%%DATADIR%%/mud.png +%%CLIENT%%%%DATADIR%%/oerkki1.png +%%CLIENT%%%%DATADIR%%/player.png +%%CLIENT%%%%DATADIR%%/player_back.png +%%CLIENT%%%%DATADIR%%/rat.png +%%CLIENT%%%%DATADIR%%/sand.png +%%CLIENT%%%%DATADIR%%/sign.png +%%CLIENT%%%%DATADIR%%/sign_back.png +%%CLIENT%%%%DATADIR%%/sign_wall.png +%%CLIENT%%%%DATADIR%%/skybox1.png +%%CLIENT%%%%DATADIR%%/skybox1_dawn.png +%%CLIENT%%%%DATADIR%%/skybox1_night.png +%%CLIENT%%%%DATADIR%%/skybox2.png +%%CLIENT%%%%DATADIR%%/skybox2_dawn.png +%%CLIENT%%%%DATADIR%%/skybox2_night.png +%%CLIENT%%%%DATADIR%%/skybox3.png +%%CLIENT%%%%DATADIR%%/skybox3_dawn.png +%%CLIENT%%%%DATADIR%%/skybox3_night.png +%%CLIENT%%%%DATADIR%%/steel_block.png +%%CLIENT%%%%DATADIR%%/steel_ingot.png +%%CLIENT%%%%DATADIR%%/stick.png +%%CLIENT%%%%DATADIR%%/stone.png +%%CLIENT%%%%DATADIR%%/tool_mesepick.png +%%CLIENT%%%%DATADIR%%/tool_steelaxe.png +%%CLIENT%%%%DATADIR%%/tool_steelpick.png +%%CLIENT%%%%DATADIR%%/tool_steelshovel.png +%%CLIENT%%%%DATADIR%%/tool_stoneaxe.png +%%CLIENT%%%%DATADIR%%/tool_stonepick.png +%%CLIENT%%%%DATADIR%%/tool_stoneshovel.png +%%CLIENT%%%%DATADIR%%/tool_woodaxe.png +%%CLIENT%%%%DATADIR%%/tool_woodpick.png +%%CLIENT%%%%DATADIR%%/tool_woodshovel.png +%%CLIENT%%%%DATADIR%%/torch.png +%%CLIENT%%%%DATADIR%%/torch_on_ceiling.png +%%CLIENT%%%%DATADIR%%/torch_on_floor.png +%%CLIENT%%%%DATADIR%%/tree.png +%%CLIENT%%%%DATADIR%%/tree_top.png +%%CLIENT%%%%DATADIR%%/treeprop.png +%%CLIENT%%%%DATADIR%%/water.png +%%CLIENT%%%%DATADIR%%/wood.png +%%CLIENT%%@dirrm %%DATADIR%% |