commit:     5de5b893520423567e28dee634f082134670840e
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 20 00:20:52 2022 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Apr 20 00:36:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5de5b893

dev-libs/libfilezilla: use -pthread to fix atomic issue

the -pthread flag will expand link option "-latomic" in RISC-V platfrom,
so will effectively fix the problem.

Closes: https://bugs.gentoo.org/837740
Upstream report: https://trac.filezilla-project.org/ticket/12699

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../libfilezilla/files/libfilezilla-0.37.1-pthread.patch    | 13 +++++++++++++
 dev-libs/libfilezilla/libfilezilla-0.37.1.ebuild            |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/dev-libs/libfilezilla/files/libfilezilla-0.37.1-pthread.patch 
b/dev-libs/libfilezilla/files/libfilezilla-0.37.1-pthread.patch
new file mode 100644
index 000000000000..6a40cc69c52e
--- /dev/null
+++ b/dev-libs/libfilezilla/files/libfilezilla-0.37.1-pthread.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 14bb5d0..da45769 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -120,7 +120,7 @@ AC_CHECK_DECLS([pthread_condattr_setclock], [], [], 
[[#include <pthread.h>]])
+ if test "$windows" = "1"; then
+   libdeps="-lws2_32"
+ else
+-  libdeps=-lpthread
++  libdeps=-pthread
+   CHECK_ICONV([libdeps="$libdeps -liconv"])
+ 
+   CHECK_RANDOM

diff --git a/dev-libs/libfilezilla/libfilezilla-0.37.1.ebuild 
b/dev-libs/libfilezilla/libfilezilla-0.37.1.ebuild
index 106c52d6facd..9a58c23e0be8 100644
--- a/dev-libs/libfilezilla/libfilezilla-0.37.1.ebuild
+++ b/dev-libs/libfilezilla/libfilezilla-0.37.1.ebuild
@@ -23,6 +23,8 @@ RDEPEND="
 DEPEND="${RDEPEND}
        test? ( dev-util/cppunit )"
 
+PATCHES=( "${FILESDIR}"/${PN}-0.37.1-pthread.patch )
+
 pkg_pretend() {
        if [[ ${MERGE_TYPE} != binary ]]; then
                if ! test-flag-CXX -std=c++14; then

Reply via email to