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

Context Navigation

  • Back to Ticket #715

Ticket #715: cmake-2.8-git.patch

File cmake-2.8-git.patch, 9.0 KB (added by scottmc, 2 years ago)

1st attempt at a merged patch.

  • Modules/FindGLUT.cmake

    diff -urN cmake-2.8-git/Modules/FindGLUT.cmake cmake-2.8-git-haiku/Modules/FindGLUT.cmake
    old new  
    8484if (GLUT_FOUND) 
    8585  # Is -lXi and -lXmu required on all platforms that have it? 
    8686  # If not, we need some way to figure out what platform we are on. 
    87   set( GLUT_LIBRARIES 
    88     ${GLUT_glut_LIBRARY} 
    89     ${GLUT_Xmu_LIBRARY} 
    90     ${GLUT_Xi_LIBRARY} 
    91     ${GLUT_cocoa_LIBRARY} 
    92     ) 
     87  if(BEOS OR HAIKU) 
     88    set( GLUT_LIBRARIES 
     89      ${GLUT_glut_LIBRARY} 
     90      ) 
     91  else 
     92    set( GLUT_LIBRARIES 
     93      ${GLUT_glut_LIBRARY} 
     94      ${GLUT_Xmu_LIBRARY} 
     95      ${GLUT_Xi_LIBRARY}  
     96      ${GLUT_cocoa_LIBRARY} 
     97      ) 
     98  endif() 
    9399 
    94100  #The following deprecated settings are for backwards compatibility with CMake1.4 
    95101  set (GLUT_LIBRARY ${GLUT_LIBRARIES}) 
  • Modules/FindOpenGL.cmake

    diff -urN cmake-2.8-git/Modules/FindOpenGL.cmake cmake-2.8-git-haiku/Modules/FindOpenGL.cmake
    old new  
    9595      /usr/share/doc/NVIDIA_GLX-1.0/include 
    9696      /usr/openwin/share/include 
    9797      /opt/graphics/OpenGL/include /usr/X11R6/include 
     98      /boot/develop/headers/os/opengl 
    9899    ) 
    99100 
    100101    find_library(OPENGL_gl_LIBRARY 
  • Modules/Platform/Haiku.cmake

    diff -urN cmake-2.8-git/Modules/Platform/Haiku.cmake cmake-2.8-git-haiku/Modules/Platform/Haiku.cmake
    old new  
    1 set(BEOS 1) 
    2  
    3 set(CMAKE_DL_LIBS root be) 
    4 set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC") 
    5 set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE") 
     1set(HAIKU 1) 
     2set(UNIX 1) 
     3   
     4set(CMAKE_DL_LIBS "") 
    65set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") 
    7 set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart") 
     6set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") 
    87set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") 
    98set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") 
     9set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") 
    1010set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") 
    11  
    12 include(Platform/UnixPaths) 
    13 list(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common) 
    14 list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include) 
    15 list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib) 
    16 list(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin) 
    17 list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib) 
     11set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") 
     12   
     13list(APPEND CMAKE_SYSTEM_PREFIX_PATH 
     14  /boot/common/non-packaged 
     15  /boot/common 
     16  /boot/system 
     17  ) 
     18list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES 
     19  /boot/common/non-packaged/lib 
     20  /boot/common/lib 
     21  /boot/develop/lib/x86 
     22  ) 
    1823list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty) 
    1924list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86) 
    2025 
  • Source/cmExportCommand.cxx

    diff -urN cmake-2.8-git/Source/cmExportCommand.cxx cmake-2.8-git-haiku/Source/cmExportCommand.cxx
    old new  
    2020#include "cmExportBuildFileGenerator.h" 
    2121 
    2222#if defined(__HAIKU__) 
    23 #include <StorageKit.h> 
     23#include <FindDirectory.h> 
     24#include <StorageDefs.h> 
    2425#endif 
    2526 
    2627cmExportCommand::cmExportCommand() 
    … …  
    305306                                              const char* hash) 
    306307{ 
    307308#if defined(__HAIKU__) 
    308   BPath dir; 
    309   if (find_directory(B_USER_SETTINGS_DIRECTORY, &dir) != B_OK) 
     309  char dir[B_PATH_NAME_LENGTH]; 
     310  if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) != 
     311      B_OK) 
    310312    { 
    311313    return; 
    312314    } 
    313   dir.Append("cmake/packages"); 
    314   dir.Append(package.c_str()); 
    315   std::string fname = dir.Path(); 
     315  std::string fname = dir; 
     316  fname += "/cmake/packages/"; 
     317  fname += package; 
    316318#else 
    317319  const char* home = cmSystemTools::GetEnv("HOME"); 
    318320  if(!home) 
  • Source/cmFindPackageCommand.cxx

    diff -urN cmake-2.8-git/Source/cmFindPackageCommand.cxx cmake-2.8-git-haiku/Source/cmFindPackageCommand.cxx
    old new  
    1919#endif 
    2020 
    2121#if defined(__HAIKU__) 
    22 #include <StorageKit.h> 
     22#include <string.h> 
     23#include <FindDirectory.h> 
     24#include <StorageDefs.h> 
    2325#endif 
    2426 
    2527void cmFindPackageNeedBackwardsCompatibility(const std::string& variable, 
    … …  
    15841586#if defined(_WIN32) && !defined(__CYGWIN__) 
    15851587  this->LoadPackageRegistryWinUser(); 
    15861588#elif defined(__HAIKU__) 
    1587   BPath dir; 
    1588   if (find_directory(B_USER_SETTINGS_DIRECTORY, &dir) == B_OK) 
     1589  char dir[B_PATH_NAME_LENGTH]; 
     1590  if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) == 
     1591      B_OK) 
    15891592    { 
    1590     dir.Append("cmake/packages"); 
    1591     dir.Append(this->Name.c_str()); 
    1592     this->LoadPackageRegistryDir(dir.Path()); 
     1593    strlcat(dir, "/cmake/packages/", sizeof(dir)); 
     1594    strlcat(dir, this->Name.c_str(), sizeof(dir)); 
     1595    this->LoadPackageRegistryDir(dir); 
    15931596    } 
    15941597#else 
    15951598  if(const char* home = cmSystemTools::GetEnv("HOME")) 
  • Source/cmLocalGenerator.cxx

    diff -urN cmake-2.8-git/Source/cmLocalGenerator.cxx cmake-2.8-git-haiku/Source/cmLocalGenerator.cxx
    old new  
    3737#include <assert.h> 
    3838 
    3939#if defined(__HAIKU__) 
    40 #include <StorageKit.h> 
     40#include <FindDirectory.h> 
     41#include <StorageDefs.h> 
    4142#endif 
    4243 
    4344cmLocalGenerator::cmLocalGenerator() 
    … …  
    354355    prefix = prefix_win32.c_str(); 
    355356    } 
    356357#elif defined(__HAIKU__) 
     358  char dir[B_PATH_NAME_LENGTH]; 
    357359  if (!prefix) 
    358360    { 
    359     BPath dir; 
    360     if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK) 
     361    if (find_directory(B_COMMON_DIRECTORY, -1, false, dir, sizeof(dir)) == B_OK) 
    361362      { 
    362       prefix = dir.Path(); 
     363      prefix = dir; 
    363364      } 
    364365    else 
    365366      { 
  • Source/CPack/cmCPackGenerator.cxx

    diff -urN cmake-2.8-git/Source/CPack/cmCPackGenerator.cxx cmake-2.8-git-haiku/Source/CPack/cmCPackGenerator.cxx
    old new  
    2626#include <algorithm> 
    2727 
    2828#if defined(__HAIKU__) 
    29 #include <StorageKit.h> 
     29#include <FindDirectory.h> 
     30#include <StorageDefs.h> 
    3031#endif 
    3132 
    3233//---------------------------------------------------------------------- 
    … …  
    12631264  this->InstallPath += "-"; 
    12641265  this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION"); 
    12651266#elif defined(__HAIKU__) 
    1266   BPath dir; 
    1267   if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK) 
     1267  char dir[B_PATH_NAME_LENGTH]; 
     1268  if (find_directory(B_COMMON_DIRECTORY, -1, false, dir, sizeof(dir)) == B_OK) 
    12681269    { 
    1269     this->InstallPath = dir.Path(); 
     1270    this->InstallPath = dir; 
    12701271    } 
    12711272  else 
    12721273    { 
  • Utilities/cmcurl/CMake/CurlTests.c

    diff -urN cmake-2.8-git/Utilities/cmcurl/CMake/CurlTests.c cmake-2.8-git-haiku/Utilities/cmcurl/CMake/CurlTests.c
    old new  
    3838# define PLATFORM_AIX_V3 
    3939#endif 
    4040 
    41 #if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || (defined(__BEOS__) && !defined(__HAIKU__)) 
     41#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__) 
    4242#error "O_NONBLOCK does not work on this platform" 
    4343#endif 
    4444  int socket; 
  • Utilities/cmcurl/select.c

    diff -urN cmake-2.8-git/Utilities/cmcurl/select.c cmake-2.8-git-haiku/Utilities/cmcurl/select.c
    old new  
    3939#error "We can't compile without select() support!" 
    4040#endif 
    4141 
    42 #if defined(__BEOS__) && !defined(__HAIKU__) 
     42#if defined(__BEOS__) 
    4343/* BeOS has FD_SET defined in socket.h */ 
    4444#include <socket.h> 
    4545#endif 
  • Utilities/cmzlib/zconf.h

    diff -urN cmake-2.8-git/Utilities/cmzlib/zconf.h cmake-2.8-git-haiku/Utilities/cmzlib/zconf.h
    old new  
    237237#  endif 
    238238#endif 
    239239 
    240 #if defined (__BEOS__) && !defined (__HAIKU__) 
     240#if defined (__BEOS__) 
    241241#  ifdef ZLIB_DLL 
    242242#    ifdef ZLIB_INTERNAL 
    243243#      define ZEXPORT   __declspec(dllexport) 
  • Utilities/cmzlib/zutil.h

    diff -urN cmake-2.8-git/Utilities/cmzlib/zutil.h cmake-2.8-git-haiku/Utilities/cmzlib/zutil.h
    old new  
    147147#  define OS_CODE  0x0f 
    148148#endif 
    149149 
    150 /* Haiku defines both __HAIKU__ and __BEOS__ (for now) */ 
    151 /* many BeOS workarounds are no longer needed in Haiku */ 
    152 #if defined(__HAIKU__) && defined(__BEOS__) 
    153 #undef __BEOS__ 
    154 #endif 
    155  
    156150#if defined(_BEOS_) || defined(RISCOS)  
    157151#  define fdopen(fd,mode) NULL /* No fdopen() */ 
    158152#endif 

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/