From 903683d5ed2cbc8d93a85fc270526858ba4d3f76 Mon Sep 17 00:00:00 2001 From: Mikhail Zolotukhin Date: Fri, 9 Dec 2022 20:09:43 +0100 Subject: [PATCH] feat: use forked neovim-qt with qt6 support To build against Qt6 we need neovim-qt to support it. It is currently in progress and will take some time. Before that, we can use a fork with all the patches we need, while contributing them upstream, if possible, and waiting for the main project to be ready. --- LICENSES/ISC.txt | 8 ----- external/neovim-qt/CMakeLists.txt | 11 ++----- ...rent-directory-to-interface-includes.patch | 24 --------------- ...-project-directory-for-icons-install.patch | 29 ------------------- 4 files changed, 2 insertions(+), 70 deletions(-) delete mode 100644 LICENSES/ISC.txt delete mode 100644 external/neovim-qt/patches/0001-fix-share-current-directory-to-interface-includes.patch delete mode 100644 external/neovim-qt/patches/0002-fix-use-current-project-directory-for-icons-install.patch diff --git a/LICENSES/ISC.txt b/LICENSES/ISC.txt deleted file mode 100644 index b9c199c..0000000 --- a/LICENSES/ISC.txt +++ /dev/null @@ -1,8 +0,0 @@ -ISC License: - -Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-2003 by Internet Software Consortium - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/external/neovim-qt/CMakeLists.txt b/external/neovim-qt/CMakeLists.txt index 99b60e5..31cf7a8 100644 --- a/external/neovim-qt/CMakeLists.txt +++ b/external/neovim-qt/CMakeLists.txt @@ -3,23 +3,16 @@ include(FetchContent) -find_package(Git QUIET) - -file(GLOB NEOVIM_QT_PATCHES "${CMAKE_CURRENT_SOURCE_DIR}/patches/*.patch") - FetchContent_Declare( neovimqt - GIT_REPOSITORY https://github.com/equalsraf/neovim-qt.git - GIT_TAG 3f05de82ecb5c1a24a7572081ae59e419eb059b8 # 0.2.17 - PATCH_COMMAND ${GIT_EXECUTABLE} restore . && ${GIT_EXECUTABLE} apply ${NEOVIM_QT_PATCHES} + GIT_REPOSITORY https://github.com/gikari/neovim-qt.git + GIT_TAG c84f81712639140f910a1d38acb8edcb4509dc4d # qt6 branch ) FetchContent_GetProperties(neovimqt) if(NOT neovimqt_POPULATED) FetchContent_Populate(neovimqt) - set(ENABLE_TESTS OFF CACHE INTERNAL "Turn off tests") - # We use this, instead of MakeAvailable, # so that neovimqt is not installed in CI artifacts add_subdirectory(${neovimqt_SOURCE_DIR} ${neovimqt_BINARY_DIR} EXCLUDE_FROM_ALL) diff --git a/external/neovim-qt/patches/0001-fix-share-current-directory-to-interface-includes.patch b/external/neovim-qt/patches/0001-fix-share-current-directory-to-interface-includes.patch deleted file mode 100644 index f026bc8..0000000 --- a/external/neovim-qt/patches/0001-fix-share-current-directory-to-interface-includes.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 17c3b68c664baa2eb5bfdc976bba8692f185b191 Mon Sep 17 00:00:00 2001 -From: Mikhail Zolotukhin -Date: Thu, 17 Nov 2022 21:08:39 +0100 -Subject: [PATCH] fix: share current directory to interface includes - ---- - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index dab2afe..780afa4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -121,6 +121,7 @@ endif() - - set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") - set(CMAKE_INCLUDE_CURRENT_DIR ON) -+set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) - - # to generate a compile_commands.json usable by ycm and other tooling - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) --- -2.38.1.windows.1 - diff --git a/external/neovim-qt/patches/0002-fix-use-current-project-directory-for-icons-install.patch b/external/neovim-qt/patches/0002-fix-use-current-project-directory-for-icons-install.patch deleted file mode 100644 index a169a5f..0000000 --- a/external/neovim-qt/patches/0002-fix-use-current-project-directory-for-icons-install.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 24bb285a2a07ea15a98e8002810304f8a0e4d8a2 Mon Sep 17 00:00:00 2001 -From: Mikhail Zolotukhin -Date: Thu, 17 Nov 2022 21:09:18 +0100 -Subject: [PATCH] fix: use current project directory for icons install - ---- - src/gui/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt -index a48cf47..4063ce3 100644 ---- a/src/gui/CMakeLists.txt -+++ b/src/gui/CMakeLists.txt -@@ -101,10 +101,10 @@ if(NOT APPLE) - install(FILES ${PROJECT_SOURCE_DIR}/LICENSE - DESTINATION ${CMAKE_INSTALL_DATADIR}/nvim-qt/) - install(FILES nvim-qt.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) -- install(FILES ${CMAKE_SOURCE_DIR}/third-party/neovim.png -+ install(FILES ${PROJECT_SOURCE_DIR}/third-party/neovim.png - RENAME nvim-qt.png - DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/192x192/apps/) -- install(FILES ${CMAKE_SOURCE_DIR}/third-party/neovim.svg -+ install(FILES ${PROJECT_SOURCE_DIR}/third-party/neovim.svg - RENAME nvim-qt.svg - DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/) - endif() --- -2.38.1.windows.1 -