A dependency of net-im/profanity.
Based on chaoslab-overlay.
Thanks Ian Moone for high quality work!
Changes made to original work are motivated by avoidance of
overcomplication, and conformance to current practices.
Changes are:
* USE flag 'xml' changed to existing global flag 'expat'
* USE flag 'doc' now also installs examples
* README file is not installed anymore, as it contains mostly
compilation advise, which is useless once you have it installed
* USE flags 'static-libs', 'ssl' are dropped
* RESTRICT="mirror" dropped as unreasonable.
Bug: https://bugs.gentoo.org/show_bug.cgi?id=558840
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>
--- /dev/null
+DIST libstrophe-0.9.2.tar.gz 500459 BLAKE2B 0b1f6f1daac1215bcdcbde0e54264b98f5a863de339500826f625f8c5e8143ce7200fb251d04248715e9a8b6621a4360e7ca2780bf4684d916ec13361b5f6fcc SHA512 a0129c49ca574afaefa77c412143571af2eb1100c7d737d497b65d44680d35e2404ee2d4d4e1378b06ac1bcc5c587f505f79fea9251af1cbb36afd990d48570d
--- /dev/null
+--- a/src/tls_openssl.c
++++ b/src/tls_openssl.c
+@@ -51,7 +51,7 @@
+
+ void tls_initialize(void)
+ {
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ SSL_library_init();
+ SSL_load_error_strings();
+ #else
+@@ -120,7 +120,7 @@
+ /* Trust server's certificate when user sets the flag explicitly. */
+ mode = conn->tls_trust ? SSL_VERIFY_NONE : SSL_VERIFY_PEER;
+ SSL_set_verify(tls->ssl, mode, 0);
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
+ /* Hostname verification is supported in OpenSSL 1.0.2 and newer. */
+ X509_VERIFY_PARAM *param = SSL_get0_param(tls->ssl);
+
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+DESCRIPTION="A simple, lightweight C library for writing XMPP clients"
+HOMEPAGE="http://strophe.im/libstrophe/"
+SRC_URI="https://github.com/strophe/${PN}/releases/download/${PV}/${P}.tar.gz"
+LICENSE="|| ( MIT GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc expat libressl"
+
+RDEPEND="
+ expat? ( dev-libs/expat )
+ !expat? ( dev-libs/libxml2:2 )
+ libressl? ( dev-libs/libressl:0= )
+ !libressl? ( dev-libs/openssl:0= )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+"
+
+DOCS=( ChangeLog )
+PATCHES=( "${FILESDIR}/libstrophe-0.9.2-libressl.patch" )
+
+src_configure() {
+ # shellcheck disable=SC2207
+ local myeconf=(
+ --enable-tls
+ $(use_with !expat libxml2)
+ )
+ econf "${myeconf[@]}"
+}
+src_compile() {
+ default
+ if use doc; then
+ doxygen || die
+ HTML_DOCS=( docs/html/* )
+ fi
+}
+
+src_install() {
+ default
+ use doc && dodoc -r examples
+ find "${D}" -name '*.la' -delete || die
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andrey_utkin@gentoo.org</email>
+ <name>Andrey Utkin</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">strophe/libstrophe</remote-id>
+ <bugs-to>https://github.com/strophe/libstrophe/issues</bugs-to>
+ </upstream>
+ <longdescription lang="en">
+ libstrophe is a lightweight XMPP client library written
+ in C. It has minimal dependencies and is configurable
+ for various environments.
+ </longdescription>
+</pkgmetadata>