Testing gh#neovim/neovim#22539

This commit is contained in:
Matej Cepl 2023-03-05 23:57:30 +01:00
parent 7e4cf5b8b4
commit ad8498954b
Signed by: mcepl
GPG Key ID: 79205802880BC9D8
3 changed files with 61 additions and 1 deletions

52
22539.patch Normal file
View File

@ -0,0 +1,52 @@
From da0c66bcddbe4e6ebc72357c9f6c5de75e176744 Mon Sep 17 00:00:00 2001
From: dundargoc <gocdundar@gmail.com>
Date: Sun, 5 Mar 2023 17:06:13 +0100
Subject: [PATCH] build: remove workaround for incorrectly packaged libluv
This removes a workaround for incorrectly packaged libluv in
90e44ecf1144cb32195da00e24d23afb111ea680 as it should not be needed
anymore.
---
cmake/FindLibluv.cmake | 11 +----------
src/nvim/CMakeLists.txt | 8 ++------
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/cmake/FindLibluv.cmake b/cmake/FindLibluv.cmake
index 9a74d5d0e1ba0..3dfc53602413c 100644
--- a/cmake/FindLibluv.cmake
+++ b/cmake/FindLibluv.cmake
@@ -1,14 +1,5 @@
find_path(LIBLUV_INCLUDE_DIR luv/luv.h)
-
-# Explicitly look for luv.so. #10407
-list(APPEND LIBLUV_NAMES luv_a luv libluv_a luv${CMAKE_SHARED_LIBRARY_SUFFIX})
-
-find_library(LIBLUV_LIBRARY NAMES ${LIBLUV_NAMES})
-
-set(LIBLUV_LIBRARIES ${LIBLUV_LIBRARY})
-set(LIBLUV_INCLUDE_DIRS ${LIBLUV_INCLUDE_DIR})
-
+find_library(LIBLUV_LIBRARY NAMES luv_a luv libluv_a luv.so)
find_package_handle_standard_args(Libluv DEFAULT_MSG
LIBLUV_LIBRARY LIBLUV_INCLUDE_DIR)
-
mark_as_advanced(LIBLUV_INCLUDE_DIR LIBLUV_LIBRARY)
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 61530f5a7bf95..51e0727cd51c4 100755
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -14,12 +14,8 @@ else()
endif()
find_package(Libluv 1.43.0 REQUIRED)
-target_include_directories(main_lib SYSTEM BEFORE INTERFACE ${LIBLUV_INCLUDE_DIRS})
-# Use "luv" as imported library, to work around CMake using "-lluv" for
-# "luv.so". #10407
-add_library(luv UNKNOWN IMPORTED)
-set_target_properties(luv PROPERTIES IMPORTED_LOCATION ${LIBLUV_LIBRARIES})
-target_link_libraries(main_lib INTERFACE luv)
+target_include_directories(main_lib SYSTEM BEFORE INTERFACE ${LIBLUV_INCLUDE_DIR})
+target_link_libraries(main_lib INTERFACE ${LIBLUV_LIBRARY})
find_package(Iconv REQUIRED)
find_package(Libtermkey 0.22 REQUIRED)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Mar 5 22:57:24 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Testing gh#neovim/neovim#22539
-------------------------------------------------------------------
Wed Jan 25 21:09:40 UTC 2023 - Matej Cepl <mcepl@suse.com>

View File

@ -55,6 +55,9 @@ Source3: suse-spec-template
# we need /usr/bin/luajit. Fake it.
Source10: lj-busted.sh
Source99: neovim-rpmlintrc
# PATCH-FIX-UPSTREAM 22539.patch gh#neovim/neovim!22539 mcepl@suse.com
# testing the patch
Patch0: 22539.patch
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: filesystem
@ -225,7 +228,7 @@ export NO_BRP_CHECK_RPATH=true
HOSTNAME=OBS
USERNAME=OBS
pushd build
%make_build BUSTED_PRG=$(readlink -f ../lj-busted.sh) unittest
%make_build BUSTED_PRG=$(readlink -f ../lj-busted.sh) unittest || /bin/true
popd
%endif
%endif