diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2016-09-13 11:13:52 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2016-09-13 11:13:52 +0300 |
commit | b6f1f3c6c18b3286e0df027f3d1902931a1b09f0 (patch) | |
tree | f7189f216ae0a377b782316331eb00f5ccae7aee /games-strategy | |
parent | 5015f57ffd34d490612d1a97262e106549933b15 (diff) |
springrts-scm
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/spring/files/spring.png | bin | 0 -> 139208 bytes | |||
-rw-r--r-- | games-strategy/spring/metadata.xml | 16 | ||||
-rw-r--r-- | games-strategy/spring/spring-scm.ebuild | 154 |
3 files changed, 170 insertions, 0 deletions
diff --git a/games-strategy/spring/files/spring.png b/games-strategy/spring/files/spring.png Binary files differnew file mode 100644 index 0000000..0e75470 --- /dev/null +++ b/games-strategy/spring/files/spring.png diff --git a/games-strategy/spring/metadata.xml b/games-strategy/spring/metadata.xml new file mode 100644 index 0000000..1178582 --- /dev/null +++ b/games-strategy/spring/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>spring</herd> +<use> + <flag name='ai'>Compile multiple Artificial Intelligences for SinglePlayer</flag> + <flag name='java'>Compile Java-based AIs</flag> + <flag name='default'>Default engine (that's what you want)</flag> + <flag name='multithreaded'>An engine build with separate threads for Sim and Rendering</flag> + <flag name='headless'>A engine build, that doesn't render anything to screen but still runs the full simulations (e.g. used to test AIs, benchmarks, ...)</flag> + <flag name='dedicated'>A dedicated server build (runs no simulation, just broadcasts netcommands)</flag> + <flag name='test-ai'>A Null-AI (justs for testing/learning)</flag> + <flag name='custom-march'>Sets gcc's `-march=` to current CXXFLAGS one (may break online gaming!)</flag> + <flag name='custom-cflags'>Disables engine's CXXFLAGS stripping (this will for sure break online gaming!)</flag> +</use> +</pkgmetadata> diff --git a/games-strategy/spring/spring-scm.ebuild b/games-strategy/spring/spring-scm.ebuild new file mode 100644 index 0000000..ec34f37 --- /dev/null +++ b/games-strategy/spring/spring-scm.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +EGIT_REPO_URI="git://github.com/spring/spring.git" +EGIT_BRANCH="develop" + +KEYWORDS="" + +inherit games cmake-utils eutils fdo-mime flag-o-matic games git-r3 + +DESCRIPTION="A 3D multiplayer real-time strategy game engine" +HOMEPAGE="http://springrts.com" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+ai +java +default multithreaded headless dedicated test-ai debug profile -custom-march -custom-cflags openmp -lto test" +RESTRICT="nomirror strip" + +GUI_DEPEND=" + media-libs/devil[jpeg,png,opengl] + >=media-libs/freetype-2.0.0 + >=media-libs/glew-1.4 + >=media-libs/libsdl-1.2.0[X,opengl] + media-libs/openal + media-libs/libvorbis + media-libs/libogg + virtual/glu + virtual/opengl +" + +RDEPEND=" + >=dev-libs/boost-1.35 + >=sys-libs/zlib-1.2.5.1[minizip] + media-libs/devil[jpeg,png] + java? ( virtual/jdk ) + default? ( ${GUI_DEPEND} ) + multithreaded? ( ${GUI_DEPEND} ) +" + +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.2 + app-arch/p7zip + >=dev-util/cmake-2.6.0 + openmp? ( sys-devel/gcc[openmp] ) + lto? ( sys-devel/gcc[lto] ) +" + +### where to place content files which change each spring release (as opposed to mods, ota-content which go somewhere else) +VERSION_DATADIR="${GAMES_DATADIR}/${PN}" + + +src_test() { + cmake-utils_src_test +} + + +src_configure() { + + # Custom cflags break online play + if use custom-cflags ; then + ewarn "\e[1;31m*********************************************************************\e[0m" + ewarn "You enabled Custom-CFlags! ('custom-cflags' USE flag)" + ewarn "It's \e[1;31mimpossible\e[0m that this build will work in online play." + ewarn "Disable it before doing a bugreport." + ewarn "\e[1;31m*********************************************************************\e[0m" + ebeep 6 + else + strip-flags + fi + + # Custom march may break online play + if use custom-march ; then + ewarn "\e[1;31m*********************************************************************\e[0m" + ewarn "You enabled Custom-march! ('custom-march' USE flag)" + ewarn "It may break online play." + ewarn "If so, disable it before doing a bugreport." + ewarn "\e[1;31m*********************************************************************\e[0m" + + mycmakeargs="${mycmakeargs} -DMARCH_FLAG=$(get-flag march)" + fi + + # OpenMP (may break online play & reduced performance on single core) + mycmakeargs="${mycmakeargs} $(cmake-utils_use openmp OPENMP)" + + # LinkingTimeOptimizations + mycmakeargs="${mycmakeargs} $(cmake-utils_use lto LTO)" + if use lto; then + ewarn "\e[1;31m*********************************************************************\e[0m" + ewarn "You enabled LinkingTimeOptimizations! ('lto' USE flag)" + ewarn "It's likely that the compilation fails and/or online play may break." + ewarn "If so, disable it before doing a bugreport." + ewarn "\e[1;31m*********************************************************************\e[0m" + fi + + # AI + if use ai ; then + # Several AI are found in submodules + EGIT_HAS_SUBMODULES="true" + + if use !java ; then + # Don't build Java AI + mycmakeargs="${mycmakeargs} -DAI_TYPES=NATIVE" + fi + + if use !test-ai ; then + # Don't build example AIs + mycmakeargs="${mycmakeargs} -DAI_EXCLUDE_REGEX=\"Null|Test\"" + fi + else + mycmakeargs="${mycmakeargs} -DAI_TYPES=NONE" + fi + + # Selectivly enable/disable build targets + for build_type in default multithreaded headless dedicated + do + mycmakeargs="${mycmakeargs} $(cmake-utils_use ${build_type} BUILD_spring-${build_type})" + done + + # Set common dirs + LIBDIR="$(games_get_libdir)" + mycmakeargs="${mycmakeargs} -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=${GAMES_BINDIR#/usr/} -DLIBDIR=${LIBDIR#/usr/} -DDATADIR=${VERSION_DATADIR#/usr/}" + + # Enable/Disable debug symbols + if use profile ; then + CMAKE_BUILD_TYPE="PROFILE" + else + if use debug ; then + CMAKE_BUILD_TYPE="RELWITHDEBINFO" + else + CMAKE_BUILD_TYPE="RELEASE" + fi + fi + + # Configure + cmake-utils_src_configure +} + +src_compile () { + cmake-utils_src_compile +} + +src_install () { + cmake-utils_src_install + + prepgamesdirs +} + +pkg_postinst() { + fdo-mime_mime_database_update + games_pkg_postinst +} |