summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-12-20 12:04:42 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-12-20 13:41:45 +0100
commit2df53de7655592e1345c4c47194a75e3cdf7fd51 (patch)
tree4a44159101fae1eed9017e3643f58f9bb38466e3
parentmedia-libs/mlt: 7.4.0 version bump (diff)
downloadgentoo-2df53de7655592e1345c4c47194a75e3cdf7fd51.tar.gz
gentoo-2df53de7655592e1345c4c47194a75e3cdf7fd51.tar.bz2
gentoo-2df53de7655592e1345c4c47194a75e3cdf7fd51.zip
dev-util/heaptrack: Fix cmake with IUSE=-gui
Closes: https://bugs.gentoo.org/829606 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--dev-util/heaptrack/files/heaptrack-1.3.0-cmake.patch58
-rw-r--r--dev-util/heaptrack/heaptrack-1.3.0.ebuild2
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-util/heaptrack/files/heaptrack-1.3.0-cmake.patch b/dev-util/heaptrack/files/heaptrack-1.3.0-cmake.patch
new file mode 100644
index 000000000000..fe4cfd6fed93
--- /dev/null
+++ b/dev-util/heaptrack/files/heaptrack-1.3.0-cmake.patch
@@ -0,0 +1,58 @@
+From 24d593624a41488416116057fc36e9962a548477 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Mon, 20 Dec 2021 11:43:26 +0100
+Subject: [PATCH] Let releaseme know to skip po install
+
+Since KF5I18n is optional AND dependent on HEAPTRACK_BUILD_GUI, we
+have to call ki18n_install(po) conditionally on our own and in
+addition tell releaseme not to touch CMakeLists.txt to do the same.
+
+Otherwise releaseme adds the following code unconditionally at the
+end of the file:
+
+ find_package(KF5I18n CONFIG REQUIRED)
+ ki18n_install(po)
+
+ki18n_install checks for existence of po subdir and returns silently
+if none found, so it is safe for git sources too.
+
+* asturmlechner 2021-12-20: Modified for 1.3.0 release.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 4 ++++
+ src/analyze/CMakeLists.txt | 3 +++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4ccfc88..06c43cf 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -169,7 +169,8 @@
+ add_subdirectory(src)
+ add_subdirectory(tests)
+
+-feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
++# Let releaseme know about this:
++# SKIP_PO_INSTALL
++# (KF5I18n is optional in src/analyze/CMakeLists.txt...)
+
+-find_package(KF5I18n CONFIG REQUIRED)
+-ki18n_install(po)
++feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+diff --git a/src/analyze/CMakeLists.txt b/src/analyze/CMakeLists.txt
+index 592f337..763c671 100644
+--- a/src/analyze/CMakeLists.txt
++++ b/src/analyze/CMakeLists.txt
+@@ -41,6 +41,9 @@ if(HEAPTRACK_BUILD_GUI)
+ find_package(KF5 ${REQUIRED_IN_APPIMAGE} COMPONENTS CoreAddons I18n ItemModels ThreadWeaver ConfigWidgets KIO IconThemes)
+ find_package(KChart ${REQUIRED_IN_APPIMAGE} "2.6.0")
+ set_package_properties(KChart PROPERTIES TYPE RECOMMENDED PURPOSE "Required for the heaptrack_gui executable. Get it from the kdiagram module.")
++ if(KF5I18n_FOUND)
++ ki18n_install(../../po)
++ endif()
+ endif()
+ endif()
+
+--
+2.34.1
diff --git a/dev-util/heaptrack/heaptrack-1.3.0.ebuild b/dev-util/heaptrack/heaptrack-1.3.0.ebuild
index 415f90a3f430..bca3728eeba1 100644
--- a/dev-util/heaptrack/heaptrack-1.3.0.ebuild
+++ b/dev-util/heaptrack/heaptrack-1.3.0.ebuild
@@ -44,6 +44,8 @@ BDEPEND="
gui? ( kde-frameworks/extra-cmake-modules:5 )
"
+PATCHES=( "${FILESDIR}/${P}-cmake.patch" ) # bug 829606
+
src_prepare() {
cmake_src_prepare
rm -rf 3rdparty/boost-zstd || die # ensure no bundling