From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3438D138359 for ; Thu, 27 Aug 2020 17:28:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7FBE9E0B54; Thu, 27 Aug 2020 17:28:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 543F4E0B54 for ; Thu, 27 Aug 2020 17:28:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C9529335D7D for ; Thu, 27 Aug 2020 17:28:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 72B1B315 for ; Thu, 27 Aug 2020 17:28:12 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1598549280.73b5c4466f2c421fb3bdbe13b3f7b27be76fc968.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/spectrum2/files/, net-im/spectrum2/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch net-im/spectrum2/spectrum2-2.0.12-r4.ebuild net-im/spectrum2/spectrum2-2.0.13-r2.ebuild X-VCS-Directories: net-im/spectrum2/ net-im/spectrum2/files/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 73b5c4466f2c421fb3bdbe13b3f7b27be76fc968 X-VCS-Branch: master Date: Thu, 27 Aug 2020 17:28:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: db236a5e-6db2-4f33-b2f3-86d3cba8fc46 X-Archives-Hash: 7403635c3e2d4f73125e7c39cd9559df commit: 73b5c4466f2c421fb3bdbe13b3f7b27be76fc968 Author: Conrad Kostecki gentoo org> AuthorDate: Thu Aug 27 17:27:46 2020 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Thu Aug 27 17:28:00 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73b5c446 net-im/spectrum2: fix compilation with musl Closes: https://bugs.gentoo.org/717410 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Conrad Kostecki gentoo.org> .../spectrum2-2.0.13-musl-compatibility.patch | 95 ++++++++++++++++++++++ net-im/spectrum2/spectrum2-2.0.12-r4.ebuild | 1 + net-im/spectrum2/spectrum2-2.0.13-r2.ebuild | 5 +- 3 files changed, 100 insertions(+), 1 deletion(-) diff --git a/net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch b/net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch new file mode 100644 index 00000000000..07bde50b832 --- /dev/null +++ b/net-im/spectrum2/files/spectrum2-2.0.13-musl-compatibility.patch @@ -0,0 +1,95 @@ +From 19b10896fa3426b2bd9e4e75a63ca52322373d33 Mon Sep 17 00:00:00 2001 +From: Vitaly Takmazov +Date: Fri, 24 Jul 2020 15:09:28 +0300 +Subject: [PATCH] musl compatibility + +--- + backends/libpurple/main.cpp | 6 +++--- + backends/swiften/main.cpp | 2 ++ + libtransport/UserManager.cpp | 2 ++ + spectrum/src/main.cpp | 2 ++ + 4 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp +index 54c618e0..4555edbc 100644 +--- a/backends/libpurple/main.cpp ++++ b/backends/libpurple/main.cpp +@@ -528,7 +528,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin { + + purple_accounts_delete_wrapped(account); + #ifndef WIN32 +-#if !defined(__FreeBSD__) && !defined(__APPLE__) ++#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__) + malloc_trim(0); + #endif + #endif +@@ -2287,7 +2287,7 @@ static void signed_on(PurpleConnection *gc, gpointer unused) { + PurpleAccount *account = purple_connection_get_account_wrapped(gc); + np->handleConnected(np->m_accounts[account]); + #ifndef WIN32 +-#if !defined(__FreeBSD__) && !defined(__APPLE__) ++#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__) + // force returning of memory chunks allocated by libxml2 to kernel + malloc_trim(0); + #endif +@@ -2516,7 +2516,7 @@ int main(int argc, char **argv) { + boost::locale::generator gen; + std::locale::global(gen("")); + #ifndef WIN32 +-#if !defined(__FreeBSD__) && !defined(__APPLE__) ++#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__) + mallopt(M_CHECK_ACTION, 2); + mallopt(M_PERTURB, 0xb); + #endif +diff --git a/backends/swiften/main.cpp b/backends/swiften/main.cpp +index f0acdb6d..6c111464 100644 +--- a/backends/swiften/main.cpp ++++ b/backends/swiften/main.cpp +@@ -227,10 +227,12 @@ class SwiftenPlugin : public NetworkPlugin, Swift::XMPPParserClient { + #ifndef WIN32 + #ifndef __FreeBSD__ + #ifndef __MACH__ ++#if defined (__GLIBC__) + // force returning of memory chunks allocated by libxml2 to kernel + malloc_trim(0); + #endif + #endif ++#endif + #endif + } + +diff --git a/libtransport/UserManager.cpp b/libtransport/UserManager.cpp +index 73fcdae9..a622754f 100644 +--- a/libtransport/UserManager.cpp ++++ b/libtransport/UserManager.cpp +@@ -125,10 +125,12 @@ void UserManager::removeUser(User *user, bool onUserBehalf) { + #ifndef WIN32 + #ifndef __FreeBSD__ + #ifndef __MACH__ ++#if defined (__GLIBC__) + malloc_trim(0); + #endif + #endif + #endif ++#endif + // VALGRIND_DO_LEAK_CHECK; + } + +diff --git a/spectrum/src/main.cpp b/spectrum/src/main.cpp +index 0f5985a2..89e5b9a1 100644 +--- a/spectrum/src/main.cpp ++++ b/spectrum/src/main.cpp +@@ -320,11 +320,13 @@ int main(int argc, char **argv) + #ifndef WIN32 + #ifndef __FreeBSD__ + #ifndef __MACH__ ++#if defined (__GLIBC__) + mallopt(M_CHECK_ACTION, 2); + mallopt(M_PERTURB, 0xb); + #endif + #endif + #endif ++#endif + + #ifndef WIN32 + if (signal(SIGINT, spectrum_sigint_handler) == SIG_ERR) { diff --git a/net-im/spectrum2/spectrum2-2.0.12-r4.ebuild b/net-im/spectrum2/spectrum2-2.0.12-r4.ebuild index 4f12c3c285e..3bbf840a522 100644 --- a/net-im/spectrum2/spectrum2-2.0.12-r4.ebuild +++ b/net-im/spectrum2/spectrum2-2.0.12-r4.ebuild @@ -62,6 +62,7 @@ PATCHES=( "${FILESDIR}/${P}-boost-173-compatibility.patch" "${FILESDIR}/${P}-gcc-10-compatibility.patch" "${FILESDIR}/${PN}-2.0.13-libpqxx-7-compatibility.patch" + "${FILESDIR}/${PN}-2.0.13-musl-compatibility.patch" ) src_prepare() { diff --git a/net-im/spectrum2/spectrum2-2.0.13-r2.ebuild b/net-im/spectrum2/spectrum2-2.0.13-r2.ebuild index 1c7985cbc6c..d94c327ca2c 100644 --- a/net-im/spectrum2/spectrum2-2.0.13-r2.ebuild +++ b/net-im/spectrum2/spectrum2-2.0.13-r2.ebuild @@ -58,7 +58,10 @@ DEPEND=" test? ( dev-util/cppunit ) " -PATCHES=( "${FILESDIR}/${P}-libpqxx-7-compatibility.patch" ) +PATCHES=( + "${FILESDIR}/${P}-libpqxx-7-compatibility.patch" + "${FILESDIR}/${P}-musl-compatibility.patch" +) src_prepare() { # Respect users LDFLAGS