summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-11-14 17:13:31 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-11-14 17:13:31 +0000
commit91d76c51c45f6ade043eac4505fcc1487b8afbca (patch)
treeb09fa96a79058b37e2b074e4bc1cd8315e1901b3 /games-strategy/megaglest
parentx86 stable, see bug 439146 (diff)
downloadgentoo-2-91d76c51c45f6ade043eac4505fcc1487b8afbca.tar.gz
gentoo-2-91d76c51c45f6ade043eac4505fcc1487b8afbca.tar.bz2
gentoo-2-91d76c51c45f6ade043eac4505fcc1487b8afbca.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/ChangeLog9
-rw-r--r--games-strategy/megaglest/files/megaglest-3.7.0-as-needed.patch31
-rw-r--r--games-strategy/megaglest/files/megaglest-3.7.0-cmake.patch36
-rw-r--r--games-strategy/megaglest/files/megaglest-3.7.0-static-build.patch116
-rw-r--r--games-strategy/megaglest/megaglest-3.7.0.ebuild160
5 files changed, 351 insertions, 1 deletions
diff --git a/games-strategy/megaglest/ChangeLog b/games-strategy/megaglest/ChangeLog
index 48fac9fba201..6b62ec9923e0 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.7 2012/10/29 20:14:48 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/megaglest/ChangeLog,v 1.8 2012/11/14 17:13:31 hasufell Exp $
+
+*megaglest-3.7.0 (14 Nov 2012)
+
+ 14 Nov 2012; Julian Ospald <hasufell@gentoo.org> +megaglest-3.7.0.ebuild,
+ +files/megaglest-3.7.0-as-needed.patch, +files/megaglest-3.7.0-cmake.patch,
+ +files/megaglest-3.7.0-static-build.patch:
+ version bump
29 Oct 2012; Julian Ospald <hasufell@gentoo.org> megaglest-3.6.0.3.ebuild,
+files/megaglest-3.6.0.3-gcc-4.7.patch:
diff --git a/games-strategy/megaglest/files/megaglest-3.7.0-as-needed.patch b/games-strategy/megaglest/files/megaglest-3.7.0-as-needed.patch
new file mode 100644
index 000000000000..005549ade1e7
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.7.0-as-needed.patch
@@ -0,0 +1,31 @@
+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)
+@@ -308,6 +306,11 @@
+ INCLUDE_DIRECTORIES(${IRCCLIENT_INCLUDE_DIR})
+ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${IRCCLIENT_LIBRARY})
+
++ # fix linking order, curl after libircclient
++ 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.0-cmake.patch b/games-strategy/megaglest/files/megaglest-3.7.0-cmake.patch
new file mode 100644
index 000000000000..a3c65ce8cfd5
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.7.0-cmake.patch
@@ -0,0 +1,36 @@
+ provide an option for libVLC
+
+--- megaglest-3.7.0/CMakeLists.txt
++++ megaglest-3.7.0/CMakeLists.txt
+@@ -44,6 +44,7 @@
+ OPTION(BUILD_MEGAGLEST_MODEL_VIEWER "Build model viewer" ON)
+ OPTION(BUILD_MEGAGLEST_MAP_EDITOR "Build map editor" ON)
+ OPTION(BUILD_MEGAGLEST "Build MegaGlest" ON)
++OPTION(WITH_VLC "Use libVLC to play videos" ON)
+
+ FIND_PROGRAM(HELP2MAN "help2man")
+
+--- megaglest-3.7.0/source/shared_lib/CMakeLists.txt
++++ megaglest-3.7.0/source/shared_lib/CMakeLists.txt
+@@ -221,7 +221,7 @@
+ SET(LIBVLC_MIN_VERSION "1.1.0")
+ FIND_PACKAGE(LIBVLC)
+
+- IF(LIBVLC_FOUND AND NOT LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}")
++ IF(LIBVLC_FOUND AND WITH_VLC AND NOT LIBVLC_VERSION STRLESS "${LIBVLC_MIN_VERSION}")
+ MESSAGE(STATUS "**NOTE: LIBVLC found so videos are supported.")
+ INCLUDE_DIRECTORIES(${LIBVLC_INCLUDE_DIR})
+ IF(UNIX)
+@@ -236,7 +236,11 @@
+ ENDIF()
+
+ ELSE()
+- MESSAGE(STATUS "**WARNING: LIBVLC NOT found so videos are NOT supported.")
++ IF(WITH_VLC)
++ MESSAGE(STATUS "**WARNING: LIBVLC NOT found so videos are NOT supported.")
++ ELSE()
++ MESSAGE(STATUS "LIBVLC disabled so videos are NOT supported.")
++ ENDIF()
+ ENDIF()
+
+ #########################################################################################
diff --git a/games-strategy/megaglest/files/megaglest-3.7.0-static-build.patch b/games-strategy/megaglest/files/megaglest-3.7.0-static-build.patch
new file mode 100644
index 000000000000..03774cebeff5
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.7.0-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
+
+--- megaglest-3.6.0.3/source/shared_lib/CMakeLists.txt
++++ megaglest-3.6.0.3/source/shared_lib/CMakeLists.txt
+@@ -267,21 +267,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)
+@@ -316,22 +304,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}")
+--- megaglest-3.6.0.3/mk/cmake/Modules/FindMiniupnpc.cmake
++++ megaglest-3.6.0.3/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)
+--- megaglest-3.6.0.3/mk/cmake/Modules/FindOGG.cmake
++++ megaglest-3.6.0.3/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()
+--- megaglest-3.7.0/mk/cmake/Modules/FindLUAJIT.cmake
++++ megaglest-3.7.0/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.0.ebuild b/games-strategy/megaglest/megaglest-3.7.0.ebuild
new file mode 100644
index 000000000000..6f4112384760
--- /dev/null
+++ b/games-strategy/megaglest/megaglest-3.7.0.ebuild
@@ -0,0 +1,160 @@
+# 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.0.ebuild,v 1.1 2012/11/14 17:13:31 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/icu
+ 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,cmake,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
+}