HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #340

Ticket #340: netpanzer-0.8.3.patch

File netpanzer-0.8.3.patch, 5.1 KB (added by michaelvoliveira, 5 years ago)

Patch to build netpanzer without any errors

  • netpanzer-0.8.

    diff -Naur netpanzer-0.8.3/SConstruct netpanzer-0.8.3-haiku/SConstruct
    old new  
    241241else: 
    242242    env.ParseConfig(env['sdlconfig'] + ' --cflags --libs') 
    243243    env.Append( NPLIBS = [ 'SDL_mixer' ] ) 
     244    env.Append( NPLIBS = [ 'network' ] ) 
     245    env.Append( NPLIBS = [ 'physfs' ] ) 
    244246 
    245247# for crossmingw platform 
    246248if 'crossmingw' in COMMAND_LINE_TARGETS: 
  • src/Lib/Network/SocketBase.cpp

    diff -Naur netpanzer-0.8.3/src/Lib/Network/SocketBase.cpp netpanzer-0.8.3-haiku/src/Lib/Network/SocketBase.cpp
    old new  
    2929#include "SocketManager.hpp" 
    3030#include "Util/Log.hpp" 
    3131 
     32#ifndef MSG_NOSIGNAL  
     33#define MSG_NOSIGNAL 0  
     34#endif 
     35 
    3236namespace network 
    3337{ 
    3438 
  • src/Lib/Network/SocketSet.hpp

    diff -Naur netpanzer-0.8.3/src/Lib/Network/SocketSet.hpp netpanzer-0.8.3-haiku/src/Lib/Network/SocketSet.hpp
    old new  
    1818#ifndef __SOCKETSET_HPP__ 
    1919#define __SOCKETSET_HPP__ 
    2020 
     21#include <string.h> 
     22#include <wchar.h> 
     23#include <bsd_mem.h> 
     24#include <sys/select.h> 
    2125#include "SocketHeaders.hpp" 
    2226#include "SocketBase.hpp" 
    2327#include "Util/NoCopy.hpp" 
  • src/Lib/physfs/CMakeLists.txt

    diff -Naur netpanzer-0.8.3/src/Lib/physfs/CMakeLists.txt netpanzer-0.8.3-haiku/src/Lib/physfs/CMakeLists.txt
    old new  
    102102    # We add this explicitly, since we don't want CMake to think this 
    103103    #  is a C++ project unless we're on BeOS. 
    104104    SET(PHYSFS_BEOS_SRCS platform/beos.cpp) 
    105     SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} be root) 
     105    FIND_LIBRARY(BE_LIBRARY be) 
     106    FIND_LIBRARY(ROOT_LIBRARY root) 
     107    SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${BE_LIBRARY} ${ROOT_LIBRARY}) 
    106108ENDIF(BEOS) 
    107109 
    108110# Almost everything is "compiled" here, but things that don't apply to the 
    … …  
    303305    CHECK_INCLUDE_FILE(readline/readline.h HAVE_READLINE_H) 
    304306    CHECK_INCLUDE_FILE(readline/history.h HAVE_HISTORY_H) 
    305307    IF(HAVE_READLINE_H AND HAVE_HISTORY_H) 
    306         SET(CMAKE_REQUIRED_LIBRARIES curses) 
     308        FIND_LIBRARY(CURSES_LIBRARY NAMES curses ncurses) 
     309        SET(CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARY}) 
    307310        CHECK_LIBRARY_EXISTS("readline" "readline" "" HAVE_LIBREADLINE) 
    308311        CHECK_LIBRARY_EXISTS("readline" "history" "" HAVE_LIBHISTORY) 
    309312        IF(HAVE_LIBREADLINE AND HAVE_LIBHISTORY) 
  • src/Lib/physfs/physfs_platforms.h

    diff -Naur netpanzer-0.8.3/src/Lib/physfs/physfs_platforms.h netpanzer-0.8.3-haiku/src/Lib/physfs/physfs_platforms.h
    old new  
    1212 *  PHYSFS_PLATFORM_UNIX on that system. 
    1313 */ 
    1414 
    15 #if ((defined __BEOS__) || (defined __beos__)) 
     15#if ((defined __BEOS__) || (defined __beos__) || (defined __HAIKU__)) 
    1616#  define PHYSFS_PLATFORM_BEOS 
    1717#  define PHYSFS_PLATFORM_POSIX 
    1818#elif (defined _WIN32_WCE) || (defined _WIN64_WCE) 
  • src/Lib/physfs/platform/beos.cpp

    diff -Naur netpanzer-0.8.3/src/Lib/physfs/platform/beos.cpp netpanzer-0.8.3-haiku/src/Lib/physfs/platform/beos.cpp
    old new  
    161161 
    162162char *__PHYSFS_platformCalcBaseDir(const char *argv0) 
    163163{ 
    164     /* in case there isn't a BApplication yet, we'll construct a roster. */ 
    165     BRoster roster;  
    166     app_info info; 
    167     status_t rc = roster.GetRunningAppInfo(getTeamID(), &info); 
    168     BAIL_IF_MACRO(rc < B_OK, strerror(rc), NULL); 
    169     BEntry entry(&(info.ref), true); 
     164    image_info info; 
     165    int32 cookie = 0; 
     166 
     167    while (get_next_image_info(0, &cookie, &info) == B_OK) { 
     168        if (info.type == B_APP_IMAGE) 
     169            break; 
     170    } 
     171 
     172    BEntry entry(info.name, true); 
    170173    BPath path; 
    171     rc = entry.GetPath(&path);  /* (path) now has binary's path. */ 
     174    status_t rc = entry.GetPath(&path);  /* (path) now has binary's path. */ 
    172175    assert(rc == B_OK); 
    173176    rc = path.GetParent(&path); /* chop filename, keep directory. */ 
    174177    assert(rc == B_OK); 
  • src/NetPanzer/Core/main.cpp

    diff -Naur netpanzer-0.8.3/src/NetPanzer/Core/main.cpp netpanzer-0.8.3-haiku/src/NetPanzer/Core/main.cpp
    old new  
    8989        case SIGFPE: sigtype = "SIGFPE"; break; 
    9090        case SIGILL: sigtype = "SIGILL"; break; 
    9191        case SIGSEGV: sigtype = "SIGSEGV"; break; 
    92         case SIGBUS: sigtype = "SIGBUS"; break; 
     92         
    9393        case SIGABRT: sigtype = "SIGABRT"; break; 
    9494        case SIGTRAP: sigtype = "SIGTRAP"; break; 
    9595        case SIGSYS: sigtype = "SIGSYS"; break; 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/