diff options
author | Julian Ospald <hasufell@gentoo.org> | 2012-11-23 17:15:51 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2012-11-23 17:15:51 +0000 |
commit | 57583b1bea245f4f072e529de5a0daa67f4f761a (patch) | |
tree | df23a65734a1069fe98c953f11a9279adfa9a466 /games-strategy/megaglest | |
parent | Stable for amd64, wrt bug #442394 (diff) | |
download | gentoo-2-57583b1bea245f4f072e529de5a0daa67f4f761a.tar.gz gentoo-2-57583b1bea245f4f072e529de5a0daa67f4f761a.tar.bz2 gentoo-2-57583b1bea245f4f072e529de5a0daa67f4f761a.zip |
version bump
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'games-strategy/megaglest')
-rw-r--r-- | games-strategy/megaglest/ChangeLog | 9 | ||||
-rw-r--r-- | games-strategy/megaglest/files/megaglest-3.7.1-as-needed.patch | 30 | ||||
-rw-r--r-- | games-strategy/megaglest/files/megaglest-3.7.1-static-build.patch | 116 | ||||
-rw-r--r-- | games-strategy/megaglest/megaglest-3.7.1.ebuild | 159 |
4 files changed, 313 insertions, 1 deletions
diff --git a/games-strategy/megaglest/ChangeLog b/games-strategy/megaglest/ChangeLog index 1622b1937684..b25518ea3f1b 100644 --- a/games-strategy/megaglest/ChangeLog +++ b/games-strategy/megaglest/ChangeLog @@ -1,6 +1,13 @@ # 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.9 2012/11/15 23:37:42 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/ChangeLog,v 1.10 2012/11/23 17:15:50 hasufell Exp $ + +*megaglest-3.7.1 (23 Nov 2012) + + 23 Nov 2012; Julian Ospald <hasufell@gentoo.org> +megaglest-3.7.1.ebuild, + +files/megaglest-3.7.1-as-needed.patch, + +files/megaglest-3.7.1-static-build.patch: + version bump 15 Nov 2012; Julian Ospald <hasufell@gentoo.org> megaglest-3.6.0.3.ebuild, megaglest-3.7.0.ebuild: diff --git a/games-strategy/megaglest/files/megaglest-3.7.1-as-needed.patch b/games-strategy/megaglest/files/megaglest-3.7.1-as-needed.patch new file mode 100644 index 000000000000..ca0a2a717a01 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.7.1-as-needed.patch @@ -0,0 +1,30 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Fri Aug 31 23:45:34 UTC 2012 +Subject: fix as-needed + +reorder linker line (curl after libircclient) + +--- source/shared_lib/CMakeLists.txt ++++ source/shared_lib/CMakeLists.txt +@@ -47,9 +47,7 @@ + + FIND_PACKAGE(CURL REQUIRED) + INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) +- IF(UNIX) +- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES}) +- ENDIF() ++ + # check libcurl version # + IF(WIN32) + file (READ ${PROJECT_SOURCE_DIR}${CURL_INCLUDE_DIR}/curl/curlver.h CURL_VERSION_H_CONTENTS) +@@ -314,6 +312,10 @@ + INCLUDE_DIRECTORIES(${IRCCLIENT_INCLUDE_DIR}) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${IRCCLIENT_LIBRARY}) + ++ IF(UNIX) ++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES}) ++ ENDIF() ++ + set(CMAKE_REQUIRED_INCLUDES "${IRCCLIENT_INCLUDE_DIR}") + set(CMAKE_REQUIRED_LIBRARIES "${IRCCLIENT_LIBRARY}") + include(CheckCXXSourceRuns) diff --git a/games-strategy/megaglest/files/megaglest-3.7.1-static-build.patch b/games-strategy/megaglest/files/megaglest-3.7.1-static-build.patch new file mode 100644 index 000000000000..678327260bbb --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.7.1-static-build.patch @@ -0,0 +1,116 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Sat Aug 18 13:41:33 UTC 2012 +Subject: build system + +fix static build + +--- source/shared_lib/CMakeLists.txt ++++ source/shared_lib/CMakeLists.txt +@@ -273,21 +273,9 @@ + streflop/softfloat) + 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(MINIUPNPC_VERSION_PRE1_5) + ADD_DEFINITIONS(-DMINIUPNPC_VERSION_PRE1_5) +@@ -322,22 +310,9 @@ + INCLUDE_DIRECTORIES( ${MG_INCLUDES_ROOT}platform/sdl ) + INCLUDE_DIRECTORIES( ${MG_INCLUDES_ROOT}xml/rapidxml ) + +- 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 this 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}") +--- mk/cmake/Modules/FindMiniupnpc.cmake ++++ mk/cmake/Modules/FindMiniupnpc.cmake +@@ -35,7 +35,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) +--- mk/cmake/Modules/FindOGG.cmake ++++ mk/cmake/Modules/FindOGG.cmake +@@ -19,12 +19,12 @@ + + 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) + #ELSE() +--- mk/cmake/Modules/FindLUAJIT.cmake ++++ mk/cmake/Modules/FindLUAJIT.cmake +@@ -18,13 +18,13 @@ + NAMES luajit.h + PATH_SUFFIXES luajit-2.0) + +-if (LUAJIT_FIND_STATIC) ++#if (LUAJIT_FIND_STATIC) + find_library(LUAJIT_LIBRARIES luajit.a + NAMES libluajit-5.1.a) +-else (LUATJIT_FIND_STATIC) +- find_library(LUAJIT_LIBRARIES luajit +- NAMES luajit-5.1) +-endif (LUAJIT_FIND_STATIC) ++#else (LUATJIT_FIND_STATIC) ++# find_library(LUAJIT_LIBRARIES luajit.so ++# NAMES libluajit-5.1.so) ++#endif (LUAJIT_FIND_STATIC) + + mark_as_advanced(LUAJIT_INCLUDE_DIR) + mark_as_advanced(LUAJIT_LIBRARIES) diff --git a/games-strategy/megaglest/megaglest-3.7.1.ebuild b/games-strategy/megaglest/megaglest-3.7.1.ebuild new file mode 100644 index 000000000000..fd53b5e0ead4 --- /dev/null +++ b/games-strategy/megaglest/megaglest-3.7.1.ebuild @@ -0,0 +1,159 @@ +# 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.7.1.ebuild,v 1.1 2012/11/23 17:15:50 hasufell Exp $ + +EAPI=4 +VIRTUALX_REQUIRED="manual" +inherit eutils flag-o-matic cmake-utils virtualx 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 BitstreamVera" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug +editor sse sse2 sse3 static +streflop +tools +unicode wxuniversal +model-viewer videos" + +RDEPEND=" + >=dev-lang/lua-5.1 + dev-libs/libxml2 + media-libs/fontconfig + media-libs/freetype + media-libs/libsdl[X,audio,joystick,opengl,video] + media-libs/libvorbis + media-libs/openal + net-libs/gnutls + >=net-libs/libircclient-1.6-r1 + sys-libs/zlib + virtual/opengl + virtual/glu + x11-libs/libX11 + x11-libs/libXext + editor? ( x11-libs/wxGTK:2.8[X,opengl] ) + model-viewer? ( x11-libs/wxGTK:2.8[X] ) + !static? ( + dev-libs/xerces-c[icu] + media-libs/ftgl + media-libs/glew + media-libs/libogg + media-libs/libpng:0 + net-libs/miniupnpc + net-misc/curl + virtual/jpeg + ) + videos? ( media-video/vlc )" +DEPEND="${RDEPEND} + sys-apps/help2man + virtual/pkgconfig + editor? ( ${VIRTUALX_DEPEND} ) + model-viewer? ( ${VIRTUALX_DEPEND} ) + static? ( + dev-libs/xerces-c[icu,static-libs] + media-libs/ftgl[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] + )" +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}"/${P}-{static-build,as-needed}.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=( + $(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) + $(cmake-utils_use_with videos VLC) + -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}" + -DUSE_FTGL=ON + $(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}/'\\\"' + + cmake-utils_src_configure +} + +src_compile() { + if use editor || use model-viewer; then + VIRTUALX_COMMAND="cmake-utils_src_compile" virtualmake + else + cmake-utils_src_compile + fi +} + +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 +} |