logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 4db42b87d10094f2ee38b1a14c8e2c4832786aa4
parent 9a4231a46f356cccd02080734df453facf940794
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 21 Jun 2024 14:45:08 +0200

dev-libs/bearssl: new package, add 0.6

Diffstat:

Adev-libs/bearssl/Manifest1+
Adev-libs/bearssl/bearssl-0.6.ebuild52++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-libs/bearssl/files/libbearssl.pc.in9+++++++++
3 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/dev-libs/bearssl/Manifest b/dev-libs/bearssl/Manifest @@ -0,0 +1 @@ +DIST bearssl-0.6.tar.gz 765094 BLAKE2B aa7501206c66936d4c68cbc6c8d8b814e051fa0d1d37918ebdbdcfa71c52a44c9129f98eda79357cc1d87d9b6c2e70a15bc6f0c45f377b1d226725c1dbc79da6 SHA512 f9ed25683cfc6c4abe7f1203a2b82ed101ee4c9e0f9ab60755b6a09c8d1e8e4f64d413624e7bb9c4b0033f909a2e4568a1d916cc6ce4736222900691e1f8359a diff --git a/dev-libs/bearssl/bearssl-0.6.ebuild b/dev-libs/bearssl/bearssl-0.6.ebuild @@ -0,0 +1,52 @@ +# Copyright 2024 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Implementation of the SSL/TLS protocol in C" +HOMEPAGE="https://bearssl.org/" +SRC_URI="https://bearssl.org/${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="static-libs" + +src_compile() { + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" CFLAGS="$CFLAGS" \ + LD="$(tc-getCC)" LDFLAGS="$CFLAGS" \ + LDDLL="$(tc-getCC)" LDDLLFLAGS="$CFLAGS $LDFLAGS -shared -Wl,-soname,libbearssl.so.${PV%%.*}" \ + D=".so.$PV" +} + +src_test() { + cd "${S}/build" || die + ./testx509 || die + ./testcrypto all || die +} + +src_install() { + libdir="${ED}/usr/$(get_libdir)/" + + dobin build/brssl + + doheader -r inc/* + + mkdir -p "$libdir" || die + cp -f build/libbearssl.so.$PV "$libdir/" || die + ln -s libbearssl.so.$PV "$libdir/libbearssl.so.${PV%%.*}" || die + ln -s libbearssl.so.$PV "$libdir/libbearssl.so" || die + if use static-libs; then + cp -f build/libbearssl.a "$libdir/" || die + fi + + mkdir -p "$libdir/pkgconfig/" || die + sed \ + -e "s;@PREFIX@;${EPREFIX}/usr;" \ + -e "s;@VERSION@;${PV};" \ + "${FILESDIR}/libbearssl.pc.in" > "${libdir}/pkgconfig/libbearssl.pc" || die +} diff --git a/dev-libs/bearssl/files/libbearssl.pc.in b/dev-libs/bearssl/files/libbearssl.pc.in @@ -0,0 +1,9 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${prefix}/lib +Name: libbearssl +Version: @VERSION@ +Description: The BearSSL implementation of the SSL/TLS protocol +Cflags: -I${includedir} +Libs: -L${libdir} -lbearssl