summaryrefslogtreecommitdiff
path: root/net-libs/loudmouth
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /net-libs/loudmouth
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'net-libs/loudmouth')
-rw-r--r--net-libs/loudmouth/Manifest3
-rw-r--r--net-libs/loudmouth/files/loudmouth-1.5.4-freeaddrinfo-musl.patch40
-rw-r--r--net-libs/loudmouth/loudmouth-1.5.4.ebuild57
3 files changed, 100 insertions, 0 deletions
diff --git a/net-libs/loudmouth/Manifest b/net-libs/loudmouth/Manifest
index a411683b2629..1fcfaaee7cc6 100644
--- a/net-libs/loudmouth/Manifest
+++ b/net-libs/loudmouth/Manifest
@@ -1,4 +1,7 @@
AUX loudmouth-1.5.3-gcc7.patch 919 BLAKE2B 085cc7bd0c1eabe91f45c8f1fce8f52518a5824479d110e2bd235a4decc79456f11d3c57d1288c0043fc15c466998b9e52687a9a0d59fe3269c043cb2daaf88f SHA512 f5636e0745f81d4a7c85efa45238bf26cf70b5c43fbf32e9746a7ad534dd33abf10b7547ac7361ae7d5f7b5fa422a1a3028b8ffaa9fe0e5b843934a056e0b0ce
+AUX loudmouth-1.5.4-freeaddrinfo-musl.patch 1207 BLAKE2B 54c939bf18c50cb2aceaaaa3b2014093c0a2aacc000a2c0274ce90f328883750ea3a63a7ba454ae85072b8c0ab0a01fb1245217b8fe949f6b2a78acbbc30f7af SHA512 477fa04f1f2734596fd2f50ba1a44e0f9e9db09758d1942a2943d5b0120d5b08a851e55a8ccea36ab96f956539947e37a980e8f057fa21466a49887e981cedf7
DIST loudmouth-1.5.3.tar.bz2 375974 BLAKE2B c9707fe18560104456a624a61437240a16bb6bbaf544cdf775f6d6c64fdbeb6eb8f7042eb13fcdeb36c89bb8d9522c2eba02c24987757c0f0ac8748d92a2b166 SHA512 ab6b16b4e644b69cdb7d8df1753d1bb5b43c2f1e76944e639339169b332e1b5c6a4246053c5b8a579ee9b53c845cef610b0040dfdffeb857180b6bab71adfcce
+DIST loudmouth-1.5.4.tar.bz2 361323 BLAKE2B 1d8453625262e4f9dc8d603619b71cac073831462164a10a92a5118c212293ae4ad9a0ca276b07b7919a0aebce633b4afaabb015ecf4b33e7c641a4273edc64a SHA512 49a08f0130b9ee56f07586d244504c81242723865a136b03e1049f32b1aa1e6c49e9b76b38f0cfb812ef4c66f73b7d83914a58e9a93e0496207e06c2b5efa9d8
EBUILD loudmouth-1.5.3-r3.ebuild 1088 BLAKE2B ba43d3d9a0426d742891569b93145ad08f7708a8982faa4a9603f2adca5a33e55c0dbe3fd029b7c2c31cd9384da6d899d86c956805c37633bb777311295d439e SHA512 86b049d3058a4862e4907b1835659b6a3db182f5b90223cf79d6620d936d8feb0e6f51a629957084ce259b481e69966a1c376aece76f16ac7da91b48ff07ef25
+EBUILD loudmouth-1.5.4.ebuild 1206 BLAKE2B 15f9420a76c317732deb9397bf9a14f4f32059961554c2c32a965d1519b510094dee0ef759e935278e556520621203f6902650c4777fba513b7ca9296da2708c SHA512 65ab39dd4fa39eba7c98e8861ab91e25f8e700a84ee81dc75a8b64dc75b804b1c80fb3ff68352bd606649316087f79a63828cdcaee04ae64a2020095fd77ff05
MISC metadata.xml 479 BLAKE2B b0aeda3b9f2d5114387fee46bc82a36d6753defdbbeb1f4ecb4ead66f4738527402e42e001e8c8b953403563ece6f554bee5deac88799d7a0e07013f5ce25359 SHA512 f35c42cd967cc0832434dbbf04a1999c7585accd646af68e55f39e15363e47837aa094bce6536d991dff8385fe28cf7e0600180ead347033d61c4752f1ed0a83
diff --git a/net-libs/loudmouth/files/loudmouth-1.5.4-freeaddrinfo-musl.patch b/net-libs/loudmouth/files/loudmouth-1.5.4-freeaddrinfo-musl.patch
new file mode 100644
index 000000000000..f75714a75058
--- /dev/null
+++ b/net-libs/loudmouth/files/loudmouth-1.5.4-freeaddrinfo-musl.patch
@@ -0,0 +1,40 @@
+https://github.com/mcabber/loudmouth/pull/46
+
+From f32119e1408c742da9a1862805d76d222937756d Mon Sep 17 00:00:00 2001
+From: psykose <alice@ayaya.dev>
+Date: Thu, 21 Apr 2022 18:23:32 +0000
+Subject: [PATCH] fix macro define for freeaddrinfo with asyncns
+
+previously, this define was only made in lm-asyncns-resolver.c, which
+does not propagate it to lm-resolver.c, where freeaddrinfo() is used.
+this means that when asyncns support is used, the standard libc
+freeaddrinfo() is called on an addrinfo acquired from
+asyncns_getaddrinfo, which is undefined behaviour, and leads to a
+segfault on musl libc.
+--- a/loudmouth/lm-asyncns-resolver.c
++++ b/loudmouth/lm-asyncns-resolver.c
+@@ -21,7 +21,6 @@
+ #include <string.h>
+ #ifdef HAVE_ASYNCNS
+ #include <asyncns.h>
+-#define freeaddrinfo(x) asyncns_freeaddrinfo(x)
+
+ /* Needed on Mac OS X */
+ #if HAVE_ARPA_NAMESER_COMPAT_H
+--- a/loudmouth/lm-asyncns-resolver.h
++++ b/loudmouth/lm-asyncns-resolver.h
+@@ -19,8 +19,14 @@
+ #ifndef __LM_ASYNCNS_RESOLVER_H__
+ #define __LM_ASYNCNS_RESOLVER_H__
+
++#include <config.h>
++
+ #include <glib-object.h>
+
++#ifdef HAVE_ASYNCNS
++#define freeaddrinfo(x) asyncns_freeaddrinfo(x)
++#endif
++
+ #include "lm-resolver.h"
+
+ G_BEGIN_DECLS
diff --git a/net-libs/loudmouth/loudmouth-1.5.4.ebuild b/net-libs/loudmouth/loudmouth-1.5.4.ebuild
new file mode 100644
index 000000000000..bd960d3f5dbc
--- /dev/null
+++ b/net-libs/loudmouth/loudmouth-1.5.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Lightweight C Jabber library"
+HOMEPAGE="https://mcabber.com"
+SRC_URI="https://mcabber.com/files/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~ppc-macos"
+IUSE="asyncns ssl openssl test"
+RESTRICT="!test? ( test )"
+
+# Automagic libidn dependency
+RDEPEND=">=dev-libs/glib-2.16:2
+ net-dns/libidn:=
+ ssl? (
+ !openssl? ( >=net-libs/gnutls-1.4.0:0= )
+ openssl? ( dev-libs/openssl:0= )
+ )
+ asyncns? ( >=net-libs/libasyncns-0.3 )"
+DEPEND="${RDEPEND}
+ test? ( dev-libs/check )"
+BDEPEND="dev-util/glib-utils
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.4-freeaddrinfo-musl.patch
+)
+
+src_configure() {
+ local myconf
+
+ if use ssl; then
+ if ! use openssl; then
+ myconf="${myconf} --with-ssl=gnutls"
+ else
+ myconf="${myconf} --with-ssl=openssl"
+ fi
+ else
+ myconf="${myconf} --with-ssl=no"
+ fi
+
+ # --with-compile-warnings=yes to avoid default =error
+ econf \
+ $(use_with asyncns) \
+ --with-compile-warnings=yes \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}