From cc833b3524e3f096a29a1db9b00dd7f686cc027b Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 19 Nov 2013 01:35:35 +0000 Subject: version bump (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3) --- games-strategy/megaglest/ChangeLog | 10 +- .../files/megaglest-3.9.0.3-Waddress.patch | 11 + .../files/megaglest-3.9.0.3-fribidi.patch | 289 +++++++++++++++++++++ .../files/megaglest-3.9.0.3-static-build.patch | 48 ++++ games-strategy/megaglest/megaglest-3.9.0.3.ebuild | 167 ++++++++++++ games-strategy/megaglest/metadata.xml | 1 + 6 files changed, 525 insertions(+), 1 deletion(-) create mode 100644 games-strategy/megaglest/files/megaglest-3.9.0.3-Waddress.patch create mode 100644 games-strategy/megaglest/files/megaglest-3.9.0.3-fribidi.patch create mode 100644 games-strategy/megaglest/files/megaglest-3.9.0.3-static-build.patch create mode 100644 games-strategy/megaglest/megaglest-3.9.0.3.ebuild (limited to 'games-strategy') diff --git a/games-strategy/megaglest/ChangeLog b/games-strategy/megaglest/ChangeLog index c0eaf2551c49..86e82d935480 100644 --- a/games-strategy/megaglest/ChangeLog +++ b/games-strategy/megaglest/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for games-strategy/megaglest # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/ChangeLog,v 1.15 2013/10/12 03:27:22 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/ChangeLog,v 1.16 2013/11/19 01:35:35 hasufell Exp $ + +*megaglest-3.9.0.3 (19 Nov 2013) + + 19 Nov 2013; Julian Ospald +megaglest-3.9.0.3.ebuild, + +files/megaglest-3.9.0.3-Waddress.patch, + +files/megaglest-3.9.0.3-fribidi.patch, + +files/megaglest-3.9.0.3-static-build.patch: + version bump 12 Oct 2013; Sergei Trofimovich +files/megaglest-3.7.1-gcc47.patch, megaglest-3.7.1.ebuild: diff --git a/games-strategy/megaglest/files/megaglest-3.9.0.3-Waddress.patch b/games-strategy/megaglest/files/megaglest-3.9.0.3-Waddress.patch new file mode 100644 index 000000000000..a56a32266e1d --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.9.0.3-Waddress.patch @@ -0,0 +1,11 @@ +--- a/source/shared_lib/sources/platform/sdl/window.cpp ++++ b/source/shared_lib/sources/platform/sdl/window.cpp +@@ -1034,7 +1034,7 @@ + wchar_t keyW = c; + wchar_t textAppend[] = { keyW, 0 }; + +- if(textAppend) { ++ if(textAppend[0]) { + wchar_t newKey = textAppend[0]; + if (newKey < 0x80) { + result.push_back(1); diff --git a/games-strategy/megaglest/files/megaglest-3.9.0.3-fribidi.patch b/games-strategy/megaglest/files/megaglest-3.9.0.3-fribidi.patch new file mode 100644 index 000000000000..106d46c2ef98 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.9.0.3-fribidi.patch @@ -0,0 +1,289 @@ +From: Julian Ospald +Date: Tue Nov 19 00:58:41 UTC 2013 +Subject: fix fribidi checks + +--- a/mk/cmake/Modules/FindFriBiDi.cmake ++++ b/mk/cmake/Modules/FindFriBiDi.cmake +@@ -28,9 +28,9 @@ + SET(FRIBIDI_NAMES ${FRIBIDI_NAMES} fribidi libfribidi) + + OPTION(WANT_STATIC_LIBS "builds as many static libs as possible" OFF) +-IF(WANT_STATIC_LIBS) +- SET(FRIBIDI_NAMES fribidi.a libfribidi.a ${FRIBIDI_NAMES}) +-ENDIF() ++# IF(WANT_STATIC_LIBS) ++ # SET(FRIBIDI_NAMES fribidi.a libfribidi.a ${FRIBIDI_NAMES}) ++# ENDIF() + + FIND_LIBRARY(FRIBIDI_LIBRARY + NAMES ${FRIBIDI_NAMES} +@@ -40,40 +40,20 @@ + IF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR) + SET(CMAKE_REQUIRED_INCLUDES ${FRIBIDI_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${FRIBIDI_LIBRARY}) +- CHECK_SYMBOL_EXISTS(fribidi_utf8_to_unicode fribidi.h FOUND_fribidi_utf8_to_unicode) +- CHECK_SYMBOL_EXISTS(fribidi_charset_to_unicode fribidi.h FOUND_fribidi_charset_to_unicode) +- CHECK_SYMBOL_EXISTS(FRIBIDI_CHAR_SET_UTF8 fribidi.h FOUND_FRIBIDI_CHAR_SET_UTF8) ++ FIND_PACKAGE(GLIB2 REQUIRED) + +- # FriBiDi provides both fribidi_utf8_to_unicode and fribidi_charset_to_unicode. +- # The difference is that +- # 1. fribidi >= 0.10.5 has FRIBIDI_CHAR_SET_UTF8. +- # 2. fribidi <= 0.10.4 has FRIBIDI_CHARSET_UTF8. ++ CHECK_LIBRARY_EXISTS(fribidi fribidi_utf8_to_unicode "" FOUND_fribidi_utf8_to_unicode) ++ CHECK_LIBRARY_EXISTS(fribidi fribidi_charset_to_unicode "" FOUND_fribidi_charset_to_unicode) + +- # Newer versions of fribidi (not tested the initial version which has the +- # issue, but at least 0.19.2 has the issue) no longer have the symbol +- # FRIBIDI_CHAR_SET_UTF8. But the symbol is build with some macros confusing +- # cmake. To test for that case let the compiler give its verdict. +- if(FOUND_fribidi_charset_to_unicode AND NOT FOUND_FRIBIDI_CHAR_SET_UTF8) +- file(WRITE "${CMAKE_BINARY_DIR}/fribidi_test.c" +- "#include \nint main(){FriBidiCharSet s = FRIBIDI_CHAR_SET_UTF8;}" +- ) +- try_compile(FOUND_FRIBIDI_CHAR_SET_UTF8 +- "${CMAKE_BINARY_DIR}" +- "${CMAKE_BINARY_DIR}/fribidi_test.c" +- CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${FRIBIDI_INCLUDE_DIR}" +- ) +- +- file(REMOVE "${CMAKE_BINARY_DIR}/fribidi_test.c") +- +- endif(FOUND_fribidi_charset_to_unicode AND NOT FOUND_FRIBIDI_CHAR_SET_UTF8) +- +- if(FOUND_fribidi_charset_to_unicode AND FOUND_FRIBIDI_CHAR_SET_UTF8) ++ if(FOUND_fribidi_charset_to_unicode) + # fribidi >= 0.10.5 + SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY}) ++ SET(FRIBIDI_INCLUDE_DIR ${FRIBIDI_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS}) + SET(FRIBIDI_FOUND "YES") + elseif(FOUND_fribidi_utf8_to_unicode) + # fribidi <= 0.10.4 +- SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY}) ++ SET(FRIBIDI_INCLUDE_DIR ${FRIBIDI_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS}) ++ SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY} ${GLIB2_LIBRARIES}) + SET(FRIBIDI_FOUND "YES") + add_definitions(-DOLD_FRIBIDI) + MESSAGE(STATUS "Legacy FriBiDi: ${FRIBIDI_LIBRARY}") +--- /dev/null ++++ b/mk/cmake/Modules/FindGLIB2.cmake +@@ -0,0 +1,219 @@ ++# http://opensource.bolloretelecom.eu/projects/boc-wimax/browser/cmake/modules/FindGLIB2.cmake?rev=8f5b254534bd304923d4cc7bc7e9d6552c119ea2 ++ ++# - Try to find GLib2 ++# Once done this will define ++# ++# GLIB2_FOUND - system has GLib2 ++# GLIB2_INCLUDE_DIRS - the GLib2 include directory ++# GLIB2_LIBRARIES - Link these to use GLib2 ++# ++# HAVE_GLIB_GREGEX_H glib has gregex.h header and ++# supports g_regex_match_simple ++# ++# Copyright (c) 2006 Andreas Schneider ++# Copyright (c) 2006 Philippe Bernery ++# Copyright (c) 2007 Daniel Gollub ++# Copyright (c) 2007 Alban Browaeys ++# Copyright (c) 2008 Michael Bell ++# Copyright (c) 2008 Bjoern Ricks ++# ++# Redistribution and use is allowed according to the terms of the New ++# BSD license. ++# For details see the accompanying COPYING-CMAKE-SCRIPTS file. ++# ++ ++ ++IF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS ) ++ # in cache already ++ SET(GLIB2_FOUND TRUE) ++ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS ) ++ ++ INCLUDE(FindPkgConfig) ++ ++ ## Glib ++ IF ( GLIB2_FIND_REQUIRED ) ++ SET( _pkgconfig_REQUIRED "REQUIRED" ) ++ ELSE ( GLIB2_FIND_REQUIRED ) ++ SET( _pkgconfig_REQUIRED "" ) ++ ENDIF ( GLIB2_FIND_REQUIRED ) ++ ++ IF ( GLIB2_MIN_VERSION ) ++ PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} ) ++ ELSE ( GLIB2_MIN_VERSION ) ++ PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 ) ++ ENDIF ( GLIB2_MIN_VERSION ) ++ IF ( PKG_CONFIG_FOUND ) ++ IF ( GLIB2_FOUND ) ++ SET ( GLIB2_CORE_FOUND TRUE ) ++ ELSE ( GLIB2_FOUND ) ++ SET ( GLIB2_CORE_FOUND FALSE ) ++ ENDIF ( GLIB2_FOUND ) ++ ENDIF ( PKG_CONFIG_FOUND ) ++ ++ # Look for glib2 include dir and libraries w/o pkgconfig ++ IF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND ) ++ FIND_PATH( ++ _glibconfig_include_DIR ++ NAMES ++ glibconfig.h ++ PATHS ++ /opt/gnome/lib64 ++ /opt/gnome/lib ++ /opt/lib/ ++ /opt/local/lib ++ /sw/lib/ ++ /usr/lib64 ++ /usr/lib ++ /usr/local/include ++ ${CMAKE_LIBRARY_PATH} ++ PATH_SUFFIXES ++ glib-2.0/include ++ ) ++ ++ FIND_PATH( ++ _glib2_include_DIR ++ NAMES ++ glib.h ++ PATHS ++ /opt/gnome/include ++ /opt/local/include ++ /sw/include ++ /usr/include ++ /usr/local/include ++ PATH_SUFFIXES ++ glib-2.0 ++ ) ++ ++ #MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}") ++ ++ FIND_LIBRARY( ++ _glib2_link_DIR ++ NAMES ++ glib-2.0 ++ glib ++ PATHS ++ /opt/gnome/lib ++ /opt/local/lib ++ /sw/lib ++ /usr/lib ++ /usr/local/lib ++ ) ++ IF ( _glib2_include_DIR AND _glib2_link_DIR ) ++ SET ( _glib2_FOUND TRUE ) ++ ENDIF ( _glib2_include_DIR AND _glib2_link_DIR ) ++ ++ ++ IF ( _glib2_FOUND ) ++ SET ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} ) ++ SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} ) ++ SET ( GLIB2_CORE_FOUND TRUE ) ++ ELSE ( _glib2_FOUND ) ++ SET ( GLIB2_CORE_FOUND FALSE ) ++ ENDIF ( _glib2_FOUND ) ++ ++ # Handle dependencies ++ # libintl ++ IF ( NOT LIBINTL_FOUND ) ++ FIND_PATH(LIBINTL_INCLUDE_DIR ++ NAMES ++ libintl.h ++ PATHS ++ /opt/gnome/include ++ /opt/local/include ++ /sw/include ++ /usr/include ++ /usr/local/include ++ ) ++ ++ FIND_LIBRARY(LIBINTL_LIBRARY ++ NAMES ++ intl ++ PATHS ++ /opt/gnome/lib ++ /opt/local/lib ++ /sw/lib ++ /usr/local/lib ++ /usr/lib ++ ) ++ ++ IF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR) ++ SET (LIBINTL_FOUND TRUE) ++ ENDIF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR) ++ ENDIF ( NOT LIBINTL_FOUND ) ++ ++ # libiconv ++ IF ( NOT LIBICONV_FOUND ) ++ FIND_PATH(LIBICONV_INCLUDE_DIR ++ NAMES ++ iconv.h ++ PATHS ++ /opt/gnome/include ++ /opt/local/include ++ /opt/local/include ++ /sw/include ++ /sw/include ++ /usr/local/include ++ /usr/include ++ PATH_SUFFIXES ++ glib-2.0 ++ ) ++ ++ FIND_LIBRARY(LIBICONV_LIBRARY ++ NAMES ++ iconv ++ PATHS ++ /opt/gnome/lib ++ /opt/local/lib ++ /sw/lib ++ /usr/lib ++ /usr/local/lib ++ ) ++ ++ IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) ++ SET (LIBICONV_FOUND TRUE) ++ ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) ++ ENDIF ( NOT LIBICONV_FOUND ) ++ ++ IF (LIBINTL_FOUND) ++ SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY}) ++ SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR}) ++ ENDIF (LIBINTL_FOUND) ++ ++ IF (LIBICONV_FOUND) ++ SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY}) ++ SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR}) ++ ENDIF (LIBICONV_FOUND) ++ ++ ENDIF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND ) ++ ## ++ ++ IF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES) ++ SET (GLIB2_FOUND TRUE) ++ ENDIF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES) ++ ++ IF (GLIB2_FOUND) ++ IF (NOT GLIB2_FIND_QUIETLY) ++ MESSAGE (STATUS "Found GLib2: ${GLIB2_LIBRARIES} ${GLIB2_INCLUDE_DIRS}") ++ ENDIF (NOT GLIB2_FIND_QUIETLY) ++ ELSE (GLIB2_FOUND) ++ IF (GLIB2_FIND_REQUIRED) ++ MESSAGE (SEND_ERROR "Could not find GLib2") ++ ENDIF (GLIB2_FIND_REQUIRED) ++ ENDIF (GLIB2_FOUND) ++ ++ # show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view ++ MARK_AS_ADVANCED(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES) ++ MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY) ++ MARK_AS_ADVANCED(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY) ++ ++ENDIF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS) ++ ++IF ( GLIB2_FOUND ) ++ # Check if system has a newer version of glib ++ # which supports g_regex_match_simple ++ INCLUDE( CheckIncludeFiles ) ++ SET( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} ) ++ CHECK_INCLUDE_FILES ( glib/gregex.h HAVE_GLIB_GREGEX_H ) ++ # Reset CMAKE_REQUIRED_INCLUDES ++ SET( CMAKE_REQUIRED_INCLUDES "" ) ++ENDIF( GLIB2_FOUND ) diff --git a/games-strategy/megaglest/files/megaglest-3.9.0.3-static-build.patch b/games-strategy/megaglest/files/megaglest-3.9.0.3-static-build.patch new file mode 100644 index 000000000000..a649b037d590 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.9.0.3-static-build.patch @@ -0,0 +1,48 @@ +commit 754a6eb9f81a4a40a2a0102ffe1bfdbba734b36a +Author: hasufell +Date: Mon Nov 18 21:54:54 2013 +0100 + + fix static build + +diff --git a/mk/cmake/Modules/FindOGG.cmake b/mk/cmake/Modules/FindOGG.cmake +index 2a026cc..8ca8a23 100644 +--- a/mk/cmake/Modules/FindOGG.cmake ++++ b/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 AND NOT OGG_LIBRARY) ++ 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) +--- a/mk/cmake/Modules/FindXercesC.cmake ++++ b/mk/cmake/Modules/FindXercesC.cmake +@@ -83,6 +83,9 @@ + /usr/lib + /usr/local/lib + ) ++ ++ FIND_LIBRARY(ICUUC_LIBRARY NAMES libicuuc.a) ++ FIND_LIBRARY(ICUDATA_LIBRARY NAMES libicudata.a) + + IF (XERCESC_INCLUDE AND XERCESC_LIBRARY) + MESSAGE(STATUS "Found static Xerces-C lib [${XERCESC_LIBRARY}]") +@@ -90,7 +93,7 @@ + + IF(UNIX AND NOT APPLE) + #SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} -Bdynamic -licuuc -licudata") +- SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY}") ++ SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} ${ICUUC_LIBRARY} ${ICUDATA_LIBRARY}") + ENDIF() + ENDIF() + ENDIF() diff --git a/games-strategy/megaglest/megaglest-3.9.0.3.ebuild b/games-strategy/megaglest/megaglest-3.9.0.3.ebuild new file mode 100644 index 000000000000..759a5cc4ec69 --- /dev/null +++ b/games-strategy/megaglest/megaglest-3.9.0.3.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/megaglest-3.9.0.3.ebuild,v 1.1 2013/11/19 01:35:35 hasufell Exp $ + +# google-breakpad +# TODO: fribidi, libvorbis static + +EAPI=5 +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 fribidi 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 + sys-libs/zlib + virtual/opengl + virtual/glu + x11-libs/libX11 + x11-libs/libXext + editor? ( x11-libs/wxGTK:2.8[X,opengl] ) + fribidi? ( dev-libs/fribidi ) + model-viewer? ( x11-libs/wxGTK:2.8[X] ) + !static? ( + dev-libs/icu + dev-libs/xerces-c[icu] + media-libs/ftgl + media-libs/glew + media-libs/libpng:0 + net-libs/libircclient + >=net-libs/miniupnpc-1.8 + 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/icu[static-libs] + dev-libs/xerces-c[icu,static-libs] + media-libs/ftgl[static-libs] + media-libs/glew[static-libs] + media-libs/libpng:0[static-libs] + net-libs/libircclient[static-libs] + net-libs/miniupnpc[static-libs] + net-misc/curl[static-libs] + virtual/jpeg[static-libs] + )" +PDEPEND="~games-strategy/${PN}-data-3.9.0" + +S=${WORKDIR}/${PN}-3.9.0 + +src_prepare() { + if use editor || use model-viewer ; then + WX_GTK_VER="2.8" + need-wxwidgets unicode + fi + + epatch "${FILESDIR}"/${P}-{static-build,Waddress,fribidi}.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_enable fribidi FRIBIDI) + $(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 "${ED%/}/${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 index cea582a3be2b..32dac0ac2166 100644 --- a/games-strategy/megaglest/metadata.xml +++ b/games-strategy/megaglest/metadata.xml @@ -13,6 +13,7 @@ Build map editor + Enable FriBIDi support Use the library streflop. Out of synchs may occur if not enabled. Build model import/export tools -- cgit v1.2.3-65-gdbad