aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Retornaz <gentoo@retornaz.com>2021-01-17 19:04:00 +0100
committerQuentin Retornaz <gentoo@retornaz.com>2021-01-26 01:21:41 +0100
commita897e7f04eadf2e3c91b411196a676d43d3e1bfe (patch)
tree1a67ce55ab82ba8146af5b5c02159d569c188ce6 /dev-libs/libstrophe
parentdev-lang/rust: new package (diff)
downloadlibressl-a897e7f04eadf2e3c91b411196a676d43d3e1bfe.tar.gz
libressl-a897e7f04eadf2e3c91b411196a676d43d3e1bfe.tar.bz2
libressl-a897e7f04eadf2e3c91b411196a676d43d3e1bfe.zip
dev-libs/libstrophe: new package
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Quentin Retornaz <gentoo@retornaz.com>
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.ebuild52
-rw-r--r--dev-libs/libstrophe/metadata.xml17
4 files changed, 90 insertions, 0 deletions
diff --git a/dev-libs/libstrophe/Manifest b/dev-libs/libstrophe/Manifest
new file mode 100644
index 0000000..e5c1bc3
--- /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 0000000..1c0cf23
--- /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 0000000..830c91b
--- /dev/null
+++ b/dev-libs/libstrophe/libstrophe-0.9.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2021 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' -o -name '*.a' -delete || die
+}
+
+# Explicit src_test is there to document that the test suite is integrated and
+# is expected to pass. Please do not remove.
+src_test() {
+ emake check
+}
diff --git a/dev-libs/libstrophe/metadata.xml b/dev-libs/libstrophe/metadata.xml
new file mode 100644
index 0000000..66bfa18
--- /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>