diff options
Diffstat (limited to 'games-strategy/megaglest')
-rw-r--r-- | games-strategy/megaglest/Manifest | 4 | ||||
-rw-r--r-- | games-strategy/megaglest/files/megaglest-3.11.1-cmake-lua.patch | 25 | ||||
-rw-r--r-- | games-strategy/megaglest/megaglest-3.11.1-r1.ebuild | 2 | ||||
-rw-r--r-- | games-strategy/megaglest/megaglest-3.11.1-r100.ebuild | 166 |
4 files changed, 196 insertions, 1 deletions
diff --git a/games-strategy/megaglest/Manifest b/games-strategy/megaglest/Manifest index 199806ef108f..e5149ff6d779 100644 --- a/games-strategy/megaglest/Manifest +++ b/games-strategy/megaglest/Manifest @@ -1,7 +1,9 @@ +AUX megaglest-3.11.1-cmake-lua.patch 848 BLAKE2B ae918da49eb8bac6add4cd0df27f2e58cc632a3b5c3fc188fefd7152cbdff83e255bab9cdcd17580ef564ca99a88fc4715ed103001463981d7053d8338c3d5ca SHA512 33b1a3bb6fc0fed9cc30d5cd88aed4b738b831625e0d1a33cf11dfd0252b9bf8b5c2cbdfd1a8f62b4b683562e7d6fb824675850ac79ce7f74ce4d7e41feb7076 AUX megaglest-3.11.1-cmake.patch 897 BLAKE2B 3076a11cbb18263aabfabdaadb4e201d26b7db6e55e32278c0f37ebd938ae8a41cccb906bcf30ff99a32f6ecb35d77512fd3904610443847d1e3bb3212122902 SHA512 f49580a2b87fbc1e9aa3bec7313bdff36f78404aa97ac9f0cef790202c7d92439ad3fd8a9bdc991540048adb771e22f36c946f44a967cacae5157ef98b41c6cc AUX megaglest-3.11.1-miniupnpc-api-version-16.patch 1334 BLAKE2B ae9ad1641d8624c59bd69046b00be6bbb8395baee2c72e9929ecc070d6b550cbe311cd071ad0d16539175df263da08900e5668787a4ae9232202de6e8b81da43 SHA512 a91a551da9cf67c5984ac359e6f56d97e873b52de02ff1dfc73ac516f34f9f9704e3958ad3371e6609f048ff198e9b3dfbde0a3c97e1b0253748fd41d39b0443 AUX megaglest-3.11.1-miniupnpc.patch 1299 BLAKE2B e56123ca017cf7b244c449e7b77385d9adc5066873e2ff220eed0344752405019abb13a7dfd0ade027dedd7064e65cf4d6e0509b44986aa5692d7af73b701f7f SHA512 62bf0ff8fa167cecae9f7bf65e5295d609afcdb9fdcb3bf502366eb775fa8d3d39c12001d320a9dc42e12075004c86b7d118eb517d6a57473e03aa26944f8bd4 AUX megaglest-3.11.1-static-build.patch 1939 BLAKE2B 6d71cdc521f3bcf519a3f98bee00bf45951c26f895c3fe74cd03f3ea74c7a28f370726e82385ce6e6af46a81fa77999b28ae266bdbb8b34cf9d1a5e66abb8bef SHA512 c83c8ed2700cd951516d497ac2a2cadbbb9fe56634e368a252ea7186266ada0bb744edb05fc2d8f1483a5f968854e46606f54926b50677cf424503b6c496dee5 DIST megaglest-source-3.11.1.tar.xz 2863180 BLAKE2B 01923ad4b29cc7042f0a26ba44a6a023020cbe2071b26b40c3332d763430dd559eb9eb7041182e154a0f1832866c759e08f21a677fcb5f2dba134127b0624b30 SHA512 9e1d8eccff1889199ff0e4b0f1cc3d0193306cd9271a2c98f12a49d61a09789d0813d5f3dadfe7701d2446976992834c63287f0227d660dc9cc9d2ecef65e225 -EBUILD megaglest-3.11.1-r1.ebuild 4599 BLAKE2B 3e2c93a8883e370b796e90f5eab608551bcd4862013535c65c9b253ba5598153df9edfdd74abbf3483b4db38a2bf12239525c18b1e5f7fb61d01a0dbb5435b2d SHA512 e4adcc2397228c260b196a6b97fb85e552236521272e2a3c40c0d92bf56266f6d5c3f29ca624ba1737f66c29b8549ad1d53e4345aca2a23fb6cc1f998abe0459 +EBUILD megaglest-3.11.1-r1.ebuild 4699 BLAKE2B 61d0354bc5ea224efd01e1cae93312bdb5a4c56c9c52d1d05e80e81c827656db4d6039ba4421f12515e63c596e792c1c6286376c3ae4bc40c1f77079156556c6 SHA512 30c0e8a47a8a43a7e8089e528d1ec14f4d99571eb7e6b8f1b05089fec3bffe54831ef55fec66d39216913054a86d4a94eefd791c60ed7add516b599345a9c432 +EBUILD megaglest-3.11.1-r100.ebuild 4343 BLAKE2B b5f09ea8ff4df54396428a1d605b9191cfae81e10bce35c707763b2e39dd94db78d1e363f77bb1e7bf8f0a1d111d67e3323825fe30adde1e650f728b34f24160 SHA512 5bbb1f2ebe9dd128c8c33a629914f1748b9a522b91de0cbcf5c3cb386358b6849b3c9b17fa6fee2a0aea94ea15a84b5d605788abc8d0d85f2509102249d9c2f2 MISC metadata.xml 1621 BLAKE2B c8cbe108c70355825dfc84d74a64380ca7fd84b335abee058738e2139f00a25c3e79f6a7a3faa0da5cd06051809315ef482cf661ab29bac7f1254f41abdab8fc SHA512 b2bb0fc5043314a798b697ca6e337b7b4896475502c14c0e31ebf8b9d56e6629ef8c4dded03338b1ec7669db5a3ab84021177893dae2e0fae9d661d1f27216d1 diff --git a/games-strategy/megaglest/files/megaglest-3.11.1-cmake-lua.patch b/games-strategy/megaglest/files/megaglest-3.11.1-cmake-lua.patch new file mode 100644 index 000000000000..c8d30e3d096f --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.11.1-cmake-lua.patch @@ -0,0 +1,25 @@ +Use the standard FindLua.cmake instead of the modified bundled FindLUA.cmake, +and force the use of an exact Lua version. + +--- a/source/glest_game/CMakeLists.txt ++++ b/source/glest_game/CMakeLists.txt +@@ -64,7 +64,7 @@ + ENDIF() + ENDIF() + +- FIND_PACKAGE(LUA REQUIRED) ++ FIND_PACKAGE(Lua ${FORCE_LUA_VERSION} EXACT REQUIRED) + INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR}) + IF(UNIX) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUA_LIBRARIES}) +--- a/source/shared_lib/CMakeLists.txt ++++ b/source/shared_lib/CMakeLists.txt +@@ -132,7 +132,7 @@ + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENAL_LIBRARY}) + ENDIF() + +- FIND_PACKAGE(LUA REQUIRED) ++ FIND_PACKAGE(Lua ${FORCE_LUA_VERSION} EXACT REQUIRED) + INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR}) + IF(UNIX) + SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS}) diff --git a/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild b/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild index ca99c5450f14..86e78fb0535d 100644 --- a/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild +++ b/games-strategy/megaglest/megaglest-3.11.1-r1.ebuild @@ -17,8 +17,10 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug +editor fribidi cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static +streflop +tools +unicode wxuniversal +model-viewer videos" +# Newer versions of megaglest-data install directly into /usr RDEPEND=" ~games-strategy/${PN}-data-${PV} + <games-strategy/${PN}-data-3.11.1-r1 >=dev-lang/lua-5.1:0 dev-libs/libxml2 media-libs/fontconfig diff --git a/games-strategy/megaglest/megaglest-3.11.1-r100.ebuild b/games-strategy/megaglest/megaglest-3.11.1-r100.ebuild new file mode 100644 index 000000000000..796b7822f5ec --- /dev/null +++ b/games-strategy/megaglest/megaglest-3.11.1-r100.ebuild @@ -0,0 +1,166 @@ +# Copyright 2010-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# google-breakpad +# TODO: fribidi, libvorbis static + +EAPI=7 + +# src_install() currently requires this +CMAKE_MAKEFILE_GENERATOR="emake" + +LUA_COMPAT=( lua5-{1..2} ) + +# Only needed by certain features +VIRTUALX_REQUIRED="manual" + +inherit cmake desktop flag-o-matic lua-single virtualx wxwidgets xdg-utils + +DESCRIPTION="Cross-platform 3D realtime strategy game" +HOMEPAGE="https://megaglest.org/ https://github.com/MegaGlest/megaglest-source" +SRC_URI="https://github.com/MegaGlest/megaglest-source/releases/download/${PV}/megaglest-source-${PV}.tar.xz" + +LICENSE="GPL-3 BitstreamVera" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug +editor fribidi cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static +streflop +tools +unicode wxuniversal +model-viewer videos" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +# Older versions of megaglest-data install into /usr/games +RDEPEND="${LUA_DEPS} + ~games-strategy/${PN}-data-${PV} + >=games-strategy/${PN}-data-3.11.1-r1 + dev-libs/libxml2 + media-libs/fontconfig + media-libs/freetype + media-libs/libsdl[X,sound,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:3.0[X,opengl] ) + fribidi? ( dev-libs/fribidi ) + model-viewer? ( x11-libs/wxGTK:3.0[X] ) + !static? ( + 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:0 + ) + videos? ( media-video/vlc )" +DEPEND="${RDEPEND} + 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:0[static-libs] + )" +BDEPEND="sys-apps/help2man + virtual/pkgconfig + editor? ( ${VIRTUALX_DEPEND} ) + model-viewer? ( ${VIRTUALX_DEPEND} )" + +PATCHES=( + "${FILESDIR}"/${P}-static-build.patch + "${FILESDIR}"/${P}-cmake.patch + "${FILESDIR}"/${P}-cmake-lua.patch + "${FILESDIR}"/${P}-miniupnpc.patch + "${FILESDIR}"/${P}-miniupnpc-api-version-16.patch +) + +src_prepare() { + cmake_src_prepare + + if use editor || use model-viewer ; then + WX_GTK_VER="3.0" + setup-wxwidgets + fi +} + +src_configure() { + if use cpu_flags_x86_sse3; then + SSE=3 + elif use cpu_flags_x86_sse2; then + SSE=2 + elif use cpu_flags_x86_sse; then + SSE=1 + else + SSE=0 + fi + + local mycmakeargs=( + -DBUILD_MEGAGLEST_MAP_EDITOR=$(usex editor) + -DBUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS=$(usex tools) + -DBUILD_MEGAGLEST_MODEL_VIEWER=$(usex model-viewer) + -DENABLE_FRIBIDI=$(usex fribidi) + -DFORCE_LUA_VERSION="$(lua_get_version)" + -DMAX_SSE_LEVEL_DESIRED="${SSE}" + -DUSE_FTGL=ON + -DWANT_STATIC_LIBS=$(usex static) + -DWANT_STREFLOP=$(usex streflop) + -DWITH_VLC=$(usex videos) + -DwxWidgets_USE_STATIC=$(usex static) + -DwxWidgets_USE_UNICODE=$(usex unicode) + -DwxWidgets_USE_UNIVERSAL=$(usex wxuniversal) + + $(usex debug "-DBUILD_MEGAGLEST_UPNP_DEBUG=ON -DwxWidgets_USE_DEBUG=ON" "") + ) + + cmake_src_configure +} + +src_compile() { + if use editor || use model-viewer; then + # work around parallel make issues - bug #561380 + MAKEOPTS="-j1 ${MAKEOPTS}" \ + virtx cmake_src_compile + else + cmake_src_compile + fi +} + +src_install() { + # rebuilds some targets randomly without fast option + emake -C "${BUILD_DIR}" DESTDIR="${D}" "$@" install/fast + + dodoc docs/{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" +} + +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 + + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +} |