konsole: update to 22.04.3.
This commit is contained in:
parent
b29e51b991
commit
3afff051c5
srcpkgs/konsole
@ -1,86 +0,0 @@
|
||||
From f6310c2b791275f3727f2240ca7fab9f58db943d Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Becker <heiko.becker@kde.org>
|
||||
Date: Tue, 22 Mar 2022 22:08:10 +0100
|
||||
Subject: [PATCH] Detect the presence of malloc_trim to fix the build with musl
|
||||
|
||||
malloc_trim is indeed a GNU extension, but an extension of glibc.
|
||||
Relying on __GNUC__ unfortunately doesn't help with that. Check for
|
||||
the actual presence of malloc_trim with cmake's check_function_exists
|
||||
instead.
|
||||
This fixes the build with musl libc, which doesn't come with
|
||||
malloc_trim.
|
||||
|
||||
Co-authored-by: Ahmad Samir <a.samirh78@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
src/Screen.cpp | 17 +++++++----------
|
||||
src/config-konsole.h.cmake | 4 ++--
|
||||
3 files changed, 10 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e6775aeef..9e990c37d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -94,7 +94,7 @@ set(HAVE_X11 ${X11_FOUND})
|
||||
# Check for function GETPWUID
|
||||
check_symbol_exists(getpwuid "pwd.h" HAVE_GETPWUID)
|
||||
|
||||
-check_include_files(malloc.h HAVE_MALLOC_H)
|
||||
+check_function_exists(malloc_trim HAVE_MALLOC_TRIM)
|
||||
|
||||
# See above includes for defaults
|
||||
add_definitions(
|
||||
diff --git a/src/Screen.cpp b/src/Screen.cpp
|
||||
index ad578b4fd..10876f988 100644
|
||||
--- a/src/Screen.cpp
|
||||
+++ b/src/Screen.cpp
|
||||
@@ -28,13 +28,11 @@
|
||||
#include "history/HistoryType.h"
|
||||
#include "profile/Profile.h"
|
||||
|
||||
-#ifdef HAVE_MALLOC_H
|
||||
- // For malloc_trim, which is a GNU extension
|
||||
- #ifdef __GNUC__
|
||||
- extern "C" {
|
||||
- #include <malloc.h>
|
||||
- }
|
||||
- #endif
|
||||
+#ifdef HAVE_MALLOC_TRIM
|
||||
+// For malloc_trim, which is a GNU extension
|
||||
+extern "C" {
|
||||
+#include <malloc.h>
|
||||
+}
|
||||
#endif
|
||||
|
||||
using namespace Konsole;
|
||||
@@ -1797,14 +1797,13 @@
|
||||
t.scroll(_history);
|
||||
}
|
||||
|
||||
-#ifdef HAVE_MALLOC_H
|
||||
+#ifdef HAVE_MALLOC_TRIM
|
||||
+
|
||||
#ifdef Q_OS_LINUX
|
||||
-#ifdef __GNUC__
|
||||
// We might have been using gigabytes of memory, so make sure it is actually released
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
#endif
|
||||
-#endif
|
||||
}
|
||||
|
||||
bool Screen::hasScroll() const
|
||||
diff --git a/src/config-konsole.h.cmake b/src/config-konsole.h.cmake
|
||||
index b74992b0a..4b1d9b515 100644
|
||||
--- a/src/config-konsole.h.cmake
|
||||
+++ b/src/config-konsole.h.cmake
|
||||
@@ -15,5 +15,5 @@
|
||||
|
||||
#cmakedefine HAVE_GETPWUID ${HAVE_GETPWUID}
|
||||
|
||||
-/* Define to 1 if you have the <malloc.h> header file. */
|
||||
-#cmakedefine HAVE_MALLOC_H 1
|
||||
+/* Defined if system has the malloc_trim function, which is a GNU extension */
|
||||
+#cmakedefine HAVE_MALLOC_TRIM
|
||||
--
|
||||
GitLab
|
@ -1,6 +1,6 @@
|
||||
# Template file for 'konsole'
|
||||
pkgname=konsole
|
||||
version=22.04.1
|
||||
version=22.04.3
|
||||
revision=1
|
||||
build_style=cmake
|
||||
configure_args="-DBUILD_TESTING=OFF -GNinja"
|
||||
@ -13,7 +13,7 @@ maintainer="John <me@johnnynator.dev>"
|
||||
license="GPL-2.0-or-later, LGPL-2.0-or-later, GFDL-1.2-or-later"
|
||||
homepage="https://kde.org/applications/en/system/org.kde.konsole"
|
||||
distfiles="${KDE_SITE}/release-service/${version}/src/konsole-${version}.tar.xz"
|
||||
checksum=8d049888a9be2464ec5c0c961fbab155fea679a714558f9ad6e13720c56822e3
|
||||
checksum=148f65891318e6a6f31793c9535e2bf32068b1cae8c5026e54f360bea484d9a7
|
||||
replaces="konsole5>=0"
|
||||
# FIXME: after we switch cmake build-style to ninja, remove this as well as
|
||||
# the ninja host-dependency and configure_arg as they will become superfluous
|
||||
|
Loading…
Reference in New Issue
Block a user