Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/kio-extras/, kde-apps/kio-extras/files/
Date: Thu, 05 Mar 2020 19:39:34
Message-Id: 1583437139.bba00d525e78de6dcfb59a6eee04a55a88fec0f2.asturm@gentoo
1 commit: bba00d525e78de6dcfb59a6eee04a55a88fec0f2
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 5 19:31:05 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 5 19:38:59 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bba00d52
7
8 kde-apps/kio-extras: Add USE nls
9
10 Upstream commit 1029148d9ca743ffa4ccff7dfd75069808de7953
11
12 Package-Manager: Portage-2.3.92, Repoman-2.3.20
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/kio-extras-19.12.3-kio_nfs.patch | 171 +++++++++++++++++++++
16 kde-apps/kio-extras/kio-extras-19.12.3.ebuild | 6 +-
17 2 files changed, 176 insertions(+), 1 deletion(-)
18
19 diff --git a/kde-apps/kio-extras/files/kio-extras-19.12.3-kio_nfs.patch b/kde-apps/kio-extras/files/kio-extras-19.12.3-kio_nfs.patch
20 new file mode 100644
21 index 00000000000..4bdf9af413a
22 --- /dev/null
23 +++ b/kde-apps/kio-extras/files/kio-extras-19.12.3-kio_nfs.patch
24 @@ -0,0 +1,171 @@
25 +From a0a7ccb17fbb702ebc9122015f40fa9b112cedc6 Mon Sep 17 00:00:00 2001
26 +From: Christophe Giboudeaux <christophe@××××.fr>
27 +Date: Tue, 27 Nov 2018 23:37:13 +0100
28 +Subject: [PATCH 1/2] Add FindTIRPC.cmake
29 +
30 +Taken from https://phabricator.kde.org/D12761
31 +---
32 + cmake/FindTIRPC.cmake | 60 +++++++++++++++++++++++++++++++++++++++++++
33 + 1 file changed, 60 insertions(+)
34 + create mode 100644 cmake/FindTIRPC.cmake
35 +
36 +diff --git a/cmake/FindTIRPC.cmake b/cmake/FindTIRPC.cmake
37 +new file mode 100644
38 +index 00000000..20e78f9f
39 +--- /dev/null
40 ++++ b/cmake/FindTIRPC.cmake
41 +@@ -0,0 +1,60 @@
42 ++# - Try to find TI-RPC
43 ++#
44 ++# The following variables will be available once found :
45 ++#
46 ++# TIRPC_INCLUDE_DIRS - The TI-RPC headers location
47 ++# TIRPC_LIBRARIES - Link these to use TI-RPC
48 ++# TIRPC_VERSION - The TIRPC version
49 ++#
50 ++#=============================================================================
51 ++# Copyright (c) 2017 Christophe Giboudeaux <christophe@××××.fr>
52 ++#
53 ++#
54 ++# Redistribution and use in source and binary forms, with or without
55 ++# modification, are permitted provided that the following conditions
56 ++# are met:
57 ++#
58 ++# 1. Redistributions of source code must retain the copyright
59 ++# notice, this list of conditions and the following disclaimer.
60 ++# 2. Redistributions in binary form must reproduce the copyright
61 ++# notice, this list of conditions and the following disclaimer in the
62 ++# documentation and/or other materials provided with the distribution.
63 ++# 3. The name of the author may not be used to endorse or promote products
64 ++# derived from this software without specific prior written permission.
65 ++#
66 ++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
67 ++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
68 ++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
69 ++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
70 ++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
71 ++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
72 ++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
73 ++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
74 ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
75 ++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
76 ++#=============================================================================
77 ++
78 ++find_package(PkgConfig QUIET)
79 ++pkg_check_modules(PC_TIRPC libtirpc)
80 ++
81 ++find_path(TIRPC_INCLUDE_DIRS
82 ++ NAMES netconfig.h
83 ++ PATH_SUFFIXES tirpc
84 ++ HINTS ${PC_TIRPC_INCLUDE_DIRS}
85 ++)
86 ++
87 ++find_library(TIRPC_LIBRARIES
88 ++ NAMES tirpc
89 ++ HINTS ${PC_TIRPC_LIBRARY_DIRS}
90 ++)
91 ++
92 ++set(TIRPC_VERSION ${PC_TIRPC_VERSION})
93 ++
94 ++include(FindPackageHandleStandardArgs)
95 ++
96 ++find_package_handle_standard_args(TIRPC
97 ++ REQUIRED_VARS TIRPC_LIBRARIES TIRPC_INCLUDE_DIRS
98 ++ VERSION_VAR TIRPC_VERSION
99 ++)
100 ++
101 ++mark_as_advanced(TIRPC_INCLUDE_DIRS TIRPC_LIBRARIES)
102 +--
103 +2.25.1
104 +
105 +
106 +From 7cd0142ada663ac1bfcf4926f80f7ac53ccfb37c Mon Sep 17 00:00:00 2001
107 +From: Andreas Sturmlechner <asturm@g.o>
108 +Date: Tue, 27 Nov 2018 23:43:18 +0100
109 +Subject: [PATCH 2/2] Build kio_nfs against standalone libtirpc
110 +
111 +Summary:
112 +Since glibc-2.26, cmake skipped over nfs when standalone tirpc
113 +was installed in tirpc subdir (as done by Debian, Fedora, Arch, Gentoo...)
114 +
115 +Use FindTIRPC and make kio_nfs optional that way
116 +FindTIRPC taken from https://phabricator.kde.org/D12761
117 +
118 +Test Plan: Built with libtirpc successfully.
119 +
120 +Reviewers: #dolphin, dfaure, rdieter, sitter
121 +
122 +Subscribers: kde-frameworks-devel, cgiboudeaux, arojas, kfm-devel, meven
123 +
124 +Tags: #dolphin, #frameworks
125 +
126 +Differential Revision: https://phabricator.kde.org/D17205
127 +---
128 + CMakeLists.txt | 9 ++++++---
129 + nfs/CMakeLists.txt | 15 +++++++++------
130 + 2 files changed, 15 insertions(+), 9 deletions(-)
131 +
132 +diff --git a/CMakeLists.txt b/CMakeLists.txt
133 +index 347caaad..37d56b3f 100644
134 +--- a/CMakeLists.txt
135 ++++ b/CMakeLists.txt
136 +@@ -134,6 +134,11 @@ if(UNIX)
137 + set_package_properties(Gperf PROPERTIES TYPE OPTIONAL
138 + PURPOSE "Needed to build the man kioslave"
139 + )
140 ++
141 ++ find_package(TIRPC)
142 ++ set_package_properties(TIRPC PROPERTIES TYPE OPTIONAL
143 ++ PURPOSE "Needed to build the NFS kioslave"
144 ++ )
145 + else()
146 + # FIXME: on windows we ignore support until trash gets integrated
147 + endif()
148 +@@ -178,9 +183,7 @@ if(NOT WIN32)
149 + if(Gperf_FOUND)
150 + add_subdirectory( man )
151 + endif()
152 +- check_include_files(rpc/rpc.h HAVE_RPC_RPC_H)
153 +- add_feature_info("NFS kioslave" HAVE_RPC_RPC_H "The RPC library is needed to build the NFS kioslave")
154 +- if(HAVE_RPC_RPC_H)
155 ++ if(TIRPC_FOUND)
156 + add_subdirectory( nfs )
157 + endif()
158 + endif()
159 +diff --git a/nfs/CMakeLists.txt b/nfs/CMakeLists.txt
160 +index 6436e0d1..7189b25a 100644
161 +--- a/nfs/CMakeLists.txt
162 ++++ b/nfs/CMakeLists.txt
163 +@@ -1,10 +1,12 @@
164 + ## Check for XDR functions
165 +-include(CheckFunctionExists)
166 ++include(CheckCXXSymbolExists)
167 +
168 +-CHECK_FUNCTION_EXISTS(xdr_u_int64_t HAVE_XDR_U_INT64_T)
169 +-CHECK_FUNCTION_EXISTS(xdr_uint64_t HAVE_XDR_UINT64_T)
170 +-CHECK_FUNCTION_EXISTS(xdr_u_hyper HAVE_XDR_U_HYPER)
171 +-CHECK_FUNCTION_EXISTS(xdr_u_longlong_t HAVE_XDR_U_LONGLONG_T)
172 ++set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${TIRPC_LIBRARIES})
173 ++set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${TIRPC_INCLUDE_DIRS})
174 ++check_cxx_symbol_exists(xdr_u_int64_t "rpc/xdr.h" HAVE_XDR_U_INT64_T)
175 ++check_cxx_symbol_exists(xdr_uint64_t "rpc/xdr.h" HAVE_XDR_UINT64_T)
176 ++check_cxx_symbol_exists(xdr_u_hyper "rpc/xdr.h" HAVE_XDR_U_HYPER)
177 ++check_cxx_symbol_exists(xdr_u_longlong_t "rpc/xdr.h" HAVE_XDR_U_LONGLONG_T)
178 +
179 + if (NOT HAVE_XDR_U_INT64_T AND NOT HAVE_XDR_UINT64_T AND NOT HAVE_XDR_U_HYPER AND NOT HAVE_XDR_U_LONGLONG_T)
180 + message(FATAL_ERROR "Could not find 64-bit XDR datatype functions!")
181 +@@ -24,9 +26,10 @@ if (HAVE_XDR_U_LONGLONG_T)
182 + endif (HAVE_XDR_U_LONGLONG_T)
183 +
184 + add_definitions(-DTRANSLATION_DOMAIN=\"kio5_nfs\")
185 ++include_directories(${TIRPC_INCLUDE_DIRS})
186 +
187 + add_library(kio_nfs MODULE kio_nfs.cpp nfsv2.cpp nfsv3.cpp rpc_nfs3_prot_xdr.c rpc_nfs2_prot_xdr.c)
188 +-target_link_libraries(kio_nfs KF5::KIOCore KF5::I18n Qt5::Network)
189 ++target_link_libraries(kio_nfs KF5::KIOCore KF5::I18n Qt5::Network ${TIRPC_LIBRARIES})
190 + set_target_properties(kio_nfs PROPERTIES OUTPUT_NAME "nfs")
191 +
192 + install(TARGETS kio_nfs DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio)
193 +--
194 +2.25.1
195 +
196
197 diff --git a/kde-apps/kio-extras/kio-extras-19.12.3.ebuild b/kde-apps/kio-extras/kio-extras-19.12.3.ebuild
198 index dac7d525141..53ffdb067ac 100644
199 --- a/kde-apps/kio-extras/kio-extras-19.12.3.ebuild
200 +++ b/kde-apps/kio-extras/kio-extras-19.12.3.ebuild
201 @@ -16,7 +16,7 @@ HOMEPAGE="https://cgit.kde.org/kio-extras.git"
202 LICENSE="GPL-2" # TODO: CHECK
203 SLOT="5"
204 KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
205 -IUSE="activities +man mtp openexr phonon samba +sftp taglib"
206 +IUSE="activities +man mtp nls openexr phonon samba +sftp taglib"
207
208 BDEPEND="
209 man? ( dev-util/gperf )
210 @@ -52,6 +52,7 @@ DEPEND="
211 >=dev-qt/qtsql-${QTMIN}:5
212 )
213 mtp? ( >=media-libs/libmtp-1.1.16:= )
214 + nls? ( net-libs/libtirpc:= )
215 openexr? ( media-libs/openexr:= )
216 phonon? ( media-libs/phonon[qt5(+)] )
217 samba? ( net-fs/samba[client] )
218 @@ -65,12 +66,15 @@ RDEPEND="${DEPEND}
219 # requires running kde environment
220 RESTRICT+=" test"
221
222 +PATCHES=( "${FILESDIR}/${P}-kio_nfs.patch" )
223 +
224 src_configure() {
225 local mycmakeargs=(
226 $(cmake_use_find_package activities KF5Activities)
227 $(cmake_use_find_package activities KF5ActivitiesStats)
228 $(cmake_use_find_package man Gperf)
229 $(cmake_use_find_package mtp Mtp)
230 + $(cmake_use_find_package nls TIRPC)
231 $(cmake_use_find_package openexr OpenEXR)
232 $(cmake_use_find_package phonon Phonon4Qt5)
233 $(cmake_use_find_package samba Samba)