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

Context Navigation

  • Back to Ticket #708

Ticket #708: bzflag-2.4.2.patch

File bzflag-2.4.2.patch, 11.1 KB (added by richienyhus, 2 years ago)
  • configure.ac

    diff -urN bzflag-2.4.2/configure.ac bzflag-2.4.2-haiku/configure.ac
    old new  
    5454    libdir="$libdir/bzflag" 
    5555fi 
    5656 
    57 AC_CONFIG_AUX_DIR(misc) 
     57AC_CONFIG_AUX_DIR(m4) 
    5858 
    5959# sed magic to get version numbers from src/date/buildDate.cxx 
    6060MAJOR_VERSION=`sed -e 's/#.*define.*BZ_MAJOR_VERSION[^0-9]*\(.*\)/\1/' -e t -e d < \$srcdir/src/date/buildDate.cxx` 
    … …  
    166166# compile our own curl 
    167167AC_ARG_ENABLE(curl_build, [  --enable-curl-build     Force compilation of curl]) 
    168168 
    169 # compile our own glew 
    170 AC_ARG_WITH(included-glew, 
    171         AC_HELP_STRING([--with-included-glew],[build with included GLEW library]), 
    172         [enable_glew_build="$withval"], ) 
    173  
    174169# compile our own regex 
    175170AC_ARG_ENABLE(regex_build, [  --enable-regex-build    Force compilation of regex]) 
    176171 
    … …  
    184179if test "x$enable_all_builds" = "xyes" ; then 
    185180    enable_ares_build=yes 
    186181    enable_curl_build=yes 
    187     enable_glew_build=yes 
    188182    enable_regex_build=yes 
    189183    enable_zlib_build=yes 
    190184fi 
    … …  
    476470    irix*) 
    477471        GLIBS="-lXsgivc -lX11 -laudio $GLIBS" 
    478472        ;; 
    479     beos) 
     473    beos*|haiku*) 
    480474        GLIBS=" -lmedia -lgame $GLIBS" 
    481475        LIBS="-lbe" 
    482476        ;; 
    … …  
    491485case $host_os in 
    492486    macos|darwin*) 
    493487        ;; 
    494     beos*) 
     488    beos*|haiku*) 
    495489        ;; 
    496490    *) 
    497491        CONF_CPPFLAGS="$CONF_CPPFLAGS $X_CFLAGS" 
    … …  
    730724        fi 
    731725        CONF_CFLAGS="$CONF_CFLAGS $FLAGS"; 
    732726        CONF_CXXFLAGS="$CONF_CXXFLAGS $FLAGS";; 
    733      beos*) 
     727     beos*|haiku*) 
    734728        AC_DEFINE(HAVE_DEFINED_TOLOWER, 1, [tolower and toupper are not functions]) 
    735729        ;; 
    736730esac 
    … …  
    831825# need to consolidate them to here. 
    832826 
    833827case $host_os in 
    834     beos*) 
     828    beos*|haiku*) 
    835829        beos=true 
    836830        ;; 
    837831    hpux*) 
    … …  
    10331027    CONF_CPPFLAGS="$CONF_CPPFLAGS -I\$(top_srcdir)/src/other/curl/include" 
    10341028fi 
    10351029 
    1036  
    1037 # GLEW 
    1038 if test "x$enable_client" != "xno" ; then 
    1039 # Check for the GLEW library (GL Extension Wrangler) 
    1040 if test "x$enable_glew_build" != "xyes" ; then 
    1041     AC_MSG_CHECKING([for GLEW library]) 
    1042     tmpLIBS=$LIBS 
    1043     GLEW_LIBS="-lGLEW" 
    1044     LIBS=$GLEW_LIBS 
    1045     AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <GL/glew.h>]], 
    1046                                     [[if (GLEW_VERSION_3_0) { glewInit(); }]])], 
    1047                    [glew_check="yes"], 
    1048                    [glew_check="no  (missing, or older than version 1.5.1)"]) 
    1049     if test "x$glew_check" != "xyes"; then 
    1050         GLEW_LIBS="" 
    1051     fi 
    1052     AC_MSG_RESULT([$glew_check]) 
    1053     AC_SUBST(GLEW_LIBS) 
    1054     LIBS=$tmpLIBS 
    1055 fi 
    1056 AC_MSG_CHECKING(whether to build the included GLEW library) 
    1057 BUILD_GLEW="no (using system)" 
    1058 if test "x$GLEW_LIBS" = "x" ; then 
    1059     if test "x$enable_glew_build" = xno ; then 
    1060         BUILD_GLEW=no 
    1061     else 
    1062         BUILD_GLEW="yes" 
    1063         CONF_CPPFLAGS="$CONF_CPPFLAGS -I\$(top_srcdir)/src/other/glew/include" 
    1064     fi 
    1065 fi 
    1066 AC_MSG_RESULT($BUILD_GLEW) 
    1067 else # enable_client 
    1068 BUILD_GLEW="no (clients disabled)" 
    1069 AC_MSG_NOTICE([GLEW is disabled because no clients are being built]) 
    1070 fi # enable_client 
    1071 AM_CONDITIONAL(BUILD_GLEW, test "x$BUILD_GLEW" = "xyes") 
    1072 if test "x$BUILD_GLEW" = xyes -o "x$glew_check" = xyes; then 
    1073     AC_DEFINE(HAVE_GLEW, 1, [Using GLEW]) 
    1074 fi 
    1075  
    10761030# make sure ECHO and ECHO_N got defined and substituted 
    10771031if test "x$ECHO" = "x" ; then 
    10781032    ECHO=echo 
    … …  
    13181272AC_MSG_RESULT([]) 
    13191273AC_MSG_RESULT([Build ares ........: $BUILD_ARES]) 
    13201274AC_MSG_RESULT([Build curl ........: $BUILD_CURL]) 
    1321 AC_MSG_RESULT([Build glew ........: $BUILD_GLEW]) 
    13221275AC_MSG_RESULT([Build regex .......: $BUILD_REGEX]) 
    13231276AC_MSG_RESULT([Build zlib ........: $BUILD_ZLIB]) 
    13241277AC_MSG_RESULT([]) 
  • Makefile.in

    diff -urN bzflag-2.4.2/Makefile.in bzflag-2.4.2-haiku/Makefile.in
    old new  
    149149EXEEXT = @EXEEXT@ 
    150150FGREP = @FGREP@ 
    151151FRAMEWORK_OPENGL = @FRAMEWORK_OPENGL@ 
    152 GLEW_LIBS = @GLEW_LIBS@ 
    153152GLIBS = @GLIBS@ 
    154153GREP = @GREP@ 
    155154HASPOD2MAN = @HASPOD2MAN@ 
  • src/bzadmin/StdBothUI.cxx

    diff -urN bzflag-2.4.2/src/bzadmin/StdBothUI.cxx bzflag-2.4.2-haiku/src/bzadmin/StdBothUI.cxx
    old new  
    2222#else 
    2323#  include <sys/types.h> 
    2424#  include <sys/select.h> 
     25// for memset, used in FD_ZERO (this is a Haiku bug, select.h should include string.h): 
     26#  include <string.h> 
    2527#endif 
    2628 
    2729/* implementation headers */ 
  • src/bzflag/clientCommands.cxx

    diff -urN bzflag-2.4.2/src/bzflag/clientCommands.cxx bzflag-2.4.2-haiku/src/bzflag/clientCommands.cxx
    old new  
    1818#  include <sys/types.h> 
    1919#  include <dirent.h> 
    2020#endif 
     21#ifdef HAVE_PTHREADS 
     22#  include <pthread.h> 
     23#endif 
    2124#include <string> 
    2225#include <vector> 
    2326 
  • src/bzflag/Makefile.am

    diff -urN bzflag-2.4.2/src/bzflag/Makefile.am bzflag-2.4.2-haiku/src/bzflag/Makefile.am
    old new  
    185185        stars.h 
    186186 
    187187 
    188 if BUILD_GLEW 
    189 bzflag_SOURCES += $(top_srcdir)/src/other/glew/src/glew.c 
    190 endif 
    191  
    192188if WIN32 
    193189RESOURCE = bzflag.res 
    194190else 
    … …  
    219215        $(SDL_LIBS)                     \ 
    220216        $(SDL_IMAGE_LIBS)               \ 
    221217        $(GLIBS)                        \ 
    222         $(GLEW_LIBS)                    \ 
    223218        $(LIBCURL)                      \ 
    224219        ../date/libDate.la 
    225220# This is required to hook in ogg/vorbis libraries 
  • src/bzflag/ServerLink.cxx

    diff -urN bzflag-2.4.2/src/bzflag/ServerLink.cxx bzflag-2.4.2-haiku/src/bzflag/ServerLink.cxx
    old new  
    480480  if ((urecvfd >= 0) /* && ulinkup */) { 
    481481 
    482482    if (!udpLength) { 
    483       AddrLen recvlen = sizeof(urecvaddr); 
     483      socklen_t recvlen = sizeof(urecvaddr); 
    484484      int n = recvfrom(urecvfd, ubuf, MaxPacketLen, 0, 
    485485                       &urecvaddr, (socklen_t*) &recvlen); 
    486486      if (n > 0) { 
  • src/bzfs/bzfs.cxx

    diff -urN bzflag-2.4.2/src/bzfs/bzfs.cxx bzflag-2.4.2-haiku/src/bzfs/bzfs.cxx
    old new  
    858858    } 
    859859 
    860860    // fixup ping reply 
    861     AddrLen addrLen = sizeof(addr); 
     861    socklen_t addrLen = sizeof(addr); 
    862862    if (getsockname(wksSocket, (struct sockaddr*)&addr, &addrLen) >= 0) 
    863863      pingReply.serverId.port = addr.sin_port; 
    864864 
    … …  
    11711171  // client (not a player yet) is requesting service. 
    11721172  // accept incoming connection on our well known port 
    11731173  struct sockaddr_in clientAddr; 
    1174   AddrLen addr_len = sizeof(clientAddr); 
     1174  socklen_t addr_len = sizeof(clientAddr); 
    11751175  int fd = accept(wksSocket, (struct sockaddr*)&clientAddr, &addr_len); 
    11761176  if (fd == -1) { 
    11771177    nerror("accepting on wks"); 
  • src/common/TimeKeeper.cxx

    diff -urN bzflag-2.4.2/src/common/TimeKeeper.cxx bzflag-2.4.2-haiku/src/common/TimeKeeper.cxx
    old new  
    2020#ifdef HAVE_UNISTD_H 
    2121#  include <unistd.h> 
    2222#endif 
    23 #ifdef __BEOS__ 
     23#if defined __BEOS__ || defined __HAIKU__ 
    2424#  include <OS.h> 
    2525#endif 
    2626#if !defined(_WIN32) 
  • src/game/NetHandler.cxx

    diff -urN bzflag-2.4.2/src/game/NetHandler.cxx bzflag-2.4.2-haiku/src/game/NetHandler.cxx
    old new  
    125125 
    126126int NetHandler::udpReceive(char *buffer, struct sockaddr_in *uaddr, 
    127127                           bool &udpLinkRequest) { 
    128   AddrLen recvlen = sizeof(*uaddr); 
     128  socklen_t recvlen = sizeof(*uaddr); 
    129129  int n; 
    130130  int id; 
    131131  uint16_t len; 
  • src/ogl/OpenGLGState.cxx

    diff -urN bzflag-2.4.2/src/ogl/OpenGLGState.cxx bzflag-2.4.2-haiku/src/ogl/OpenGLGState.cxx
    old new  
    15751575#else 
    15761576#  ifdef HAVE_CGLGETCURRENTCONTEXT 
    15771577#    define GET_CURRENT_CONTEXT CGLGetCurrentContext 
    1578 #  elif defined(__BEOS__) 
     1578#  elif defined(__BEOS__) || defined(__HAIKU__) 
    15791579// no way to do that, and you shouldn't have to anyway! 
    15801580#    define GET_CURRENT_CONTEXT() 1 
    15811581#  else 
  • src/other/ares/configure.ac

    diff -urN bzflag-2.4.2/src/other/ares/configure.ac bzflag-2.4.2-haiku/src/other/ares/configure.ac
    old new  
    231231               ]) 
    232232fi 
    233233 
     234if test "$HAVE_GETHOSTBYNAME" != "1" 
     235then 
     236  AC_MSG_CHECKING([for gethostbyname with network lib]) 
     237  AC_CHECK_LIB(network, gethostbyname, 
     238               [HAVE_GETHOSTBYNAME="1" 
     239               LIBS="$LIBS -lnetwork" 
     240               ]) 
     241fi 
     242 
    234243dnl At least one system has been identified to require BOTH nsl and socket 
    235244dnl libs at the same time to link properly. 
    236245if test "$HAVE_GETHOSTBYNAME" != "1" 
  • src/other/curl/acinclude.m4

    diff -urN bzflag-2.4.2/src/other/curl/acinclude.m4 bzflag-2.4.2-haiku/src/other/curl/acinclude.m4
    old new  
    22112211  AC_MSG_CHECKING([for connect in libraries]) 
    22122212  tst_connect_save_LIBS="$LIBS" 
    22132213  tst_connect_need_LIBS="unknown" 
    2214   for tst_lib in '' '-lsocket' ; do 
     2214  for tst_lib in '' '-lsocket' '-lnetwork' ; do 
    22152215    if test "$tst_connect_need_LIBS" = "unknown"; then 
    22162216      LIBS="$tst_lib $tst_connect_save_LIBS" 
    22172217      AC_LINK_IFELSE([ 
  • src/other/Makefile.am

    diff -urN bzflag-2.4.2/src/other/Makefile.am bzflag-2.4.2-haiku/src/other/Makefile.am
    old new  
    3030 
    3131# include the files for subconfigured packages as needed left out of the dist 
    3232EXTRA_DIST = \ 
    33         PDCurses \ 
    34         glew 
     33        PDCurses 
    3534 
    3635MAINTAINERCLEANFILES = \ 
    3736        Makefile.in \ 
  • src/platform/BeOSWindow.cxx

    diff -urN bzflag-2.4.2/src/platform/BeOSWindow.cxx bzflag-2.4.2-haiku/src/platform/BeOSWindow.cxx
    old new  
    2222#include <View.h> 
    2323#include <WindowScreen.h> // for set_mouse_position() 
    2424#include <stdio.h> 
     25#include <string.h> 
    2526#include <math.h> 
    2627#include "BeOSDisplay.h" 
    2728#include "BeOSWindow.h" 
    … …  
    8687/****** MyGLView implementation ******/ 
    8788 
    8889MyGLView::MyGLView(MyGLWindow *win, BRect rect, char *name) 
    89   : BGLView(rect, name, B_FOLLOW_NONE, 0, BGL_RGB | BGL_DEPTH | BGL_DOUBLE) 
     90  : BGLView(rect, const_cast<const char*>(name), B_FOLLOW_NONE, 0, BGL_RGB | BGL_DEPTH | BGL_DOUBLE) 
    9091{ 
    9192  this->win = win; 
    9293} 
  • src/platform/BeOSWindow.h

    diff -urN bzflag-2.4.2/src/platform/BeOSWindow.h bzflag-2.4.2-haiku/src/platform/BeOSWindow.h
    old new  
    2222 
    2323class BeOSDisplay; 
    2424class BeOSVisual; 
    25 #ifdef BEOS_USE_GL2 
     25// we need this forward declaration 
    2626class MyGLWindow; 
    27 #endif 
    2827class BView; 
    2928 
    3029class BeOSWindow : public BzfWindow { 

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/