diff mbox series

[12/20] libgit2: update 1.8.4 -> 1.9.0

Message ID 20250108084226.117178-12-alex.kanavin@gmail.com
State New
Headers show
Series [01/20] ppp: update 2.5.1 -> 2.5.2 | expand

Commit Message

Alexander Kanavin Jan. 8, 2025, 8:42 a.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

Do not install cmake files; if someone wants them, please make
them reproducible and not hardcode-installed into /usr/lib.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...eLists.txt-install-cmake-files-into-.patch | 32 +++++++++++++++++++
 .../{libgit2_1.8.4.bb => libgit2_1.9.0.bb}    | 10 ++++--
 2 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-support/libgit2/libgit2/0001-src-libgit2-CMakeLists.txt-install-cmake-files-into-.patch
 rename meta/recipes-support/libgit2/{libgit2_1.8.4.bb => libgit2_1.9.0.bb} (60%)
diff mbox series

Patch

diff --git a/meta/recipes-support/libgit2/libgit2/0001-src-libgit2-CMakeLists.txt-install-cmake-files-into-.patch b/meta/recipes-support/libgit2/libgit2/0001-src-libgit2-CMakeLists.txt-install-cmake-files-into-.patch
new file mode 100644
index 00000000000..ae48524e0d4
--- /dev/null
+++ b/meta/recipes-support/libgit2/libgit2/0001-src-libgit2-CMakeLists.txt-install-cmake-files-into-.patch
@@ -0,0 +1,32 @@ 
+From 8ca35649c33d0d2fcdcd573ce6a9edd91c77e4da Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Tue, 7 Jan 2025 18:56:19 +0100
+Subject: [PATCH] src/libgit2/CMakeLists.txt: install cmake files into
+ configured libdir
+
+libdir can be something else than /usr/lib, e.g. /usr/lib64 or similar.
+
+Upstream-Status: Submitted [https://github.com/libgit2/libgit2/pull/7004]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/libgit2/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt
+index a7d3c7ca4..16b3a23d9 100644
+--- a/src/libgit2/CMakeLists.txt
++++ b/src/libgit2/CMakeLists.txt
+@@ -119,11 +119,11 @@ configure_file(config.cmake.in
+ install(FILES
+ 	"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake"
+ 	"${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
+-	DESTINATION "lib/cmake/${PROJECT_NAME}")
++	DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
+ install(
+ 	EXPORT ${LIBGIT2_TARGETS_EXPORT_NAME}
+ 	NAMESPACE "${PROJECT_NAME}::"
+-	DESTINATION "lib/cmake/${PROJECT_NAME}")
++	DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
+ 
+ # Install
+ 
diff --git a/meta/recipes-support/libgit2/libgit2_1.8.4.bb b/meta/recipes-support/libgit2/libgit2_1.9.0.bb
similarity index 60%
rename from meta/recipes-support/libgit2/libgit2_1.8.4.bb
rename to meta/recipes-support/libgit2/libgit2_1.9.0.bb
index 63986fcd130..47a63ca2862 100644
--- a/meta/recipes-support/libgit2/libgit2_1.8.4.bb
+++ b/meta/recipes-support/libgit2/libgit2_1.9.0.bb
@@ -5,8 +5,10 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=8eacfdc17c8f4d219e131a073973b97d"
 
 DEPENDS = "curl openssl zlib libssh2 libgcrypt libpcre2"
 
-SRC_URI = "git://github.com/libgit2/libgit2.git;branch=maint/v1.8;protocol=https"
-SRCREV = "3f4182d15eab74a302718f2de454ffadb1995626"
+SRC_URI = "git://github.com/libgit2/libgit2.git;branch=main;protocol=https \
+           file://0001-src-libgit2-CMakeLists.txt-install-cmake-files-into-.patch \
+           "
+SRCREV = "338e6fb681369ff0537719095e22ce9dc602dbf0"
 
 S = "${WORKDIR}/git"
 
@@ -19,3 +21,7 @@  EXTRA_OECMAKE = "\
 "
 
 BBCLASSEXTEND = "native"
+
+do_install:append() {
+    sed -i -e 's,${RECIPE_SYSROOT},,g' ${D}${libdir}/cmake/libgit2/libgit2Targets.cmake
+}