diff options
author | 2024-02-21 22:51:24 +0100 | |
---|---|---|
committer | 2024-02-22 11:04:26 +0100 | |
commit | cdda2b4470aa4bba18bf1650b4566a8eef3d16c5 (patch) | |
tree | 5fe163cb136d27ed059642f32e5056e2482ffa0c /kde-apps/dolphin | |
parent | package.mask: Last rite www-plugins/gosuslugi-plugin (diff) | |
download | gentoo-cdda2b4470aa4bba18bf1650b4566a8eef3d16c5.tar.gz gentoo-cdda2b4470aa4bba18bf1650b4566a8eef3d16c5.tar.bz2 gentoo-cdda2b4470aa4bba18bf1650b4566a8eef3d16c5.zip |
kde-apps/dolphin: Fix musl build
Closes: https://bugs.gentoo.org/925195
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/dolphin')
-rw-r--r-- | kde-apps/dolphin/dolphin-23.08.5.ebuild | 2 | ||||
-rw-r--r-- | kde-apps/dolphin/files/dolphin-23.08.5-musl.patch | 64 |
2 files changed, 66 insertions, 0 deletions
diff --git a/kde-apps/dolphin/dolphin-23.08.5.ebuild b/kde-apps/dolphin/dolphin-23.08.5.ebuild index f253b8e0a372..3116f5e5d438 100644 --- a/kde-apps/dolphin/dolphin-23.08.5.ebuild +++ b/kde-apps/dolphin/dolphin-23.08.5.ebuild @@ -64,6 +64,8 @@ RDEPEND="${DEPEND} ) " +PATCHES=( "${FILESDIR}/${P}-musl.patch" ) + src_configure() { local mycmakeargs=( -DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON diff --git a/kde-apps/dolphin/files/dolphin-23.08.5-musl.patch b/kde-apps/dolphin/files/dolphin-23.08.5-musl.patch new file mode 100644 index 000000000000..044a0caef830 --- /dev/null +++ b/kde-apps/dolphin/files/dolphin-23.08.5-musl.patch @@ -0,0 +1,64 @@ +From 32a5f1c041d00cdd0246cf7e764a447588f30f3a Mon Sep 17 00:00:00 2001 +From: Bart Ribbers <bribbers@disroot.org> +Date: Wed, 9 Aug 2023 14:07:46 +0200 +Subject: [PATCH] Fix musl build by using fts_* from external library + +musl does not support fts. There is however a standalone package that +can be used, but it must be linked against. This commit adds a check +that makes sure to link to the external library if it is required. +--- + CMakeLists.txt | 17 +++++++++++++++++ + src/CMakeLists.txt | 2 ++ + 2 files changed, 19 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8a0b97c635..0a655babb3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,6 +27,8 @@ include(GenerateExportHeader) + include(FeatureSummary) + include(ECMQtDeclareLoggingCategory) + include(ECMDeprecationSettings) ++include(CheckIncludeFiles) ++include(CheckLibraryExists) + + ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX DOLPHIN + VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/dolphin_version.h" +@@ -150,6 +152,21 @@ else() + set(HAVE_TERMINAL TRUE) + endif() + ++# Compatibility with platforms without native fts (e.g. musl) ++check_include_files("sys/types.h;sys/stat.h;fts.h" HAVE_FTS_H) ++if(HAVE_FTS_H) ++ check_function_exists(fts_open HAVE_FTS_OPEN) ++ if(NOT HAVE_FTS_OPEN) ++ check_library_exists(fts fts_open "" HAVE_LIB_FTS) ++ endif() ++endif() ++ ++if(HAVE_LIB_FTS) ++ set(FTS_LIB fts) ++else() ++ set(FTS_LIB "") ++endif() ++ + add_subdirectory(src) + add_subdirectory(doc) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5a481e39ff..fa7de5cc23 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -213,6 +213,8 @@ target_link_libraries( + KF5::WindowSystem + KF5::WidgetsAddons + KF5::Codecs ++ ++ ${FTS_LIB} + ) + + if(HAVE_BALOO) +-- +GitLab + |