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 54 54 libdir="$libdir/bzflag" 55 55 fi 56 56 57 AC_CONFIG_AUX_DIR(m isc)57 AC_CONFIG_AUX_DIR(m4) 58 58 59 59 # sed magic to get version numbers from src/date/buildDate.cxx 60 60 MAJOR_VERSION=`sed -e 's/#.*define.*BZ_MAJOR_VERSION[^0-9]*\(.*\)/\1/' -e t -e d < \$srcdir/src/date/buildDate.cxx` … … 166 166 # compile our own curl 167 167 AC_ARG_ENABLE(curl_build, [ --enable-curl-build Force compilation of curl]) 168 168 169 # compile our own glew170 AC_ARG_WITH(included-glew,171 AC_HELP_STRING([--with-included-glew],[build with included GLEW library]),172 [enable_glew_build="$withval"], )173 174 169 # compile our own regex 175 170 AC_ARG_ENABLE(regex_build, [ --enable-regex-build Force compilation of regex]) 176 171 … … 184 179 if test "x$enable_all_builds" = "xyes" ; then 185 180 enable_ares_build=yes 186 181 enable_curl_build=yes 187 enable_glew_build=yes188 182 enable_regex_build=yes 189 183 enable_zlib_build=yes 190 184 fi … … 476 470 irix*) 477 471 GLIBS="-lXsgivc -lX11 -laudio $GLIBS" 478 472 ;; 479 beos )473 beos*|haiku*) 480 474 GLIBS=" -lmedia -lgame $GLIBS" 481 475 LIBS="-lbe" 482 476 ;; … … 491 485 case $host_os in 492 486 macos|darwin*) 493 487 ;; 494 beos* )488 beos*|haiku*) 495 489 ;; 496 490 *) 497 491 CONF_CPPFLAGS="$CONF_CPPFLAGS $X_CFLAGS" … … 730 724 fi 731 725 CONF_CFLAGS="$CONF_CFLAGS $FLAGS"; 732 726 CONF_CXXFLAGS="$CONF_CXXFLAGS $FLAGS";; 733 beos* )727 beos*|haiku*) 734 728 AC_DEFINE(HAVE_DEFINED_TOLOWER, 1, [tolower and toupper are not functions]) 735 729 ;; 736 730 esac … … 831 825 # need to consolidate them to here. 832 826 833 827 case $host_os in 834 beos* )828 beos*|haiku*) 835 829 beos=true 836 830 ;; 837 831 hpux*) … … 1033 1027 CONF_CPPFLAGS="$CONF_CPPFLAGS -I\$(top_srcdir)/src/other/curl/include" 1034 1028 fi 1035 1029 1036 1037 # GLEW1038 if test "x$enable_client" != "xno" ; then1039 # Check for the GLEW library (GL Extension Wrangler)1040 if test "x$enable_glew_build" != "xyes" ; then1041 AC_MSG_CHECKING([for GLEW library])1042 tmpLIBS=$LIBS1043 GLEW_LIBS="-lGLEW"1044 LIBS=$GLEW_LIBS1045 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"; then1050 GLEW_LIBS=""1051 fi1052 AC_MSG_RESULT([$glew_check])1053 AC_SUBST(GLEW_LIBS)1054 LIBS=$tmpLIBS1055 fi1056 AC_MSG_CHECKING(whether to build the included GLEW library)1057 BUILD_GLEW="no (using system)"1058 if test "x$GLEW_LIBS" = "x" ; then1059 if test "x$enable_glew_build" = xno ; then1060 BUILD_GLEW=no1061 else1062 BUILD_GLEW="yes"1063 CONF_CPPFLAGS="$CONF_CPPFLAGS -I\$(top_srcdir)/src/other/glew/include"1064 fi1065 fi1066 AC_MSG_RESULT($BUILD_GLEW)1067 else # enable_client1068 BUILD_GLEW="no (clients disabled)"1069 AC_MSG_NOTICE([GLEW is disabled because no clients are being built])1070 fi # enable_client1071 AM_CONDITIONAL(BUILD_GLEW, test "x$BUILD_GLEW" = "xyes")1072 if test "x$BUILD_GLEW" = xyes -o "x$glew_check" = xyes; then1073 AC_DEFINE(HAVE_GLEW, 1, [Using GLEW])1074 fi1075 1076 1030 # make sure ECHO and ECHO_N got defined and substituted 1077 1031 if test "x$ECHO" = "x" ; then 1078 1032 ECHO=echo … … 1318 1272 AC_MSG_RESULT([]) 1319 1273 AC_MSG_RESULT([Build ares ........: $BUILD_ARES]) 1320 1274 AC_MSG_RESULT([Build curl ........: $BUILD_CURL]) 1321 AC_MSG_RESULT([Build glew ........: $BUILD_GLEW])1322 1275 AC_MSG_RESULT([Build regex .......: $BUILD_REGEX]) 1323 1276 AC_MSG_RESULT([Build zlib ........: $BUILD_ZLIB]) 1324 1277 AC_MSG_RESULT([]) -
Makefile.in
diff -urN bzflag-2.4.2/Makefile.in bzflag-2.4.2-haiku/Makefile.in
old new 149 149 EXEEXT = @EXEEXT@ 150 150 FGREP = @FGREP@ 151 151 FRAMEWORK_OPENGL = @FRAMEWORK_OPENGL@ 152 GLEW_LIBS = @GLEW_LIBS@153 152 GLIBS = @GLIBS@ 154 153 GREP = @GREP@ 155 154 HASPOD2MAN = @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 22 22 #else 23 23 # include <sys/types.h> 24 24 # 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> 25 27 #endif 26 28 27 29 /* 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 18 18 # include <sys/types.h> 19 19 # include <dirent.h> 20 20 #endif 21 #ifdef HAVE_PTHREADS 22 # include <pthread.h> 23 #endif 21 24 #include <string> 22 25 #include <vector> 23 26 -
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 185 185 stars.h 186 186 187 187 188 if BUILD_GLEW189 bzflag_SOURCES += $(top_srcdir)/src/other/glew/src/glew.c190 endif191 192 188 if WIN32 193 189 RESOURCE = bzflag.res 194 190 else … … 219 215 $(SDL_LIBS) \ 220 216 $(SDL_IMAGE_LIBS) \ 221 217 $(GLIBS) \ 222 $(GLEW_LIBS) \223 218 $(LIBCURL) \ 224 219 ../date/libDate.la 225 220 # 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 480 480 if ((urecvfd >= 0) /* && ulinkup */) { 481 481 482 482 if (!udpLength) { 483 AddrLenrecvlen = sizeof(urecvaddr);483 socklen_t recvlen = sizeof(urecvaddr); 484 484 int n = recvfrom(urecvfd, ubuf, MaxPacketLen, 0, 485 485 &urecvaddr, (socklen_t*) &recvlen); 486 486 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 858 858 } 859 859 860 860 // fixup ping reply 861 AddrLenaddrLen = sizeof(addr);861 socklen_t addrLen = sizeof(addr); 862 862 if (getsockname(wksSocket, (struct sockaddr*)&addr, &addrLen) >= 0) 863 863 pingReply.serverId.port = addr.sin_port; 864 864 … … 1171 1171 // client (not a player yet) is requesting service. 1172 1172 // accept incoming connection on our well known port 1173 1173 struct sockaddr_in clientAddr; 1174 AddrLenaddr_len = sizeof(clientAddr);1174 socklen_t addr_len = sizeof(clientAddr); 1175 1175 int fd = accept(wksSocket, (struct sockaddr*)&clientAddr, &addr_len); 1176 1176 if (fd == -1) { 1177 1177 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 20 20 #ifdef HAVE_UNISTD_H 21 21 # include <unistd.h> 22 22 #endif 23 #if def __BEOS__23 #if defined __BEOS__ || defined __HAIKU__ 24 24 # include <OS.h> 25 25 #endif 26 26 #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 125 125 126 126 int NetHandler::udpReceive(char *buffer, struct sockaddr_in *uaddr, 127 127 bool &udpLinkRequest) { 128 AddrLenrecvlen = sizeof(*uaddr);128 socklen_t recvlen = sizeof(*uaddr); 129 129 int n; 130 130 int id; 131 131 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 1575 1575 #else 1576 1576 # ifdef HAVE_CGLGETCURRENTCONTEXT 1577 1577 # define GET_CURRENT_CONTEXT CGLGetCurrentContext 1578 # elif defined(__BEOS__) 1578 # elif defined(__BEOS__) || defined(__HAIKU__) 1579 1579 // no way to do that, and you shouldn't have to anyway! 1580 1580 # define GET_CURRENT_CONTEXT() 1 1581 1581 # 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 231 231 ]) 232 232 fi 233 233 234 if test "$HAVE_GETHOSTBYNAME" != "1" 235 then 236 AC_MSG_CHECKING([for gethostbyname with network lib]) 237 AC_CHECK_LIB(network, gethostbyname, 238 [HAVE_GETHOSTBYNAME="1" 239 LIBS="$LIBS -lnetwork" 240 ]) 241 fi 242 234 243 dnl At least one system has been identified to require BOTH nsl and socket 235 244 dnl libs at the same time to link properly. 236 245 if 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 2211 2211 AC_MSG_CHECKING([for connect in libraries]) 2212 2212 tst_connect_save_LIBS="$LIBS" 2213 2213 tst_connect_need_LIBS="unknown" 2214 for tst_lib in '' '-lsocket' ; do2214 for tst_lib in '' '-lsocket' '-lnetwork' ; do 2215 2215 if test "$tst_connect_need_LIBS" = "unknown"; then 2216 2216 LIBS="$tst_lib $tst_connect_save_LIBS" 2217 2217 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 30 30 31 31 # include the files for subconfigured packages as needed left out of the dist 32 32 EXTRA_DIST = \ 33 PDCurses \ 34 glew 33 PDCurses 35 34 36 35 MAINTAINERCLEANFILES = \ 37 36 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 22 22 #include <View.h> 23 23 #include <WindowScreen.h> // for set_mouse_position() 24 24 #include <stdio.h> 25 #include <string.h> 25 26 #include <math.h> 26 27 #include "BeOSDisplay.h" 27 28 #include "BeOSWindow.h" … … 86 87 /****** MyGLView implementation ******/ 87 88 88 89 MyGLView::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) 90 91 { 91 92 this->win = win; 92 93 } -
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 22 22 23 23 class BeOSDisplay; 24 24 class BeOSVisual; 25 #ifdef BEOS_USE_GL2 25 // we need this forward declaration 26 26 class MyGLWindow; 27 #endif28 27 class BView; 29 28 30 29 class BeOSWindow : public BzfWindow {
