From 4f526b9fd864acbba9665e5a71787fc1c958d82c Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 28 Oct 2023 20:27:30 +0200 Subject: [PATCH] build: use neovim/libtermkey instead of neovim/deps for libtermkey Using a mirror makes it easier to test patches as well as reducing maintenance when a new version is released. --- cmake.deps/cmake/LibtermkeyCMakeLists.txt | 12 ++++++++++++ cmake.deps/deps.txt | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cmake.deps/cmake/LibtermkeyCMakeLists.txt b/cmake.deps/cmake/LibtermkeyCMakeLists.txt index cefe14e515..7257ff69bb 100644 --- a/cmake.deps/cmake/LibtermkeyCMakeLists.txt +++ b/cmake.deps/cmake/LibtermkeyCMakeLists.txt @@ -1,6 +1,18 @@ cmake_minimum_required(VERSION 3.10) project(libtermkey C) +if(EXISTS ${PROJECT_SOURCE_DIR}/termkey.h.in) + file(STRINGS Makefile TERMKEY_VERSION_MAJOR REGEX "VERSION_MAJOR") + string(REGEX MATCH "[0-9]+" TERMKEY_VERSION_MAJOR ${TERMKEY_VERSION_MAJOR}) + + file(STRINGS Makefile TERMKEY_VERSION_MINOR REGEX "VERSION_MINOR") + string(REGEX MATCH "[0-9]+" TERMKEY_VERSION_MINOR ${TERMKEY_VERSION_MINOR}) + + file(READ termkey.h.in TERMKEY_TEXT) + string(REPLACE "@@VERSION_MAJOR@@" "${TERMKEY_VERSION_MAJOR}" TERMKEY_TEXT "${TERMKEY_TEXT}") + string(REPLACE "@@VERSION_MINOR@@" "${TERMKEY_VERSION_MINOR}" TERMKEY_TEXT "${TERMKEY_TEXT}") + file(WRITE termkey.h "${TERMKEY_TEXT}") +endif() add_definitions(-D _CRT_SECURE_NO_WARNINGS) add_definitions(-DHAVE_UNIBILIUM) diff --git a/cmake.deps/deps.txt b/cmake.deps/deps.txt index 5f47e57440..f1275eb7e7 100644 --- a/cmake.deps/deps.txt +++ b/cmake.deps/deps.txt @@ -13,8 +13,8 @@ LUA_SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 UNIBILIUM_URL https://github.com/neovim/unibilium/archive/d72c3598e7ac5d1ebf86ee268b8b4ed95c0fa628.tar.gz UNIBILIUM_SHA256 9c4747c862ab5e3076dcf8fa8f0ea7a6b50f20ec5905618b9536655596797487 -LIBTERMKEY_URL https://github.com/neovim/deps/raw/aa004f1b2b6470a92363cba8e1cc1874141dacc4/opt/libtermkey-0.22.tar.gz -LIBTERMKEY_SHA256 6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600 +LIBTERMKEY_URL https://github.com/neovim/libtermkey/archive/v0.22.tar.gz +LIBTERMKEY_SHA256 81cac2b685c9ada4ead4ea788fb69ff74fc1947ad188ed0264c646fe12b496ba LIBVTERM_URL https://github.com/neovim/deps/raw/12c9dcf1d823ac4acbccf494c93c4774a87db11d/opt/libvterm-0.3.3.tar.gz LIBVTERM_SHA256 09156f43dd2128bd347cbeebe50d9a571d32c64e0cf18d211197946aff7226e0