neovim-0.9.5-cmake-no-doc.patch 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --- a/runtime/CMakeLists.txt
  2. +++ b/runtime/CMakeLists.txt
  3. @@ -21,91 +21,6 @@ add_custom_command(OUTPUT ${GENERATED_SY
  4. ${FUNCS_DATA}
  5. )
  6. -glob_wrapper(PACKAGES ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*)
  7. -
  8. -set(GENERATED_PACKAGE_TAGS)
  9. -foreach(PACKAGE ${PACKAGES})
  10. - get_filename_component(PACKNAME ${PACKAGE} NAME)
  11. - glob_wrapper("${PACKNAME}_DOC_FILES" ${PACKAGE}/doc/*.txt)
  12. - if(${PACKNAME}_DOC_FILES)
  13. - file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME})
  14. - add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
  15. - COMMAND ${CMAKE_COMMAND} -E copy_directory
  16. - ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
  17. - COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
  18. - -u NONE -i NONE -e --headless -c "helptags doc" -c quit
  19. - DEPENDS
  20. - nvim
  21. - nvim_runtime_deps
  22. - WORKING_DIRECTORY "${GENERATED_PACKAGE_DIR}/${PACKNAME}"
  23. - )
  24. -
  25. - set("${PACKNAME}_DOC_NAMES")
  26. - foreach(DF "${${PACKNAME}_DOC_FILES}")
  27. - get_filename_component(F ${DF} NAME)
  28. - list(APPEND "${PACKNAME}_DOC_NAMES" ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/${F})
  29. - endforeach()
  30. -
  31. - install_helper(
  32. - FILES ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags "${${PACKNAME}_DOC_NAMES}"
  33. - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/pack/dist/opt/${PACKNAME}/doc)
  34. -
  35. - list(APPEND GENERATED_PACKAGE_TAGS "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags")
  36. - endif()
  37. -endforeach()
  38. -
  39. -glob_wrapper(DOCFILES ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
  40. -
  41. -set(BUILDDOCFILES)
  42. -foreach(DF ${DOCFILES})
  43. - get_filename_component(F ${DF} NAME)
  44. - list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
  45. -endforeach()
  46. -
  47. -add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
  48. - COMMAND ${CMAKE_COMMAND} -E remove_directory doc
  49. - COMMAND ${CMAKE_COMMAND} -E copy_directory
  50. - ${PROJECT_SOURCE_DIR}/runtime/doc doc
  51. - COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
  52. - -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
  53. - DEPENDS
  54. - nvim
  55. - nvim_runtime_deps
  56. - WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
  57. -)
  58. -
  59. -
  60. -# TODO: This doesn't work. wait for "nvim -l" to land?
  61. -add_custom_target(doc_html
  62. - COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
  63. - -V1 -es --clean -c "lua require('scripts.gen_help_html').gen('./build/runtime/doc', './build/doc_html', nil, 'todo_commit_id')" -c "0cq"
  64. - DEPENDS
  65. - ${GENERATED_HELP_TAGS}
  66. - WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
  67. -)
  68. -
  69. -add_custom_target(
  70. - runtime ALL
  71. - DEPENDS
  72. - ${GENERATED_SYN_VIM}
  73. - ${GENERATED_HELP_TAGS}
  74. - ${GENERATED_PACKAGE_TAGS}
  75. -)
  76. -
  77. -# CMake is painful here. It will create the destination using the user's
  78. -# current umask, and we don't want that. And we don't just want to install
  79. -# the target directory, as it will mess with existing permissions. So this
  80. -# seems like the best compromise. If we create it, then everyone can see it.
  81. -# If it's preexisting, leave it alone.
  82. -
  83. -install_helper(
  84. - FILES ${GENERATED_HELP_TAGS} ${BUILDDOCFILES}
  85. - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/doc)
  86. -
  87. -install_helper(
  88. - FILES ${GENERATED_SYN_VIM}
  89. - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/syntax/vim)
  90. -
  91. if(NOT APPLE)
  92. install_helper(
  93. FILES ${CMAKE_CURRENT_SOURCE_DIR}/nvim.desktop