Files
MSYS2-packages/cmake/3.9.3-cygwin-paths.patch
J. Peter Mugaas 41a89c2c34 cmake 3.9.4 - Update to altest version. Rekey most patches, and add dependencies on new port of librhash and libuv.
jsoncpp - 1,8..3 - Update to latest version.  Split package into a run-time and developer package subce a DKK as a DLL is now included
libuv - 1.15.0 - New package required for cmake.
rhrash - 1.3.5 - New package required for cmake.  Note that the makefile and some other things had to ported to MSYS (Cygwin is incidental).  The patch I wrote should also work on MINGW (kill two birds with one stone).
2017-10-06 13:31:19 -04:00

115 lines
4.0 KiB
Diff

diff -aurp cmake-3.9.3/Source/kwsys/SystemTools.cxx.orig cmake-3.9.3/Source/kwsys/SystemTools.cxx
--- cmake-3.9.3/Source/kwsys/SystemTools.cxx.orig 2017-09-20 07:49:56.000000000 -0400
+++ cmake-3.9.3/Source/kwsys/SystemTools.cxx 2017-10-03 00:22:22.703115300 -0400
@@ -91,7 +91,7 @@
#if defined(_MSC_VER) && _MSC_VER >= 1800
#define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
#endif
-#elif defined(__CYGWIN__)
+#elif defined(__CYGWIN__) && !defined(__MSYS__)
#include <windows.h>
#undef _WIN32
#endif
@@ -100,7 +100,7 @@
extern char** environ;
#endif
-#ifdef __CYGWIN__
+#if defined __CYGWIN__ && !defined(__MSYS__)
#include <sys/cygwin.h>
#endif
@@ -1144,7 +1144,7 @@ bool SystemTools::PathExists(const std::
if (path.empty()) {
return false;
}
-#if defined(__CYGWIN__)
+#if defined(__CYGWIN__) && !defined(__MSYS__)
// Convert path to native windows path if possible.
char winpath[MAX_PATH];
if (SystemTools::PathCygwinToWin32(path.c_str(), winpath)) {
@@ -1174,7 +1174,7 @@ bool SystemTools::FileExists(const std::
if (filename.empty()) {
return false;
}
-#if defined(__CYGWIN__)
+#if defined(__CYGWIN__) && !defined(__MSYS__)
// Convert filename to native windows path if possible.
char winpath[MAX_PATH];
if (SystemTools::PathCygwinToWin32(filename.c_str(), winpath)) {
@@ -1273,7 +1273,7 @@ int SystemTools::Stat(const std::string&
#endif
}
-#ifdef __CYGWIN__
+#if defined (__CYGWIN__) && !defined(__MSYS__)
bool SystemTools::PathCygwinToWin32(const char* path, char* win32_path)
{
SystemToolsTranslationMap::iterator i =
@@ -4063,7 +4063,7 @@ bool SystemTools::FileIsFullPath(const c
bool SystemTools::FileIsFullPath(const char* in_name, size_t len)
{
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32) || ( defined(__CYGWIN__) && !defined(__MSYS__))
// On Windows, the name must be at least two characters long.
if (len < 2) {
return false;
@@ -4746,7 +4746,7 @@ SystemToolsTranslationMap* SystemTools::
SystemToolsPathCaseMap* SystemTools::PathCaseMap;
SystemToolsEnvMap* SystemTools::EnvMap;
#endif
-#ifdef __CYGWIN__
+#if defined( __CYGWIN__) && !defined(__MSYS__)
SystemToolsTranslationMap* SystemTools::Cyg2Win32Map;
#endif
@@ -4795,14 +4795,14 @@ void SystemTools::ClassInitialize()
SystemTools::PathCaseMap = new SystemToolsPathCaseMap;
SystemTools::EnvMap = new SystemToolsEnvMap;
#endif
-#ifdef __CYGWIN__
+#if defined( __CYGWIN__ ) && !defined(__MSYS__)
SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap;
#endif
// Add some special translation paths for unix. These are not added
// for windows because drive letters need to be maintained. Also,
// there are not sym-links and mount points on windows anyway.
-#if !defined(_WIN32) || defined(__CYGWIN__)
+#if !defined(_WIN32) || (defined(__CYGWIN__) && !defined(__MSYS__))
// The tmp path is frequently a logical path so always keep it:
SystemTools::AddKeepPath("/tmp/");
@@ -4850,7 +4850,7 @@ void SystemTools::ClassFinalize()
delete SystemTools::PathCaseMap;
delete SystemTools::EnvMap;
#endif
-#ifdef __CYGWIN__
+#if defined( __CYGWIN__ ) && !defined(__MSYS__)
delete SystemTools::Cyg2Win32Map;
#endif
}
diff -aur cmake-3.9.3/Source/kwsys/SystemTools.hxx.in.orig cmake-3.9.3/Source/kwsys/SystemTools.hxx.in
--- cmake-3.9.3/Source/kwsys/SystemTools.hxx.in.orig 2017-10-02 23:40:31.089869000 -0400
+++ cmake-3.9.3/Source/kwsys/SystemTools.hxx.in 2017-10-02 23:42:24.698442900 -0400
@@ -348,7 +348,7 @@ public:
* caching and calls to cygwin_conv_to_win32_path from Cygwin dll
* for actual translation. Returns true on success, else false.
*/
-#ifdef __CYGWIN__
+#if defined( __CYGWIN__ ) && !defined(__MSYS__)
static bool PathCygwinToWin32(const char* path, char* win32_path);
#endif
@@ -1000,7 +1000,7 @@ private:
static SystemToolsPathCaseMap* PathCaseMap;
static SystemToolsEnvMap* EnvMap;
#endif
-#ifdef __CYGWIN__
+#if defined(__CYGWIN__) && !defined(__MSYS__)
static SystemToolsTranslationMap* Cyg2Win32Map;
#endif
friend class SystemToolsManager;