summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-11-14 17:13:32 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-11-14 17:13:32 +0000
commitdb0dbd398b780a6cd9db953b124fe9f574068568 (patch)
tree7065cd5e79a073f279281c53122e594ea05106e3 /games-strategy/megaglest
parentx86 stable, see bug 439146 (diff)
downloadhistorical-db0dbd398b780a6cd9db953b124fe9f574068568.tar.gz
historical-db0dbd398b780a6cd9db953b124fe9f574068568.tar.bz2
historical-db0dbd398b780a6cd9db953b124fe9f574068568.zip
version bump
Package-Manager: portage-2.2.0_alpha142/cvs/Linux x86_64 Manifest-Sign-Key: 0xE73C35B3
Diffstat (limited to 'games-strategy/megaglest')
-rw-r--r--games-strategy/megaglest/ChangeLog9
-rw-r--r--games-strategy/megaglest/Manifest21
-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
6 files changed, 364 insertions, 9 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/Manifest b/games-strategy/megaglest/Manifest
index aefeaf2379b4..6b05598d3473 100644
--- a/games-strategy/megaglest/Manifest
+++ b/games-strategy/megaglest/Manifest
@@ -5,18 +5,23 @@ AUX megaglest-3.6.0.3-as-needed.patch 909 SHA256 e3b2117f9e524e44e815d9fe7d56c7f
AUX megaglest-3.6.0.3-build.patch 1050 SHA256 fe00f58335e551b29e23efd66cb6ff16780d81c992522601981bd2a211932bc1 SHA512 f1ab9698f2a91a765a888030bb317d4ae6093f6070d7f068d142993100975be826c6db84278a6bb662b6a2e25df94b5968aa10cf9db08083d76e9c4beb4b2f62 WHIRLPOOL 04d1b7e3cd40a265a6ba181a63b28fbf5edef2b88174afda71fc5940ce2f3a65fbf77db1531c6e368619904bc5ab940279442c4d9a1b301d7f03ee9ac4020cfb
AUX megaglest-3.6.0.3-gcc-4.7.patch 910 SHA256 76527db1795587d64d4d7eb0ec9be540f5abf9619d469095f6c24e9c12d261cc SHA512 d406910fc7ab04c142e565b61b91347b20a842ca10e5575e11e788d6d147f994f5ed441d6f3b8f6155da2bcb4288a81d0387ed1bdb4f21302713b657891916e2 WHIRLPOOL 6f8b31233b607d26e64d78f8255e15d3917b239f4a084ac2e8b6c5587f8c88c40f11519403555319db0a11cddffe73a7ef3b4dfbfc1d8af8d9e54f9025788a67
AUX megaglest-3.6.0.3-static-build.patch 3821 SHA256 cca9eb7180bd4f47030d96d95ea0ff63b6ba567d1ace43df908bcb847d9b1c26 SHA512 2706643eaa597bc2629179541f180508c4d7f89f205e9a5a072671acaf0bb519ff216a5dc06feb11b74ff5614c9ef8e58f5031f3aaa66c1b27ab2f7b32927d60 WHIRLPOOL 2125cf9ab83e01d5a2987b5bf9f07f0a4e33d742585b0ff58bb6c0ae115cd2055bf4442ab26483bececa9fcba324a872af36d7a8cbb6f920797cfafbf595c28f
+AUX megaglest-3.7.0-as-needed.patch 952 SHA256 16c9f661e91c1415934f6e3f52a5a2603273d117518b832a508c6c2dba0581e3 SHA512 290cecd7175b39a61291eb377f2df9411324dd945778d30c630427dbab9fc8eec5ce7a122647ec58a2a87cb2793835d600e66c83c1189a73c214fe08a7892285 WHIRLPOOL 20ae9e20c0aecfdc84034456724ff8fdf2a7a2ce8e96139f29f9077566edd22e1c6c9b722edaf776871e4c041be926063b35dcafdc3a2874b2e7c9ae27f5b4bf
+AUX megaglest-3.7.0-cmake.patch 1338 SHA256 745762db3540ce2c376706d2bd40e9cb6654e4360e53ab1509f8a3a7d56d4fe2 SHA512 38e24af6958b374155ba651d80088f3fffedc4099a136e4e7955a48faa6e4a42dbc2942b1eea5bd1768a3cbbaaa6c3f3faed384fec8178f9f79974510f97fba0 WHIRLPOOL f7d9b5f0a0810b946547c8222fbcf824ff7adac8be55bbf931ddaa9e4ea55b88b4e3ba53e6d49f4f18e7e591860be0be5001767187e0818c2d09a8c0b2a4ac1d
+AUX megaglest-3.7.0-static-build.patch 4148 SHA256 aad7b46e8825f951f0f07d1d60be3a7b9e4728b870b59c1589f86ef6335347d1 SHA512 7c3beff249c48969280e053dbc7eec8f2a22e817b2d05df18abc9bdfa97ad3a7a3132700077a08efda85d039bb501c62cf3ddb50b408f7e9e83bbb03cd1123fa WHIRLPOOL 4ad78f27ebc4dd6726d26ecb2b30e22af07ba17944bb4907a5156092d7388c510b3dc9ffa244fc2d83d6bf39274b32350038cdd20427d551185b28eaf3bc5e77
DIST megaglest-source-3.6.0.3.tar.xz 1336432 SHA256 700b1eef534d72fa5efd329445aa085259a87dcea5e739eda629e6c41386b9f7 SHA512 0152457444c8d4ed65ed2ae565a73a2921a3706bb653fa818be03fb15d6fac196d50fc616583ce4c6fe7e76d4fb82cc83eb7c16809a90edf705701bab9c95387 WHIRLPOOL e452cd6dafb9024b663c62c9c3077af725601c6bc7b34b54cef641feb7ecbf2d1c1b6625e016e6e149055782d303a7bff78b59f29eb3c72d010c2a8b8a554b6f
+DIST megaglest-source-3.7.0.tar.xz 1442444 SHA256 5fdf2ed072c8a207a42b280929a7ce097ed6f966b2b85a7f0a89e741ac5cca23 SHA512 113bb59a4f8ec2b0d83b30952f7723c8a9a835b4854a083327c13a87f69c45d66184025bc0dd1af4ebfebeaa6d8ea7f488b859bcb8c04a8ecc5bcad8ac8bb35c WHIRLPOOL 16c5c56c0b8b9374b024178a3d780a21b7594398acb27f4d32ede39567edb6238a1122baaa57272134e62ae2de7c855db8384efd31d6171b7dbc4717249f63a6
EBUILD megaglest-3.6.0.3.ebuild 4620 SHA256 1f2d532638d5bf84796af77137986b4947891af548969456117233b58b5febcb SHA512 322327af33a68da939c1a6ab7924b211f3a1ef4e3c5733d9de1ceda999563be7515d528ab95aab9a4e3c115631b06566008d307070b4a2345505748ae98f0ad1 WHIRLPOOL f354eac3ef16ac48cdf58fe8c9f6340582c24e65f04e83bbe05bb94d3fa0e37d38fbabd3fefb892c3c0d8b90265c777031a520bebb2f33211651982fdd277482
-MISC ChangeLog 1254 SHA256 65f1a095e2c19c33f2ca60ca7296d4e7f73b98d5add165e005c604d5f384c084 SHA512 cac38337b5f03ab6663f61997fb1ff1a3be7635aed6c5fa8770e27a324effda206f6272e9ef6b8f7ce9ebeb6fbf9d55e166f6292464a29446813ad4566ab2fda WHIRLPOOL edc3d8d7c083d0ac59782ebfe8f9ee3e1d6b37ca1bdca33066235faaad6c5fb6fc0e154b05f3f6d40c0408cca42dca2b6f7763a8a2723843f8dc1dd9b3dcc4c7
+EBUILD megaglest-3.7.0.ebuild 4307 SHA256 bbf2ce6567d5882d464fcffe07b950c8421c39aaf22d097e745cf64adbc2ad19 SHA512 1682923fcc4e84c1efdbce81dc558ac8b4a658f14249b27bff8ccbb70fc0538bff74f79bf7d792dc2bdfbd36fb5f5a4a88ff62edddff89c3dfb5c5e5eb3cdb72 WHIRLPOOL 28177a63d37b7600526bdb13ec831d3e989b2dcb902ad52128f4ef553397d6554906d95429495406ba2d38a63baf151abea9be6ed4d192dcb07a546dc4b8dcad
+MISC ChangeLog 1501 SHA256 fc69adeadfab7a6afaf99a7d7d897a9350331006bff6de42a38408e00742441e SHA512 fbb36166f59b531a5118c4876a48160f04bfd32b6343ab40fe5d4791001f6ca13c92d6eef2cab4a423d77f5725e0e1de02a434bc288b69c82fa061a43e410022 WHIRLPOOL caea6ef1a60b4f167c2e87abb5de37c00882f809f71cc223087f0ead086df9445098c8c19c484ab1f6a83276f16180fadd5cdbb780bd76dae5b18897a8b24407
MISC metadata.xml 1550 SHA256 ea7604fb5e9f322911cbb140fe67410a5e8e40f4854c9691c984331d60e3bf2a SHA512 e8b697d2c6af8e42a7dd304e8c3f2325ce676bfe50f2eb626933f95ebe50fd656964f0f497451bda3be269e743f642714e9b2660f42ca23352b909af0670d7bb WHIRLPOOL 2109e05f6de9b86a543b08025bdc26987354983fed4bc2e6315d27a4254f07ea8291af1e4587a07162c8ad9d5795f5b2915b523fc617259af4de65d61c13eb61
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBCAAGBQJQjuO6AAoJEFpvPKfnPDWzJ9QIAJ9ND+Nar9/GYZfyExBHYHf/
-zERu48sICU6n/H+sGIGu/12knLUQh35Mp1QyAdNGoOKmw3d64eLJbQvz7f6SGbRr
-Anjsp3Y1YTIl+Zzi5jBDHDmtQnFVuhz2K+8JwFp6EudQWNFpk8x1jvJ6cMwxMxsA
-nVQt6NXjDx5AP8dRsUAC79OCX4DvTmByvepAaC+SO+LMTPBreEvYZqL7A3ZZ+H1Z
-vzmDo2u7MFaD9fisMLA0Tu4Qz/L8xWuPocHy0J1QlMSAkcVOSVQF2odU+wv9hEr2
-Kt/BD747Kf4szg0ZqWaVbEGJvOWOChvCIzB44d0sS5i5t2ytD8+eN51sKnX/1+k=
-=o0Su
+iQEcBAEBCAAGBQJQo9E8AAoJEFpvPKfnPDWzkUEH/jnbpzjRoqp+q11dGAAwbQ+6
+rxqQXl4ngzMdC/W2S2mRJTyfrZySmUZ/4a9Qvz1G/0WddgkNkTkSXssLQpvyZ0Gf
+zOuNCYrWBYe7gUbFRsoZ5A1PKrv8W+1saw7WPU7pmOPIc+HZS+nW2pyT9ARQV/nD
+njN1rHKD/z0/HX9nh/ruk+czVfKeVjVV/umqfkxXTDILrc7FjMU42rZj/MMFyBiL
+Cxhv4tG3ZXz5UhsD/Q/wj0bWBqLkq5ezHLHfjb0cXDHSptxGbYgWVD0VVb/VocJ2
+F/RaPaHlrbA5bPCFdoWrO2vNzZFz2ptn3o+hkOolSXgIbvg20AE6v6hC3R3/N6o=
+=Bk4P
-----END PGP SIGNATURE-----
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
+}