diff options
author | click <click@gonnamakeyou.com> | 2013-02-27 22:31:25 +0100 |
---|---|---|
committer | click <click@gonnamakeyou.com> | 2013-02-27 22:31:25 +0100 |
commit | 58ac8207eccbaf056cb1ae7a046bdef48a2483ad (patch) | |
tree | 1ec24e06578b37ff93f72f56583fcf428330ec3f /dep | |
parent | d3ad8a4941124aae2b2ced6cc75c18ec8498664a (diff) |
Core: Add support for compiling core in a cygwin-environment
- rename/readd/add G3D-patches
- give a history on the changes (some G3D-changes didn't even HAVE a patch - boo!)
DON'T MESS ABOUT WITH CHANGING DEP/* LIBRARIES AND NOT LEAVING A DIFF IN THE SOURCETRE, MKAY!?
Diffstat (limited to 'dep')
-rw-r--r-- | dep/g3dlite/G3D-v8.0_hotfix1.diff (renamed from dep/g3dlite/G3D-v8.0.diff) | 66 | ||||
-rw-r--r-- | dep/g3dlite/G3D-v8.0_hotfix2.diff | 14 | ||||
-rw-r--r-- | dep/g3dlite/G3D-v8.0_hotfix3.diff | 12 | ||||
-rw-r--r-- | dep/g3dlite/G3D-v8.0_hotfix4.diff (renamed from dep/g3dlite/G3D-v8.0_extra.diff) | 12 | ||||
-rw-r--r-- | dep/g3dlite/G3D-v8.0_hotfix5.diff | 71 | ||||
-rw-r--r-- | dep/g3dlite/Readme.txt | 11 | ||||
-rw-r--r-- | dep/g3dlite/include/G3D/System.h | 1 | ||||
-rw-r--r-- | dep/g3dlite/include/G3D/platform.h | 2 | ||||
-rw-r--r-- | dep/g3dlite/source/BinaryOutput.cpp | 4 | ||||
-rw-r--r-- | dep/g3dlite/source/FileSystem.cpp | 4 | ||||
-rw-r--r-- | dep/g3dlite/source/System.cpp | 4 |
11 files changed, 153 insertions, 48 deletions
diff --git a/dep/g3dlite/G3D-v8.0.diff b/dep/g3dlite/G3D-v8.0_hotfix1.diff index a82d5378a8b..ec90cebbecf 100644 --- a/dep/g3dlite/G3D-v8.0.diff +++ b/dep/g3dlite/G3D-v8.0_hotfix1.diff @@ -1,6 +1,6 @@ -diff -urN g3d-beta4/include/G3D/debugAssert.h g3d-mangos/include/G3D/debugAssert.h ---- g3d-beta4/include/G3D/debugAssert.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/debugAssert.h 2010-08-26 21:36:32.000000000 +0200 +diff -urN a/dep/g3dlite/include/G3D/debugAssert.h b/dep/g3dlite/include/G3D/debugAssert.h +--- a/dep/g3dlite/include/G3D/debugAssert.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/debugAssert.h 2010-08-26 21:36:32.000000000 +0200 @@ -39,10 +39,12 @@ #ifdef G3D_LINUX // Needed so we can define a global display @@ -30,9 +30,9 @@ diff -urN g3d-beta4/include/G3D/debugAssert.h g3d-mangos/include/G3D/debugAssert /** Pops up an assertion dialog or prints an assertion -diff -urN g3d-beta4/include/G3D/g3dmath.h g3d-mangos/include/G3D/g3dmath.h ---- g3d-beta4/include/G3D/g3dmath.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/g3dmath.h 2010-08-26 21:36:32.000000000 +0200 +diff -urN a/dep/g3dlite/include/G3D/g3dmath.h b/dep/g3dlite/include/G3D/g3dmath.h +--- a/dep/g3dlite/include/G3D/g3dmath.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/g3dmath.h 2010-08-26 21:36:32.000000000 +0200 @@ -65,6 +65,8 @@ return ::rand() / double(RAND_MAX); } @@ -62,9 +62,9 @@ diff -urN g3d-beta4/include/G3D/g3dmath.h g3d-mangos/include/G3D/g3dmath.h #endif -diff -urN g3d-beta4/include/G3D/platform.h g3d-mangos/include/G3D/platform.h ---- g3d-beta4/include/G3D/platform.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/platform.h 2010-08-26 21:36:32.000000000 +0200 +diff -urN a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h +--- a/dep/g3dlite/include/G3D/platform.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/platform.h 2010-08-26 21:36:32.000000000 +0200 @@ -56,12 +57,15 @@ // pi as a constant, which creates a conflict with G3D #define __FP__ @@ -97,9 +97,9 @@ diff -urN g3d-beta4/include/G3D/platform.h g3d-mangos/include/G3D/platform.h /** @def G3D_CHECK_PRINTF_METHOD_ARGS() Enables printf parameter validation on gcc. */ -diff -urN g3d-beta4/include/G3D/System.h g3d-mangos/include/G3D/System.h ---- g3d-beta4/include/G3D/System.h 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/include/G3D/System.h 2010-08-26 21:36:32.000000000 +0200 +diff -urN a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h +--- a/dep/g3dlite/include/G3D/System.h 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/include/G3D/System.h 2010-08-26 21:36:32.000000000 +0200 @@ -375,10 +375,10 @@ // count now contains the cycle count for the intervening operation. </PRE> @@ -141,9 +141,9 @@ diff -urN g3d-beta4/include/G3D/System.h g3d-mangos/include/G3D/System.h } // namespace -diff -urN g3d-beta4/source/BinaryInput.cpp g3d-mangos/source/BinaryInput.cpp ---- g3d-beta4/source/BinaryInput.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/BinaryInput.cpp 2010-08-15 11:37:26.000000000 +0200 +diff -urN a/dep/g3dlite/source/BinaryInput.cpp b/dep/g3dlite/source/BinaryInput.cpp +--- a/dep/g3dlite/source/BinaryInput.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/BinaryInput.cpp 2010-08-15 11:37:26.000000000 +0200 @@ -39,7 +39,9 @@ #include "G3D/Log.h" #include "G3D/FileSystem.h" @@ -171,9 +171,9 @@ diff -urN g3d-beta4/source/BinaryInput.cpp g3d-mangos/source/BinaryInput.cpp // Figure out how big the file is and verify that it exists. m_length = FileSystem::size(m_filename); -diff -urN g3d-beta4/source/debugAssert.cpp g3d-mangos/source/debugAssert.cpp ---- g3d-beta4/source/debugAssert.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/debugAssert.cpp 2010-08-15 11:37:26.000000000 +0200 +diff -urN a/dep/g3dlite/source/debugAssert.cpp b/dep/g3dlite/source/debugAssert.cpp +--- a/dep/g3dlite/source/debugAssert.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/debugAssert.cpp 2010-08-15 11:37:26.000000000 +0200 @@ -37,9 +37,11 @@ AssertionHook _failureHook = _handleErrorCheck_; @@ -202,9 +202,9 @@ diff -urN g3d-beta4/source/debugAssert.cpp g3d-mangos/source/debugAssert.cpp #elif defined(G3D_OSX) // TODO: OS X #endif -diff -urN g3d-beta4/source/FileSystem.cpp g3d-mangos/source/FileSystem.cpp ---- g3d-beta4/source/FileSystem.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/FileSystem.cpp 2010-08-15 11:37:26.000000000 +0200 +diff -urN a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp +--- a/dep/g3dlite/source/FileSystem.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/FileSystem.cpp 2010-08-15 11:37:26.000000000 +0200 @@ -12,7 +12,9 @@ #include "G3D/fileutils.h" #include <sys/stat.h> @@ -252,9 +252,9 @@ diff -urN g3d-beta4/source/FileSystem.cpp g3d-mangos/source/FileSystem.cpp } return st.st_size; -diff -urN g3d-beta4/source/fileutils.cpp g3d-mangos/source/fileutils.cpp ---- g3d-beta4/source/fileutils.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/fileutils.cpp 2010-08-15 11:37:26.000000000 +0200 +diff -urN a/dep/g3dlite/source/fileutils.cpp b/dep/g3dlite/source/fileutils.cpp +--- a/dep/g3dlite/source/fileutils.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/fileutils.cpp 2010-08-15 11:37:26.000000000 +0200 @@ -20,7 +20,9 @@ #include <sys/stat.h> @@ -368,9 +368,9 @@ diff -urN g3d-beta4/source/fileutils.cpp g3d-mangos/source/fileutils.cpp } -diff -urN g3d-beta4/source/prompt.cpp g3d-mangos/source/prompt.cpp ---- g3d-beta4/source/prompt.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/prompt.cpp 2010-08-15 11:37:26.000000000 +0200 +diff -urN a/dep/g3dlite/source/prompt.cpp b/dep/g3dlite/source/prompt.cpp +--- a/dep/g3dlite/source/prompt.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/prompt.cpp 2010-08-15 11:37:26.000000000 +0200 @@ -21,6 +21,7 @@ # define _getch getchar #endif @@ -433,9 +433,9 @@ diff -urN g3d-beta4/source/prompt.cpp g3d-mangos/source/prompt.cpp return textPrompt(windowTitle, prompt, choice, numChoices); } -diff -urN g3d-beta4/source/RegistryUtil.cpp g3d-mangos/source/RegistryUtil.cpp ---- g3d-beta4/source/RegistryUtil.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/RegistryUtil.cpp 2010-08-15 11:37:26.000000000 +0200 +diff -urN a/dep/g3dlite/source/RegistryUtil.cpp b/dep/g3dlite/source/RegistryUtil.cpp +--- a/dep/g3dlite/source/RegistryUtil.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/RegistryUtil.cpp 2010-08-15 11:37:26.000000000 +0200 @@ -257,7 +257,7 @@ @@ -445,9 +445,9 @@ diff -urN g3d-beta4/source/RegistryUtil.cpp g3d-mangos/source/RegistryUtil.cpp debugAssert(str); if (str) { -diff -urN g3d-beta4/source/System.cpp g3d-mangos/source/System.cpp ---- g3d-beta4/source/System.cpp 2010-02-07 23:39:20.000000000 +0100 -+++ g3d-mangos/source/System.cpp 2010-08-15 11:37:26.000000000 +0200 +diff -urN a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp +--- a/dep/g3dlite/source/System.cpp 2010-02-07 23:39:20.000000000 +0100 ++++ b/dep/g3dlite/source/System.cpp 2010-08-15 11:37:26.000000000 +0200 @@ -80,8 +80,9 @@ #endif diff --git a/dep/g3dlite/G3D-v8.0_hotfix2.diff b/dep/g3dlite/G3D-v8.0_hotfix2.diff new file mode 100644 index 00000000000..bb66c4a6a29 --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix2.diff @@ -0,0 +1,14 @@ +diff --git a/dep/g3dlite/source/g3dmath.cpp b/dep/g3dlite/source/g3dmath.cpp +index e846f8c..84e8345 100644 +--- a/dep/g3dlite/source/g3dmath.cpp ++++ b/dep/g3dlite/source/g3dmath.cpp +@@ -41,7 +41,7 @@ double inf() { + } + + bool isNaN(float x) { +- static const float n = nan(); ++ static const float n = fnan(); + return memcmp(&x, &n, sizeof(float)) == 0; + } + + diff --git a/dep/g3dlite/G3D-v8.0_hotfix3.diff b/dep/g3dlite/G3D-v8.0_hotfix3.diff new file mode 100644 index 00000000000..d556103c96d --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix3.diff @@ -0,0 +1,12 @@ +diff --git a/dep/g3dlite/include/G3D/GMutex.h b/dep/g3dlite/include/G3D/GMutex.h +index 3469b81..9fe098d 100644 +--- a/dep/g3dlite/include/G3D/GMutex.h ++++ b/dep/g3dlite/include/G3D/GMutex.h +@@ -16,6 +16,7 @@ + #ifndef G3D_WIN32 + # include <pthread.h> + # include <signal.h> ++# include <unistd.h> + #endif + + diff --git a/dep/g3dlite/G3D-v8.0_extra.diff b/dep/g3dlite/G3D-v8.0_hotfix4.diff index 62c513435b9..cae92747a9a 100644 --- a/dep/g3dlite/G3D-v8.0_extra.diff +++ b/dep/g3dlite/G3D-v8.0_hotfix4.diff @@ -1,15 +1,3 @@ -diff --git a/dep/g3dlite/include/G3D/GMutex.h b/dep/g3dlite/include/G3D/GMutex.h -index 3469b81..9fe098d 100644 ---- a/dep/g3dlite/include/G3D/GMutex.h -+++ b/dep/g3dlite/include/G3D/GMutex.h -@@ -16,6 +16,7 @@ - #ifndef G3D_WIN32 - # include <pthread.h> - # include <signal.h> -+# include <unistd.h> - #endif - - diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h index c8d2f0b..11093f4 100644 --- a/dep/g3dlite/include/G3D/platform.h diff --git a/dep/g3dlite/G3D-v8.0_hotfix5.diff b/dep/g3dlite/G3D-v8.0_hotfix5.diff new file mode 100644 index 00000000000..29b7eba811b --- /dev/null +++ b/dep/g3dlite/G3D-v8.0_hotfix5.diff @@ -0,0 +1,71 @@ +diff --git a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h +index 1c0cf99..f160774 100644 +--- a/dep/g3dlite/include/G3D/System.h ++++ b/dep/g3dlite/include/G3D/System.h +@@ -19,6 +19,7 @@ + #include "G3D/G3DGameUnits.h" + #include "G3D/BinaryFormat.h" + #include <string> ++#include <sys/socket.h> + + #ifdef G3D_OSX + # include <CoreServices/CoreServices.h> +diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h +index 11093f4..614c0ed 100644 +--- a/dep/g3dlite/include/G3D/platform.h ++++ b/dep/g3dlite/include/G3D/platform.h +@@ -56,6 +56,8 @@ + #define G3D_LINUX + #elif defined(__linux__) + #define G3D_LINUX ++#elif defined(__CYGWIN__) ++ #define G3D_LINUX + #elif defined(__APPLE__) + #define G3D_LINUX + +diff --git a/dep/g3dlite/source/BinaryOutput.cpp b/dep/g3dlite/source/BinaryOutput.cpp +index 054211d..81fa982 100644 +--- a/dep/g3dlite/source/BinaryOutput.cpp ++++ b/dep/g3dlite/source/BinaryOutput.cpp +@@ -22,6 +22,10 @@ + # include <errno.h> + #endif + ++#ifdef __CYGWIN__ ++# include <errno.h> ++#endif ++ + // Largest memory buffer that the system will use for writing to + // disk. After this (or if the system runs out of memory) + // chunks of the file will be dumped to disk. +diff --git a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp +index 2cf890a..76a3611 100644 +--- a/dep/g3dlite/source/FileSystem.cpp ++++ b/dep/g3dlite/source/FileSystem.cpp +@@ -35,6 +35,10 @@ + # define _stat stat + #endif + ++#ifdef __CYGWIN__ ++#define stat64 stat ++#endif ++ + namespace G3D { + + static FileSystem* common = NULL; +diff --git a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp +index 809f05c..f6b0e03 100644 +--- a/dep/g3dlite/source/System.cpp ++++ b/dep/g3dlite/source/System.cpp +@@ -888,7 +888,11 @@ void System::initTime() { + + if (localTimeVals) { + // tm_gmtoff is already corrected for daylight savings. ++ #ifdef __CYGWIN__ ++ local = local + _timezone; ++ #else + local = local + localTimeVals->tm_gmtoff; ++ #endif + } + + m_realWorldGetTickTime0 = local; diff --git a/dep/g3dlite/Readme.txt b/dep/g3dlite/Readme.txt index b91c20dce38..055574ee654 100644 --- a/dep/g3dlite/Readme.txt +++ b/dep/g3dlite/Readme.txt @@ -1,3 +1,8 @@ - Due to issues with G3D (normally requiring X11 and the ZIP-library), the -sourcetree version contains a modified version. The applied patch is -commited to the repository for future reference. + Due to issues with G3D normally requiring X11 and the ZIP-library, the library version in this sourcetree contains a modified version. +The applied patches are added as .diff-files to the repository for future reference (knowing what was changed is quite handy). + +G3D-v8.0_hotfix1.diff - 2010-08-27 - remove dependency on zip/z11 libraries, add support for 64-bit arch +G3D-v8.0_hotfix2.diff - 2012-01-14 - fix typo in isNaN(float x) +G3D-v8.0_hotfix3.diff - 2012-08-26 - fix compilation on Fedora Linux +G3D-v8.0_hotfix4.diff - 2012-11-09 - fix compilation on OSX +G3D-v8.0_hotfix5.diff - 2013-02-27 - fix compilation in cygwin environments diff --git a/dep/g3dlite/include/G3D/System.h b/dep/g3dlite/include/G3D/System.h index 1c0cf99410c..f1607747bbe 100644 --- a/dep/g3dlite/include/G3D/System.h +++ b/dep/g3dlite/include/G3D/System.h @@ -19,6 +19,7 @@ #include "G3D/G3DGameUnits.h" #include "G3D/BinaryFormat.h" #include <string> +#include <sys/socket.h> #ifdef G3D_OSX # include <CoreServices/CoreServices.h> diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h index 11093f4a6ce..614c0ed7cad 100644 --- a/dep/g3dlite/include/G3D/platform.h +++ b/dep/g3dlite/include/G3D/platform.h @@ -56,6 +56,8 @@ #define G3D_LINUX #elif defined(__linux__) #define G3D_LINUX +#elif defined(__CYGWIN__) + #define G3D_LINUX #elif defined(__APPLE__) #define G3D_LINUX diff --git a/dep/g3dlite/source/BinaryOutput.cpp b/dep/g3dlite/source/BinaryOutput.cpp index 054211d906c..81fa9822206 100644 --- a/dep/g3dlite/source/BinaryOutput.cpp +++ b/dep/g3dlite/source/BinaryOutput.cpp @@ -22,6 +22,10 @@ # include <errno.h> #endif +#ifdef __CYGWIN__ +# include <errno.h> +#endif + // Largest memory buffer that the system will use for writing to // disk. After this (or if the system runs out of memory) // chunks of the file will be dumped to disk. diff --git a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp index 2cf890a1cd5..76a361162c9 100644 --- a/dep/g3dlite/source/FileSystem.cpp +++ b/dep/g3dlite/source/FileSystem.cpp @@ -35,6 +35,10 @@ # define _stat stat #endif +#ifdef __CYGWIN__ +#define stat64 stat +#endif + namespace G3D { static FileSystem* common = NULL; diff --git a/dep/g3dlite/source/System.cpp b/dep/g3dlite/source/System.cpp index 809f05c0ab4..f6b0e038f27 100644 --- a/dep/g3dlite/source/System.cpp +++ b/dep/g3dlite/source/System.cpp @@ -888,7 +888,11 @@ void System::initTime() { if (localTimeVals) { // tm_gmtoff is already corrected for daylight savings. + #ifdef __CYGWIN__ + local = local + _timezone; + #else local = local + localTimeVals->tm_gmtoff; + #endif } m_realWorldGetTickTime0 = local; |