[games-server/ghost++] long overdue bump, fixed zlib (apperently binutils got smart), support stormlib 8.22, sync FindMySQL.cmake from Connector/ODBC 5.3.0 alpha

This commit is contained in:
Robert Förster 2013-11-13 17:10:32 +01:00
parent 1d90209677
commit d4f8660768
6 changed files with 377 additions and 110 deletions

View File

@ -1 +1 @@
DIST ghost++-17.1_p20120618.tar.xz 790644 SHA256 7ca988a20ab070c2c8b8fbf7c4e3b8843640addc82390397555f2b3db88d2884 SHA512 ae658693f66c5a35f991a0970db83ccd8152daffddebb7ce5d2b5cc9b6abc46d2e96c0159d2a8fb8b18c27470652db34c4d1e020c6b4cbe9490f606f5565ea44 WHIRLPOOL bb7a3003b0264d21adaf78f1fdeb9d96488fd667193caec4fb1529aa5a3d130fe98e422b872823e7389966e6ffafbe1d424fa5ec00218675c5b157f981720937
DIST ghost++-17.1_p20130528.tar.xz 897468 SHA256 38e5d155194f8bff82bb039c5a3932cac9a6499d3273e31e87d6a86cc6f5fedb SHA512 89b6582014f834fd0fd9c5c900d2422b4676f1dc74c7aa4bb59cb1fd1685607a35f4bb5d0b0bdf124c33626ef760138ec86ac788fe4fc723c451b35cf56eafe4 WHIRLPOOL f3fa1e38d38760ab0a12d00530eb1fc649aa7d809e2615293743c1bf8399e4f64672ce0b306c26eaad15e6c396cb0328055d0f77f86848aa62f913e7470d1599

View File

