summaryrefslogtreecommitdiff
path: root/net-libs/libomemo
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libomemo')
-rw-r--r--net-libs/libomemo/Manifest4
-rw-r--r--net-libs/libomemo/files/libomemo-0.7.1-so-symlinks.patch25
-rw-r--r--net-libs/libomemo/libomemo-0.7.1-r2.ebuild55
-rw-r--r--net-libs/libomemo/metadata.xml8
4 files changed, 92 insertions, 0 deletions
diff --git a/net-libs/libomemo/Manifest b/net-libs/libomemo/Manifest
new file mode 100644
index 000000000000..f16699730037
--- /dev/null
+++ b/net-libs/libomemo/Manifest
@@ -0,0 +1,4 @@
+AUX libomemo-0.7.1-so-symlinks.patch 1055 BLAKE2B 9dac207e32fb339f52e25571eb3381f2486f5427857dd238f619a841b01db34c9b79708119724af7d2aad2fe5f285925e3be174350f934b166dd3a4794585052 SHA512 d7bf4c51fde4de7e478e44cbc63b8f90f2d6fc357d66ac5d8e8999f03e411257a392284944164d5dfa5388a191c1aba11b8d551c611403a026f1ed0dacdfbca6
+DIST libomemo-0.7.1.tar.gz 23770 BLAKE2B a3909650e399075f62026bd048a667a276a6cd7197ac18ddf9e3c12f57e5fd9cb2f5532ba69d0836af87e1415a5ffdc1746cf90a596dcf255265a64e921f039d SHA512 e5769dee4db7be246853e47e29ded9eefad2f62422951ce5dd0c1acee3bb92131c0423f09bc716be0f55fb02c747f07a6d5b2c656bdfeee0ee148252c51a1050
+EBUILD libomemo-0.7.1-r2.ebuild 1086 BLAKE2B e043afbd7347e7feaeb3c868a1f6543b8666df8923a7cedbf186b50ee6099ceebc2f8952ac8b98620fd6b80e5894496129f2b6b8158b1c1bc8ff483b7c2c83d5 SHA512 ee743c91e7d90005c04804b6daada3d37ba8cec19d498eefd3feda0d721277e26dd4123a8ed4a0a4fbde8b884cf50533bffdd07d4c357bb4831c690285008ad4
+MISC metadata.xml 249 BLAKE2B a4931a30c3947b238913053d611639235b076475e864914e684020d86ee1b4aa6da94e4cef59c53a0e5ccd3b3d15d3a4ae293800b17bbb89e0af9cff79314a70 SHA512 b1cb770984baef468e3d17e343acff395e1993b14f90def7f8582b5e5d1a512bd3c7727e03f1deca47f7359a8f8cc9a8360130923388a5c06fabbfb9b05d5138
diff --git a/net-libs/libomemo/files/libomemo-0.7.1-so-symlinks.patch b/net-libs/libomemo/files/libomemo-0.7.1-so-symlinks.patch
new file mode 100644
index 000000000000..69f174a75ecf
--- /dev/null
+++ b/net-libs/libomemo/files/libomemo-0.7.1-so-symlinks.patch
@@ -0,0 +1,25 @@
+From 3911dc9d496f61b774d091bd1f2394d458abe8d7 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 21 Feb 2021 20:51:01 +0100
+Subject: [PATCH] Add missing symlinks libomemo.so.$(VER_MAJ) and libomemo.so
+
+---
+ Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index e7b9ea6..289d2ec 100644
+--- a/Makefile
++++ b/Makefile
+@@ -108,6 +108,8 @@ install: $(BDIR)
+ install -d $(DESTDIR)/$(PREFIX)/lib/$(ARCH)/pkgconfig/
+ install -m 644 $(BDIR)/libomemo-conversations.a $(DESTDIR)/$(PREFIX)/lib/$(ARCH)/libomemo.a
+ install -m 644 $(BDIR)/libomemo.so $(DESTDIR)/$(PREFIX)/lib/$(ARCH)/libomemo.so.$(VERSION)
++ ln -s libomemo.so.$(VERSION) $(DESTDIR)/$(PREFIX)/lib/$(ARCH)/libomemo.so.$(VER_MAJ)
++ ln -s libomemo.so.$(VERSION) $(DESTDIR)/$(PREFIX)/lib/$(ARCH)/libomemo.so
+ install -m 644 $(BDIR)/libomemo.pc $(DESTDIR)/$(PREFIX)/lib/$(ARCH)/pkgconfig/
+ install -d $(DESTDIR)/$(PREFIX)/include/libomemo/
+ install -m 644 $(SDIR)/libomemo_crypto.h $(DESTDIR)/$(PREFIX)/include/libomemo/
+--
+2.30.1
+
diff --git a/net-libs/libomemo/libomemo-0.7.1-r2.ebuild b/net-libs/libomemo/libomemo-0.7.1-r2.ebuild
new file mode 100644
index 000000000000..2350a7e5f4dd
--- /dev/null
+++ b/net-libs/libomemo/libomemo-0.7.1-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Implementation of OMEMO (XEP-0384) in C"
+HOMEPAGE="https://github.com/gkdr/libomemo"
+SRC_URI="https://github.com/gkdr/libomemo/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs test"
+
+RDEPEND="
+ dev-db/sqlite
+ dev-libs/glib
+ dev-libs/libgcrypt
+ dev-libs/mxml
+ "
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-util/cmocka )
+ "
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-so-symlinks.patch
+)
+
+DOCS=( CHANGELOG.md README.md )
+
+src_compile() {
+ emake PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ # Respect libdir other than /usr/lib, e.g. /usr/lib64
+ local libdir="$(get_libdir)"
+ if [[ ${libdir} != lib ]]; then
+ mv "${D}"/usr/{lib,${libdir}} || die
+ sed "s|^libdir=.*|libdir=\${prefix}/${libdir}|" \
+ -i "${D}/usr/${libdir}/pkgconfig/libomemo.pc" || die
+ fi
+
+ einstalldocs
+
+ if ! use static-libs ; then
+ rm "${D}/usr/${libdir}/libomemo.a" || die
+ fi
+}
diff --git a/net-libs/libomemo/metadata.xml b/net-libs/libomemo/metadata.xml
new file mode 100644
index 000000000000..ab886b7f0382
--- /dev/null
+++ b/net-libs/libomemo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+</pkgmetadata>