diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-11-24 16:33:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-11-24 16:33:11 +0000 |
commit | faddeff65d652bda3291eba255955adb17f1aa19 (patch) | |
tree | 4352e6d85ce48c7c8d96159fad4d3dd90602a70a /games-strategy | |
parent | 0e7b1da874d923b9f006e0000023f5fa528140a8 (diff) |
gentoo auto-resync : 24:11:2023 - 16:33:11
Diffstat (limited to 'games-strategy')
15 files changed, 671 insertions, 0 deletions
diff --git a/games-strategy/Manifest.gz b/games-strategy/Manifest.gz Binary files differindex 54d9dec809a1..76172f323853 100644 --- a/games-strategy/Manifest.gz +++ b/games-strategy/Manifest.gz diff --git a/games-strategy/megaglest/Manifest b/games-strategy/megaglest/Manifest index 2a46289f2198..2ff3b7e8e580 100644 --- a/games-strategy/megaglest/Manifest +++ b/games-strategy/megaglest/Manifest @@ -1,4 +1,16 @@ AUX megaglest-3.11.1-cmake-lua.patch 848 BLAKE2B ae918da49eb8bac6add4cd0df27f2e58cc632a3b5c3fc188fefd7152cbdff83e255bab9cdcd17580ef564ca99a88fc4715ed103001463981d7053d8338c3d5ca SHA512 33b1a3bb6fc0fed9cc30d5cd88aed4b738b831625e0d1a33cf11dfd0252b9bf8b5c2cbdfd1a8f62b4b683562e7d6fb824675850ac79ce7f74ce4d7e41feb7076 +AUX megaglest-3.13.0-GLEW_ERROR_NO_GLX_DISPLAY.patch 1003 BLAKE2B 50f45e1598c55da1c12f8baa7a4bd19e14cc81f7c12e5b28bec7220cd0e8b09878071796db2700fea8c0a9ae6b776b9ff2cb495d20fcd49addd92b1d82ca0dab SHA512 483cbaab13e3f850986ffd903c811a48ec12d5a122f46cc25fe74b895db71ce5abd706ae32f59445820e12ed87a29bd28c389e76cf1ae37b6f36d90777439844 +AUX megaglest-3.13.0-fbd0cfb1.patch 1822 BLAKE2B 48503b231e061de8e7fdb60a013d80cdd97626c062a7955fa4fd05624e9727e5a78220eb230fa3e85c1dc3e570014ced4a33339d043748dad8b35339a69d0dc5 SHA512 b941d06f5f4fd5e3f9fba615142147041bb9693c61b5568f9f488b9453c7ce9b21e8a3371bd8e7c7988baa47e7528169fc2ab321ca87d34653f96138039d3506 +AUX megaglest-3.13.0-fix-lua-version-ordering.patch 920 BLAKE2B 28661ec9a525fc9944bb38d7b06713420284759168c50b6c628decc6b571ec1aeb6b627b5d89c3bdec167a4b1fe961a74676d13d576a32cad27a2ff31beae19c SHA512 97d0e6bd1acf1fd9e0ced79eeee994598bd109cceb2a340ec65d65d0f4c847575143ccb7e957bff0eea075ea9188960499f9028c53eaa75ec6c886595ae94504 +AUX megaglest-3.13.0-help2man.patch 1000 BLAKE2B da7ef05b17a2d06a11f1c684af0dcf6575313305623aeb89f9d7036e57efd27616d4e0272720b1293602797bff5e70d6eb380972fab98ef22213d0aa23bb5169 SHA512 5a474aca1b4ce745efecc06f8327b29c742f7704b11e75937e0da3cce2fbe332ebb4f69b56dee676b816f869a85555fb81c166a2dcd5fe7aad7f56417996a77d +AUX megaglest-3.13.0-multiple-definitions.patch 2322 BLAKE2B 581b8df98d1eac77f1a4f2ab90dc6706cc6e4c5c8bbf37430aca0eb6cec7ef2a0662690a3ca50b52ad3f903b6d8ed69146a8aea25c3ca36227204b59b3048f40 SHA512 2d1b45643f18532ed20a499f4f626e725ef6ff4ab94998abcc911d1dd6bd1874d01fdb1813cc61d0ccdce4ddedc7eed47b821bb1f0d284a635ffb648659907ce +AUX megaglest-3.13.0-underlink.patch 609 BLAKE2B 74a00d1c160d1ec811ac86a27156b19a1c4207ae642714ac09b7938d5b36ac26176ed8cc79fb1d6baca8117d3c04ca0551d1678015b277804eeaf46ccdbaac61 SHA512 e32b3c1d2983207651db9ae4e38ee503cf3ab8a4c9c635c5fdd6e6fc4fd50a332e5d42905b72207705757359c2b68cc21fecfbc2be3e004bb0a7a8eceb935c3a +DIST megaglest-3.13.0-412b37d0.patch 779 BLAKE2B 317743191d54eb4d57d96ce5793cfc059e9f82f2e9ca9c2bba197909e40b2574b05aab47e5ba07b8181eb705e9668b7673a8c88468c3120b4d3ff3e22ae55b24 SHA512 3ececb0b9f4e704bbf6e072c8b12c02a86b27b8289843afd6d1ea5342fae25a347b342c8204873a5954f5cb9dbed6af7d6ea9c9d3f1ac1de46152a23fde4b828 +DIST megaglest-3.13.0-5801b1fa.patch 5691 BLAKE2B 3f0b01ed1bce432c6d5f7d882d6e846475015919f1a0c1f1c740582accc3b957d73edda3a3dfc488706424041b5fe1141ce9a911500baab599cea9505a2958e2 SHA512 93c4a9e829c5eb9d1924f423c62a3213421121cd14781e1c80f4fb1a0ffdcbb492bae12e7b0ef0f8e3018c4da886d02b2ac122e05738901edfdb16a5b653e824 +DIST megaglest-3.13.0-789e1cdf.patch 1543 BLAKE2B f75ce901683b6a9f9578ec6987101f10e9c5f3e5295aab4e3ccbe0ca37a8136d70f775654321d67614c31bec96312bc3ea334ed97e599ec73825771bb657045d SHA512 6ee86999341bb12dbc6db8c3f532c052400ab685d0c3ec3e286682eba30fd075623073dbb2427155f255f0555b42c3884ac8405f07ab2429e6809e1a5dbd5aa0 +DIST megaglest-3.13.0-e09ba53c.patch 3485 BLAKE2B fa0c94b88726f239957b3fb950c6be2be18e564bbf2cfbc809a069961edae0023d69d629cdaab73ca31bb731fbf0dbbd2103a8b84c3f857f423d08addacde706 SHA512 4785ff6c1967aaacd8e674cdd6f3a2ecd038cd1951a2337899f5d9654376c7549360f65ed36bc9f0e108f6fff809486f38a6f641afc694b248c6a47b1b1f1ebb +DIST megaglest-3.13.0-fbd0cfb1.patch 1820 BLAKE2B b3a1bf7ca1b51d948b354e4b9cd2d675dadac7b9f072e11032f117479c5199d1f7cfd87146da46a40387bfeaef8433144e37410aa8c92865048744ae31ffd730 SHA512 960fe1be66eb1737e9292c5956c09902e6761ed8de56d864950268e3e8a5184f59b7cf3521629aeb460842f4423699526d5dd71fa0494c7ac2899cab117e7f45 DIST megaglest-source-3.13.0.tar.xz 1979440 BLAKE2B 9df70502e0dddc754897c989222d0bddbebbb781a16f49ffa2dd30ee1dbd3e88249ccd600fbde8dab712a1286e29651bebfc9add0d255b675e9eb0ca5ba60153 SHA512 5ae74efce55d7ec9f38d7701da9c865458e15223b5a3c5ac829e09dc81e63fbea2a235cae99450ea7333044c5166af82a762a29c5793c75711d1200688518b5c +EBUILD megaglest-3.13.0-r1.ebuild 4537 BLAKE2B faacacad0b6a04d95e806e0689f4e10437a55941d574dc92cc91ec4d3095e8d8e910adb7666b76bfbb5a79482c4ffbc1829f9e5c473c667b2e091703e0447640 SHA512 59e26cba7f046e000558afada8c880a2855d38799e22e217c8983bf7e6926a28d70d20320673554d4be27f87dc1d05016201c822e29ccbd7c4ddc26b7cc64cfb EBUILD megaglest-3.13.0.ebuild 3681 BLAKE2B 637c56194556b157e5eabf97051e27a3c988a92d52ba028299490ce5038fb9ff46186e2d59fc689931c4582789d5ef5738f79588c901b14c5ad2a211dc6d613d SHA512 36f9bd1b500ee3c5d05b0df26a862a11db2b7602ff87608a6af8b7191fe3b93def37c697879862fbf038900d1327510f8da64d6cb897a0abb2a5e5fcfc3935a6 MISC metadata.xml 1622 BLAKE2B f4d7dddd0d654cefb22fe3acc00d366501a5fa93243bef3336965fffe2f8500f94eed915e5adf7655a8e1f7a28fcbc2fc49d99a2cdf2899173ffe819cdfdfa80 SHA512 5b65d3bf4ccf9619350293d3669e7a001fcb0f4addcb0c50f56c6ccba2239b87507a796a34d5fc5c3b2d144e740057496220aff2d0699a41db5f37ae8eaad2bc diff --git a/games-strategy/megaglest/files/megaglest-3.13.0-GLEW_ERROR_NO_GLX_DISPLAY.patch b/games-strategy/megaglest/files/megaglest-3.13.0-GLEW_ERROR_NO_GLX_DISPLAY.patch new file mode 100644 index 000000000000..7855baa2273f --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.13.0-GLEW_ERROR_NO_GLX_DISPLAY.patch @@ -0,0 +1,12 @@ +diff -up megaglest-source-3.13.0/source/shared_lib/sources/platform/sdl/gl_wrap.cpp.ignore-GLEW_ERROR_NO_GLX_DISPLAY megaglest-source-3.13.0/source/shared_lib/sources/platform/sdl/gl_wrap.cpp +--- megaglest-source-3.13.0/source/shared_lib/sources/platform/sdl/gl_wrap.cpp.ignore-GLEW_ERROR_NO_GLX_DISPLAY 2022-10-17 09:47:51.084267697 -0400 ++++ megaglest-source-3.13.0/source/shared_lib/sources/platform/sdl/gl_wrap.cpp 2022-10-17 09:48:35.079555790 -0400 +@@ -301,7 +301,7 @@ void PlatformContextGl::init(int colorBi + + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d] AFTER glewInit call err = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,err); + +- if (GLEW_OK != err) { ++ if (GLEW_OK != err && GLEW_ERROR_NO_GLX_DISPLAY != err) { + if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); + + fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err)); diff --git a/games-strategy/megaglest/files/megaglest-3.13.0-fbd0cfb1.patch b/games-strategy/megaglest/files/megaglest-3.13.0-fbd0cfb1.patch new file mode 100644 index 000000000000..6f2eb91847e2 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.13.0-fbd0cfb1.patch @@ -0,0 +1,75 @@ +From fbd0cfb17ed759d24aeb577a602b0d97f7895cc2 Mon Sep 17 00:00:00 2001 +From: titiger <titi_linux@megaglest.org> +Date: Sat, 29 May 2021 02:41:40 +0200 +Subject: [PATCH] get rid of manual wxPaintEvent creation + +--- + source/glest_map_editor/main.cpp | 19 +++++++------------ + 1 file changed, 7 insertions(+), 12 deletions(-) + +diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp +index 3a799c864..889a1dea8 100644 +--- a/source/glest_map_editor/main.cpp ++++ b/source/glest_map_editor/main.cpp +@@ -545,8 +545,7 @@ MainWindow::~MainWindow() { + } + + void MainWindow::setDirty(bool val) { +- wxPaintEvent ev; +- onPaint(ev); ++ refreshThings(); + if (fileModified && val) { + return; + } +@@ -582,8 +581,8 @@ void MainWindow::onMouseDown(wxMouseEvent &event, int x, int y) { + if (!isDirty()) { + setDirty(true); + } +- wxPaintEvent ev; +- onPaint(ev); ++ ++ refreshThings(); + } + event.Skip(); + } +@@ -593,18 +592,16 @@ void MainWindow::onMouseWheelDown(wxMouseEvent &event) { + if(program == NULL) { + return; + } +- wxPaintEvent ev; + program->incCellSize(1); +- onPaint(ev); ++ refreshThings(); + } + + void MainWindow::onMouseWheelUp(wxMouseEvent &event) { + if(program == NULL) { + return; + } +- wxPaintEvent ev; + program->incCellSize(-1); +- onPaint(ev); ++ refreshThings(); + } + + void MainWindow::onMouseMove(wxMouseEvent &event, int x, int y) { +@@ -651,8 +648,7 @@ void MainWindow::onMouseMove(wxMouseEvent &event, int x, int y) { + lastY = y; + + if (repaint) { +- wxPaintEvent ev; +- onPaint(ev); ++ refreshThings(); + } + event.Skip(); + } +@@ -866,8 +862,7 @@ void MainWindow::onMenuEditReset(wxCommandEvent &event) { + currentFile = ""; + fileName = "New (unsaved) map"; + +- wxPaintEvent ev; +- onPaint(ev); ++ refreshThings(); + } + + void MainWindow::onMenuEditResetPlayers(wxCommandEvent &event) { diff --git a/games-strategy/megaglest/files/megaglest-3.13.0-fix-lua-version-ordering.patch b/games-strategy/megaglest/files/megaglest-3.13.0-fix-lua-version-ordering.patch new file mode 100644 index 000000000000..60ab155946f0 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.13.0-fix-lua-version-ordering.patch @@ -0,0 +1,12 @@ +diff -up megaglest-source-3.13.0/mk/cmake/Modules/ReqVersAndStaticConf.cmake.fix-lua-version-ordering megaglest-source-3.13.0/mk/cmake/Modules/ReqVersAndStaticConf.cmake +--- megaglest-source-3.13.0/mk/cmake/Modules/ReqVersAndStaticConf.cmake.fix-lua-version-ordering 2022-10-17 09:17:11.429220699 -0400 ++++ megaglest-source-3.13.0/mk/cmake/Modules/ReqVersAndStaticConf.cmake 2022-10-17 09:17:25.388312109 -0400 +@@ -57,7 +57,7 @@ IF(NOT DEFINED FORCE_LUA_VERSION) + SET(FORCE_LUA_VERSION "OFF" CACHE STRING "Try to force some specific lua version (for example older). On the list may be also not existing versions yet for future use." FORCE) + ENDIF() + SET_PROPERTY(CACHE FORCE_LUA_VERSION PROPERTY STRINGS OFF 5.5 5.4 5.3 5.2 5.1 5.0) +-SET(ALL_LUA_VERSIONS_IN_ORDER 5.3 5.2 5.1 5.4 5.5 5.0) ++SET(ALL_LUA_VERSIONS_IN_ORDER 5.4 5.3 5.2 5.1 5.5 5.0) + + IF(STATIC_JPEG) + SET(JPEG_NAMES jpeg.a libjpeg.a ${JPEG_NAMES}) diff --git a/games-strategy/megaglest/files/megaglest-3.13.0-help2man.patch b/games-strategy/megaglest/files/megaglest-3.13.0-help2man.patch new file mode 100644 index 000000000000..efb8fcbf01d4 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.13.0-help2man.patch @@ -0,0 +1,12 @@ +diff -up megaglest-3.13.0/source/g3d_viewer/CMakeLists.txt.orig megaglest-3.13.0/source/g3d_viewer/CMakeLists.txt +--- megaglest-3.13.0/source/g3d_viewer/CMakeLists.txt.orig 2019-09-24 15:36:04.938321806 -0300 ++++ megaglest-3.13.0/source/g3d_viewer/CMakeLists.txt 2019-09-24 15:36:34.633526679 -0300 +@@ -207,7 +207,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER) + MESSAGE(STATUS "***-- Found xvfb-run: ${XVFB_EXEC} about to build manpage with it.") + + add_custom_target(${TARGET_NAME_MANPAGE} ALL +- COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --no-discard-stderr --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME} ++ COMMAND ${XVFB_EXEC} --auto-servernum ${HELP2MAN} --name='${MG_MANPAGE_DESCRIPTION}' --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME} + DEPENDS ${TARGET_NAME}) + ELSE() + add_custom_target(${TARGET_NAME_MANPAGE} ALL diff --git a/games-strategy/megaglest/files/megaglest-3.13.0-multiple-definitions.patch b/games-strategy/megaglest/files/megaglest-3.13.0-multiple-definitions.patch new file mode 100644 index 000000000000..657b70fe228d --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.13.0-multiple-definitions.patch @@ -0,0 +1,46 @@ +diff -up megaglest-3.13.0/source/shared_lib/include/feathery_ftp/ftpTypes.h.orig megaglest-3.13.0/source/shared_lib/include/feathery_ftp/ftpTypes.h +--- megaglest-3.13.0/source/shared_lib/include/feathery_ftp/ftpTypes.h.orig 2020-03-30 13:56:49.360323060 -0300 ++++ megaglest-3.13.0/source/shared_lib/include/feathery_ftp/ftpTypes.h 2020-03-30 13:58:21.924743049 -0300 +@@ -69,7 +69,7 @@ typedef uint16_t port_t; + extern "C" { + #endif + +-int VERBOSE_MODE_ENABLED; ++extern int VERBOSE_MODE_ENABLED; + + typedef ip_t (*ftpFindExternalFTPServerIpType)(ip_t clientIp); + typedef void (*ftpAddUPNPPortForwardType)(int internalPort, int externalPort); +@@ -77,11 +77,11 @@ typedef void (*ftpRemoveUPNPPortForwardT + typedef int (*ftpIsValidClientType)(ip_t clientIp); + typedef int (*ftpIsClientAllowedToGetFileType)(ip_t clientIp, const char *username, const char *filename); + +-ftpFindExternalFTPServerIpType ftpFindExternalFTPServerIp; +-ftpAddUPNPPortForwardType ftpAddUPNPPortForward; +-ftpRemoveUPNPPortForwardType ftpRemoveUPNPPortForward; +-ftpIsValidClientType ftpIsValidClient; +-ftpIsClientAllowedToGetFileType ftpIsClientAllowedToGetFile; ++extern ftpFindExternalFTPServerIpType ftpFindExternalFTPServerIp; ++extern ftpAddUPNPPortForwardType ftpAddUPNPPortForward; ++extern ftpRemoveUPNPPortForwardType ftpRemoveUPNPPortForward; ++extern ftpIsValidClientType ftpIsValidClient; ++extern ftpIsClientAllowedToGetFileType ftpIsClientAllowedToGetFile; + + #ifdef __cplusplus + } +diff -up megaglest-3.13.0/source/shared_lib/sources/feathery_ftp/ftpRuntime.c.orig megaglest-3.13.0/source/shared_lib/sources/feathery_ftp/ftpRuntime.c +--- megaglest-3.13.0/source/shared_lib/sources/feathery_ftp/ftpRuntime.c.orig 2020-03-30 13:56:56.412355058 -0300 ++++ megaglest-3.13.0/source/shared_lib/sources/feathery_ftp/ftpRuntime.c 2020-03-30 13:58:30.524782070 -0300 +@@ -30,6 +30,13 @@ + #include "ftp.h" + #include "ftpMessages.h" + ++int VERBOSE_MODE_ENABLED; ++ ++ftpFindExternalFTPServerIpType ftpFindExternalFTPServerIp; ++ftpAddUPNPPortForwardType ftpAddUPNPPortForward; ++ftpRemoveUPNPPortForwardType ftpRemoveUPNPPortForward; ++ftpIsValidClientType ftpIsValidClient; ++ftpIsClientAllowedToGetFileType ftpIsClientAllowedToGetFile; + + /** + * @brief server-sockets that listens for incoming connections diff --git a/games-strategy/megaglest/files/megaglest-3.13.0-underlink.patch b/games-strategy/megaglest/files/megaglest-3.13.0-underlink.patch new file mode 100644 index 000000000000..646132fe3c66 --- /dev/null +++ b/games-strategy/megaglest/files/megaglest-3.13.0-underlink.patch @@ -0,0 +1,12 @@ +diff -up megaglest-3.13.0/source/shared_lib/CMakeLists.txt.orig megaglest-3.13.0/source/shared_lib/CMakeLists.txt +--- megaglest-3.13.0/source/shared_lib/CMakeLists.txt.orig 2019-09-24 15:38:49.867482131 -0300 ++++ megaglest-3.13.0/source/shared_lib/CMakeLists.txt 2019-09-24 15:39:00.045556832 -0300 +@@ -109,7 +109,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD + FIND_PACKAGE(OpenGL REQUIRED) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + IF(UNIX) +- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY}) ++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY} -lX11) + ENDIF() + + FIND_PACKAGE(X11 REQUIRED) diff --git a/games-strategy/megaglest/megaglest-3.13.0-r1.ebuild b/games-strategy/megaglest/megaglest-3.13.0-r1.ebuild new file mode 100644 index 000000000000..abc3ccab6973 --- /dev/null +++ b/games-strategy/megaglest/megaglest-3.13.0-r1.ebuild @@ -0,0 +1,165 @@ +# Copyright 2010-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Todo: google-breakpad? + +EAPI=8 + +# src_install() currently requires this +CMAKE_MAKEFILE_GENERATOR="emake" + +LUA_COMPAT=( lua5-{1..4} ) + +# Only needed by certain features +VIRTUALX_REQUIRED="manual" + +WX_GTK_VER="3.0-gtk3" +inherit cmake desktop lua-single readme.gentoo-r1 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 + https://github.com/MegaGlest/megaglest-source/commit/789e1cdf.patch -> ${P}-789e1cdf.patch + https://github.com/MegaGlest/megaglest-source/commit/5801b1fa.patch -> ${P}-5801b1fa.patch + https://github.com/MegaGlest/megaglest-source/commit/412b37d0.patch -> ${P}-412b37d0.patch + https://github.com/MegaGlest/megaglest-source/commit/e09ba53c.patch -> ${P}-e09ba53c.patch + https://github.com/MegaGlest/megaglest-source/commit/fbd0cfb1.patch -> ${P}-fbd0cfb1.patch +" + +LICENSE="GPL-3 BitstreamVera" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug +editor fribidi cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 +streflop +tools +unicode wxuniversal +model-viewer videos" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + ${LUA_DEPS} + ~games-strategy/${PN}-data-${PV} + dev-libs/libxml2 + dev-libs/xerces-c[icu] + media-libs/fontconfig + media-libs/freetype + media-libs/ftgl + media-libs/glew:= + net-libs/libircclient + media-libs/libpng:0 + media-libs/libsdl2[X,sound,joystick,opengl,video] + media-libs/libvorbis + media-libs/openal + net-libs/gnutls:= + net-libs/miniupnpc:= + net-misc/curl + sys-libs/zlib + virtual/opengl + virtual/glu + virtual/jpeg:0= + x11-libs/libX11 + x11-libs/libXext + editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] ) + fribidi? ( dev-libs/fribidi ) + model-viewer? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) + videos? ( media-video/vlc ) +" +DEPEND="${RDEPEND}" + +BDEPEND="sys-apps/help2man + virtual/pkgconfig + editor? ( ${VIRTUALX_DEPEND} ) + model-viewer? ( ${VIRTUALX_DEPEND} )" + +PATCHES=( + "${FILESDIR}/${PN}-3.11.1-cmake-lua.patch" + + # From Fedora and Arch + "${FILESDIR}/${P}-underlink.patch" + "${FILESDIR}/${P}-fix-lua-version-ordering.patch" + "${FILESDIR}/${P}-multiple-definitions.patch" + "${FILESDIR}/${P}-GLEW_ERROR_NO_GLX_DISPLAY.patch" + "${FILESDIR}/${P}-help2man.patch" + + # Fix build with wxWidgets 3.2 + "${DISTDIR}/${P}-789e1cdf.patch" + "${DISTDIR}/${P}-5801b1fa.patch" + "${DISTDIR}/${P}-412b37d0.patch" + "${DISTDIR}/${P}-e09ba53c.patch" + "${FILESDIR}/${P}-fbd0cfb1.patch" +) + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS="DO NOT directly edit glest.ini and glestkeys.ini but rather glestuser.ini +and glestuserkeys.ini in ~/.megaglest/ and create your user over-ride +values in these files. + +If you have an older graphics card which only supports OpenGL 1.2, and the +game crashes when you try to play, try starting with 'megaglest --disable-vbo' +Some graphics cards may require setting Max Lights to 1. +" + +src_prepare() { + cmake_src_prepare + + if use editor || use model-viewer ; then + 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=( + -DWANT_GIT_STAMP=OFF + -DWANT_USE_FriBiDi="$(usex fribidi)" + -DBUILD_MEGAGLEST_MAP_EDITOR="$(usex editor)" + -DBUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS="$(usex tools)" + -DBUILD_MEGAGLEST_MODEL_VIEWER="$(usex model-viewer)" + -DWANT_USE_VLC="$(usex videos)" + -DFORCE_LUA_VERSION="$(lua_get_version)" + -DFORCE_MAX_SSE_LEVEL="${SSE}" + -DWANT_USE_FTGL=ON + -DWANT_STATIC_LIBS=OFF + -DWANT_USE_STREFLOP="$(usex streflop)" + -DwxWidgets_USE_STATIC=OFF + -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() { + cmake_src_compile +} + +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 + + use editor && + make_desktop_entry ${PN}_editor "MegaGlest Map Editor" + use model-viewer && + make_desktop_entry ${PN}_g3dviewer "MegaGlest Model Viewer" + + readme.gentoo_create_doc + einstalldocs +} + +pkg_postinst() { + xdg_icon_cache_update + readme.gentoo_print_elog +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/games-strategy/scorched3d/Manifest b/games-strategy/scorched3d/Manifest index cdb98547561a..7fcfe3a55c08 100644 --- a/games-strategy/scorched3d/Manifest +++ b/games-strategy/scorched3d/Manifest @@ -2,10 +2,16 @@ AUX scorched3d-44-fix-c++14.patch 566 BLAKE2B 0924707c4da94b1ca088b46db19e145191 AUX scorched3d-44-fixups.patch 717 BLAKE2B 24af35bbc6d1070d08282e4915d4575f1d0783a49d542a3d7aca45ad91ac8ab8378a0a48d19e7e593d71e39882ea1964a1686d6f4fbcacedb00cbc26f8e68d65 SHA512 8045df51e6a09d9101d971056edc77e03694b2872819cd892d1239c04ad5c59afa8a60adc2ca04a63a5d501bbb113221408522a33159eee836e600bb2b8d40c7 AUX scorched3d-44-freetype.patch 715 BLAKE2B e3eba5c6d3d606db4d8e6055b79dc4afea648a07df75a4dde475ebc86e10247ddf600284b2ee7c404f3afe0d9e376631f9bbf2ad81d75e263b8f3d5c7b447572 SHA512 a1718b97a039282481e8ebdda5a9bc61de91b9a3a34002969e891c2db43872cd85742426150d988db176a4a17f557a42925042d77b78264b7794c7719c6791f5 AUX scorched3d-44-gcc43.patch 561 BLAKE2B 4fb787d19161ecb21b40f0636288d521af62d281bfe9af7408761851f3f527e0645d0c698f42b47765743f72d2d07d85b45d32875182c6febe1b38e0862b3e45 SHA512 c00bfcf2feb7d740e4fc4337a5577962a198d56296bae68a96902046f78fd29856d83b57f309ea9c61d36d4a767e76ae101639a8ed786c5451b440b5a0d908c1 +AUX scorched3d-44-hang-fast-machines.patch 2546 BLAKE2B ed1c5dcf9b63914a5e551e121a4cff360774471716a2ad011e587b84bdea7de664ead43307d6f350ac4aa335c417cc780575640562bcae52a3ffa107459dd712 SHA512 b9c2bb9ea3a034163949901776918dad6b6ea526629b1c7a5feebd3ed67847658ec4d4eb5a972ba9b6eb9cd0634703a3d08c5d304b64cd8bc4e09e65dde4deed +AUX scorched3d-44-help.patch 676 BLAKE2B f57ff614d45aa5af790fb7fd4acf3892f1eb878520f6650769a0bf244182786fbcf2fa9ce528765e8dddfda2b1378482a00d53c49956b3d7ae03ff0e36589d23 SHA512 a0f7c249d2cc2e228130ce66c1ee79bac3698f48db5b7cbdcbd29619db83e55e875d23c2fe472008c9241662ccf3bb99093ef06d5e6f8114b238c4d247ead16d AUX scorched3d-44-jpeg9.patch 614 BLAKE2B de7f71778be9530801a6f764d64f6020a260c9cef328dbf0481f9a486f50211879db981fffc54ec4fa67309a365fa8f1e712be28b72514dc69473c23c7b422e5 SHA512 8adb3bd124b11b006d8124e57fc506e8dc56415c89cca70440901cef7aa547f241d100c42281345fd489c95f9e8eb105d5e5de5ef18382087e203877cc8f6ca4 AUX scorched3d-44-odbc.patch 503 BLAKE2B 90c212fd77732bad90d5455e967cbc18f3e28c6352637e6325dd9c3ae91e9e86d759dac66d1054a75a84ddfa827fb5b80aa4483d90e77782a5632ad4bc29fdd6 SHA512 8bf3e3f9a91502a7c84be73a73e0909c09b050266fb2c6847be2cca13b1a368697dd70c373b6bbce4b12ba97241b2d577cce3604640b4182b2be223d009a4f6e +AUX scorched3d-44-openal-pkgconfig.patch 4026 BLAKE2B a6ab68656170f5f0b20596e797da90c2b3dd8c1899fd2d6f36516c8ae12bde427ce5194f2d70ba2b8180325eae43e2d82028806fec3e09aee6e39d8db8c727ec SHA512 9941bbdd4cc17657c3c74e34a0027575bb560e402c44983079868800cf308a6c03160276c4d0f101887623f7c32ca171812c760895080ce062988f1ffd1b40cd AUX scorched3d-44-win32.patch 464 BLAKE2B 51362a695212dd8d37013c1b4a11d77fb1b8564b54e3ec9ce3e0165ee83e42d65883dc3df964180d975885a555b1ae02e87fc20cc3c85d4507308110ee7cf810 SHA512 992224f65f80527276c0b6e139ea44c6c29a2fbfa3a0af78e2f2366897dbd51e9988b065aa21ac95cf9b1a0efc8866e2e45646e1851f8afd195651b3c47a81dd AUX scorched3d-44-wxgtk.patch 7001 BLAKE2B b120e1cc12343fa5be2e4348930d2656eb2c727224a8e9e63f00dfb4da71888918d3fcccc1a9a439737ce2f6fbe6224be06d4801b4cb857ad1e4765d2c444e4e SHA512 99e21ff6854bbea676c8ea0a5ef2b28a4d6020b34fbae134d9346d4febb7b6defbd39cb712f29b3dcff7ac829b2e76275a85d7d740e921835898f550c4471120 +AUX scorched3d-44-wxgtk32.patch 548 BLAKE2B d17ce751427f259c042893604ae6558c829ffda86654452ecbd49c5c6ab38d8fdd95e5b2bebda0a58bb2ccd45575b6c94c238abc2d5771e9d4389a8a7b0de16b SHA512 239fe6451861709c90f8bf292913a91525765893c2d64f2579304b5cc88f9c844968507244e70edf8a3038177caf894849f90404098c9943d9d809576cc6d3c7 DIST Scorched3D-44-src.tar.gz 41689613 BLAKE2B 61f5536ad6e9dedeb0e778f90d73aa918f890632385278d4d788a43f1e199e817d6199f923c264dadbe8084fa53c32968b599c9b08784de0d5752069f9bed818 SHA512 27341d12ef9db5b64c1051a8abe45cef8a957e26c2cd8928f64c071589052d2857fc6f8104772bb67d5d348aef14122a117d9e00d61e4d9f963f3b5bbe5859ca +DIST scorched3d.png 4559 BLAKE2B dba1c4021844b71cea7e71132f6a1ff6ecfbd5bcf8978210b56100d005accdcb85eaa619406863dc0582413cd1d4c0c07d7d1924cbcef49d80af7eaaf77c41ff SHA512 3034e7ff643443bbc283c0c566d0ef062c10b9f7d326f005ebbe87e68b795cafff20ce65dd4656057aac7982eee4cff44196e0e38a3b6bbd556c98439e3950d4 EBUILD scorched3d-44-r2.ebuild 2304 BLAKE2B ef34d75cc048db10b3ccce46c38295951db7fb189e93911d6936c3ca4864b60ea298ffad473778b2a46679681872e35ff0a5aa0cc5fe8889baf1a7b79bbbc3b8 SHA512 70e44e513480ad18276e89e981dd0b06b18e4404439f9be5f9cdefce97e2fc432133c088290d56615a775e1c835251ea28690ef70bcf410012c070a5c284600e +EBUILD scorched3d-44-r3.ebuild 2535 BLAKE2B 9ffe1d8be594ce1d71b84ac264e460e64710165208672980897dc391cd2638d59a2f536fd2e51bdddcfe8801ba4ce6c802c4dc97256e58aa7f8eaa4d0971c165 SHA512 a797c083f29473b9b2f299da3629942573e0464a449db3c70e897668ee6cb67d22281c43fef0e0b30d4e822a7245e641c5fb036871907627251af70d8fa45fe2 MISC metadata.xml 334 BLAKE2B dfd62c816fbf4cf4f400052ff02c95147b6f4114c5523a8c5be6cedb667b021b3e61f179e8abbdf5f1be47980592977cefb1d6cf2aab2e13cc0b210e031ba3ee SHA512 19e29955c5d1d53fcf1f03c28200201785a0d7c349a1a71a102d06cc003f8e43e057404382aa0354c9f3c69105dc063a3a56648665031555b35f7426118f4224 diff --git a/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch b/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch new file mode 100644 index 000000000000..4773081b6f31 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-hang-fast-machines.patch @@ -0,0 +1,53 @@ +diff -up scorched/src/common/coms/ComsLoadLevelMessage.cpp~ scorched/src/common/coms/ComsLoadLevelMessage.cpp +--- scorched/src/common/coms/ComsLoadLevelMessage.cpp~ 2014-08-01 18:47:31.000000000 +0200 ++++ scorched/src/common/coms/ComsLoadLevelMessage.cpp 2020-08-13 21:33:59.895250469 +0200 +@@ -108,6 +108,49 @@ bool ComsLoadLevelMessage::loadState(Sco +
+ bool ComsLoadLevelMessage::loadTanks(ScorchedContext &context)
+ {
++ /*
++ * There is a timing bug which shows on really fast machines
++ * where the client starts talking to the server before the
++ * server initial setup is done.
++ * In sofar as I have managed to debug this, the following
++ * happens on slower machines, aka the GOOD case:
++ *
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Server TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Server TankAddSimAction::invokeAction() new Tank "Spectator"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Client TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Client TankAddSimAction::invokeAction() new Tank "Spectator"
++ *
++ * Note the server internally creates all tanks before the
++ * client does and thus before the client starts sending
++ * messages related to these tanks to the server.
++ *
++ * On a fast enough system (i7-10610U) the following order
++ * has been observed instead:
++ *
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Server TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Fred"
++ * Client TankAddSimAction::invokeAction() new Tank "(Bot) Ted"
++ * Client TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Client TankAddSimAction::invokeAction() new Tank "Spectator"
++ * Server TankAddSimAction::invokeAction() new Tank "Player 1"
++ * Server TankAddSimAction::invokeAction() new Tank "Spectator"
++ *
++ * Note the server creates the "Player 1" and "Spectator"
++ * tanks after the client, this causes the server to ignore
++ * some initial messages from the client related to these
++ * tanks, after which things get stuck, breaking non-networked
++ * games on fast machines.
++ *
++ * The sleep below is an ugly but effective workaround for this
++ * issue.
++ */
++ SDL_Delay(100);
++
+ NetBufferReader reader(tanksBuffer_);
+
+ // Add any new tanks
diff --git a/games-strategy/scorched3d/files/scorched3d-44-help.patch b/games-strategy/scorched3d/files/scorched3d-44-help.patch new file mode 100644 index 000000000000..4da81a9a53a9 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-help.patch @@ -0,0 +1,12 @@ +diff -up scorched/src/common/common/DefinesScorched.cpp.orig scorched/src/common/common/DefinesScorched.cpp +--- scorched/src/common/common/DefinesScorched.cpp.orig 2009-02-15 15:11:18.000000000 +0100 ++++ scorched/src/common/common/DefinesScorched.cpp 2009-02-16 14:28:53.000000000 +0100 +@@ -58,7 +58,7 @@ void S3D::showURL(const std::string &url + std::string buffer = S3D::formatStringBuffer("open %s", url.c_str());
+ system(buffer.c_str());
+ #else
+- std::string buffer = S3D::formatStringBuffer("firefox %s", url.c_str());
++ std::string buffer = S3D::formatStringBuffer("xdg-open %s", url.c_str());
+ system(buffer.c_str());
+ #endif // __DARWIN__
+ #endif // _WIN32
diff --git a/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch b/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch new file mode 100644 index 000000000000..2e1f4bac98a0 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-openal-pkgconfig.patch @@ -0,0 +1,137 @@ +Description: make use of pkg-config instead of openal-config +From: Reinhard Tartler <siretart@tauware.de> +Date: Sun, 28 Jun 2009 20:04:31 +0200 +Subject: openal-pkgconfig +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533973 + +--- + configure-al.m4 | 118 ++------------------------------------------------------ + 1 file changed, 4 insertions(+), 114 deletions(-) + +diff --git a/configure-al.m4 b/configure-al.m4 +index e37c20b..5250f0d 100644 +--- a/configure-al.m4 ++++ b/configure-al.m4 +@@ -1,118 +1,8 @@ + dnl Checking for OpenAL +-AC_ARG_WITH([openal-static], +- AC_HELP_STRING([--with-openal-static], +- [enable static linking for openal (default no)]), +- [use_static_openal=${withval}],,) +-AC_ARG_ENABLE(openaltest, +- [ --disable-openaltest Do not try to compile and run a test OpenAL program], +- , enable_openaltest=yes) +-AC_MSG_CHECKING(for OpenAL support) +-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no) +-if test x$OPENAL_CONFIG = xno; then +- echo "The openal-config script installed by OpenAL could not be found" +- echo "Make sure openal-config is in your path, or set the OPENAL_CONFIG" +- echo "environment variable to the full path to openal-config." +- echo "Trying pkg-config instead." +- +- AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +- if test x$PKG_CONFIG = xno; then +- echo "The pkg-config script could not be found" +- echo "Make sure pkg-config is in your path, or set the PKG_CONFIG" +- echo "environment variable to the full path to pkg-config." +- +- AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/]) +- else +- OPENAL_CONFIG="$PKG_CONFIG openal"; +- fi +-fi +- +-if test x"$use_static_openal" = x"yes"; then +- AL_LIBS="/usr/local/lib/libopenal.a" +-else +- AL_LIBS="`$OPENAL_CONFIG --libs`" +-fi +- +-AL_CFLAGS="`$OPENAL_CONFIG --cflags`" +- +-AC_MSG_RESULT(yes) +- +-AC_MSG_CHECKING(for Freealut support) +-AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no) +-if test x$FREEALUT_CONFIG = xno; then +- echo "*** Warning: The freealut-config script installed by OpenAL could not be found." +- echo "*** The alut library is required, however some older OpenAL distribitions may include it." +- echo "*** If Scorched3D fails to link check alut is in the link line." +- echo "*** Alternatively, make sure freealut-config is in your path, or set the FREEALUT_CONFIG" +- echo "*** environment variable to the full path to openal-config." +-else +- +- AL_LIBS="$AL_LIBS `$FREEALUT_CONFIG --libs`" +- AL_CFLAGS="$AL_CFLAGS `$FREEALUT_CONFIG --cflags`" +- +- AC_MSG_RESULT(yes) +-fi +- +-AC_MSG_CHECKING(for OpenAL compilation) +-if test "x$enable_openaltest" = "xyes" ; then +- +- ac_save_CFLAGS="$CFLAGS" +- ac_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $AL_CFLAGS" +- LIBS="$AL_LIBS $LIBS" +- +- AC_TRY_COMPILE([ +-#ifdef __APPLE__ +- #include <OpenAL/al.h> +- #include <OpenAL/alc.h> +-#else +- #include <AL/al.h> +- #include <AL/alut.h> +- #include <AL/alc.h> +-#endif +- +- ],[ +- ],[ +- have_openal=yes +- ],[ +- echo "*** Failed to compile using the OpenAL library." +- echo "*** CFLAGS = $AL_CFLAGS"; +- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.]) +- ]) +- +- AC_TRY_LINK([ +-#ifdef __APPLE__ +- #include <OpenAL/al.h> +- #include <OpenAL/alc.h> +-#else +- #include <AL/al.h> +- #include <AL/alut.h> +- #include <AL/alc.h> +-#endif +- +- int main(int argc, char *argv[]) +- { +- alutInit(argc, argv); +- return 0; +- } +-#undef main +-#define main K_and_R_C_main +- +- ],[ +- ],[ +- have_openal=yes +- ],[ +- echo "*** Compiled but failed to link using the OpenAL library." +- echo "*** LIBS = $AL_LIBS"; +- echo "*** Check the OpenAL library is on the LD_LIBRARY_PATH"; +- AC_MSG_ERROR([*** Check the OpenAL library is correctly installed.]) +- ]) +- +- CFLAGS="$ac_save_CFLAGS" +- LIBS="$ac_save_LIBS" +- +- AC_MSG_RESULT(yes) +-fi +- ++PKG_CHECK_MODULES([OPENAL], [openal]) ++PKG_CHECK_MODULES([FREEALUT], [freealut]) ++AL_CFLAGS="$OPENAL_CFLAGS $FREEALUT_CFLAGS" ++AL_LIBS="$OPENAL_LIBS $FREEALUT_LIBS" + AC_SUBST(AL_CFLAGS) + AC_SUBST(AL_LIBS) + diff --git a/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch b/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch new file mode 100644 index 000000000000..9ee0b8c34b58 --- /dev/null +++ b/games-strategy/scorched3d/files/scorched3d-44-wxgtk32.patch @@ -0,0 +1,19 @@ +--- a/src/launcher/scorched/main.cpp ++++ b/src/launcher/scorched/main.cpp +@@ -26,6 +26,7 @@ + #include <graph/OptionsDisplay.h>
+ #include <wx/wx.h>
+ #include <wx/utils.h>
++#include <wx/sizer.h>
+ #include <locale.h>
+ #include <math.h>
+ #include <signal.h>
+@@ -86,6 +87,8 @@ int main(int argc, char *argv[]) + ScorchedParams::instance()->getSDLInitVideo() = true;
+ }
+
++ wxSizerFlags::DisableConsistencyChecks();
++
+ #ifdef _WIN32
+ wxEntry((WXHINSTANCE) (HINSTANCE) GetModuleHandle(NULL),
+ (WXHINSTANCE) NULL, "", SW_SHOWNORMAL);
diff --git a/games-strategy/scorched3d/scorched3d-44-r3.ebuild b/games-strategy/scorched3d/scorched3d-44-r3.ebuild new file mode 100644 index 000000000000..526a838be935 --- /dev/null +++ b/games-strategy/scorched3d/scorched3d-44-r3.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +WX_GTK_VER="3.2-gtk3" +inherit autotools desktop edos2unix wxwidgets + +DESCRIPTION="Multi-player tank battle in 3D (OpenGL)" +HOMEPAGE="http://www.scorched3d.co.uk/" +SRC_URI="mirror://sourceforge/scorched3d/Scorched3D-${PV}-src.tar.gz + https://salsa.debian.org/games-team/scorched3d/-/raw/master/debian/scorched3d.png" +S="${WORKDIR}/scorched" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="dedicated mysql" + +RDEPEND=" + dev-libs/expat + media-fonts/dejavu + media-libs/libpng:0= + media-libs/libsdl[video] + media-libs/sdl-net + sys-libs/zlib + x11-misc/xdg-utils + virtual/jpeg:0 + !dedicated? ( + virtual/opengl + virtual/glu + media-libs/glew:0= + media-libs/libogg + media-libs/libvorbis + media-libs/openal + media-libs/freealut + x11-libs/wxGTK:${WX_GTK_VER}[X] + media-libs/freetype:2 + sci-libs/fftw:3.0= + ) + mysql? ( dev-db/mysql-connector-c ) +" +DEPEND="${RDEPEND}" +BDEPEND="!dedicated? ( virtual/pkgconfig )" + +PATCHES=( + "${FILESDIR}"/${P}-fixups.patch + "${FILESDIR}"/${P}-gcc43.patch + "${FILESDIR}"/${P}-odbc.patch + "${FILESDIR}"/${P}-win32.patch + "${FILESDIR}"/${P}-freetype.patch + "${FILESDIR}"/${P}-jpeg9.patch + "${FILESDIR}"/${P}-wxgtk.patch + "${FILESDIR}"/${P}-fix-c++14.patch + "${FILESDIR}"/${P}-help.patch + "${FILESDIR}"/${P}-hang-fast-machines.patch + "${FILESDIR}"/${P}-wxgtk32.patch + "${FILESDIR}"/${P}-openal-pkgconfig.patch +) + +src_prepare() { + edos2unix \ + src/launcher/wxdialogs/SettingsDialog.cpp \ + src/launcher/wxdialogs/DisplayDialog.cpp \ + src/launcher/wxdialogs/Display.cpp \ + src/launcher/wxdialogs/KeyDialog.cpp + default + eautoreconf +} + +src_configure() { + setup-wxwidgets + econf \ + --datadir="${EPREFIX}"/usr/share/${PN} \ + --with-fftw="${EPREFIX}"/usr \ + --with-ogg="${EPREFIX}"/usr \ + --with-vorbis="${EPREFIX}"/usr \ + --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ + --with-wx-config="${WX_CONFIG}" \ + --without-pgsql \ + $(use_with mysql) \ + $(use_enable dedicated serveronly) +} + +src_install() { + default + + # remove bundled fonts + rm "${ED}"/usr/share/${PN}/data/fonts/* || die + dosym ../../../fonts/dejavu/DejaVuSans.ttf /usr/share/${PN}/data/fonts/dejavusans.ttf + dosym ../../../fonts/dejavu/DejaVuSansCondensed-Bold.ttf /usr/share/${PN}/data/fonts/dejavusconbd.ttf + dosym ../../../fonts/dejavu/DejaVuSansMono-Bold.ttf /usr/share/${PN}/data/fonts/dejavusmobd.ttf + + if ! use dedicated; then + doicon "${DISTDIR}"/${PN}.png + make_desktop_entry ${PN} "Scorched 3D" + fi +} |