From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A532A138350 for ; Tue, 14 Apr 2020 15:28:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB81AE0953; Tue, 14 Apr 2020 15:28:19 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B3239E0953 for ; Tue, 14 Apr 2020 15:28:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 52C9734F2A8 for ; Tue, 14 Apr 2020 15:28:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BD817197 for ; Tue, 14 Apr 2020 15:28:16 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1586878085.67c00c137efa4a35c34459d871f4b038709ac297.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/kup/files/, app-backup/kup/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-backup/kup/files/kup-0.7.3-libgit2.patch app-backup/kup/kup-0.7.3.ebuild X-VCS-Directories: app-backup/kup/ app-backup/kup/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 67c00c137efa4a35c34459d871f4b038709ac297 X-VCS-Branch: master Date: Tue, 14 Apr 2020 15:28:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1ca2cfbd-1b55-4a2b-b012-5ced18144411 X-Archives-Hash: 4e301253b3b2f43a1267915e35d5a617 commit: 67c00c137efa4a35c34459d871f4b038709ac297 Author: Andreas Sturmlechner gentoo org> AuthorDate: Tue Apr 14 15:27:07 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Apr 14 15:28:05 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67c00c13 app-backup/kup: Fix build with newer dev-libs/libgit2 Closes: https://bugs.gentoo.org/717408 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner gentoo.org> app-backup/kup/files/kup-0.7.3-libgit2.patch | 140 +++++++++++++++++++++++++++ app-backup/kup/kup-0.7.3.ebuild | 10 +- 2 files changed, 145 insertions(+), 5 deletions(-) diff --git a/app-backup/kup/files/kup-0.7.3-libgit2.patch b/app-backup/kup/files/kup-0.7.3-libgit2.patch new file mode 100644 index 00000000000..a6b1c536afc --- /dev/null +++ b/app-backup/kup/files/kup-0.7.3-libgit2.patch @@ -0,0 +1,140 @@ +From 2ca19e917f895e24a5379be669b9ad77ff5692f5 Mon Sep 17 00:00:00 2001 +From: Simon Persson +Date: Mon, 16 Mar 2020 17:03:33 +0800 +Subject: Remove copy of libgit2 + +API seems to have stabilized a lot, such that different distros can be +expected to have a compatible version. +--- + CMakeLists.txt | 13 +- + filedigger/CMakeLists.txt | 2 +- + filedigger/main.cpp | 12 - + kioslave/CMakeLists.txt | 2 +- + kioslave/bupslave.cpp | 8 - + +From ee720980113162c019eecabc01dfa5763cfb7585 Mon Sep 17 00:00:00 2001 +From: Adriaan de Groot +Date: Mon, 6 Apr 2020 23:06:53 +0200 +Subject: Link to libgit2 via imported target + +--- + filedigger/CMakeLists.txt | 2 +- + kioslave/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2118193..76a1367 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,18 +6,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + + project(kup) + +-# Use this option if you want to use the system LibGit2 library. +-# This is not recommended unless you know what you are doing. +-option(USE_SYSTEM_LIBGIT2 "Don't set this option unless your are sure that your system version of LibGit2 library is fully compatible with Kup." OFF) +-if (USE_SYSTEM_LIBGIT2) +- find_package(LibGit2 REQUIRED) +- set(libgit_link_name git2) +-else (USE_SYSTEM_LIBGIT2) +- set(BUILD_SHARED_LIBS ON) +- add_subdirectory(libgit2-0.19.0) +- include_directories(${CMAKE_SOURCE_DIR}/libgit2-0.19.0/include) +- set(libgit_link_name git24kup) +-endif (USE_SYSTEM_LIBGIT2) ++find_package(LibGit2 REQUIRED) + + if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "DebugFull") + message(WARNING "enabling debug output!") +diff --git a/filedigger/CMakeLists.txt b/filedigger/CMakeLists.txt +index 2fcdd82..fd6a3a0 100644 +--- a/filedigger/CMakeLists.txt ++++ b/filedigger/CMakeLists.txt +@@ -37,7 +37,7 @@ KF5::I18n + KF5::I18n + KF5::IconThemes + KF5::JobWidgets +-${libgit_link_name} ++LibGit2::LibGit2 + ) + + ########### install files ############### +diff --git a/filedigger/main.cpp b/filedigger/main.cpp +index 6682985..43fe9ae 100644 +--- a/filedigger/main.cpp ++++ b/filedigger/main.cpp +@@ -21,11 +21,7 @@ + #include "filedigger.h" + #include "mergedvfs.h" + +-#if LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 24 + #include +-#else +-#include +-#endif + + #include + #include +@@ -66,19 +62,11 @@ int main(int pArgCount, char **pArgArray) { + } + + // This needs to be called first thing, before any other calls to libgit2. +- #if LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 24 + git_libgit2_init(); +- #else +- git_threads_init(); +- #endif + + FileDigger *lFileDigger = new FileDigger(lRepoPath, lParser.value(QStringLiteral("branch"))); + lFileDigger->show(); + int lRetVal = lApp.exec(); +- #if LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 24 + git_libgit2_shutdown(); +- #else +- git_threads_shutdown(); +- #endif + return lRetVal; + } +diff --git a/kioslave/CMakeLists.txt b/kioslave/CMakeLists.txt +index 7187f33..83e6122 100644 +--- a/kioslave/CMakeLists.txt ++++ b/kioslave/CMakeLists.txt +@@ -17,7 +17,7 @@ target_link_libraries(kio_bup + Qt5::Core + KF5::KIOCore + KF5::I18n +-${libgit_link_name} ++LibGit2::LibGit2 + ) + + install(TARGETS kio_bup DESTINATION ${PLUGIN_INSTALL_DIR}) +diff --git a/kioslave/bupslave.cpp b/kioslave/bupslave.cpp +index 1a7e1a3..0812658 100644 +--- a/kioslave/bupslave.cpp ++++ b/kioslave/bupslave.cpp +@@ -64,22 +64,14 @@ BupSlave::BupSlave(const QByteArray &pPoolSocket, const QByteArray &pAppSocket) + { + mRepository = nullptr; + mOpenFile = nullptr; +- #if LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 24 + git_libgit2_init(); +- #else +- git_threads_init(); +- #endif + } + + BupSlave::~BupSlave() { + if(mRepository != nullptr) { + delete mRepository; + } +- #if LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 24 + git_libgit2_shutdown(); +- #else +- git_threads_shutdown(); +- #endif + } + + void BupSlave::close() { +-- +cgit v1.1 + diff --git a/app-backup/kup/kup-0.7.3.ebuild b/app-backup/kup/kup-0.7.3.ebuild index d479069e1b3..8af41a81c73 100644 --- a/app-backup/kup/kup-0.7.3.ebuild +++ b/app-backup/kup/kup-0.7.3.ebuild @@ -49,9 +49,9 @@ RDEPEND="${DEPEND} S="${WORKDIR}/${PN^}-${P}" -src_configure() { - local mycmakeargs=( - -DUSE_SYSTEM_LIBGIT2=ON - ) - ecm_src_configure +PATCHES=( "${FILESDIR}/${P}-libgit2.patch" ) + +src_prepare() { + ecm_src_prepare + rm -r libgit2-0.19.0 || die "Failed to remove bundled libgit2-0.19.0" }