summaryrefslogtreecommitdiff
path: root/net-libs/libaxc
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libaxc')
-rw-r--r--net-libs/libaxc/Manifest1
-rw-r--r--net-libs/libaxc/libaxc-0.3.7-r1.ebuild75
2 files changed, 76 insertions, 0 deletions
diff --git a/net-libs/libaxc/Manifest b/net-libs/libaxc/Manifest
index 1f39f28752e6..87c8759c42cf 100644
--- a/net-libs/libaxc/Manifest
+++ b/net-libs/libaxc/Manifest
@@ -6,5 +6,6 @@ DIST libaxc-0.3.7.tar.gz 41742 BLAKE2B e43220745cbf1e3f375c69218cc0c5bc944e2fbfd
EBUILD libaxc-0.3.4-r2.ebuild 1253 BLAKE2B cfd715172d69015bafbd4ae41104a749fbfd0fede1c222beb4e3ad60770e6c394beff7af2d0e32edad3a88b5ae31c9fe00cccc892d655dd5f2600fbe98e88bdd SHA512 2c244b826eb7a25cd16040b1347561f973fb3cf0c7208f6d7312ef4c4f87d8cb44cfa9faca442e296bc70cac6bda0a35862f577df1ae8d96ab36c9e937c39b60
EBUILD libaxc-0.3.5.ebuild 1204 BLAKE2B 3c3e6e7455583ed2a383a3e0415de5437e8fb3180db49b2db769bae4d10953adbdddb8a18db6fc56be7d5399cc5a1654a6216accef7bd67dc3f5206d997a1ed4 SHA512 06c75949deb1b84ba27224849d867021e8831aeab2bf6d8054ea70c1820f633c060da6d450c0d00b715c357c13b5753a974449ea9ec1750d391bcc53684a64b1
EBUILD libaxc-0.3.6.ebuild 1498 BLAKE2B 895c99d15610ceaebfd12ea57b776e52a41dbd487615d5683eef5da36a7f40a15c44b40ad1b72dcd3de87f3aefcde5c45fafa92e985f2b4a1383f1332537212c SHA512 17ba494678d9a7f4f590c62f1dadfa67f6b46b3c1115fdb326afa5812c81da1dc7591a0354e15675bc77289b7d2d53f0a8bf923163601209703495a93dc4432e
+EBUILD libaxc-0.3.7-r1.ebuild 1515 BLAKE2B 7754597346961209142decbd22fa4527d8a0b30f058fae77ab871a6ec17b9ef613ed247146354383e4a51652373a79e4686d5667d52e65d7e9a84f034d2d7d99 SHA512 e44b6d4642368a5a051667796f12e257047c05e919cb9bfc05984b86a23fc4f89429b4880f1129382238c94fc04dc9b12dd12c6aefc301478cb3d32e257967bf
EBUILD libaxc-0.3.7.ebuild 1500 BLAKE2B 23a7dfeee0cc5647d98502906703e88f8ea1ef271e24dc26e74f4adc31a631f810ca7357682e074863b47b0fb2ad80dc7cf08ab51d2bd1d6a7ed3a08964add53 SHA512 bc701aa1347bbcb19020a604f4f33bcad2b0df6f1d4ac30bf19b30517c91ea4543596d6311fcd738673e7b9a009172d2d0e0ed069516081387e4858b7df5b786
MISC metadata.xml 250 BLAKE2B 2bc2e14adc90cf0097dec7f5c2eeeaebecbd404252555385c3455d81ea3a22eecc3dc27aa17699ab500fdfcb737f58a6cc981aeb691fe6266537c290655ca54f SHA512 913641ea55e6cbeb7ca80b13ed2161dd3d22e6d2f59408bf272c4a79e4590b4f2c726f4025d190e58617e262313fbf9ba0892b72773e4769466f812b5c009374
diff --git a/net-libs/libaxc/libaxc-0.3.7-r1.ebuild b/net-libs/libaxc/libaxc-0.3.7-r1.ebuild
new file mode 100644
index 000000000000..e217a88d83cf
--- /dev/null
+++ b/net-libs/libaxc/libaxc-0.3.7-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+MY_P="axc-${PV}"
+DESCRIPTION="Client library for libsignal-protocol-c"
+HOMEPAGE="https://github.com/gkdr/axc"
+SRC_URI="https://github.com/gkdr/axc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3" # not GPL-3+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs test"
+
+RDEPEND="
+ dev-db/sqlite
+ dev-libs/glib
+ dev-libs/libgcrypt
+ net-libs/libsignal-protocol-c
+ "
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka )
+ "
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}"/${MY_P}
+RESTRICT="!test? ( test )"
+
+DOCS=( CHANGELOG.md README.md )
+
+src_prepare() {
+ rm -R lib || die # unbundle libsignal-protocol-c
+ default
+}
+
+src_compile() {
+ local make_args=(
+ PREFIX=/usr
+
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ PKG_CONFIG="$(tc-getPKG_CONFIG)"
+
+ ARCH=
+ )
+ emake "${make_args[@]}"
+}
+
+src_test() {
+ # TODO: Test failures seem to be ignored in the upstream Makefile?
+ # e.g. https://github.com/gkdr/axc/blob/master/Makefile#L153
+ emake CC="$(tc-getCC)" test
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr ARCH= install
+
+ # Respect libdir other than /usr/lib, e.g. /usr/lib64
+ local libdir="$(get_libdir)"
+ if [[ ${libdir} != lib ]]; then
+ mv "${ED}"/usr/{lib,${libdir}} || die
+ sed "s|^libdir=.*|libdir=\${prefix}/${libdir}|" \
+ -i "${ED}/usr/${libdir}/pkgconfig/libaxc.pc" || die
+ fi
+
+ einstalldocs
+
+ if ! use static-libs ; then
+ rm "${ED}/usr/${libdir}/libaxc.a" || die
+ fi
+}