diff options
author | Julian Ospald <hasufell@gentoo.org> | 2012-08-19 21:15:08 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2012-08-19 21:15:08 +0000 |
commit | fa54a0295ce188b1856f166b3ccd7e9a9a739c5c (patch) | |
tree | 6b52bb5c66b7d8201ea1866b54de538721898de7 /games-strategy/megaglest | |
parent | added prefix keywords (diff) | |
download | gentoo-2-fa54a0295ce188b1856f166b3ccd7e9a9a739c5c.tar.gz gentoo-2-fa54a0295ce188b1856f166b3ccd7e9a9a739c5c.tar.bz2 gentoo-2-fa54a0295ce188b1856f166b3ccd7e9a9a739c5c.zip |
initial commit wrt #340343
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'games-strategy/megaglest')
-rw-r--r-- | games-strategy/megaglest/ChangeLog | 11 | ||||
-rw-r--r-- | games-strategy/megaglest/Manifest | 6 | ||||
-rw-r--r-- | games-strategy/megaglest/files/megaglest-3.6.0.3-build.patch | 25 | ||||
-rw-r--r-- | games-strategy/megaglest/files/megaglest-3.6.0.3-static-build.patch | 107 | ||||
-rw-r--r-- | games-strategy/megaglest/megaglest-3.6.0.3.ebuild | 157 | ||||
-rw-r--r-- | games-strategy/megaglest/metadata.xml | 36 |
6 files changed, 342 insertions, 0 deletions
diff --git a/games-strategy/megaglest/ChangeLog b/games-strategy/megaglest/ChangeLog new file mode 100644 index 000000000000..7828b8223a88 --- /dev/null +++ b/games-strategy/megaglest/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for games-strategy/megaglest +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/ChangeLog,v 1.1 2012/08/19 21:15:08 hasufell Exp $ + +*megaglest-3.6.0.3 (19 Aug 2012) + + 19 Aug 2012; Julian Ospald <hasufell@gentoo.org> +megaglest-3.6.0.3.ebuild, + +files/megaglest-3.6.0.3-build.patch, + +files/megaglest-3.6.0.3-static-build.patch, +metadata.xml: + initial commit wrt #340343 + diff --git a/games-strategy/megaglest/Manifest b/games-strategy/megaglest/Manifest new file mode 100644 index 000000000000..da49a7995014 --- /dev/null +++ b/games-strategy/megaglest/Manifest @@ -0,0 +1,6 @@ +AUX megaglest-3.6.0.3-build.patch 1050 SHA256 fe00f58335e551b29e23efd66cb6ff16780d81c992522601981bd2a211932bc1 SHA512 f1ab9698f2a91a765a888030bb317d4ae6093f6070d7f068d142993100975be826c6db84278a6bb662b6a2e25df94b5968aa10cf9db08083d76e9c4beb4b2f62 WHIRLPOOL 04d1b7e3cd40a265a6ba181a63b28fbf5edef2b88174afda71fc5940ce2f3a65fbf77db1531c6e368619904bc5ab940279442c4d9a1b301d7f03ee9ac4020cfb +AUX megaglest-3.6.0.3-static-build.patch 3821 SHA256 cca9eb7180bd4f47030d96d95ea0ff63b6ba567d1ace43df908bcb847d9b1c26 SHA512 2706643eaa597bc2629179541f180508c4d7f89f205e9a5a072671acaf0bb519ff216a5dc06feb11b74ff5614c9ef8e58f5031f3aaa66c1b27ab2f7b32927d60 WHIRLPOOL 2125cf9ab83e01d5a2987b5bf9f07f0a4e33d742585b0ff58bb6c0ae115cd2055bf4442ab26483bececa9fcba324a872af36d7a8cbb6f920797cfafbf595c28f +DIST megaglest-source-3.6.0.3.tar.xz 1336432 SHA256 700b1eef534d72fa5efd329445aa085259a87dcea5e739eda629e6c41386b9f7 SHA512 0152457444c8d4ed65ed2ae565a73a2921a3706bb653fa818be03fb15d6fac196d50fc616583ce4c6fe7e76d4fb82cc83eb7c16809a90edf705701bab9c95387 WHIRLPOOL e452cd6dafb9024b663c62c9c3077af725601c6bc7b34b54cef641feb7ecbf2d1c1b6625e016e6e149055782d303a7bff78b59f29eb3c72d010c2a8b8a554b6f +EBUILD megaglest-3.6.0.3.ebuild 4169 SHA256 06aa02739cd7099ce51d96510ae2e341ce8d912540debd39e9c5c33589898911 SHA512 67dfd0e2961d60066c2043b5e57110872ecc11188a7b92bdb02485cd135a87665b33529f712f6a26c593c6ffc770599a03238622f502f81a684fe2962cad8bbc WHIRLPOOL 7ff0b122a22cb3b70f583a9f074ede9d8e11902952e253746bfad1617098cc0d236c1d2f2d2afb1fe27ae0a70de4a2996f19bec8fab3a971c7f534b343ce22a7 +MISC ChangeLog 369 SHA256 a4f9c9b619c1221d7626cf472c47a7bce4e3223135af2f4413735934c2b637c3 SHA512 f8b9d24815d81bd754dc03942b003efa304def48311717214ddda4ba137f46fd67aedfedb2229dedd8d3330a2061637d54ead88e8c7fe4c9a9d8259f2196d4c1 WHIRLPOOL f24f00f561ddf015f9017ed98f840ddf4ff15869b66475628728ae95753d8b02b9404a0eeb983dd9dc0fad89dec4cd00e25587b25b700ad1151128d8c83ac06c +MISC metadata.xml 1673 SHA256 e82372357b85e23eab725ab1aaec9183f2df25f481b1bd2c972e5ef95136be00 SHA512 abaaaddadfd5db1b94c6281f3a46adfdaccd0f6b3172af887787a6c448e61601742f3f2663fb1c4dcb7b59deaf9fb3348d081683f65bc131c3dbb22516e3c7d7 WHIRLPOOL ca2dfc91de1fb3a4d560a97a876628d47f98b0f3a0e1165573c8c9381f7da5bbf7632670976c880953057a14c28a6fa34d6faabd1c936ec8473e5dcfadb81679 diff --git a/games-strategy/megaglest/files/megaglest-3.6.0.3-build.patch b/games-strategy/megaglest/files/megaglest-3.6.0.3-build.patch new file mode 100644 index 000000000000..cc6862f26209 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.6.0.3-build.patch @@ -0,0 +1,25 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Sat Aug 18 16:07:26 UTC 2012 +Subject: build system + +fixes compilation when -DBUILD_MEGAGLEST_CONFIGURATOR=OFF is set +and when other targets are disabled + +configurator is deprecated/unstable and will be removed next release + +--- megaglest-3.6.0.3/CMakeLists.txt ++++ megaglest-3.6.0.3/CMakeLists.txt +@@ -243,9 +243,12 @@ + ADD_SUBDIRECTORY( ${PROJECT_SOURCE_DIR}/source/shared_lib ) + ADD_SUBDIRECTORY( ${PROJECT_SOURCE_DIR}/source/glest_game ) + #if(wxWidgets_FOUND) ++ IF(BUILD_MEGAGLEST_MAP_EDITOR) + ADD_SUBDIRECTORY( ${PROJECT_SOURCE_DIR}/source/glest_map_editor ) ++ ENDIF(BUILD_MEGAGLEST_MAP_EDITOR) ++ IF(BUILD_MEGAGLEST_MODEL_VIEWER) + ADD_SUBDIRECTORY( ${PROJECT_SOURCE_DIR}/source/g3d_viewer ) +- ADD_SUBDIRECTORY( ${PROJECT_SOURCE_DIR}/source/configurator ) ++ ENDIF(BUILD_MEGAGLEST_MODEL_VIEWER) + #else() + # MESSAGE(STATUS "WARNING... the following game tools will NOT be built since we cannot find wxWidgets on this machine") + # MESSAGE(STATUS "map editor, g3d viewer, configurator") diff --git a/games-strategy/megaglest/files/megaglest-3.6.0.3-static-build.patch b/games-strategy/megaglest/files/megaglest-3.6.0.3-static-build.patch new file mode 100644 index 000000000000..a561585c90c1 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.6.0.3-static-build.patch @@ -0,0 +1,107 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Sat Aug 18 13:41:33 UTC 2012 +Subject: build system + +fix static build + +--- megaglest-3.6.0.3/source/shared_lib/CMakeLists.txt ++++ megaglest-3.6.0.3/source/shared_lib/CMakeLists.txt +@@ -240,21 +240,9 @@ + streflop/libm_flt32_source) + ENDIF() + +- IF(NOT WANT_STATIC_LIBS) +- MESSAGE(STATUS "*** Searching for miniupnpc since WANT_STATIC_LIBS is off ...") +- FIND_PACKAGE(Miniupnpc) +- ENDIF() +- +- if(NOT MINIUPNP_FOUND) +- MESSAGE(STATUS "*** Using EMBEDDED miniupnpc since dev system does not have it... MINIUPNP_FOUND [${MINIUPNP_FOUND}]") +- +- SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} platform/miniupnpc) +- else() +- MESSAGE(STATUS "*** Using SHARED miniupnpc found in [${MINIUPNP_INCLUDE_DIR}] MINIUPNP_FOUND [${MINIUPNP_FOUND}] MINIUPNP_LIBRARY [${MINIUPNP_LIBRARY}]") +- +- INCLUDE_DIRECTORIES(${MINIUPNP_INCLUDE_DIR}) +- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${MINIUPNP_LIBRARY}) +- endif() ++ FIND_PACKAGE(Miniupnpc REQUIRED) ++ INCLUDE_DIRECTORIES(${MINIUPNP_INCLUDE_DIR}) ++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${MINIUPNP_LIBRARY}) + + IF(APPLE) + SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} platform/sdl) +@@ -276,22 +264,9 @@ + SET(MG_SOURCE_FILES "") + INCLUDE_DIRECTORIES( ${MG_INCLUDES_ROOT}platform/sdl ) + +- IF(NOT WANT_STATIC_LIBS) +- MESSAGE(STATUS "*** Searching for libircclient since WANT_STATIC_LIBS is off ...") +- FIND_PACKAGE(Ircclient) +- ENDIF() +- +- if(NOT IRCCLIENT_FOUND) +- MESSAGE(STATUS "*** Using EMBEDDED libircclient since dev system does not have it... IRCCLIENT_FOUND [${IRCCLIENT_FOUND}]") +- +- SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${PROJECT_SOURCE_DIR}/source/shared_lib/sources/libircclient/src/libircclient.c) +- INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/libircclient/include) +- else() +- MESSAGE(STATUS "*** Using SHARED libircclient found in [${IRCCLIENT_INCLUDE_DIR}] IRCCLIENT_FOUND [${IRCCLIENT_FOUND}] IRCCLIENT_LIBRARY [${IRCCLIENT_LIBRARY}]") +- +- INCLUDE_DIRECTORIES(${IRCCLIENT_INCLUDE_DIR}) +- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${IRCCLIENT_LIBRARY}) +- endif() ++ FIND_PACKAGE(Ircclient REQUIRED) ++ INCLUDE_DIRECTORIES(${IRCCLIENT_INCLUDE_DIR}) ++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${IRCCLIENT_LIBRARY}) + + set(CMAKE_REQUIRED_INCLUDES "${IRCCLIENT_INCLUDE_DIR}") + set(CMAKE_REQUIRED_LIBRARIES "${IRCCLIENT_LIBRARY}") +@@ -415,8 +390,11 @@ + IF(WANT_STREFLOP) + TARGET_LINK_LIBRARIES(${TARGET_NAME} streflop) + ENDIF() +- TARGET_LINK_LIBRARIES(${TARGET_NAME} ${EXTERNAL_LIBS}) +- ++ IF(WANT_STATIC_LIBS) ++ TARGET_LINK_LIBRARIES(${TARGET_NAME} ${EXTERNAL_LIBS} dl) ++ ELSE(WANT_STATIC_LIBS) ++ TARGET_LINK_LIBRARIES(${TARGET_NAME} ${EXTERNAL_LIBS}) ++ ENDIF(WANT_STATIC_LIBS) + ENDIF() + + #IF(BUILD_MEGAGLEST_UPNP_DEBUG) +--- megaglest-3.6.0.3/mk/cmake/Modules/FindMiniupnpc.cmake ++++ megaglest-3.6.0.3/mk/cmake/Modules/FindMiniupnpc.cmake +@@ -31,7 +31,11 @@ + + find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h + PATH_SUFFIXES miniupnpc) +-find_library(MINIUPNP_LIBRARY miniupnpc) ++IF(WANT_STATIC_LIBS) ++ find_library(MINIUPNP_LIBRARY libminiupnpc.a) ++ELSE(WANT_STATIC_LIBS) ++ find_library(MINIUPNP_LIBRARY libminiupnpc.so) ++ENDIF(WANT_STATIC_LIBS) + + if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY) + set (MINIUPNP_FOUND TRUE) +--- megaglest-3.6.0.3/mk/cmake/Modules/FindOGG.cmake ++++ megaglest-3.6.0.3/mk/cmake/Modules/FindOGG.cmake +@@ -19,11 +19,11 @@ + + FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h) + +-#IF (OGG_STATIC AND NOT OGG_LIBRARY) +-# FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a ogg) +-#ELSE() +- FIND_LIBRARY(OGG_LIBRARY NAMES ogg) +-#ENDIF() ++IF (OGG_STATIC) ++ FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a) ++ELSE() ++ FIND_LIBRARY(OGG_LIBRARY NAMES libogg.so) ++ENDIF() + + #IF (OGG_STATIC AND NOT VORBIS_LIBRARY) + # FIND_LIBRARY(VORBIS_LIBRARY NAMES libvorbis.a vorbis) diff --git a/games-strategy/megaglest/megaglest-3.6.0.3.ebuild b/games-strategy/megaglest/megaglest-3.6.0.3.ebuild new file mode 100644 index 000000000000..3bf56bfe5de8 --- /dev/null +++ b/games-strategy/megaglest/megaglest-3.6.0.3.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/megaglest-3.6.0.3.ebuild,v 1.1 2012/08/19 21:15:08 hasufell Exp $ + +EAPI=4 +inherit eutils flag-o-matic cmake-utils wxwidgets gnome2-utils games + +DESCRIPTION="Cross-platform 3D realtime strategy game" +HOMEPAGE="http://www.megaglest.org/" +SRC_URI="mirror://sourceforge/${PN}/${PN}-source-${PV}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug +editor freetype +ftgl sse sse2 sse3 static +streflop +tools +unicode wxuniversal +model-viewer" + +RDEPEND=" + >=dev-lang/lua-5.1 + dev-libs/icu + dev-libs/libxml2 + media-libs/fontconfig + media-libs/libsdl[X,audio,joystick,opengl,video] + media-libs/libvorbis + media-libs/openal + net-libs/gnutls + sys-libs/zlib + virtual/opengl + virtual/glu + x11-libs/libX11 + x11-libs/libXext + editor? ( x11-libs/wxGTK:2.8[X] ) + freetype? ( media-libs/freetype ) + model-viewer? ( x11-libs/wxGTK:2.8[X] ) + !static? ( + dev-libs/xerces-c + media-libs/glew + media-libs/libogg + media-libs/libpng:0 + net-libs/miniupnpc + net-misc/curl + virtual/jpeg + ftgl? ( media-libs/ftgl ) + )" +DEPEND="${RDEPEND} + net-libs/libircclient + sys-apps/help2man + virtual/pkgconfig + static? ( + dev-libs/xerces-c[static-libs] + media-libs/glew[static-libs] + media-libs/libogg[static-libs] + media-libs/libpng:0[static-libs] + net-libs/miniupnpc[static-libs] + net-misc/curl[static-libs] + virtual/jpeg[static-libs] + ftgl? ( media-libs/ftgl[static-libs] ) + )" +PDEPEND="~games-strategy/${PN}-data-${PV}" + +src_prepare() { + if use use editor || use model-viewer ; then + WX_GTK_VER="2.8" + need-wxwidgets unicode + fi + + epatch "${FILESDIR}"/${P}-{static-build,build}.patch +} + +src_configure() { + if use sse3; then + SSE=3 + elif use sse2; then + SSE=2 + elif use sse; then + SSE=1 + else + SSE=0 + fi + + local mycmakeargs=( + # configurator is deprecated and not included on purpose + -DBUILD_MEGAGLEST_CONFIGURATOR=OFF + $(cmake-utils_use_build editor MEGAGLEST_MAP_EDITOR) + $(cmake-utils_use_build tools MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS) + $(cmake-utils_use_build model-viewer MEGAGLEST_MODEL_VIEWER) + -DMAX_SSE_LEVEL_DESIRED="${SSE}" + -DMEGAGLEST_BIN_INSTALL_PATH="${GAMES_BINDIR}" + -DMEGAGLEST_DATA_INSTALL_PATH="${GAMES_DATADIR}/${PN}" + # icons are used at runtime, wrong default location share/pixmaps + -DMEGAGLEST_ICON_INSTALL_PATH="${GAMES_DATADIR}/${PN}" + $(cmake-utils_use_use freetype FREETYPEGL) + $(cmake-utils_use_use ftgl FTGL) + $(cmake-utils_use_want static STATIC_LIBS) + $(cmake-utils_use_want streflop STREFLOP) + -DWANT_SVN_STAMP=off + $(cmake-utils_use static wxWidgets_USE_STATIC) + $(cmake-utils_use unicode wxWidgets_USE_UNICODE) + $(cmake-utils_use wxuniversal wxWidgets_USE_UNIVERSAL) + + $(usex debug "-DBUILD_MEGAGLEST_UPNP_DEBUG=ON -DwxWidgets_USE_DEBUG=ON" "") + ) + + # support CMAKE_BUILD_TYPE=Gentoo + append-cppflags '-DCUSTOM_DATA_INSTALL_PATH=\\\"'${GAMES_DATADIR}/${PN}/'\\\"' + # as-needed is broken for ld.bfd here + # ld.gold works either way + append-ldflags $(no-as-needed) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + # rebuilds some targets randomly without fast option + emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" "$@" install/fast + + dodoc {AUTHORS.source_code,CHANGELOG,README}.txt + doicon -s 48 ${PN}.png + + use editor && + make_desktop_entry ${PN}_editor "MegaGlest Map Editor" + use model-viewer && + make_desktop_entry ${PN}_g3dviewer "MegaGlest Model Viewer" + + # provided by megaglest-data + rm "${D}${GAMES_DATADIR}"/${PN}/${PN}.bmp || die + + prepgamesdirs +} + +pkg_preinst() { + games_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 + + games_pkg_postinst + 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 000000000000..445ba745b994 --- /dev/null +++ b/games-strategy/megaglest/metadata.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>games</herd> + <maintainer> + <email>hasufell@gentoo.org</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&atid=1266776</bugs-to> + </upstream> + <use> + <flag name='editor'>Build map editor</flag> + <flag name='freetype'>Use Freetype-GL for on-screen fonts</flag> + <flag name='ftgl'>Use FTGL 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> + |