hasufell    14/03/27 21:20:52

  Added:                4-odamex-0.7.0-odalauncher-bin-path.patch
                        3-odamex-0.7.0-wad-search-path.patch
                        odamex-0.7.0-miniupnpc.patch
                        1-odamex-0.7.0-install-rules.patch
                        2-odamex-0.7.0-cmake-options.patch
  Log:
  version bump
  
  (Portage version: 2.2.9-r1/cvs/Linux x86_64, signed Manifest commit with key 
BDEED020)

Revision  Changes    Path
1.1                  
games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/4-odamex-0.7.0-odalauncher-bin-path.patch?rev=1.1&content-type=text/plain

Index: 4-odamex-0.7.0-odalauncher-bin-path.patch
===================================================================
>From 672b2e61f3c0347c29746a4a22fe3ab912e88d62 Mon Sep 17 00:00:00 2001
From: hasufell <[email protected]>
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




1.1                  
games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/3-odamex-0.7.0-wad-search-path.patch?rev=1.1&content-type=text/plain

Index: 3-odamex-0.7.0-wad-search-path.patch
===================================================================
>From 9af4e992ff9fa10816beba36478c711ac2c8542a Mon Sep 17 00:00:00 2001
From: hasufell <[email protected]>
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




1.1                  games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/odamex-0.7.0-miniupnpc.patch?rev=1.1&content-type=text/plain

Index: odamex-0.7.0-miniupnpc.patch
===================================================================
From: Julian Ospald <[email protected]>
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)



1.1                  
games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/1-odamex-0.7.0-install-rules.patch?rev=1.1&content-type=text/plain

Index: 1-odamex-0.7.0-install-rules.patch
===================================================================
>From 1352b633388dd9d82b8cb7e3d11932d0b569da4e Mon Sep 17 00:00:00 2001
From: hasufell <[email protected]>
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




1.1                  
games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/odamex/files/2-odamex-0.7.0-cmake-options.patch?rev=1.1&content-type=text/plain

Index: 2-odamex-0.7.0-cmake-options.patch
===================================================================
>From 851bc58a74eadd89838c924167f27df1b9d3be37 Mon Sep 17 00:00:00 2001
From: hasufell <[email protected]>
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





Reply via email to