summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-01-21 14:44:38 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-01-21 14:44:38 +0300
commitc8c79eff1a5aec920109218066a42d953ab6a54b (patch)
treed42a7b30e841cf323003707edf6056b7c444c101
parent6eb777005ba6970aad9382c8b62d36caf23106f6 (diff)
megaglest
-rw-r--r--games-strategy/megaglest-data/megaglest-data-3.13.0.ebuild39
-rw-r--r--games-strategy/megaglest-data/metadata.xml9
-rw-r--r--games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch62
-rw-r--r--games-strategy/megaglest/megaglest-3.13.0.ebuild161
-rw-r--r--games-strategy/megaglest/metadata.xml37
5 files changed, 308 insertions, 0 deletions
diff --git a/games-strategy/megaglest-data/megaglest-data-3.13.0.ebuild b/games-strategy/megaglest-data/megaglest-data-3.13.0.ebuild
new file mode 100644
index 0000000..1a7f30d
--- /dev/null
+++ b/games-strategy/megaglest-data/megaglest-data-3.13.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2014-2016 Julian Ospald <hasufell@posteo.de>
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Data files for the cross-platform 3D realtime strategy game MegaGlest"
+HOMEPAGE="http://www.megaglest.org/"
+SRC_URI="https://github.com/MegaGlest/megaglest-data/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="~games-strategy/megaglest-${PV}"
+
+DOCS=( docs/AUTHORS.data.txt docs/CHANGELOG.txt docs/README.txt )
+
+src_configure() {
+ local mycmakeargs=(
+ -DMEGAGLEST_BIN_INSTALL_PATH=/usr/bin
+ -DMEGAGLEST_DATA_INSTALL_PATH=/usr/share/megaglest
+ -DMEGAGLEST_ICON_INSTALL_PATH=/usr/share/pixmaps
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ use doc && HTML_DOCS="docs/glest_factions/"
+
+ cmake-utils_src_install
+}
+
diff --git a/games-strategy/megaglest-data/metadata.xml b/games-strategy/megaglest-data/metadata.xml
new file mode 100644
index 0000000..c58b187
--- /dev/null
+++ b/games-strategy/megaglest-data/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hasufell@posteo.de</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch b/games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch
new file mode 100644
index 0000000..112cb41
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch
@@ -0,0 +1,62 @@
+From ff8704854ddf4b931ac1f1e27dee8a440ef07e75 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sat, 10 Oct 2015 23:00:06 +0200
+Subject: [PATCH] Fix build with >=cmake-3.2
+
+The FindOpenGL module no longer pulls in X11 libraries.
+---
+ source/g3d_viewer/CMakeLists.txt | 3 ++-
+ source/glest_game/CMakeLists.txt | 3 ++-
+ source/shared_lib/CMakeLists.txt | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/source/g3d_viewer/CMakeLists.txt b/source/g3d_viewer/CMakeLists.txt
+index 9e3cd5c..456092f 100644
+--- a/source/g3d_viewer/CMakeLists.txt
++++ b/source/g3d_viewer/CMakeLists.txt
+@@ -16,8 +16,9 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER)
+ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${SDL_LIBRARY})
+
+ FIND_PACKAGE(OpenGL REQUIRED)
++ FIND_PACKAGE(X11 REQUIRED)
+ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
+- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY} ${X11_LIBRARIES})
+
+ FIND_PACKAGE(GLEW REQUIRED)
+ INCLUDE_DIRECTORIES(${GLEW_INCLUDE_PATH})
+diff --git a/source/glest_game/CMakeLists.txt b/source/glest_game/CMakeLists.txt
+index 9b6025d..312ee07 100644
+--- a/source/glest_game/CMakeLists.txt
++++ b/source/glest_game/CMakeLists.txt
+@@ -36,9 +36,10 @@ IF(BUILD_MEGAGLEST)
+ ENDIF()
+
+ FIND_PACKAGE(OpenGL REQUIRED)
++ FIND_PACKAGE(X11 REQUIRED)
+ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
+ IF(UNIX)
+- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY} ${X11_LIBRARIES})
+ ENDIF()
+
+ IF(WANT_XERCES)
+diff --git a/source/shared_lib/CMakeLists.txt b/source/shared_lib/CMakeLists.txt
+index 9a4c7c9..8034e37 100644
+--- a/source/shared_lib/CMakeLists.txt
++++ b/source/shared_lib/CMakeLists.txt
+@@ -90,9 +90,10 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
+ ENDIF()
+
+ FIND_PACKAGE(OpenGL REQUIRED)
++ FIND_PACKAGE(X11 REQUIRED)
+ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
+ IF(UNIX)
+- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY} ${X11_LIBRARIES})
+ ENDIF()
+
+
+--
+2.6.0
+
diff --git a/games-strategy/megaglest/megaglest-3.13.0.ebuild b/games-strategy/megaglest/megaglest-3.13.0.ebuild
new file mode 100644
index 0000000..bea9109
--- /dev/null
+++ b/games-strategy/megaglest/megaglest-3.13.0.ebuild
@@ -0,0 +1,161 @@
+# Copyright 2014-2016 Julian Ospald <hasufell@posteo.de>
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# google-breakpad
+# TODO: fribidi, libvorbis static
+
+EAPI=5
+VIRTUALX_REQUIRED="manual"
+inherit eutils flag-o-matic cmake-utils virtualx wxwidgets gnome2-utils
+
+DESCRIPTION="Cross-platform 3D realtime strategy game"
+HOMEPAGE="http://www.megaglest.org/"
+SRC_URI="https://github.com/MegaGlest/megaglest-source/releases/download/${PV}/megaglest-source-${PV}.tar.xz"
+
+LICENSE="GPL-3 BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 +editor +fontconfig fribidi +ftgl +irc libressl static +streflop +tools +unicode wxuniversal +model-viewer videos +xml"
+
+RDEPEND="
+ >=dev-lang/lua-5.1
+ fontconfig? ( media-libs/fontconfig )
+ media-libs/freetype
+ media-libs/libsdl2[X,haptic,sound,joystick,opengl,video]
+ media-libs/libvorbis
+ media-libs/openal
+ sys-libs/zlib
+ virtual/opengl
+ virtual/glu
+ x11-libs/libX11
+ editor? ( x11-libs/wxGTK:2.8[X,opengl] )
+ fribidi? ( dev-libs/fribidi )
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ model-viewer? ( x11-libs/wxGTK:2.8[X] )
+ !static? (
+ dev-libs/xerces-c[icu]
+ ftgl? ( media-libs/ftgl )
+ media-libs/glew
+ media-libs/libpng:0
+ irc? ( net-libs/libircclient )
+ net-misc/curl
+ virtual/jpeg:0
+ net-libs/miniupnpc
+ )
+ videos? ( media-video/vlc )
+ xml? ( dev-libs/xerces-c )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ editor? ( ${VIRTUALX_DEPEND} )
+ model-viewer? ( ${VIRTUALX_DEPEND} )
+ static? (
+ dev-libs/icu[static-libs]
+ dev-libs/xerces-c[icu,static-libs]
+ ftgl? ( media-libs/ftgl[static-libs] )
+ media-libs/glew[static-libs]
+ media-libs/libpng:0[static-libs]
+ irc? ( net-libs/libircclient[static-libs] )
+ net-misc/curl[static-libs]
+ virtual/jpeg:0[static-libs]
+ net-libs/miniupnpc[static-libs]
+ )"
+PDEPEND="~games-strategy/${PN}-data-${PV}"
+
+src_prepare() {
+ if use editor || use model-viewer ; then
+ WX_GTK_VER="2.8"
+ need-wxwidgets unicode
+ fi
+
+ epatch "${FILESDIR}"/${PN}-3.11.1-cmake.patch
+}
+
+src_configure() {
+ if use cpu_flags_x86_sse3; then
+ SSE=3
+ elif use cpu_flags_x86_sse2; then
+ SSE=2
+ elif use cpu_flags_x86_sse; then
+ SSE=1
+ else
+ SSE=0
+ fi
+
+ local mycmakeargs=(
+ -DBUILD_MEGAGLEST_MAP_EDITOR="$(usex editor)"
+ -DBUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS="$(usex tools)"
+ -DBUILD_MEGAGLEST_MODEL_VIEWER="$(usex model-viewer)"
+ -DCUSTOM_DATA_INSTALL_PATH="/usr/share/${PN}/"
+ -DFORCE_MAX_SSE_LEVEL="${SSE}"
+ -DWANT_GIT_STAMP=OFF
+ -DWANT_STATIC_LIBS="$(usex static)"
+ -DWANT_USE_FTGL="$(usex ftgl)"
+ -DWANT_USE_FontConfig="$(usex ftgl)"
+ -DWANT_USE_FriBiDi="$(usex fribidi)"
+ -DWANT_USE_GoogleBreakpad=OFF
+ -DWANT_USE_Ircclient="$(usex irc)"
+ -DWANT_USE_STREFLOP="$(usex streflop)"
+ -DWANT_USE_VLC="$(usex videos)"
+ -DWANT_USE_XercesC="$(usex xml)"
+ -DwxWidgets_USE_STATIC="$(usex static)"
+ -DwxWidgets_USE_UNICODE="$(usex unicode)"
+ -DwxWidgets_USE_UNIVERSAL="$(usex wxuniversal)"
+ )
+
+ # support CMAKE_BUILD_TYPE=Gentoo
+ append-cppflags '-DCUSTOM_DATA_INSTALL_PATH=\\\"'/usr/share/${PN}/'\\\"'
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ if use editor || use model-viewer; then
+ # work around parallel make issues - bug #561380
+ MAKEOPTS="-j1 ${MAKEOPTS}" \
+ VIRTUALX_COMMAND="cmake-utils_src_compile" virtualmake
+ else
+ cmake-utils_src_compile
+ fi
+}
+
+src_install() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} != emake ]] ; then
+ cmake-utils_src_install
+ else
+ # rebuilds some targets randomly without fast option
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" "$@" install/fast
+ fi
+
+ dodoc docs/{AUTHORS.source_code,CHANGELOG,README}.txt
+
+ use editor &&
+ make_desktop_entry ${PN}_editor "MegaGlest Map Editor"
+ use model-viewer &&
+ make_desktop_entry ${PN}_g3dviewer "MegaGlest Model Viewer"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ einfo
+ elog 'Note about Configuration:'
+ elog 'DO NOT directly edit glest.ini and glestkeys.ini but rather glestuser.ini'
+ elog 'and glestuserkeys.ini in ~/.megaglest/ and create your user over-ride'
+ elog 'values in these files.'
+ elog
+ elog 'If you have an older graphics card which only supports OpenGL 1.2, and the'
+ elog 'game crashes when you try to play, try starting with "megaglest --disable-vbo"'
+ elog 'Some graphics cards may require setting Max Lights to 1.'
+ einfo
+
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
+
diff --git a/games-strategy/megaglest/metadata.xml b/games-strategy/megaglest/metadata.xml
new file mode 100644
index 0000000..3422202
--- /dev/null
+++ b/games-strategy/megaglest/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hasufell@posteo.de</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+ <upstream>
+ <changelog>http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/docs/CHANGELOG.txt?revision=3397</changelog>
+ <doc lang="en">http://glest.wikia.com/wiki/MG</doc>
+ <bugs-to>https://sourceforge.net/tracker/?group_id=300350&amp;atid=1266776</bugs-to>
+ </upstream>
+ <use>
+ <flag name='editor'>Build map editor</flag>
+ <flag name='irc'>Enable libircclient support</flag>
+ <flag name='fribidi'>Enable fribidi support</flag>
+ <flag name='ftgl'>Use <pkg>media-libs/ftgl</pkg> for on-screen fonts
+ </flag>
+ <flag name='streflop'>Use the library streflop. Out of synchs may
+ occur if not enabled.</flag>
+ <flag name='tools'>Build model import/export tools</flag>
+ <flag name='unicode'>Use unicode strings for wxwidgets</flag>
+ <flag name='wxuniversal'>Use the wxUniversal port which implements
+ the various GUI controls by drawing them itself </flag>
+ <flag name='model-viewer'>Build model viewer</flag>
+ </use>
+ <longdescription lang="en">
+ MegaGlest is an entertaining free (freeware and free software) and
+ open source cross-platform 3D real-time strategy (RTS) game, where
+ you control the armies of one of seven different factions: Tech,
+ Magic, Egyptians, Indians, Norsemen, Persian or Romans. The game is
+ setup in one of 17 naturally looking settings, which -like the unit
+ models- are crafted with great appreciation for detail. Additional
+ game data can be downloaded from within the game at no cost.
+ </longdescription>
+</pkgmetadata>
+