summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Utkin <andrey_utkin@gentoo.org>2019-05-06 19:20:19 +0100
committerAndrey Utkin <andrey_utkin@gentoo.org>2019-05-06 20:17:47 +0100
commit3c12b68547436990731331971833beff76d501eb (patch)
tree7b82360511b10abb21243504a049b2c94c802078 /dev-libs/libstrophe
parentmedia-libs/raptor-2.0.15-r2: alpha stable (diff)
downloadgentoo-3c12b68547436990731331971833beff76d501eb.tar.gz
gentoo-3c12b68547436990731331971833beff76d501eb.tar.bz2
gentoo-3c12b68547436990731331971833beff76d501eb.zip
dev-libs/libstrophe: add new package
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>
Diffstat (limited to 'dev-libs/libstrophe')
-rw-r--r--dev-libs/libstrophe/Manifest1
-rw-r--r--dev-libs/libstrophe/files/libstrophe-0.9.2-libressl.patch20
-rw-r--r--dev-libs/libstrophe/libstrophe-0.9.2.ebuild46
-rw-r--r--dev-libs/libstrophe/metadata.xml17
4 files changed, 84 insertions, 0 deletions
diff --git a/dev-libs/libstrophe/Manifest b/dev-libs/libstrophe/Manifest
new file mode 100644
index 000000000000..e5c1bc327adc
--- /dev/null
+++ b/dev-libs/libstrophe/Manifest
@@ -0,0 +1 @@
+DIST libstrophe-0.9.2.tar.gz 500459 BLAKE2B 0b1f6f1daac1215bcdcbde0e54264b98f5a863de339500826f625f8c5e8143ce7200fb251d04248715e9a8b6621a4360e7ca2780bf4684d916ec13361b5f6fcc SHA512 a0129c49ca574afaefa77c412143571af2eb1100c7d737d497b65d44680d35e2404ee2d4d4e1378b06ac1bcc5c587f505f79fea9251af1cbb36afd990d48570d
diff --git a/dev-libs/libstrophe/files/libstrophe-0.9.2-libressl.patch b/dev-libs/libstrophe/files/libstrophe-0.9.2-libressl.patch
new file mode 100644
index 000000000000..1c0cf239cdfc
--- /dev/null
+++ b/dev-libs/libstrophe/files/libstrophe-0.9.2-libressl.patch
@@ -0,0 +1,20 @@
+--- 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);
+
diff --git a/dev-libs/libstrophe/libstrophe-0.9.2.ebuild b/dev-libs/libstrophe/libstrophe-0.9.2.ebuild
new file mode 100644
index 000000000000..f95cbfb67f5e
--- /dev/null
+++ b/dev-libs/libstrophe/libstrophe-0.9.2.ebuild
@@ -0,0 +1,46 @@
+# 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
+}
diff --git a/dev-libs/libstrophe/metadata.xml b/dev-libs/libstrophe/metadata.xml
new file mode 100644
index 000000000000..66bfa18199e7
--- /dev/null
+++ b/dev-libs/libstrophe/metadata.xml
@@ -0,0 +1,17 @@
+<?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>