diff options
author | root <root@root.root> | 2015-08-21 06:14:53 +0300 |
---|---|---|
committer | root <root@root.root> | 2015-08-21 06:14:53 +0300 |
commit | a14e232243b018b4bb9ea28846f6024cdd444378 (patch) | |
tree | 4cf0bfbf1cff75a60c1090582048ba713c0844e1 /games-action | |
parent | bef05bbfa142369f2283b90d817205ac6b8371ac (diff) |
переименовано: games-engines/freeminer/Manifest -> games-action/freeminer/Manifest
переименовано: games-engines/freeminer/files/freeminerserver.confd -> games-action/freeminer/files/freeminerserver.confd
переименовано: games-engines/freeminer/files/freeminerserver.initd -> games-action/freeminer/files/freeminerserver.initd
переименовано: games-engines/freeminer/freeminer-scm.ebuild -> games-action/freeminer/freeminer-scm.ebuild
переименовано: games-engines/minetest/metadata.xml -> games-action/freeminer/metadata.xml
переименовано: games-engines/minetest/files/minetest-0.4.10-as-needed.patch -> games-action/minetest/files/minetest-0.4.10-as-needed.patch
переименовано: games-engines/minetest/files/minetest-0.4.10-shared-irrlicht.patch -> games-action/minetest/files/minetest-0.4.10-shared-irrlicht.patch
переименовано: games-engines/minetest/files/minetest-0.4.10-system-lua.patch -> games-action/minetest/files/minetest-0.4.10-system-lua.patch
переименовано: games-engines/minetest/files/minetest-0.4.9-as-needed.patch -> games-action/minetest/files/minetest-0.4.9-as-needed.patch
переименовано: games-engines/minetest/files/minetest-0.4.9-freetype.patch -> games-action/minetest/files/minetest-0.4.9-freetype.patch
переименовано: games-engines/minetest/files/minetest-0.4.9-lua-luajit-option.patch -> games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch
переименовано: games-engines/minetest/files/minetest-0.4.9-opengles.patch -> games-action/minetest/files/minetest-0.4.9-opengles.patch
переименовано: games-engines/minetest/files/minetest-0.4.9-shared-irrlicht.patch -> games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch
переименовано: games-engines/minetest/files/minetest_redis.patch -> games-action/minetest/files/minetest_redis.patch
переименовано: games-engines/minetest/files/minetestserver.confd -> games-action/minetest/files/minetestserver.confd
переименовано: games-engines/minetest/files/minetestserver.initd -> games-action/minetest/files/minetestserver.initd
переименовано: games-engines/freeminer/metadata.xml -> games-action/minetest/metadata.xml
переименовано: games-engines/minetest/minetest-0.4.10-r2.ebuild -> games-action/minetest/minetest-0.4.10-r2.ebuild
переименовано: games-engines/minetest/minetest-scm.ebuild -> games-action/minetest/minetest-scm.ebuild
Diffstat (limited to 'games-action')
19 files changed, 1071 insertions, 0 deletions
diff --git a/games-action/freeminer/Manifest b/games-action/freeminer/Manifest new file mode 100644 index 0000000..602c2ef --- /dev/null +++ b/games-action/freeminer/Manifest @@ -0,0 +1,4 @@ +AUX minetestserver.confd 313 SHA256 b360d2f80fb9793994a33778ef907a5b9220ba0a6a8a312d75499718cb9b5f81 SHA512 96fe764d78b383f294bce81e8631861057f309fd9d13f9397ca0c715396f3793f201f313a3507c0b190f41891441eb4fe418b5888cb73ffdea0d27969d0172c3 WHIRLPOOL 6be18593d29f593904760e19486eb77b3ac6bb6b02eaf7de54aba7f5cc117ebafa6ab355787015d3fc2baec6ef8368b3dc8e37bf5df9a901595ccc082adae941 +AUX minetestserver.initd 570 SHA256 15d567577377cb8c2d6dc6e38b90e83aa08217ce4aa01e5f77b2b636c81c9e41 SHA512 dc0f106812bc52eec9436a9367b8eba0814642e8b74109c870046f8f9575ebb29561c168e05fe2b1faf12c17329cdc6b76442707ffe7dbe8fb7ee8cd4bb797c2 WHIRLPOOL 2ba91a77122142512c3123efc34dd19fd1437b68bcc1a51e17cd40040f3f6fc955927533472b98be047536db26679e45d5d54c2ad8512e9fe67bffd84a655e4e +EBUILD minetest-9999.ebuild 2832 SHA256 2eec0c8146f6e9b2ac96924bd7f7444763f764d3750a6fe55414b7c207379db0 SHA512 ac76345ecd13ef880e4e604bc03f937340b6d1ae804f621a03d7450861ee3e887ab1e65b934d0343da03525f23a41cbaf351d2ea0a4701b32690309cb42ee5fe WHIRLPOOL a36980c850bea6e5c6e766c91f76eb2d79e7aa8fdfaa55cbfe6ef73cf46e19d0de8c46162effdf984dc9a823e041c15ca0811f53eb82c4a88b992ce8b1ae7ef0 +MISC metadata.xml 1778 SHA256 9bf4b1b712592fe4307abd2481952432732640db369426fd55a4861845578801 SHA512 bf2498db5d64b2f4d82a0f1c03f43cf67fe292dc8c641555792c1101be7beae3afa2b98622b6b729c5bedfca1ea6d844d7b8abf3c97518903b4c70db8fb27b09 WHIRLPOOL 7fdffec8faea204e646c521fa6b4eaf731b60393795def35ff471e1325e7c93c94eaa6efcc37d989cb9759478e1464095e8824cc5f38d88fd07c40608e6aad6b diff --git a/games-action/freeminer/files/freeminerserver.confd b/games-action/freeminer/files/freeminerserver.confd new file mode 100644 index 0000000..dc8dbd8 --- /dev/null +++ b/games-action/freeminer/files/freeminerserver.confd @@ -0,0 +1,16 @@ +# /etc/conf.d/freeminer-server: config file for /etc/init.d/freeminer-server + +# user +USER="freeminer" + +# group +GROUP="@GROUP@" + +# pidfile +PIDFILE="/var/run/freeminer.pid" + +# executable +FREEMINERBIN="@BINDIR@/freeminerserver" + +# additional arguments for the server +ARGS="--logfile /var/lib/freeminer/freeminer-server.log" diff --git a/games-action/freeminer/files/freeminerserver.initd b/games-action/freeminer/files/freeminerserver.initd new file mode 100644 index 0000000..c7cc785 --- /dev/null +++ b/games-action/freeminer/files/freeminerserver.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +description="freeminer dedicated server" + +depend() { + need net +} + +start() { + ebegin "starting server" + start-stop-daemon \ + --start \ + --quiet \ + --make-pidfile \ + --pidfile "${PIDFILE}" \ + --background \ + --user ${USER} \ + --group ${GROUP} \ + --exec "${FREEMINERBIN}" -- ${ARGS} + + eend $? +} + +stop() { + ebegin "stopping server" + start-stop-daemon \ + --stop \ + --signal 15 \ + --quiet \ + --pidfile "${PIDFILE}" + + eend $? +} diff --git a/games-action/freeminer/freeminer-scm.ebuild b/games-action/freeminer/freeminer-scm.ebuild new file mode 100644 index 0000000..4b6793a --- /dev/null +++ b/games-action/freeminer/freeminer-scm.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +inherit eutils cmake-utils git-2 gnome2-utils vcs-snapshot user games flag-o-matic + +DESCRIPTION="minetest fork" +HOMEPAGE="http://freeminer.org/" +EGIT_REPO_URI="git://github.com/freeminer/${PN}.git" + +LICENSE="LGPL-2.1+ CC-BY-SA-3.0" +SLOT="0" +KEYWORDS="" +IUSE="+curl dedicated gles leveldb luajit nls redis server +sound +truetype" + +RDEPEND="dev-db/sqlite:3 + >=dev-games/irrlicht-1.8-r2 + !luajit? ( >=dev-lang/lua-5.1.4 ) + sys-libs/zlib + curl? ( net-misc/curl ) + !dedicated? ( + app-arch/bzip2 + media-libs/libpng:0 + virtual/jpeg + virtual/opengl + x11-libs/libX11 + x11-libs/libXxf86vm + sound? ( + media-libs/libogg + media-libs/libvorbis + media-libs/openal + ) + truetype? ( media-libs/freetype:2 ) + ) + leveldb? ( dev-libs/leveldb ) + luajit? ( dev-lang/luajit:2.1 ) + redis? ( + dev-db/redis + dev-libs/hiredis + ) + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +pkg_setup() { + games_pkg_setup + + if use server || use dedicated ; then + enewuser ${PN} -1 -1 /var/lib/${PN} ${GAMES_GROUP} + fi +} + +src_unpack() { + git-2_src_unpack +} + +src_prepare() { + # set paths + sed \ + -e "s#@BINDIR@#${GAMES_BINDIR}#g" \ + -e "s#@GROUP@#${GAMES_GROUP}#g" \ + "${FILESDIR}"/freeminerserver.confd > "${T}"/freeminerserver.confd || die +} + +src_configure() { + append-cxxflags "-std=c++11" + local mycmakeargs=( + -DRUN_IN_PLACE=0 + -DCUSTOM_SHAREDIR="${GAMES_DATADIR}/${PN}" + -DCUSTOM_BINDIR="${GAMES_BINDIR}" + -DCUSTOM_DOCDIR="/usr/share/doc/${PF}" + -DCUSTOM_LOCALEDIR="/usr/share/locale" + $(usex dedicated "-DBUILD_SERVER=ON -DBUILD_CLIENT=OFF" "$(cmake-utils_use_build server SERVER) -DBUILD_CLIENT=ON") + $(cmake-utils_use_enable nls GETTEXT) + $(cmake-utils_use_enable curl CURL) + $(cmake-utils_use_enable truetype FREETYPE) + $(cmake-utils_use_enable sound SOUND) + $(cmake-utils_use_enable leveldb LEVELDB) + $(cmake-utils_use_enable redis REDIS) + $(cmake-utils_use_enable gles GLES) + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + + if use server || use dedicated ; then + newinitd "${FILESDIR}"/freeminerserver.initd freeminer-server + newconfd "${T}"/freeminerserver.confd freeminer-server + fi + + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update + + + if use server || use dedicated ; then + elog + elog "Configure your server via /etc/conf.d/freeminer-server" + elog "The user \"freeminer\" is created with /var/lib/${PN} homedir." + elog "Default logfile is ~/freeminer-server.log" + elog + fi +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/games-action/freeminer/metadata.xml b/games-action/freeminer/metadata.xml new file mode 100644 index 0000000..351ab36 --- /dev/null +++ b/games-action/freeminer/metadata.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>hasufell@gentoo.org</email> + <name>Julian Ospald</name> + </maintainer> + <longdescription lang="en"> + Minetest is an infinite-world block sandbox game and a game + engine, inspired by InfiniMiner, Minecraft and the like. It has + been in development and use since October 2010. + + It is Free and Open Source Software, released under the LGPL 2.1 + or later, available for Windows, Mac OS X and Linux. + + Minetest is developed by a random bunch of lunatics. + + Minetest is designed to be simple, stable and portable. It is + lightweight enough to run on fairly old hardware. It currently + runs playably on a laptop with Intel 945GM graphics. Though, as + for the CPU, dualcore is recommended. + + Features + * Walk around, dig and build in an infinite voxel world, + and craft stuff from raw materials to help you along the way. + * Simplistic Modding API that supports many kinds of additions + and modifications to the game. + * Multiplayer support for tens of players, via servers hosted by + users. + * Voxel based lighting with gameplay consequences + (light caves and buildings with torches) + * Almost infinite world and a beautiful map generator. + * Runs natively on Windows, Linux, OS X and FreeBSD. + * Supports multiple languages, translated by the community. + </longdescription> + <use> + <flag name="leveldb">Enable LevelDB backend</flag> + <flag name="server">Build minetest server</flag> + </use> + <upstream> + <bugs-to>https://github.com/minetest/minetest/issues</bugs-to> + <doc lang="en">http://wiki.minetest.net/Main_Page</doc> + <remote-id type="github">minetest/minetest</remote-id> + </upstream> +</pkgmetadata> diff --git a/games-action/minetest/files/minetest-0.4.10-as-needed.patch b/games-action/minetest/files/minetest-0.4.10-as-needed.patch new file mode 100644 index 0000000..83d1ca7 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.10-as-needed.patch @@ -0,0 +1,35 @@ +commit a88bfd5b77fa0b5c60e438c0011dbdcee5e14dfd +Author: hasufell <hasufell@gentoo.org> +Date: Mon Nov 25 00:28:55 2013 +0100 + + CMAKE: fix linking order + + this also fixes linking with as-needed wrt + https://github.com/minetest/minetest/issues/617 + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a1fee7a..a72bd4a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -427,18 +427,18 @@ if(BUILD_CLIENT) + set(minetest_LIBS + ${PROJECT_NAME} + ${ZLIB_LIBRARIES} +- ${IRRLICHT_LIBRARY} ++ ${X11_LIBRARIES} + ${OPENGL_LIBRARIES} ++ ${OPENGLES2_LIBRARIES} + ${JPEG_LIBRARIES} + ${BZIP2_LIBRARIES} + ${PNG_LIBRARIES} +- ${X11_LIBRARIES} ++ ${IRRLICHT_LIBRARY} + ${GETTEXT_LIBRARY} + ${SOUND_LIBRARIES} + ${SQLITE3_LIBRARY} + ${LUA_LIBRARY} + ${JSON_LIBRARY} +- ${OPENGLES2_LIBRARIES} + ${PLATFORM_LIBS} + ${CLIENT_PLATFORM_LIBS} + ) diff --git a/games-action/minetest/files/minetest-0.4.10-shared-irrlicht.patch b/games-action/minetest/files/minetest-0.4.10-shared-irrlicht.patch new file mode 100644 index 0000000..b552c09 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.10-shared-irrlicht.patch @@ -0,0 +1,23 @@ +commit 11d35e62fe13b47c5b34139559e650dfe6ebbd84 +Author: hasufell <julian.ospald@googlemail.com> +Date: Sat Jun 8 13:40:30 2013 +0200 + + CMAKE: use shared lib from Irrlicht + +diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake +index bd00422..4632993 100644 +--- a/cmake/Modules/FindIrrlicht.cmake ++++ b/cmake/Modules/FindIrrlicht.cmake +@@ -50,10 +50,11 @@ else() + /usr/include/irrlicht + ) + +- FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht ++ FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.so Irrlicht + PATHS + /usr/local/lib + /usr/lib ++ /usr/lib64 + ) + endif() + diff --git a/games-action/minetest/files/minetest-0.4.10-system-lua.patch b/games-action/minetest/files/minetest-0.4.10-system-lua.patch new file mode 100644 index 0000000..c31c851 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.10-system-lua.patch @@ -0,0 +1,37 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -215,8 +215,6 @@ + message (STATUS "LuaJIT headers: ${LUA_INCLUDE_DIR}") + else (NOT ${DISABLE_LUAJIT} MATCHES "1") + message (STATUS "LuaJIT detection disabled! (DISABLE_LUAJIT=1)") +- set(LUA_LIBRARY "") +- set(LUA_INCLUDE_DIR "") + endif (NOT DISABLE_LUAJIT) + + set(USE_LUAJIT 0) +@@ -267,11 +265,22 @@ + endif (VALID_LUAJIT_VERSION) + endif (LUA_LIBRARY AND LUA_INCLUDE_DIR) + ++OPTION(WITH_BUNDLED_LUA "Use bundled lua") ++ + if(NOT USE_LUAJIT) + message (STATUS "LuaJIT not found, using bundled Lua.") +- set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") +- set(LUA_LIBRARY "lua") +- add_subdirectory(lua) ++ if (WITH_BUNDLED_LUA) ++ set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") ++ set(LUA_LIBRARY "lua") ++ add_subdirectory(lua) ++ else (WITH_BUNDLED_LUA) ++ find_package(Lua51) ++ if(LUA51_FOUND) ++ message (STATUS "Lua51 found") ++ else(LUA51_FOUND) ++ message (FATAL_ERROR "Lua51 not found!") ++ endif(LUA51_FOUND) ++ endif(WITH_BUNDLED_LUA) + endif(NOT USE_LUAJIT) + + mark_as_advanced(LUA_LIBRARY) diff --git a/games-action/minetest/files/minetest-0.4.9-as-needed.patch b/games-action/minetest/files/minetest-0.4.9-as-needed.patch new file mode 100644 index 0000000..803ea02 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-as-needed.patch @@ -0,0 +1,35 @@ +commit a88bfd5b77fa0b5c60e438c0011dbdcee5e14dfd +Author: hasufell <hasufell@gentoo.org> +Date: Mon Nov 25 00:28:55 2013 +0100 + + CMAKE: fix linking order + + this also fixes linking with as-needed wrt + https://github.com/minetest/minetest/issues/617 + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a1fee7a..a72bd4a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -427,18 +427,18 @@ if(BUILD_CLIENT) + target_link_libraries( + ${PROJECT_NAME} + ${ZLIB_LIBRARIES} +- ${IRRLICHT_LIBRARY} ++ ${X11_LIBRARIES} + ${OPENGL_LIBRARIES} ++ ${OPENGLES2_LIBRARIES} + ${JPEG_LIBRARIES} + ${BZIP2_LIBRARIES} + ${PNG_LIBRARIES} +- ${X11_LIBRARIES} ++ ${IRRLICHT_LIBRARY} + ${GETTEXT_LIBRARY} + ${SOUND_LIBRARIES} + ${SQLITE3_LIBRARY} + ${LUA_LIBRARY} + ${JSON_LIBRARY} +- ${OPENGLES2_LIBRARIES} + ${PLATFORM_LIBS} + ${CLIENT_PLATFORM_LIBS} + ) diff --git a/games-action/minetest/files/minetest-0.4.9-freetype.patch b/games-action/minetest/files/minetest-0.4.9-freetype.patch new file mode 100644 index 0000000..9ca8e68 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-freetype.patch @@ -0,0 +1,87 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Sun Dec 8 19:28:11 UTC 2013 +Subject: prefer pkg-config for freetype2 detection + +https://github.com/minetest/minetest/pull/1042 + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -173,7 +173,22 @@ + find_package(OpenGLES2) + + if(USE_FREETYPE) +- find_package(Freetype REQUIRED) ++ if(UNIX) ++ include(FindPkgConfig) ++ if(PKG_CONFIG_FOUND) ++ pkg_check_modules(FREETYPE QUIET freetype2) ++ if(FREETYPE_FOUND) ++ SET(FREETYPE_PKGCONFIG_FOUND TRUE) ++ SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) ++ # because cmake is idiotic ++ string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS}) ++ string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS}) ++ endif(FREETYPE_FOUND) ++ endif(PKG_CONFIG_FOUND) ++ endif(UNIX) ++ if(NOT FREETYPE_FOUND) ++ find_package(Freetype REQUIRED) ++ endif(NOT FREETYPE_FOUND) + set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont") + set(CGUITTFONT_LIBRARY cguittfont) + endif(USE_FREETYPE) +@@ -446,6 +461,12 @@ + ) + endif(USE_CURL) + if(USE_FREETYPE) ++ if(FREETYPE_PKGCONFIG_FOUND) ++ set_target_properties(${PROJECT_NAME} ++ PROPERTIES ++ COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}" ++ ) ++ endif(FREETYPE_PKGCONFIG_FOUND) + target_link_libraries( + ${PROJECT_NAME} + ${FREETYPE_LIBRARY} +--- a/src/cguittfont/CMakeLists.txt ++++ b/src/cguittfont/CMakeLists.txt +@@ -1,17 +1,29 @@ +-include_directories( +- ${IRRLICHT_INCLUDE_DIR} +- ${FREETYPE_INCLUDE_DIRS} +-) +- + # CGUITTFont authors, y u no include headers you use? + # Do not add CGUITTFont.cpp to the line below. + # xCGUITTFont.cpp is a wrapper file that includes + # additional required headers. + add_library(cguittfont xCGUITTFont.cpp) + ++if(FREETYPE_PKGCONFIG_FOUND) ++ set_target_properties(cguittfont ++ PROPERTIES ++ COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}" ++ LINK_FLAGS "${FREETYPE_LDFLAGS_STR}" ++ ) ++ ++ include_directories( ++ ${IRRLICHT_INCLUDE_DIR} ++ ) ++else(FREETYPE_PKGCONFIG_FOUND) ++ include_directories( ++ ${IRRLICHT_INCLUDE_DIR} ++ ${FREETYPE_INCLUDE_DIRS} ++ ) ++endif(FREETYPE_PKGCONFIG_FOUND) ++ + target_link_libraries( +- cguittfont +- ${IRRLICHT_LIBRARY} +- ${FREETYPE_LIBRARY} +- ${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety +-) ++ cguittfont ++ ${IRRLICHT_LIBRARY} ++ ${FREETYPE_LIBRARY} ++ ${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety ++ ) diff --git a/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch b/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch new file mode 100644 index 0000000..8603c50 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-lua-luajit-option.patch @@ -0,0 +1,56 @@ +commit d8dbda3636a91eba52c97450b58f767d5a4a376e +Author: hasufell <hasufell@gentoo.org> +Date: Mon Nov 25 00:25:55 2013 +0100 + + add USE_LUAJIT option + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a30dc98..a1fee7a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -179,24 +179,29 @@ if(USE_FREETYPE) + endif(USE_FREETYPE) + + +-find_library(LUA_LIBRARY luajit +- NAMES luajit-5.1) +-find_path(LUA_INCLUDE_DIR luajit.h +- NAMES luajit.h +- PATH_SUFFIXES luajit-2.0) +-message (STATUS "LuaJIT library: ${LUA_LIBRARY}") +-message (STATUS "LuaJIT headers: ${LUA_INCLUDE_DIR}") ++option(USE_LUAJIT "Use luajit instead of lua" OFF) + + set(USE_LUAJIT 0) +-if(LUA_LIBRARY AND LUA_INCLUDE_DIR) +- message (STATUS "LuaJIT found.") +- set(USE_LUAJIT 1) +-else(LUA_LIBRARY AND LUA_INCLUDE_DIR) +- message (STATUS "LuaJIT not found, using bundled Lua.") +- set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") +- set(LUA_LIBRARY "lua") +- add_subdirectory(lua) +-endif(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++if(USE_LUAJIT) ++ find_library(LUA_LIBRARY luajit ++ NAMES luajit-5.1) ++ find_path(LUA_INCLUDE_DIR luajit.h ++ NAMES luajit.h ++ PATH_SUFFIXES luajit-2.0) ++ if(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++ message (STATUS "LuaJIT found") ++ set(USE_LUAJIT 1) ++ else(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++ message (FATAL_ERROR "LuaJIT not found!") ++ endif(LUA_LIBRARY AND LUA_INCLUDE_DIR) ++else(USE_LUAJIT) ++ find_package(Lua51) ++ if(LUA51_FOUND) ++ message (STATUS "Lua51 found") ++ else(LUA51_FOUND) ++ message (FATAL_ERROR "Lua51 not found!") ++ endif(LUA51_FOUND) ++endif(USE_LUAJIT) + + mark_as_advanced(LUA_LIBRARY) + mark_as_advanced(LUA_INCLUDE_DIR) diff --git a/games-action/minetest/files/minetest-0.4.9-opengles.patch b/games-action/minetest/files/minetest-0.4.9-opengles.patch new file mode 100644 index 0000000..eebfe28 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-opengles.patch @@ -0,0 +1,163 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Fri Nov 29 19:34:37 UTC 2013 + +This patch is currently not needed in this form, because gentoo irrlicht +does not yet have gles2 support. However this will be needed +once it does, so we can add a gles2 useflag. + +Also fixes +https://bugs.gentoo.org/show_bug.cgi?id=492804 + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -7,6 +7,7 @@ + mark_as_advanced(JSON_INCLUDE_DIR JSON_LIBRARY) + + option(ENABLE_CURL "Enable cURL support for fetching media" 1) ++option(ENABLE_GLES2 "Enable GLES2 support with irrlicht" 0) + + if (NOT ENABLE_CURL) + mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR) +@@ -170,7 +171,10 @@ + + find_package(Sqlite3 REQUIRED) + find_package(Json REQUIRED) +-find_package(OpenGLES2) ++if(ENABLE_GLES2 AND BUILD_CLIENT) ++ find_package(OpenGLES2 REQUIRED) ++ add_definitions( -DWITH_GLES2 ) ++endif(ENABLE_GLES2 AND BUILD_CLIENT) + + if(USE_FREETYPE) + find_package(Freetype REQUIRED) +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -1331,10 +1331,12 @@ + else if(driverstring == "ogles1") + driverType = video::EDT_OGLES1; + #endif ++#ifdef WITH_GLES2 + #ifdef _IRR_COMPILE_WITH_OGLES2_ + else if(driverstring == "ogles2") + driverType = video::EDT_OGLES2; + #endif ++#endif + else + { + errorstream<<"WARNING: Invalid video_driver specified; defaulting " +--- a/cmake/Modules/FindOpenGLES2.cmake ++++ b/cmake/Modules/FindOpenGLES2.cmake +@@ -19,6 +19,7 @@ + # win32, apple, android NOT TESED + # linux tested and works + ++ + IF (WIN32) + IF (CYGWIN) + +@@ -47,51 +48,57 @@ + + ELSE(APPLE) + +- FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h +- /usr/openwin/share/include +- /opt/graphics/OpenGL/include /usr/X11R6/include +- /usr/include +- ) +- +- FIND_LIBRARY(OPENGLES2_gl_LIBRARY +- NAMES GLESv2 +- PATHS /opt/graphics/OpenGL/lib ++ # prefer pkg-config ++ INCLUDE(FindPkgConfig) ++ IF (PKG_CONFIG_FOUND) ++ pkg_check_modules(OPENGLES2 QUIET glesv2 egl) ++ ELSE (PKG_CONFIG_FOUND) ++ FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h ++ /usr/openwin/share/include ++ /opt/graphics/OpenGL/include /usr/X11R6/include ++ /usr/include ++ ) ++ ++ FIND_LIBRARY(OPENGLES2_gl_LIBRARY ++ NAMES GLESv2 ++ PATHS /opt/graphics/OpenGL/lib + /usr/openwin/lib + /usr/shlib /usr/X11R6/lib + /usr/lib +- ) ++ ) + +- IF (NOT BUILD_ANDROID) +- FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h +- /usr/openwin/share/include +- /opt/graphics/OpenGL/include /usr/X11R6/include +- /usr/include +- ) +- +- FIND_LIBRARY(EGL_egl_LIBRARY +- NAMES EGL +- PATHS /opt/graphics/OpenGL/lib +- /usr/openwin/lib +- /usr/shlib /usr/X11R6/lib +- /usr/lib +- ) +- +- # On Unix OpenGL most certainly always requires X11. +- # Feel free to tighten up these conditions if you don't +- # think this is always true. +- # It's not true on OSX. +- +- IF (OPENGLES2_gl_LIBRARY) +- IF(NOT X11_FOUND) +- INCLUDE(FindX11) +- ENDIF(NOT X11_FOUND) +- IF (X11_FOUND) +- IF (NOT APPLE) +- SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES}) +- ENDIF (NOT APPLE) +- ENDIF (X11_FOUND) +- ENDIF (OPENGLES2_gl_LIBRARY) +- ENDIF () ++ IF (NOT BUILD_ANDROID) ++ FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h ++ /usr/openwin/share/include ++ /opt/graphics/OpenGL/include /usr/X11R6/include ++ /usr/include ++ ) ++ ++ FIND_LIBRARY(EGL_egl_LIBRARY ++ NAMES EGL ++ PATHS /opt/graphics/OpenGL/lib ++ /usr/openwin/lib ++ /usr/shlib /usr/X11R6/lib ++ /usr/lib ++ ) ++ ++ # On Unix OpenGL most certainly always requires X11. ++ # Feel free to tighten up these conditions if you don't ++ # think this is always true. ++ # It's not true on OSX. ++ ++ IF (OPENGLES2_gl_LIBRARY) ++ IF(NOT X11_FOUND) ++ INCLUDE(FindX11) ++ ENDIF(NOT X11_FOUND) ++ IF (X11_FOUND) ++ IF (NOT APPLE) ++ SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES}) ++ ENDIF (NOT APPLE) ++ ENDIF (X11_FOUND) ++ ENDIF (OPENGLES2_gl_LIBRARY) ++ ENDIF (NOT BUILD_ANDROID) ++ ENDIF (PKG_CONFIG_FOUND) + + ENDIF(APPLE) + ENDIF (WIN32) +@@ -126,5 +133,5 @@ + IF(OPENGLES2_FOUND) + MESSAGE(STATUS "Found system opengles2 library ${OPENGLES2_LIBRARIES}") + ELSE () +- SET(OPENGLES2_LIBRARIES "") ++ MESSAGE(FATAL_ERROR "OpenGLES2 not found!") + ENDIF () diff --git a/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch b/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch new file mode 100644 index 0000000..b552c09 --- /dev/null +++ b/games-action/minetest/files/minetest-0.4.9-shared-irrlicht.patch @@ -0,0 +1,23 @@ +commit 11d35e62fe13b47c5b34139559e650dfe6ebbd84 +Author: hasufell <julian.ospald@googlemail.com> +Date: Sat Jun 8 13:40:30 2013 +0200 + + CMAKE: use shared lib from Irrlicht + +diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake +index bd00422..4632993 100644 +--- a/cmake/Modules/FindIrrlicht.cmake ++++ b/cmake/Modules/FindIrrlicht.cmake +@@ -50,10 +50,11 @@ else() + /usr/include/irrlicht + ) + +- FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.a Irrlicht ++ FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.so Irrlicht + PATHS + /usr/local/lib + /usr/lib ++ /usr/lib64 + ) + endif() + diff --git a/games-action/minetest/files/minetest_redis.patch b/games-action/minetest/files/minetest_redis.patch new file mode 100644 index 0000000..1390afe --- /dev/null +++ b/games-action/minetest/files/minetest_redis.patch @@ -0,0 +1,13 @@ +diff --git a/src/database-redis.cpp b/src/database-redis.cpp +index b086f89..d64064c 100644 +--- a/src/database-redis.cpp ++++ b/src/database-redis.cpp +@@ -98,7 +98,7 @@ bool Database_Redis::saveBlock(v3s16 blockpos, std::string &data) + + if (reply->type == REDIS_REPLY_ERROR) { + errorstream << "WARNING: saveBlock: saving block " << PP(blockpos) +- << "failed" << std::endl; ++ << " failed: " << reply->str << std::endl; + freeReplyObject(reply); + return false; + } diff --git a/games-action/minetest/files/minetestserver.confd b/games-action/minetest/files/minetestserver.confd new file mode 100644 index 0000000..ec3d013 --- /dev/null +++ b/games-action/minetest/files/minetestserver.confd @@ -0,0 +1,16 @@ +# /etc/conf.d/minetest-server: config file for /etc/init.d/minetest-server + +# user +USER="minetest" + +# group +GROUP="@GROUP@" + +# pidfile +PIDFILE="/var/run/minetest.pid" + +# executable +MINETESTBIN="@BINDIR@/minetestserver" + +# additional arguments for the server +ARGS="--logfile /var/lib/minetest/minetest-server.log" diff --git a/games-action/minetest/files/minetestserver.initd b/games-action/minetest/files/minetestserver.initd new file mode 100644 index 0000000..e0a33d9 --- /dev/null +++ b/games-action/minetest/files/minetestserver.initd @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +description="Minetest dedicated server" + +depend() { + need net +} + +start() { + ebegin "starting server" + start-stop-daemon \ + --start \ + --quiet \ + --make-pidfile \ + --pidfile "${PIDFILE}" \ + --background \ + --user ${USER} \ + --group ${GROUP} \ + --exec "${MINETESTBIN}" -- ${ARGS} + + eend $? +} + +stop() { + ebegin "stopping server" + start-stop-daemon \ + --stop \ + --signal 15 \ + --quiet \ + --pidfile "${PIDFILE}" + + eend $? +} diff --git a/games-action/minetest/metadata.xml b/games-action/minetest/metadata.xml new file mode 100644 index 0000000..351ab36 --- /dev/null +++ b/games-action/minetest/metadata.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>hasufell@gentoo.org</email> + <name>Julian Ospald</name> + </maintainer> + <longdescription lang="en"> + Minetest is an infinite-world block sandbox game and a game + engine, inspired by InfiniMiner, Minecraft and the like. It has + been in development and use since October 2010. + + It is Free and Open Source Software, released under the LGPL 2.1 + or later, available for Windows, Mac OS X and Linux. + + Minetest is developed by a random bunch of lunatics. + + Minetest is designed to be simple, stable and portable. It is + lightweight enough to run on fairly old hardware. It currently + runs playably on a laptop with Intel 945GM graphics. Though, as + for the CPU, dualcore is recommended. + + Features + * Walk around, dig and build in an infinite voxel world, + and craft stuff from raw materials to help you along the way. + * Simplistic Modding API that supports many kinds of additions + and modifications to the game. + * Multiplayer support for tens of players, via servers hosted by + users. + * Voxel based lighting with gameplay consequences + (light caves and buildings with torches) + * Almost infinite world and a beautiful map generator. + * Runs natively on Windows, Linux, OS X and FreeBSD. + * Supports multiple languages, translated by the community. + </longdescription> + <use> + <flag name="leveldb">Enable LevelDB backend</flag> + <flag name="server">Build minetest server</flag> + </use> + <upstream> + <bugs-to>https://github.com/minetest/minetest/issues</bugs-to> + <doc lang="en">http://wiki.minetest.net/Main_Page</doc> + <remote-id type="github">minetest/minetest</remote-id> + </upstream> +</pkgmetadata> diff --git a/games-action/minetest/minetest-0.4.10-r2.ebuild b/games-action/minetest/minetest-0.4.10-r2.ebuild new file mode 100644 index 0000000..e865c4b --- /dev/null +++ b/games-action/minetest/minetest-0.4.10-r2.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-action/minetest/minetest-0.4.10-r2.ebuild,v 1.1 2014/09/25 20:13:59 hasufell Exp $ + +EAPI=5 +inherit eutils cmake-utils gnome2-utils vcs-snapshot user games + +DESCRIPTION="An InfiniMiner/Minecraft inspired game" +HOMEPAGE="http://minetest.net/" +SRC_URI="http://github.com/minetest/minetest/tarball/${PV} -> ${P}.tar.gz" + +LICENSE="LGPL-2.1+ CC-BY-SA-3.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+curl dedicated leveldb luajit nls redis +server +sound +truetype" + +RDEPEND="dev-db/sqlite:3 + sys-libs/zlib + curl? ( net-misc/curl ) + !dedicated? ( + app-arch/bzip2 + >=dev-games/irrlicht-1.8-r2 + media-libs/libpng:0 + virtual/jpeg + virtual/opengl + x11-libs/libX11 + x11-libs/libXxf86vm + sound? ( + media-libs/libogg + media-libs/libvorbis + media-libs/openal + ) + truetype? ( media-libs/freetype:2 ) + ) + leveldb? ( dev-libs/leveldb ) + luajit? ( dev-lang/luajit:2 ) + nls? ( virtual/libintl ) + redis? ( dev-libs/hiredis )" +DEPEND="${RDEPEND} + >=dev-games/irrlicht-1.8-r2 + nls? ( sys-devel/gettext )" + +pkg_setup() { + games_pkg_setup + + if use server || use dedicated ; then + enewuser ${PN} -1 -1 /var/lib/${PN} ${GAMES_GROUP} + fi +} + +src_unpack() { + vcs-snapshot_src_unpack +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-shared-irrlicht.patch \ + "${FILESDIR}"/${P}-as-needed.patch + + # correct gettext behavior + if [[ -n "${LINGUAS+x}" ]] ; then + for i in $(cd po ; echo *) ; do + if ! has ${i} ${LINGUAS} ; then + rm -r po/${i} || die + fi + done + fi + + # jthread is modified + # json is modified + rm -r src/sqlite || die + + # set paths + sed \ + -e "s#@BINDIR@#${GAMES_BINDIR}#g" \ + -e "s#@GROUP@#${GAMES_GROUP}#g" \ + "${FILESDIR}"/minetestserver.confd > "${T}"/minetestserver.confd || die +} + +src_configure() { + local mycmakeargs=( + $(usex dedicated "-DBUILD_SERVER=ON -DBUILD_CLIENT=OFF" "$(cmake-utils_use_build server SERVER) -DBUILD_CLIENT=ON") + -DCUSTOM_BINDIR="${GAMES_BINDIR}" + -DCUSTOM_DOCDIR="/usr/share/doc/${PF}" + -DCUSTOM_LOCALEDIR="/usr/share/locale" + -DCUSTOM_SHAREDIR="${GAMES_DATADIR}/${PN}" + $(cmake-utils_use_enable curl CURL) + $(cmake-utils_use_enable truetype FREETYPE) + $(cmake-utils_use_enable nls GETTEXT) + -DENABLE_GLES=0 + $(cmake-utils_use_enable leveldb LEVELDB) + $(cmake-utils_use_enable redis REDIS) + $(cmake-utils_use_enable sound SOUND) + $(cmake-utils_use !luajit DISABLE_LUAJIT) + -DRUN_IN_PLACE=0 + $(use dedicated && { + echo "-DIRRLICHT_SOURCE_DIR=/the/irrlicht/source" + echo "-DIRRLICHT_INCLUDE_DIR=/usr/include/irrlicht" + }) + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + + if use server || use dedicated ; then + newinitd "${FILESDIR}"/minetestserver.initd minetest-server + newconfd "${T}"/minetestserver.confd minetest-server + fi + + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update + + if ! use dedicated ; then + elog + elog "optional dependencies:" + elog " games-action/minetest_game (official mod)" + elog + fi + + if use server || use dedicated ; then + elog + elog "Configure your server via /etc/conf.d/minetest-server" + elog "The user \"minetest\" is created with /var/lib/${PN} homedir." + elog "Default logfile is ~/minetest-server.log" + elog + fi +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/games-action/minetest/minetest-scm.ebuild b/games-action/minetest/minetest-scm.ebuild new file mode 100644 index 0000000..5a564a8 --- /dev/null +++ b/games-action/minetest/minetest-scm.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +inherit eutils cmake-utils git-2 gnome2-utils vcs-snapshot user games + +DESCRIPTION="An InfiniMiner/Minecraft inspired game" +HOMEPAGE="http://minetest.net/" +EGIT_REPO_URI="git://github.com/minetest/${PN}.git" + +LICENSE="LGPL-2.1+ CC-BY-SA-3.0" +SLOT="0" +KEYWORDS="" +IUSE="+curl dedicated gles leveldb luajit nls redis server +sound +truetype" + +RDEPEND="dev-db/sqlite:3 + >=dev-games/irrlicht-1.8-r2 + !luajit? ( >=dev-lang/lua-5.1.4 ) + sys-libs/zlib + curl? ( net-misc/curl ) + !dedicated? ( + app-arch/bzip2 + media-libs/libpng:0 + virtual/jpeg + virtual/opengl + x11-libs/libX11 + x11-libs/libXxf86vm + sound? ( + media-libs/libogg + media-libs/libvorbis + media-libs/openal + ) + truetype? ( media-libs/freetype:2 ) + ) + leveldb? ( dev-libs/leveldb ) + luajit? ( dev-lang/luajit:2.1 ) + redis? ( + dev-db/redis + dev-libs/hiredis + ) + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +pkg_setup() { + games_pkg_setup + + if use server || use dedicated ; then + enewuser ${PN} -1 -1 /var/lib/${PN} ${GAMES_GROUP} + fi +} + +src_unpack() { + git-2_src_unpack +} + +src_prepare() { + # set paths + sed \ + -e "s#@BINDIR@#${GAMES_BINDIR}#g" \ + -e "s#@GROUP@#${GAMES_GROUP}#g" \ + "${FILESDIR}"/minetestserver.confd > "${T}"/minetestserver.confd || die +} + +src_configure() { + local mycmakeargs=( + -DRUN_IN_PLACE=0 + -DCUSTOM_SHAREDIR="${GAMES_DATADIR}/${PN}" + -DCUSTOM_BINDIR="${GAMES_BINDIR}" + -DCUSTOM_DOCDIR="/usr/share/doc/${PF}" + -DCUSTOM_LOCALEDIR="/usr/share/locale" + $(usex dedicated "-DBUILD_SERVER=ON -DBUILD_CLIENT=OFF" "$(cmake-utils_use_build server SERVER) -DBUILD_CLIENT=ON") + $(cmake-utils_use_enable nls GETTEXT) + $(cmake-utils_use_enable curl CURL) + $(cmake-utils_use_enable truetype FREETYPE) + $(cmake-utils_use_enable sound SOUND) + $(cmake-utils_use_enable leveldb LEVELDB) + $(cmake-utils_use_enable redis REDIS) + $(cmake-utils_use_enable gles GLES) + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + + if use server || use dedicated ; then + newinitd "${FILESDIR}"/minetestserver.initd minetest-server + newconfd "${T}"/minetestserver.confd minetest-server + fi + + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update + + if ! use dedicated ; then + elog + elog "optional dependencies:" + elog " games-action/minetest_game (official mod)" + elog " games-action/minetest_common (official mod)" + elog " games-action/minetest_build (official mod)" + elog " games-action/minetest_survival (official mod)" + elog + fi + + if use server || use dedicated ; then + elog + elog "Configure your server via /etc/conf.d/minetest-server" + elog "The user \"minetest\" is created with /var/lib/${PN} homedir." + elog "Default logfile is ~/minetest-server.log" + elog + fi +} + +pkg_postrm() { + gnome2_icon_cache_update +} |