@ -1,5 +1,5 @@
#--------------------------------------------------------
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
#
# The MySQL Connector/ODBC is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
@ -23,19 +23,131 @@
##########################################################################
MACRO(_MYSQL_CONFIG VAR _regex _opt)
EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} ${_opt}
OUTPUT_VARIABLE _mysql_config_output
)
SET(_var ${_mysql_config_output})
STRING(REGEX MATCHALL "${_regex}([^ ]+)" _mysql_config_output "${_mysql_config_output}")
STRING(REGEX REPLACE "^[ \t]+" "" _mysql_config_output "${_mysql_config_output}")
STRING(REGEX REPLACE "[\r\n]$" "" _mysql_config_output "${_mysql_config_output}")
STRING(REGEX REPLACE "${_regex}" "" _mysql_config_output "${_mysql_config_output}")
SEPARATE_ARGUMENTS(_mysql_config_output)
SET(${VAR} ${_mysql_config_output})
ENDMACRO(_MYSQL_CONFIG _regex _opt)
MACRO(_MYSQL_CONFIG_REPLACE VAR _regex1 _replace _regex2 _opt)
EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} ${_opt}
OUTPUT_VARIABLE _mysql_config_output1
)
SET(_var ${_mysql_config_output1})
STRING(REGEX MATCHALL "${_regex2}([^ ]+)" _mysql_config_output1 "${_mysql_config_output1}")
STRING(REGEX REPLACE "^[ \t]+" "" _mysql_config_output1 "${_mysql_config_output1}")
STRING(REGEX REPLACE "[\r\n]$" "" _mysql_config_output1 "${_mysql_config_output1}")
STRING(REGEX REPLACE "${_regex2}" "" _mysql_config_output1 "${_mysql_config_output1}")
STRING(REGEX REPLACE "${_regex1}" "${_replace}" _mysql_config_output1 "${_mysql_config_output1}")
SET(${VAR} ${_mysql_config_output1})
ENDMACRO(_MYSQL_CONFIG_REPLACE _regex1 _replace _regex2 _opt)
IF (MYSQLCLIENT_LIB_NAME)
IF (${MYSQLCLIENT_LIB_NAME} MATCHES "libmysqlclient_r.a"
OR ${MYSQLCLIENT_LIB_NAME} MATCHES "libmysqlclient.a"
OR ${MYSQLCLIENT_LIB_NAME} MATCHES "mysqlclient*")
SET(MYSQLCLIENT_STATIC_LINKING 1)
ELSEIF (${MYSQLCLIENT_LIB_NAME} MATCHES "libmysqlclient_r.so"
OR ${MYSQLCLIENT_LIB_NAME} MATCHES "libmysqlclient.so"
OR ${MYSQLCLIENT_LIB_NAME} MATCHES "libmysql.*")
SET(MYSQLCLIENT_STATIC_LINKING 0)
ENDIF (${MYSQLCLIENT_LIB_NAME} MATCHES "libmysqlclient_r.a"
OR ${MYSQLCLIENT_LIB_NAME} MATCHES "libmysqlclient.a"
OR ${MYSQLCLIENT_LIB_NAME} MATCHES "mysqlclient*")
ELSE (MYSQLCLIENT_LIB_NAME)
IF (WIN32)
SET(MYSQLCLIENT_LIB_NAME "mysqlclient.lib")
ELSE (WIN32)
SET(MYSQLCLIENT_LIB_NAME "libmysqlclient.a libmysqlclient_r.a")
ENDIF (WIN32)
SET(MYSQLCLIENT_STATIC_LINKING 1)
ENDIF (MYSQLCLIENT_LIB_NAME)
SEPARATE_ARGUMENTS(MYSQLCLIENT_LIB_NAME)
IF (NOT MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
IF (EXISTS "$ENV{MYSQL_DIR}/bin/mysql_config")
SET(MYSQL_CONFIG_EXECUTABLE "$ENV{MYSQL_DIR}/bin/mysql_config")
ELSE (EXISTS "$ENV{MYSQL_DIR}/bin/mysql_config")
FIND_PROGRAM(MYSQL_CONFIG_EXECUTABLE
NAMES mysql_config
DOC "full path of mysql_config"
PATHS /usr/bin
/usr/local/bin
/opt/mysql/mysql/bin
/usr/local/mysql/bin
)
ENDIF (EXISTS "$ENV{MYSQL_DIR}/bin/mysql_config")
ENDIF (NOT MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
IF(MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
MESSAGE(STATUS "mysql_config was found ${MYSQL_CONFIG_EXECUTABLE}")
EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--version"
OUTPUT_VARIABLE __MYSQL_VERSION
)
# Clean up so only numeric, in case of "-alpha" or similar
STRING(REGEX MATCHALL "([0-9]+.[0-9]+.[0-9]+)" MYSQL_VERSION "${__MYSQL_VERSION}")
# To create a fully numeric version, first normalize so N.NN.NN
STRING(REGEX REPLACE "[.]([0-9])[.]" ".0\\1." MYSQL_NUM_VERSION "${MYSQL_VERSION}")
STRING(REGEX REPLACE "[.]([0-9])$" ".0\\1" MYSQL_NUM_VERSION "${MYSQL_NUM_VERSION}")
# Finally remove the dot
STRING(REGEX REPLACE "[.]" "" MYSQL_NUM_VERSION "${MYSQL_NUM_VERSION}")
IF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603)
EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cxxflags"
OUTPUT_VARIABLE _mysql_config_output
)
SET(MYSQL_CXX_LINKAGE 1)
ELSE (MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603)
EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags"
OUTPUT_VARIABLE _mysql_config_output
)
ENDIF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603)
# Remove the stl4port dependency
STRING(REGEX REPLACE "-library=stlport4" "" _mysql_config_output "${_mysql_config_output}")
IF (NOT MYSQL_LINK_FLAGS)
STRING(REGEX MATCHALL "-m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}")
ENDIF (NOT MYSQL_LINK_FLAGS)
IF (NOT MYSQL_CXXFLAGS)
STRING(REGEX REPLACE "[\r\n]$" "" MYSQL_CXXFLAGS "${_mysql_config_output}")
ENDIF (NOT MYSQL_CXXFLAGS)
# ADD_DEFINITIONS("${MYSQL_CXXFLAGS}")
ENDIF (MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
#----------------- FIND MYSQL_INCLUDE_DIR -------------------
IF(NOT MYSQL_INCLUDE_DIR AND MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
_MYSQL_CONFIG(MYSQL_INCLUDE_DIR "(^| )-I" "--include")
ELSE(NOT MYSQL_INCLUDE_DIR AND MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
MESSAGE(STATUS "ENV{MYSQL_DIR} = $ENV{MYSQL_DIR}")
FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
${MYSQL_INCLUDE_DIR}
$ENV{MYSQL_INCLUDE_DIR}
$ENV{MYSQL_DIR}/include
/usr/include/mysql
/usr/local/include/mysql
/opt/mysql/mysql/include
/opt/mysql/mysql/include/mysql
/usr/local/mysql/include
/usr/local/mysql/include/mysql
$ENV{ProgramFiles}/MySQL/*/include
$ENV{SystemDrive}/MySQL/*/include)
ENDIF(NOT MYSQL_INCLUDE_DIR AND MYSQL_CONFIG_EXECUTABLE AND NOT WIN32)
#-------------- FIND MYSQL_INCLUDE_DIR ------------------
FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
$ENV{MYSQL_INCLUDE_DIR}
$ENV{MYSQL_DIR}/include
/usr/include/mysql
/usr/local/include/mysql
/opt/mysql/mysql/include
/opt/mysql/mysql/include/mysql
/usr/local/mysql/include
/usr/local/mysql/include/mysql
$ENV{ProgramFiles}/MySQL/*/include
$ENV{SystemDrive}/MySQL/*/include)
#----------------- FIND MYSQL_LIB_DIR -------------------
IF (WIN32)
@ -51,70 +163,171 @@ IF (WIN32)
ADD_DEFINITIONS(-DDBUG_OFF)
ENDIF (CMAKE_BUILD_TYPE STREQUAL Debug)
FIND_LIBRARY(MYSQL_LIB NAMES mysqlclient
PATHS
$ENV{MYSQL_DIR}/lib/${libsuffixDist}
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/libmysql
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
$ENV{MYSQL_DIR}/client/${libsuffixBuild}
$ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
$ENV{ProgramFiles}/MySQL/*/lib/${libsuffixDist}
$ENV{ProgramFiles}/MySQL/*/lib
$ENV{SystemDrive}/MySQL/*/lib/${libsuffixDist})
FIND_LIBRARY(MYSQL_LIB
NAMES
${MYSQLCLIENT_LIB_NAME}
PATHS
${MYSQL_LIB_DIR}
${MYSQL_LIB_DIR}/lib/${libsuffixDist}
${MYSQL_LIB_DIR}/lib #mysqlclient may be in lib for some c/c distros
${MYSQL_LIB_DIR}/libmysql/${libsuffixBuild}
${MYSQL_LIB_DIR}/client/${libsuffixBuild}
$ENV{MYSQL_LIB_DIR}
$ENV{MYSQL_LIB_DIR}/lib/${libsuffixDist}
$ENV{MYSQL_LIB_DIR}/lib #mysqlclient may be in lib for some c/c distros
$ENV{MYSQL_LIB_DIR}/libmysql/${libsuffixBuild}
$ENV{MYSQL_LIB_DIR}/client/${libsuffixBuild}
$ENV{MYSQL_DIR}/lib/${libsuffixDist}
$ENV{MYSQL_DIR}/lib #mysqlclient may be in lib for some c/c distros
$ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
$ENV{MYSQL_DIR}/client/${libsuffixBuild}
$ENV{ProgramFiles}/MySQL/*/lib/${libsuffixDist}
$ENV{ProgramFiles}/MySQL/*/lib
$ENV{SystemDrive}/MySQL/*/lib/${libsuffixDist}
$ENV{SystemDrive}/MySQL/*/lib)
SET(MYSQL_LIBRARIES ${MYSQL_LIB})
IF(MYSQL_LIB)
GET_FILENAME_COMPONENT(MYSQL_LIB_DIR ${MYSQL_LIB} PATH)
ENDIF(MYSQL_LIB)
ELSE (WIN32)
FIND_LIBRARY(MYSQL_LIB NAMES mysqlclient_r
PATHS
$ENV{MYSQL_DIR}/libmysql_r/.libs
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/lib/mysql
/usr/lib/mysql
/usr/local/lib/mysql
/usr/local/mysql/lib
/usr/local/mysql/lib/mysql
/opt/mysql/mysql/lib
/opt/mysql/mysql/lib/mysql)
IF (NOT MYSQL_LIB_DIR AND MYSQL_CONFIG_EXECUTABLE)
# In MySQL Server 5.6.10 "mysql_config" outputs -lssl
# -lcrypto dependencies even if (as it is with the
# Oracle built binaries) OpenSSL is linked statically
# to the client library and no reference is needed.
# We remove the OpenSSL libraries if -DREMOVE_OPENSSL_DEP
# is given
IF (REMOVE_OPENSSL_DEP)
LIST(REMOVE_ITEM MYSQL_LIBRARIES "ssl" "crypto")
ENDIF (REMOVE_OPENSSL_DEP)
FIND_LIBRARY(MYSQL_LIB
NAMES
${MYSQLCLIENT_LIB_NAME}
PATHS
${MYSQL_LIB_DIR}
${MYSQL_LIB_DIR}/libmysql_r/.libs
${MYSQL_LIB_DIR}/lib
${MYSQL_LIB_DIR}/lib/mysql
$ENV{MYSQL_LIB_DIR}
$ENV{MYSQL_LIB_DIR}/libmysql_r/.libs
$ENV{MYSQL_LIB_DIR}/lib
$ENV{MYSQL_LIB_DIR}/lib/mysql
$ENV{MYSQL_DIR}/libmysql_r/.libs
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/lib/mysql
${MYSQL_CLIB_DIR}
${MYSQL_CLIB_DIR}/libmysql_r/.libs
${MYSQL_CLIB_DIR}/lib
${MYSQL_CLIB_DIR}/lib/mysql
/usr/lib/mysql
/usr/local/lib/mysql
/usr/local/mysql/lib
/usr/local/mysql/lib/mysql
/opt/mysql/mysql/lib
/opt/mysql/mysql/lib/mysql)
IF (MYSQLCLIENT_STATIC_LINKING)
_MYSQL_CONFIG_REPLACE(MYSQL_LIBRARIES
"(mysqlclient|mysqlclient_r)" "${MYSQL_LIB}" "(^| )-l" "--libs")
ELSE (MYSQLCLIENT_STATIC_LINKING)
_MYSQL_CONFIG(MYSQL_LIBRARIES "(^| )-l" "--libs")
ENDIF (MYSQLCLIENT_STATIC_LINKING)
_MYSQL_CONFIG(MYSQL_CLIB_DIR "(^| )-L" "--libs")
IF (NOT MYSQL_LIB_DIR)
SET(MYSQL_LIB_DIR ${MYSQL_CLIB_DIR})
ENDIF (NOT MYSQL_LIB_DIR)
ELSE (NOT MYSQL_LIB_DIR AND MYSQL_CONFIG_EXECUTABLE)
FIND_LIBRARY(MYSQL_LIB
NAMES
${MYSQLCLIENT_LIB_NAME}
PATHS
${MYSQL_LIB_DIR}
${MYSQL_LIB_DIR}/libmysql_r/.libs
${MYSQL_LIB_DIR}/lib
${MYSQL_LIB_DIR}/lib/mysql
$ENV{MYSQL_LIB_DIR}
$ENV{MYSQL_LIB_DIR}/libmysql_r/.libs
$ENV{MYSQL_LIB_DIR}/lib
$ENV{MYSQL_LIB_DIR}/lib/mysql
$ENV{MYSQL_DIR}/libmysql_r/.libs
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/lib/mysql
/usr/lib/mysql
/usr/local/lib/mysql
/usr/local/mysql/lib
/usr/local/mysql/lib/mysql
/opt/mysql/mysql/lib
/opt/mysql/mysql/lib/mysql)
SET(MYSQL_LIBRARIES ${MYSQL_LIB})
IF(MYSQL_LIB)
GET_FILENAME_COMPONENT(MYSQL_LIB_DIR ${MYSQL_LIB} PATH)
ENDIF(MYSQL_LIB)
ENDIF (NOT MYSQL_LIB_DIR AND MYSQL_CONFIG_EXECUTABLE)
IF (MYSQLCLIENT_STATIC_LINKING AND
NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
LIST(APPEND MYSQL_LIBRARIES "rt")
ENDIF ()
ENDIF (WIN32)
IF(MYSQL_LIB)
GET_FILENAME_COMPONENT(MYSQL_LIB_DIR ${MYSQL_LIB} PATH)
ENDIF(MYSQL_LIB)
# Optionally add more libraries from the command line
# using -DEXTRA_MYSQL_DEP=...
IF (EXTRA_MYSQL_DEP)
LIST(APPEND MYSQL_LIBRARIES ${EXTRA_MYSQL_DEP})
ENDIF (EXTRA_MYSQL_DEP)
SET(MYSQL_CLIENT_LIBS ${MYSQL_LIBRARIES})
SET(VERBOSE 1)
IF (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
SET(MYSQL_FOUND TRUE)
MESSAGE(STATUS "MySQL Include dir: ${MYSQL_INCLUDE_DIR}")
MESSAGE(STATUS "MySQL Library : ${MYSQL_LIBRARIES}")
MESSAGE(STATUS "MySQL Library dir: ${MYSQL_LIB_DIR}")
MESSAGE(STATUS "MySQL CXXFLAGS: ${MYSQL_CXXFLAGS}")
MESSAGE(STATUS "MySQL Link flags: ${MYSQL_LINK_FLAGS}")
IF (MYSQL_VERSION)
MESSAGE(STATUS "MySQL Version: ${MYSQL_VERSION}")
ELSE (MYSQL_VERSION)
IF(WIN32)
#SET(CMAKE_REQUIRED_LIBRARIES ${MYSQL_LIB})
ELSE(WIN32)
INCLUDE(CheckFunctionExists)
INCLUDE(CheckLibraryExists)
# For now this works only on *nix
SET(CMAKE_REQUIRED_LIBRARIES ${MYSQL_LIBRARIES})
SET(CMAKE_REQUIRED_INCLUDES ${MYSQL_INCLUDE_DIR})
CHECK_FUNCTION_EXISTS("mysql_set_character_set" HAVE_SET_CHARSET)
CHECK_LIBRARY_EXISTS(mysqlclient "mysql_set_character_set" ${MYSQL_LIB_DIR} HAVE_SET_CHARSET_IN_LIB)
SET(CMAKE_REQUIRED_LIBRARIES)
SET(CMAKE_REQUIRED_INCLUDES)
IF (HAVE_SET_CHARSET OR HAVE_SET_CHARSET_IN_LIB)
MESSAGE(STATUS "libmysql version - ok")
ELSE (HAVE_SET_CHARSET OR HAVE_SET_CHARSET_IN_LIB)
MESSAGE(FATAL_ERROR "Versions < 4.1.13 (for MySQL 4.1.x) and < 5.0.7 for (MySQL 5.0.x) are not supported. Please update your libraries.")
ENDIF (HAVE_SET_CHARSET OR HAVE_SET_CHARSET_IN_LIB)
ENDIF(WIN32)
ENDIF(MYSQL_VERSION)
MESSAGE(STATUS "MySQL Include dir: ${MYSQL_INCLUDE_DIR}")
MESSAGE(STATUS "MySQL Library dir: ${MYSQL_LIB_DIR}")
MESSAGE(STATUS "MySQL CXXFLAGS: ${MYSQL_CXXFLAGS}")
MESSAGE(STATUS "MySQL Link flags: ${MYSQL_LINK_FLAGS}")
INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR})
LINK_DIRECTORIES(${MYSQL_LIB_DIR})
FIND_LIBRARY(MYSQL_ZLIB zlib PATHS ${MYSQL_LIB_DIR})
FIND_LIBRARY(MYSQL_YASSL yassl PATHS ${MYSQL_LIB_DIR})
FIND_LIBRARY(MYSQL_TAOCRYPT taocrypt PATHS ${MYSQL_LIB_DIR})
IF (WIN32)
SET(MYSQL_CLIENT_LIBS mysqlclient)
ELSE (WIN32)
SET(MYSQL_CLIENT_LIBS mysqlclient_r)
ENDIF (WIN32)
IF (MYSQL_ZLIB)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} zlib)
ENDIF (MYSQL_ZLIB)
IF (MYSQL_YASSL)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} yassl)
ENDIF (MYSQL_YASSL)
IF (MYSQL_TAOCRYPT)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} taocrypt)
ENDIF (MYSQL_TAOCRYPT)
# Added needed mysqlclient dependencies on Windows
IF (WIN32)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} ws2_32)
ELSE (WIN32)
FIND_PACKAGE(Threads)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} ${CMAKE_THREAD_LIBS_INIT})
ENDIF (WIN32)
MESSAGE(STATUS "MySQL Include dir: ${MYSQL_INCLUDE_DIR} library dir: ${MYSQL_LIB_DIR}")
MESSAGE(STATUS "MySQL client libraries: ${MYSQL_CLIENT_LIBS}")
ELSE (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
MESSAGE(FATAL_ERROR "Cannot find MySQL. Include dir: ${MYSQL_INCLUDE_DIR} library dir: ${MYSQL_LIB_DIR}")
IF(NOT WIN32)
MESSAGE(SEND_ERROR "mysql_config wasn't found, -DMYSQL_CONFIG_EXECUTABLE=...")
ENDIF(NOT WIN32)
MESSAGE(FATAL_ERROR "Cannot find MySQL. Include dir: ${MYSQL_INCLUDE_DIR} library dir: ${MYSQL_LIB_DIR} cxxflags: ${MYSQL_CXXFLAGS}")
ENDIF (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)

View File

@ -1,13 +0,0 @@
Index: ghost/socket.h
===================================================================
--- ghost/socket.h (revision 580)
+++ ghost/socket.h (working copy)
@@ -79,8 +79,6 @@
#define SOCKET_ERROR -1
#define closesocket close
-
- extern int GetLastError( );
#endif
#ifndef INADDR_NONE

View File

@ -0,0 +1,93 @@
Index: ghost/ghost.cpp
===================================================================
--- ghost/ghost.cpp (revision 600)
+++ ghost/ghost.cpp (working copy)
@@ -48,7 +48,7 @@
#endif
#define __STORMLIB_SELF__
-#include <stormlib/StormLib.h>
+#include <StormLib.h>
/*
@@ -1408,7 +1408,7 @@
char *SubFileData = new char[FileLength];
DWORD BytesRead = 0;
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
{
CONSOLE_Print( "[GHOST] extracting Scripts\\common.j from MPQ file to [" + m_MapCFGPath + "common.j]" );
UTIL_FileWrite( m_MapCFGPath + "common.j", (unsigned char *)SubFileData, BytesRead );
@@ -1435,7 +1435,7 @@
char *SubFileData = new char[FileLength];
DWORD BytesRead = 0;
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
{
CONSOLE_Print( "[GHOST] extracting Scripts\\blizzard.j from MPQ file to [" + m_MapCFGPath + "blizzard.j]" );
UTIL_FileWrite( m_MapCFGPath + "blizzard.j", (unsigned char *)SubFileData, BytesRead );
Index: ghost/map.cpp
===================================================================
--- ghost/map.cpp (revision 600)
+++ ghost/map.cpp (working copy)
@@ -26,7 +26,7 @@
#include "map.h"
#define __STORMLIB_SELF__
-#include <stormlib/StormLib.h>
+#include <StormLib.h>
#define ROTL(x,n) ((x)<<(n))|((x)>>(32-(n))) // this won't work with signed types
#define ROTR(x,n) ((x)>>(n))|((x)<<(32-(n))) // this won't work with signed types
@@ -313,7 +313,7 @@
char *SubFileData = new char[FileLength];
DWORD BytesRead = 0;
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
{
CONSOLE_Print( "[MAP] overriding default common.j with map copy while calculating map_crc/sha1" );
OverrodeCommonJ = true;
@@ -349,7 +349,7 @@
char *SubFileData = new char[FileLength];
DWORD BytesRead = 0;
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
{
CONSOLE_Print( "[MAP] overriding default blizzard.j with map copy while calculating map_crc/sha1" );
OverrodeBlizzardJ = true;
@@ -407,7 +407,7 @@
char *SubFileData = new char[FileLength];
DWORD BytesRead = 0;
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
{
if( *i == "war3map.j" || *i == "scripts\\war3map.j" )
FoundScript = true;
@@ -474,7 +474,7 @@
char *SubFileData = new char[FileLength];
DWORD BytesRead = 0;
- if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead ) )
+ if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
{
istringstream ISS( string( SubFileData, BytesRead ) );
Index: ghost/socket.h
===================================================================
--- ghost/socket.h (revision 600)
+++ ghost/socket.h (working copy)
@@ -79,8 +79,6 @@
#define SOCKET_ERROR -1
#define closesocket close
-
- extern int GetLastError( );
#endif
#ifndef INADDR_NONE

View File

@ -1,26 +0,0 @@
Index: ghost/ghost.cpp
===================================================================
--- ghost/ghost.cpp (revision 572)
+++ ghost/ghost.cpp (working copy)
@@ -48,7 +48,7 @@
#endif
#define __STORMLIB_SELF__
-#include <stormlib/StormLib.h>
+#include <StormLib.h>
/*
Index: ghost/map.cpp
===================================================================
--- ghost/map.cpp (revision 572)
+++ ghost/map.cpp (working copy)
@@ -26,7 +26,7 @@
#include "map.h"
#define __STORMLIB_SELF__
-#include <stormlib/StormLib.h>
+#include <StormLib.h>
#define ROTL(x,n) ((x)<<(n))|((x)>>(32-(n))) // this won't work with signed types
#define ROTR(x,n) ((x)>>(n))|((x)<<(32-(n))) // this won't work with signed types

View File

@ -21,7 +21,8 @@ DEPEND="dev-libs/boost
dev-games/bncsutil
dev-games/StormLib
dev-db/sqlite
mysql? ( virtual/mysql )"
mysql? ( virtual/mysql )
sys-libs/zlib"
RDEPEND="${DEPEND}"
#pkg_setup() {
@ -30,8 +31,7 @@ RDEPEND="${DEPEND}"
#}
src_prepare() {
epatch "${FILESDIR}/${PN}-stormlib-include.patch"
epatch "${FILESDIR}/${PN}-GetLastError.patch"
epatch "${FILESDIR}/${PN}-stormlib-8.22.patch"
epatch "${FILESDIR}/${PN}-sqlite-include-guard.patch"
epatch "${FILESDIR}/${PN}-configpath.patch"
use ggb && epatch "${FILESDIR}/${PN}-ggb.patch"