Guest User

Untitled

a guest
Feb 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1. diff --git a/meson.build b/meson.build
  2. index d6ffa30d9e..117e8941d1 100644
  3. --- a/meson.build
  4. +++ b/meson.build
  5. @@ -99,7 +99,7 @@ if _drivers == 'auto'
  6. else
  7. error('Unknown architecture. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.')
  8. endif
  9. - elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
  10. + elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
  11. # only swrast would make sense here, but gallium swrast is a much better default
  12. _drivers = ''
  13. else
  14. @@ -144,7 +144,7 @@ if _drivers == 'auto'
  15. else
  16. error('Unknown architecture. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
  17. endif
  18. - elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
  19. + elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
  20. _drivers = 'swrast'
  21. else
  22. error('Unknown OS. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
  23. @@ -181,7 +181,7 @@ if _vulkan_drivers == 'auto'
  24. else
  25. error('Unknown architecture. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.')
  26. endif
  27. - elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
  28. + elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
  29. # No vulkan driver supports windows or macOS currently
  30. _vulkan_drivers = ''
  31. else
  32. @@ -242,6 +242,8 @@ if _platforms == 'auto'
  33. _platforms = 'x11,wayland,drm,surfaceless'
  34. elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
  35. _platforms = 'x11,surfaceless'
  36. + elif ['haiku'].contains(host_machine.system())
  37. + _platforms = 'haiku'
  38. else
  39. error('Unknown OS. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.')
  40. endif
  41. @@ -252,6 +254,7 @@ if _platforms != ''
  42. with_platform_x11 = _split.contains('x11')
  43. with_platform_wayland = _split.contains('wayland')
  44. with_platform_drm = _split.contains('drm')
  45. + with_platform_haiku = _split.contains('haiku')
  46. with_platform_surfaceless = _split.contains('surfaceless')
  47. egl_native_platform = _split[0]
  48. endif
  49. @@ -260,6 +263,8 @@ with_glx = get_option('glx')
  50. if with_glx == 'auto'
  51. if with_dri
  52. with_glx = 'dri'
  53. + elif with_platform_haiku
  54. + with_glx = 'disabled'
  55. elif with_gallium
  56. # Even when building just gallium drivers the user probably wants dri
  57. with_glx = 'dri'
  58. @@ -375,7 +380,7 @@ if with_any_vk and (with_platform_x11 and not with_dri3)
  59. error('Vulkan drivers require dri3 for X11 support')
  60. endif
  61. if with_dri or with_gallium
  62. - if with_glx == 'disabled' and not with_egl
  63. + if with_glx == 'disabled' and not with_egl and not with_platform_haiku
  64. error('building dri or gallium drivers require at least one window system')
  65. endif
  66. endif
  67. @@ -1234,7 +1239,7 @@ if with_dri_platform == 'drm'
  68. endif
  69.  
  70. gl_priv_libs = []
  71. -if dep_thread.found()
  72. +if dep_thread.found() and host_machine.system() != 'haiku'
  73. gl_priv_libs += ['-lpthread', '-pthread']
  74. endif
  75. if dep_m.found()
  76. diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build
  77. index ea14654d2c..38a5747e9a 100644
  78. --- a/src/mapi/es1api/meson.build
  79. +++ b/src/mapi/es1api/meson.build
  80. @@ -48,7 +48,7 @@ pkg.generate(
  81. description : 'Mesa OpenGL ES 1.1 CM library',
  82. version : meson.project_version(),
  83. libraries : libglesv1_cm,
  84. - libraries_private : '-lm -ldl -lpthread -pthread',
  85. + libraries_private : gl_priv_libs,
  86. )
  87.  
  88. if with_tests
  89. diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build
  90. index de8a29bb6b..9f4770a738 100644
  91. --- a/src/mapi/es2api/meson.build
  92. +++ b/src/mapi/es2api/meson.build
  93. @@ -48,7 +48,7 @@ pkg.generate(
  94. description : 'Mesa OpenGL ES 2.0 library',
  95. version : meson.project_version(),
  96. libraries : libgles2,
  97. - libraries_private : '-lm -ldl -lpthread -pthread',
  98. + libraries_private : gl_priv_libs,
  99. )
  100.  
  101. if with_tests
  102. diff --git a/src/meson.build b/src/meson.build
  103. index 730b2ff6e4..4d5637f0aa 100644
  104. --- a/src/meson.build
  105. +++ b/src/meson.build
  106. @@ -64,7 +64,12 @@ if with_dri_i965 or with_intel_vk
  107. endif
  108. subdir('mesa')
  109. subdir('loader')
  110. -subdir('glx')
  111. +if with_platform_haiku
  112. + subdir('hgl')
  113. +endif
  114. +if with_glx != 'disabled'
  115. + subdir('glx')
  116. +endif
  117. if with_gbm
  118. subdir('gbm')
  119. else
Add Comment
Please, Sign In to add comment