Permalink
Browse files

add minetest

  • Loading branch information...
1 parent a46f8a4 commit 9db3f38f69d2064b3e7724a56f40f9b7740b5b09 hasufell committed May 8, 2012
@@ -0,0 +1,6 @@
+AUX minetest-0.4_pre20120408-cmake.patch 1018 RMD160 e882484be3a954d78ce52464613c188b9fe2b001 SHA1 c2caaf1b476777cbab0b0f1bb875a1706e5b93b5 SHA256 a6e4841a0e80d374e7de1b246a67c2f5a8e01c1c1314bc5cd6e159a868bdbe3e
+AUX minetest-0.4_pre20120408-jthread.patch 542 RMD160 efd2bbc94eb63ba677ac0220c219cfd6a82c7914 SHA1 61a13450a07b90dab7717f474946e0f3412f887a SHA256 96edf9eeb389f7ecc2fb73e782b557ea7f7e3ccf24bad998080601cb92dafaf7
+AUX minetest-0.4_pre20120408-lua.patch 742 RMD160 70bdeb015a46b8da30551e9356c599d83be8d718 SHA1 87358b6b21f2cefd61e0fcd0bfb27f278356deca SHA256 716dbf527ea767c24767dbd40beb78f0442baac76ae6f9b01e74685d8aa75f8a
+AUX minetest-0.4_pre20120408-sharepath.patch 845 RMD160 cae00430fb929b52ed20bd98b1abc50d2b3741cd SHA1 ab234ee137af8ac1a0f594dc07275d6f65333793 SHA256 c11fee414de62269234a9284cb87b7f43d6b9b2d1b3d4e6a9264e6d0c70a0134
+EBUILD minetest-0.4_pre20120408.ebuild 1285 RMD160 ded2eac9edf46b057322a3b33a3ac200b1f18b79 SHA1 aa8110c683b6cff5c428c09fddba3a24ef7b620e SHA256 ae9534db64ed42eb85b44b653eed61b7899ddd000722724b81365ef257ff80ce
+MISC metadata.xml 384 RMD160 365e70f94c35d43e60aa2f84cf68b546af2e4f67 SHA1 301446b795de3cea0fc799ae9e2c7d1a55f3c544 SHA256 e6061ee2004b17a02706acc062fa522ae07ce615c0d74a47712b562ebb7b9f25
@@ -0,0 +1,31 @@
+From: Julian Ospald <julian.ospald@googlemail.com>
+Date: Tue Apr 3 03:33:30 UTC 2012
+
+make install-paths modifiable
+prepend "CMAKE_INSTALL_PREFIX" to SHAREDIR for proper variable substitution
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -73,14 +73,14 @@
+ set(ICONDIR "unix/icons")
+ set(LOCALEDIR "locale")
+ else()
+- set(SHAREDIR "share/${PROJECT_NAME}")
+- set(BINDIR "bin")
+- set(DOCDIR "share/doc/${PROJECT_NAME}")
+- set(MANDIR "share/man")
+- set(EXAMPLE_CONF_DIR ${DOCDIR})
+- set(XDG_APPS_DIR "share/applications")
+- set(ICONDIR "share/icons")
+- set(LOCALEDIR "share/locale")
++ set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}" CACHE PATH "")
++ set(BINDIR "bin" CACHE PATH "")
++ set(DOCDIR "share/doc/${PROJECT_NAME}" CACHE PATH "")
++ set(MANDIR "share/man" CACHE PATH "")
++ set(EXAMPLE_CONF_DIR ${DOCDIR} CACHE PATH "")
++ set(XDG_APPS_DIR "share/applications" CACHE PATH "")
++ set(ICONDIR "share/icons" CACHE PATH "")
++ set(LOCALEDIR "share/locale" CACHE PATH "")
+ endif()
+ endif()
+
@@ -0,0 +1,18 @@
+From: hasufell <julian.ospald@googlemail.com>
+Date: Mon Apr 23 21:34:29 UTC 2012
+
+fix FIND_PATH to correctly find jthread
+
+--- cmake/Modules/FindJthread.cmake
++++ cmake/Modules/FindJthread.cmake
+@@ -1,8 +1,8 @@
+ # Look for jthread, use our own if not found
+
+-FIND_PATH(JTHREAD_INCLUDE_DIR jthread.h)
++FIND_PATH(JTHREAD_INCLUDE_DIR jthread.h PATHS /usr/include/jthread)
+
+-FIND_LIBRARY(JTHREAD_LIBRARY NAMES jthread)
++FIND_LIBRARY(JTHREAD_LIBRARY NAMES libjthread.a)
+
+ IF(JTHREAD_LIBRARY AND JTHREAD_INCLUDE_DIR)
+ SET( JTHREAD_FOUND TRUE )
@@ -0,0 +1,33 @@
+From: hasufell <julian.ospald@googlemail.com>
+Date: Mon Apr 23 21:34:29 UTC 2012
+
+use pkgconfig for lua detection
+
+--- src/CMakeLists.txt
++++ src/CMakeLists.txt
+@@ -144,10 +144,8 @@
+
+ find_package(Jthread REQUIRED)
+ find_package(Sqlite3 REQUIRED)
+-
+-# TODO: Create proper find script for Lua
+-set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src")
+-set(LUA_LIBRARY "lua")
++find_package(Lua51 REQUIRED)
++
+
+ configure_file(
+ "${PROJECT_SOURCE_DIR}/cmake_config.h.in"
+@@ -476,9 +474,9 @@
+ add_subdirectory(sqlite)
+ endif (SQLITE3_FOUND)
+
+-if (LUA_FOUND)
+-else (LUA_FOUND)
++if (LUA_LIBRARY AND LUA_INCLUDE_DIR)
++else (LUA_LIBRARY AND LUA_INCLUDE_DIR)
+ add_subdirectory(lua)
+-endif (LUA_FOUND)
++endif (LUA_LIBRARY AND LUA_INCLUDE_DIR)
+
+ #end
@@ -0,0 +1,27 @@
+From: Julian Ospald <julian.ospald@googlemail.com>
+Date: Tue Apr 3 03:33:30 UTC 2012
+
+make path_share look explicitly in SHAREDIR instead of potentially-broken
+relative path
+
+--- src/porting.cpp
++++ src/porting.cpp
+@@ -244,7 +244,7 @@
+
+ pathRemoveFile(buf, '/');
+
+- path_share = std::string(buf) + "/../share/" + PROJECT_NAME;
++ path_share = std::string(SHAREDIR);
+ //path_share = std::string(INSTALL_PREFIX) + "/share/" + PROJECT_NAME;
+ if (!fs::PathExists(path_share)) {
+ dstream<<"WARNING: system-wide share not found at \""<<path_share<<"\"";
+--- src/cmake_config.h.in
++++ src/cmake_config.h.in
+@@ -4,6 +4,7 @@
+ #define CMAKE_CONFIG_H
+
+ #define CMAKE_PROJECT_NAME "@PROJECT_NAME@"
++#define SHAREDIR "@SHAREDIR@"
+ #define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
+ #define CMAKE_VERSION_STRING "@VERSION_STRING@"
+ #ifdef NDEBUG
@@ -0,0 +1,15 @@
+<?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>hasufell</name>
+ </maintainer>
+ <use>
+ <flag name="client">Minetest client</flag>
+ <flag name="server">Minetest server</flag>
+ </use>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils cmake-utils git-2 games
+
+DESCRIPTION="Building single/multiplayer game (engine)"
+HOMEPAGE="http://c55.me/minetest/"
+SRC_URI=""
+
+EGIT_REPO_URI="git://github.com/celeron55/${PN}.git"
+EGIT_COMMIT="${PV%_pre*}.dev-${PV#*_pre}"
+
+LICENSE="GPL-2 CCPL-Attribution-ShareAlike-3.0"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="+client nls +server"
+
+RDEPEND="app-arch/bzip2
+ dev-db/sqlite:3
+ dev-lang/lua
+ >=dev-libs/jthread-1.2
+ media-libs/libpng:0
+ media-libs/libvorbis
+ sys-libs/zlib
+ x11-libs/libX11
+ x11-libs/libXxf86vm
+ virtual/jpeg
+ virtual/opengl
+ nls? ( virtual/libintl )
+ "
+DEPEND="${RDEPEND}
+ >=dev-games/irrlicht-1.7
+ nls? ( sys-devel/gettext )
+ "
+
+src_unpack() {
+ git-2_src_unpack
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-{cmake,jthread,lua,sharepath}.patch
+ rm -r src/{jthread,lua,sqlite} || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DRUN_IN_PLACE=0
+ -DSHAREDIR="${GAMES_DATADIR}/${PN}"
+ -DBINDIR="${GAMES_BINDIR}"
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_enable nls GETTEXT)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ prepgamesdirs
+}
@@ -0,0 +1,2 @@
+EBUILD minetest_game-0.4_pre20120408.ebuild 657 RMD160 73d0fe6962f4ac53d4545471e3c85eb8c427fdc0 SHA1 f16004c4d32702c08bac35058ebef32e81ba9cdb SHA256 3cc71d32f6b6e6c2c3767237559cf2a0a543daf0bfb1d2ff3281e1c30fcc0d4d
+MISC metadata.xml 229 RMD160 1948180390491dceb37b15031ac3364cd36a0aed SHA1 259556c6c8c0ae2559803d3fc9e2797d6c24610b SHA256 770b9a8d57d60f3ed3a960db8dc5b87dff2a488d5ce41dcc8aad0b3dbbe6241c
@@ -0,0 +1,8 @@
+<?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>hasufell</name>
+ </maintainer>
+</pkgmetadata>
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit git-2 games
+
+DESCRIPTION="Building single/multiplayer game (game)"
+HOMEPAGE="http://c55.me/minetest/"
+SRC_URI=""
+
+EGIT_REPO_URI="git://github.com/celeron55/${PN}.git"
+EGIT_COMMIT="${PV%_pre*}.dev-${PV#*_pre}"
+
+LICENSE="GPL-2 CCPL-Attribution-ShareAlike-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="games-action/minetest"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ git-2_src_unpack
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/${PN%_game}/games/${PN}
+ doins -r mods || die
+ doins game.conf || die
+
+ prepgamesdirs
+}

0 comments on commit 9db3f38

Please sign in to comment.