summaryrefslogtreecommitdiff
path: root/games-engines/odamex
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-engines/odamex
reinit the tree, so we can have metadata
Diffstat (limited to 'games-engines/odamex')
-rw-r--r--games-engines/odamex/Manifest11
-rw-r--r--games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch89
-rw-r--r--games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch110
-rw-r--r--games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch67
-rw-r--r--games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch58
-rw-r--r--games-engines/odamex/files/odamex-0.7.0-gcc6.patch39
-rw-r--r--games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch35
-rw-r--r--games-engines/odamex/metadata.xml38
-rw-r--r--games-engines/odamex/odamex-0.7.0.ebuild116
9 files changed, 563 insertions, 0 deletions
diff --git a/games-engines/odamex/Manifest b/games-engines/odamex/Manifest
new file mode 100644
index 000000000000..979bf1d7691d
--- /dev/null
+++ b/games-engines/odamex/Manifest
@@ -0,0 +1,11 @@
+AUX 1-odamex-0.7.0-install-rules.patch 2713 SHA256 0cad5518c87542de22b74a1031c334c0a1ae450126d2470b35fe55b0c6737a23 SHA512 8ad2f8eaaf6697275daec6ff3076c3f8359eed46bc89bb8567f25e5c825ef065ae875c7c607a5bb99fd62bf8e616e4c0296af374817e9fe02abcd311b306a453 WHIRLPOOL 1d9dee520cf3a56497268df38fe8d8f88d302726d4e8c2394249d050b40b0a2008145e6a4b35abc8bd39b5e669262857ab79e6837be37b78fa53dbc9bcb5de52
+AUX 2-odamex-0.7.0-cmake-options.patch 3459 SHA256 c396f5fe451178af9c60fa52eecbd21ccaa81b33a1cf1ca4faeb16b3c6df5fa2 SHA512 ef5ac9a88b189fb4276989e1de6e2723491777fa0cc12cd5dd38b9c992ed22e6be6892371efa4cf4af28eda85883056c27efa3ed074b878f89325333476dd19d WHIRLPOOL 561e424f12795c091aeebfb88cb15ba033d859a598b90972f7b6629e0f760921a8a03405df3c99997471db6680360d0337ab8363e7485eb84b6d2d722003e8ca
+AUX 3-odamex-0.7.0-wad-search-path.patch 1758 SHA256 15c841ac0b99e5a185295fbdd74fea300260620f6b70e1b882cdcb8a00228627 SHA512 031507d97734e75cddbcde5b09a7e483f1110dd08e692652b71a79e7f90b703090798916b3f25a74e18f29e0091e2f018d93662d82f994fb11317ba0215dfd10 WHIRLPOOL 0712c836a422e9094856e144ded6ca68dc582f199deb3d29defdec05eef4fea6427ed6061840ce3f0fdb55ae3b160ce4f87005e3335c153273ad70e4144239f3
+AUX 4-odamex-0.7.0-odalauncher-bin-path.patch 1671 SHA256 aef75036f4e44ffaca38fb12eb9b61cbce939d87d71d7d1607e73d633998388d SHA512 4ab5c84d5e3e1465fb02c775fad0208bf177264137d82297515c8f2bf188e9f4ce79a5510e28dfc4811392ecef407b89267e2baf45d37c236fb86cfc066c1ed2 WHIRLPOOL 5a69fe2877687ed8f296b648e943064bc67bbd3cf0dbeb8940fc372edb07455a2700b35d6033fa3e21b4b17d2dc4c7251055e2a3899b092a6d36c0357bc816db
+AUX odamex-0.7.0-gcc6.patch 1149 SHA256 6f31cff7018a12f79a9c574afeb87b350bd407382fb2ca92f467a3c753d1750d SHA512 e34fc554016d67e42d95b9f2e964b69282791a9c07c9976c49990778188bfc1dab5784b29a798e10d6fcd8cc36893bd3416b57c8e2c9f1bd67587a3524c0a422 WHIRLPOOL 1c1408c18dfa63a64be5dc4e6cd9191bc5383190ffa99c756366a53e4bdc297ea03de791c56f65f44d0f5378fb4a891308f8870318378abf89ed29268b83cbf4
+AUX odamex-0.7.0-miniupnpc.patch 1144 SHA256 189ff82d8e921348239caba5d55d236e8e4a0b18b522259ec29be700665e7b0e SHA512 0a805aca36687f183aa168972ecc9bfcd04c117787e42967fbf62b08873943b9f6c5118f15089a70ede43335ce571216255f315e08ce08f89ff23f6859507951 WHIRLPOOL cf4a8e873c7c7c88d708841fbadcd18290ce448b7db0f7c8c515316935f4d03d6b31aff79af141e4234d3540e3593a1838784783fd7549d14ceb63658153fa2a
+DIST odamex-src-0.7.0.tar.bz2 8435860 SHA256 d0306ddca3d5534672e6f0c547092d8f3f6f815686e4f6b21d6521afae1fd73b SHA512 410f3c2588e4d57006e5bb50eaa0f6c1a83cf197ce40daabb958667483eb6c85138206ac74b8aee64c4208c4360415ad16d1698534be5c7abec1493a0f91aa8b WHIRLPOOL 91ca8f658435f4503df8a2d5f52b1ef1cf34229373c4e1c3918b7eb919ae54e3a416618ce184d54c6ebc25bdfe6fea96f8933f98d859562b4972f89bd5c320ff
+EBUILD odamex-0.7.0.ebuild 2631 SHA256 3460997d72735db56b34562b8f69a1b002963fef538d5ef80a3849951b4c2c1e SHA512 efcdb5e4d946aaf5172fe207f82fae3154b296575eec5f9585aeba98875b14611526274250b07014a88535874e38d606b84b8f2ee152671f87ac771d1a5e4ae4 WHIRLPOOL c0f293c459a69be17d80349bad70dac0aab570dedd8dbee1bc7d47367ece5f99cae8dc9519901b37117cb8afd999f1291fdc5e7afd13798c2da2f1f7efbd8188
+MISC ChangeLog 3907 SHA256 7deac2f4f5eab4c5ce8d5c4b1f492c05d47d9da51238847540c9736b013251ff SHA512 c82c58d595d27d3223a6f7bc80d5a92c6ded9d820e896d714fb15716a822426602ee520e2a4d12e63de9fc0c2bff522347e9acedb84d1a4b635d7f8194467a80 WHIRLPOOL 4fdd825e718d1441f1c7a87a52f6829b73fd6ce76a1bd3066ff57be3fdab5a10568881539c05f384aa1f185b7a35b1b60d23f2a3d2d2b6a4479d2da6c5beab9b
+MISC ChangeLog-2015 3010 SHA256 e7421e1876c1a1d5dbe83fff560e8e56b665b99680b8c6bd85025d7eeaf7a77e SHA512 0b4778208e3dec73ab17970e26fdb96cb2d3e2ab7d1f1f54ccce6ad1c0cc4a31c288751377af99131e39848e70222726845fd834407d078d6d2a60698e2a8620 WHIRLPOOL c9148d0a2dce676aec1fb2a22462d4cefafb964d822d0de087b05b6944f5585837ff34681d7f469765f820ff6340052cea30a2b71d81827a444e95a91ca879fe
+MISC metadata.xml 1529 SHA256 6b98455c9c2d1981cc9e3ea25cf8d60dfb306019717143c82eae70a046c3da7c SHA512 fffaa91e3f48b7ebdbc5f7018e8012edf3c40a85eae6ac8619b5b4d4aaf5779445f495a28e06b5d597818346684ed1b470dc739abdea6cc1792f4f5b064e0b8e WHIRLPOOL 495c8ab3114de28514c9a14f96a59dbd4d395936734253c826e1963759b22a07d0c00e1d81f65f8146f92bf66eadfb020da11c4a2fe8fde46e62276da1697ff9
diff --git a/games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch b/games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch
new file mode 100644
index 000000000000..618f9fd87c2c
--- /dev/null
+++ b/games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch
@@ -0,0 +1,89 @@
+From 1352b633388dd9d82b8cb7e3d11932d0b569da4e Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Thu, 27 Mar 2014 21:07:37 +0100
+Subject: [PATCH 1/4] make install destinations modifiable
+
+---
+ CMakeLists.txt | 5 +++--
+ client/CMakeLists.txt | 2 +-
+ master/CMakeLists.txt | 4 ++++
+ odalaunch/CMakeLists.txt | 2 +-
+ server/CMakeLists.txt | 2 +-
+ 5 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 11e52d1..262e3db 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ include(CMakeDependentOption)
++include(GNUInstallDirs)
+
+ project(Odamex)
+ cmake_minimum_required(VERSION 2.8)
+@@ -113,10 +114,10 @@ if(NOT APPLE)
+ set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
+ else()
+ install(FILES odamex.wad LICENSE README
+- DESTINATION share/odamex
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/odamex
+ COMPONENT common)
+ install(FILES ${CONFIG_SAMPLES}
+- DESTINATION share/odamex/config-samples
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/odamex/config-samples
+ COMPONENT common)
+
+ option(ODAMEX_COMPONENT_PACKAGES "Create several rpm/deb packages for repository maintainers." OFF)
+diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
+index 510b820..3f73ab5 100644
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -228,7 +228,7 @@ if(SDL_FOUND AND SDLMIXER_FOUND)
+ COMPONENT client)
+ else()
+ install(TARGETS odamex
+- RUNTIME DESTINATION bin
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT client)
+ endif()
+ endif()
+diff --git a/master/CMakeLists.txt b/master/CMakeLists.txt
+index 7fc386b..5bdc048 100644
+--- a/master/CMakeLists.txt
++++ b/master/CMakeLists.txt
+@@ -14,3 +14,7 @@ if(WIN32)
+ elseif(SOLARIS)
+ target_link_libraries(odamast socket nsl)
+ endif()
++
++if(UNIX)
++ install( TARGETS odamast DESTINATION ${CMAKE_INSTALL_BINDIR} )
++endif()
+diff --git a/odalaunch/CMakeLists.txt b/odalaunch/CMakeLists.txt
+index 4ca5920..0b134ef 100644
+--- a/odalaunch/CMakeLists.txt
++++ b/odalaunch/CMakeLists.txt
+@@ -71,7 +71,7 @@ if(wxWidgets_FOUND)
+ COMPONENT odalaunch)
+ else()
+ install(TARGETS odalaunch
+- RUNTIME DESTINATION bin
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT odalaunch)
+ endif()
+
+diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
+index b046714..d33b974 100644
+--- a/server/CMakeLists.txt
++++ b/server/CMakeLists.txt
+@@ -73,6 +73,6 @@ elseif(WIN32)
+ COMPONENT server)
+ else()
+ install(TARGETS odasrv
+- RUNTIME DESTINATION bin
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT server)
+ endif()
+--
+1.9.1
+
diff --git a/games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch b/games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch
new file mode 100644
index 000000000000..1de502711406
--- /dev/null
+++ b/games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch
@@ -0,0 +1,110 @@
+From 851bc58a74eadd89838c924167f27df1b9d3be37 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Thu, 27 Mar 2014 21:14:20 +0100
+Subject: [PATCH 2/4] add various cmake options
+
+---
+ CMakeLists.txt | 26 ++++++++++++++++++++++----
+ client/CMakeLists.txt | 34 ++++++++++++++++++++--------------
+ 2 files changed, 42 insertions(+), 18 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 262e3db..91d5c50 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,13 @@
+ include(CMakeDependentOption)
+ include(GNUInstallDirs)
+
++# options
++option(BUILD_CLIENT "Build client target" 1)
++option(BUILD_SERVER "Build server target" 1)
++option(BUILD_MASTER "Build master server target" 1)
++cmake_dependent_option( BUILD_ODALAUNCH "Build odalaunch target" 1 BUILD_CLIENT 0 )
++cmake_dependent_option( ENABLE_PORTMIDI "Enable portmidi support" 1 BUILD_CLIENT 0 )
++
+ project(Odamex)
+ cmake_minimum_required(VERSION 2.8)
+
+@@ -73,10 +80,21 @@ if(USE_INTREE_PORTMIDI)
+ endif()
+
+ # Subdirectories for Odamex projects
+-add_subdirectory(client)
+-add_subdirectory(server)
+-add_subdirectory(master)
+-add_subdirectory(odalaunch)
++if(BUILD_CLIENT)
++ add_subdirectory(client)
++endif()
++if(BUILD_SERVER)
++ add_subdirectory(server)
++endif()
++if(BUILD_MASTER)
++ add_subdirectory(master)
++endif()
++if(BUILD_ODALAUNCH)
++ add_subdirectory(odalaunch)
++endif()
++if(NOT BUILD_CLIENT AND NOT BUILD_SERVER AND NOT BUILD_MASTER)
++ message(FATAL_ERROR "No target chosen, doing nothing.")
++endif()
+
+ # Disable the ag-odalaunch target completely: -DNO_AG-ODALAUNCH_TARGET
+ # This is only really useful when setting up a universal build.
+diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
+index 3f73ab5..7363c5a 100644
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -107,17 +107,21 @@ include_directories(${PNG_INCLUDE_DIRS})
+ add_definitions(-DUSE_PNG)
+
+ # PortMidi configuration
+-if(USE_INTREE_PORTMIDI)
+- include_directories(../libraries/portmidi/pm_common/ ../libraries/portmidi/porttime/)
+- add_definitions(-DPORTMIDI)
++if(ENABLE_PORTMIDI)
++ if(USE_INTREE_PORTMIDI)
++ include_directories(../libraries/portmidi/pm_common/ ../libraries/portmidi/porttime/)
++ add_definitions(-DPORTMIDI)
++ else()
++ find_package(PortMidi QUIET)
++ if(PORTMIDI_FOUND)
++ include_directories(${PORTMIDI_INCLUDE_DIR})
++ add_definitions(-DPORTMIDI)
++ else()
++ message(WARNING "PortMidi not found, client will be built without PortMidi support.")
++ endif()
++ endif()
+ else()
+- find_package(PortMidi QUIET)
+- if(PORTMIDI_FOUND)
+- include_directories(${PORTMIDI_INCLUDE_DIR})
+- add_definitions(-DPORTMIDI)
+- else()
+- message(WARNING "PortMidi not found, client will be built without PortMidi support.")
+- endif()
++ message(STATUS "Portmidi disabled.")
+ endif()
+
+ # Find Mac frameworks
+@@ -147,10 +151,12 @@ if(SDL_FOUND AND SDLMIXER_FOUND)
+ target_link_libraries(odamex ${ZLIB_LIBRARY})
+ target_link_libraries(odamex ${PNG_LIBRARY} ${ZLIB_LIBRARY})
+
+- if(USE_INTREE_PORTMIDI)
+- target_link_libraries(odamex portmidi-static)
+- elseif(PORTMIDI_FOUND)
+- target_link_libraries(odamex ${PORTMIDI_LIBRARIES})
++ if(ENABLE_PORTMIDI)
++ if(USE_INTREE_PORTMIDI)
++ target_link_libraries(odamex portmidi-static)
++ elseif(PORTMIDI_FOUND)
++ target_link_libraries(odamex ${PORTMIDI_LIBRARIES})
++ endif()
+ endif()
+
+ if(WIN32)
+--
+1.9.1
+
diff --git a/games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch b/games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch
new file mode 100644
index 000000000000..77fb4e48996e
--- /dev/null
+++ b/games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch
@@ -0,0 +1,67 @@
+From 9af4e992ff9fa10816beba36478c711ac2c8542a Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Thu, 27 Mar 2014 21:17:21 +0100
+Subject: [PATCH 3/4] add odamex.wad install destination to wad search path
+
+---
+ CMakeLists.txt | 9 +++++++++
+ common/d_main.cpp | 2 ++
+ config.h.in | 6 ++++++
+ 3 files changed, 17 insertions(+)
+ create mode 100644 config.h.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 91d5c50..a06613e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,6 +13,15 @@
+
+ set(PROJECT_VERSION 0.7.0)
+ set(PROJECT_COPYRIGHT "2006-2014")
++
++configure_file (
++ "${PROJECT_SOURCE_DIR}/config.h.in"
++ "${PROJECT_BINARY_DIR}/config.h"
++ )
++
++include_directories(
++ ${PROJECT_BINARY_DIR}
++)
+
+ # Default build type
+ if(NOT MSVC)
+diff --git a/common/d_main.cpp b/common/d_main.cpp
+index 31d4f59..be0ffd2 100644
+--- a/common/d_main.cpp
++++ b/common/d_main.cpp
+@@ -23,6 +23,7 @@
+ //-----------------------------------------------------------------------------
+
+ #include "version.h"
++#include "config.h"
+
+ #include <sstream>
+ #include <string>
+@@ -506,6 +507,7 @@ static std::string BaseFileSearch(std::string file, std::string ext = "", std::s
+ D_AddSearchDir(dirs, getenv("DOOMWADDIR"), separator);
+ D_AddSearchDir(dirs, getenv("DOOMWADPATH"), separator);
+ D_AddSearchDir(dirs, getenv("HOME"), separator);
++ D_AddSearchDir(dirs, CMAKE_WADDIR, separator);
+
+ // [AM] Search additional paths based on platform
+ D_AddPlatformSearchDirs(dirs);
+diff --git a/config.h.in b/config.h.in
+new file mode 100644
+index 0000000..e91b3a6
+--- /dev/null
++++ b/config.h.in
+@@ -0,0 +1,6 @@
++#ifndef CONFIG_H
++#define CONFIG_H
++
++#define CMAKE_WADDIR "@CMAKE_INSTALL_DATADIR@"
++
++#endif
+--
+1.9.1
+
diff --git a/games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch b/games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch
new file mode 100644
index 000000000000..acb2692e75fb
--- /dev/null
+++ b/games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch
@@ -0,0 +1,58 @@
+From 672b2e61f3c0347c29746a4a22fe3ab912e88d62 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Thu, 27 Mar 2014 21:19:48 +0100
+Subject: [PATCH 4/4] use CMAKE_BINDIR as default bin patch in odalauncher
+
+---
+ config.h.in | 1 +
+ odalaunch/src/dlg_main.cpp | 6 +++++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/config.h.in b/config.h.in
+index e91b3a6..7019a02 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -2,5 +2,6 @@
+ #define CONFIG_H
+
+ #define CMAKE_WADDIR "@CMAKE_INSTALL_DATADIR@"
++#define CMAKE_BINDIR "@CMAKE_INSTALL_BINDIR@"
+
+ #endif
+diff --git a/odalaunch/src/dlg_main.cpp b/odalaunch/src/dlg_main.cpp
+index a95a5f6..abbfc0a 100644
+--- a/odalaunch/src/dlg_main.cpp
++++ b/odalaunch/src/dlg_main.cpp
+@@ -27,6 +27,7 @@
+ #include "str_utils.h"
+
+ #include "md5.h"
++#include "config.h"
+
+ #include <wx/settings.h>
+ #include <wx/menu.h>
+@@ -42,6 +43,7 @@
+ #include <wx/process.h>
+ #include <wx/toolbar.h>
+ #include <wx/xrc/xmlres.h>
++#include <wx/string.h>
+ #include <wx/cmdline.h>
+
+ #ifdef __WXMSW__
+@@ -205,10 +207,12 @@ dlgMain::dlgMain(wxWindow* parent, wxWindowID id)
+ }
+ #endif
+
++ const char *cmake_bindir_str = CMAKE_BINDIR;
++ wxString cmake_bindir = wxString::FromAscii(cmake_bindir_str);
+ launchercfg_s.get_list_on_start = 1;
+ launchercfg_s.show_blocked_servers = 0;
+ launchercfg_s.wad_paths = wxGetCwd();
+- launchercfg_s.odamex_directory = wxGetCwd();
++ launchercfg_s.odamex_directory = cmake_bindir;
+
+ m_LstCtrlServers = XRCCTRL(*this, "Id_LstCtrlServers", LstOdaServerList);
+ m_LstCtrlPlayers = XRCCTRL(*this, "Id_LstCtrlPlayers", LstOdaPlayerList);
+--
+1.9.1
+
diff --git a/games-engines/odamex/files/odamex-0.7.0-gcc6.patch b/games-engines/odamex/files/odamex-0.7.0-gcc6.patch
new file mode 100644
index 000000000000..9e341b881ccd
--- /dev/null
+++ b/games-engines/odamex/files/odamex-0.7.0-gcc6.patch
@@ -0,0 +1,39 @@
+Bug: https://bugs.gentoo.org/610566
+Commit: https://github.com/odamex/odamex/commit/1d8121c78fe2db9befb05dd40ceb9b86062024e4
+
+From 1d8121c78fe2db9befb05dd40ceb9b86062024e4 Mon Sep 17 00:00:00 2001
+From: rice <russell@odamex.net>
+Date: Tue, 30 Aug 2016 08:37:15 +0000
+Subject: [PATCH] - Apply patch from bug 1177, thanks RjY!
+
+SVN r5444 (trunk)
+---
+ common/m_vectors.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/common/m_vectors.cpp b/common/m_vectors.cpp
+index b51e4e40..2eb48a04 100644
+--- a/common/m_vectors.cpp
++++ b/common/m_vectors.cpp
+@@ -541,16 +541,16 @@ void M_PerpendicularVec3(v3double_t *dest, const v3double_t *src)
+ {
+ // find the smallest component of the vector src
+ v3double_t tempvec;
+- double minelem = src->x;
++ double minelem = fabs(src->x);
+ double *mincomponent = &(tempvec.x);
+- if (abs(src->y) < minelem)
++ if (fabs(src->y) < minelem)
+ {
+- minelem = abs(src->y);
++ minelem = fabs(src->y);
+ mincomponent = &(tempvec.y);
+ }
+- if (abs(src->z) < minelem)
++ if (fabs(src->z) < minelem)
+ {
+- minelem = abs(src->z);
++ minelem = fabs(src->z);
+ mincomponent = &(tempvec.z);
+ }
+
diff --git a/games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch b/games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch
new file mode 100644
index 000000000000..34896e2a4e8b
--- /dev/null
+++ b/games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch
@@ -0,0 +1,35 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu Mar 27 21:16:02 UTC 2014
+Subject: unbundle miniupnpc
+
+--- a/server/CMakeLists.txt
++++ b/server/CMakeLists.txt
+@@ -29,8 +29,7 @@
+ set(JSONCPP_SOURCE ${JSONCPP_DIR}/jsoncpp.cpp)
+
+ # MiniUPnPc
+-set(MINIUPNPC_DIR ../libraries/libminiupnpc)
+-set(MINIUPNPC_STATIC_LIBRARIES upnpc-static)
++set(MINIUPNPC_DIR /usr/include/miniupnpc)
+
+ # Platform definitions
+ define_platform()
+@@ -54,7 +53,7 @@
+ ${COMMON_SOURCES} ${COMMON_HEADERS}
+ ${SERVER_SOURCES} ${SERVER_HEADERS}
+ ${SERVER_WIN32_HEADERS} ${SERVER_WIN32_RESOURCES})
+-target_link_libraries(odasrv ${MINIUPNPC_STATIC_LIBRARIES})
++target_link_libraries(odasrv -lminiupnpc)
+
+ if(WIN32)
+ target_link_libraries(odasrv winmm wsock32)
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -71,7 +71,6 @@
+ set(UPNPC_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
+ set(UPNPC_INSTALL OFF CACHE INTERNAL "" FORCE)
+ mark_as_advanced(FORCE UPNPC_INSTALL)
+-add_subdirectory(libraries/libminiupnpc)
+
+ # PortMidi
+ cmake_dependent_option(USE_INTREE_PORTMIDI "Compile with the version of PortMidi included in the source tree." ON "WIN32" OFF)
diff --git a/games-engines/odamex/metadata.xml b/games-engines/odamex/metadata.xml
new file mode 100644
index 000000000000..fa5e66cf1fde
--- /dev/null
+++ b/games-engines/odamex/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>mwoodj@knology.net</email>
+ <name>Mike Wood</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="odalaunch">Build the wxwidgets based launcher.</flag>
+ <flag name="master">Build master server target (advertises odamex server list)</flag>
+ <flag name="portmidi">Enable portmidi support.</flag>
+ <flag name="server">Build server target.</flag>
+ </use>
+ <upstream>
+ <changelog>http://odamex.net/changelog.php</changelog>
+ <doc lang="en">http://odamex.net/wiki/Odamex</doc>
+ <bugs-to>http://odamex.net/bugs/</bugs-to>
+ <remote-id type="sourceforge">odamex</remote-id>
+ </upstream>
+ <longdescription lang="en">
+ Odamex is a free and open source port for the classic
+ first-person-shooter Doom. Odamex's goal is to emulate the feel of and
+ retain many aspects of the original Doom executables while offering a
+ broader expanse of security features, personal configuration, gameplay
+ options, and editing features. Odamex can run on a wide range of
+ operating systems and hardware, so players should be able to play
+ on almost any platform.
+ </longdescription>
+</pkgmetadata>
diff --git a/games-engines/odamex/odamex-0.7.0.ebuild b/games-engines/odamex/odamex-0.7.0.ebuild
new file mode 100644
index 000000000000..552df25f75a1
--- /dev/null
+++ b/games-engines/odamex/odamex-0.7.0.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+WX_GTK_VER="3.0"
+inherit cmake-utils eutils gnome2-utils wxwidgets games
+
+MY_P=${PN}-src-${PV}
+DESCRIPTION="An online multiplayer, free software engine for Doom and Doom II"
+HOMEPAGE="http://odamex.net/"
+SRC_URI="mirror://sourceforge/${PN}/Odamex/${PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="dedicated +odalaunch master portmidi server"
+
+RDEPEND="
+ dedicated? ( >=net-libs/miniupnpc-1.8 )
+ !dedicated? (
+ media-libs/libpng:0
+ >=media-libs/libsdl-1.2.9[X,sound,joystick,video]
+ >=media-libs/sdl-mixer-1.2.6
+ odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )
+ portmidi? ( media-libs/portmidi )
+ server? ( >=net-libs/miniupnpc-1.8 )
+ )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/src-${PV:2:3}
+
+pkg_pretend() {
+ if ! test-flag-CXX -std=c++11; then
+ die "You need at least GCC 4.7.x or Clang >= 3.0 for C++11-specific compiler flags"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/1-${P}-install-rules.patch \
+ "${FILESDIR}"/2-${P}-cmake-options.patch \
+ "${FILESDIR}"/3-${P}-wad-search-path.patch \
+ "${FILESDIR}"/4-${P}-odalauncher-bin-path.patch \
+ "${FILESDIR}"/${P}-miniupnpc.patch \
+ "${FILESDIR}"/${P}-gcc6.patch
+
+ rm -r libraries/libminiupnpc || die
+
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_INTREE_PORTMIDI=OFF
+ -DCMAKE_INSTALL_BINDIR="${GAMES_BINDIR}"
+ -DCMAKE_INSTALL_DATADIR="${GAMES_DATADIR}"
+ $(cmake-utils_use_build master MASTER)
+ )
+
+ if use dedicated ; then
+ mycmakeargs+=(
+ -DBUILD_CLIENT=OFF
+ -DBUILD_ODALAUNCH=OFF
+ -DBUILD_SERVER=ON
+ -DENABLE_PORTMIDI=OFF
+ )
+ else
+ mycmakeargs+=(
+ -DBUILD_CLIENT=ON
+ $(cmake-utils_use_build odalaunch ODALAUNCH)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_enable portmidi PORTMIDI)
+ )
+ fi
+
+ append-cxxflags -std=c++11
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use dedicated ; then
+ newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png"
+ make_desktop_entry ${PN}
+
+ if use odalaunch ; then
+ newicon -s 128 "${S}/media/icon_odalaunch_128.png" "odalaunch.png"
+ make_desktop_entry odalaunch "Odamex Launcher" odalaunch
+ fi
+ fi
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ einfo
+ elog "This is just the engine, you will need doom resource files in order to play."
+ elog "Check: http://odamex.net/wiki/FAQ#What_data_files_are_required.3F"
+ einfo
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}