app-crypt/libb2: Add the package as a dev-lang/python-3.11 dependency

This commit is contained in:
krishjainx 2023-07-05 11:27:12 +02:00 committed by Krzesimir Nowak
parent 06704ee646
commit 3bb67d01dc
5 changed files with 181 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST libb2-0.98.1.tar.gz 280826 BLAKE2B aa8c3dee3032f457410479be12d00c79a6ca6a7c0376a5c70265d30ff25b50663171f7096141834d4faa4dd5027f38b23b774e59be63475a3ecba855337fb1aa SHA512 a666fdbd1efa9cfff3028e953c62f21ba092c6733ccd12d4d04f1f836fc9747fc90053bc9166510d251d332b91e133853d2cc9b61c279517bd65b05e8483250b

View File

@ -0,0 +1,16 @@
https://bugs.gentoo.org/704044#c8
Patch by Alexey
--- a/src/Makefile.am 2020-04-26 11:16:22.354103351 +0100
+++ b/src/Makefile.am 2020-04-26 11:16:31.584080899 +0100
@@ -18,8 +18,7 @@ LDFLAGS += -version-info $(B2_LIBRARY_VE
lib_LTLIBRARIES = libb2.la
libb2_la_LIBADD = # -lgomp -lpthread
libb2_la_CPPFLAGS = -DSUFFIX= \
- $(LTDLINCL) \
- ${top_builddir}/src/
+ $(LTDLINCL)
include_HEADERS = blake2.h

View File

@ -0,0 +1,69 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib-minimal toolchain-funcs
DESCRIPTION="C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp"
HOMEPAGE="https://github.com/BLAKE2/libb2"
GITHASH="73d41c8255a991ed2adea41c108b388d9d14b449"
SRC_URI="https://github.com/BLAKE2/libb2/archive/${GITHASH}.tar.gz -> ${P}.tar.gz"
LICENSE="CC0-1.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static-libs native-cflags openmp"
DEPEND="
openmp? (
|| ( >=sys-devel/gcc-4.2:*[openmp] sys-devel/clang-runtime:*[openmp] )
)
"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${PN}-${GITHASH}
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
src_prepare() {
default
# fix bashism
sed -i -e 's/ == / = /' configure.ac || die
# https://github.com/BLAKE2/libb2/pull/28
echo 'libb2_la_LDFLAGS = -no-undefined' >> src/Makefile.am || die
eautoreconf # upstream doesn't make releases
}
multilib_src_configure() {
ECONF_SOURCE=${S} \
econf \
$(use_enable static-libs static) \
$(use_enable native-cflags native) \
$(use_enable openmp)
}
do_make() {
# respect our CFLAGS when native-cflags is not in effect
local openmp=$(use openmp && echo -fopenmp)
emake $(use native-cflags && echo no)CFLAGS="${CFLAGS} ${openmp}" "$@"
}
multilib_src_compile() {
do_make
}
multilib_src_test() {
do_make check
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -name '*.la' -type f -delete || die
}

View File

@ -0,0 +1,71 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools multilib-minimal toolchain-funcs
DESCRIPTION="C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp"
HOMEPAGE="https://github.com/BLAKE2/libb2"
GITHASH="73d41c8255a991ed2adea41c108b388d9d14b449"
SRC_URI="https://github.com/BLAKE2/libb2/archive/${GITHASH}.tar.gz -> ${P}.tar.gz"
LICENSE="CC0-1.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="static-libs native-cflags openmp"
DEPEND="
openmp? (
|| ( >=sys-devel/gcc-4.2:*[openmp] sys-devel/clang-runtime:*[openmp] )
)
"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${PN}-${GITHASH}
PATCHES=( "${FILESDIR}"/${P}-distcc.patch )
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}
src_prepare() {
default
# fix bashism
sed -i -e 's/ == / = /' configure.ac || die
# https://github.com/BLAKE2/libb2/pull/28
echo 'libb2_la_LDFLAGS = -no-undefined' >> src/Makefile.am || die
eautoreconf # upstream doesn't make releases
}
multilib_src_configure() {
ECONF_SOURCE=${S} \
econf \
$(use_enable static-libs static) \
$(use_enable native-cflags native) \
$(use_enable openmp)
}
do_make() {
# respect our CFLAGS when native-cflags is not in effect
local openmp=$(use openmp && echo -fopenmp)
emake $(use native-cflags && echo no)CFLAGS="${CFLAGS} ${openmp}" "$@"
}
multilib_src_compile() {
do_make
}
multilib_src_test() {
do_make check
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -name '*.la' -type f -delete || die
}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>grobian@gentoo.org</email>
<name>Fabian Groffen</name>
</maintainer>
<longdescription lang="en">
C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp
Official implementations from BLAKE2 project.
</longdescription>
<use>
<flag name="native-cflags">
Use CFLAGS as determined by configure script. These flags will
enable all CPU specific features it find available, to further
optimise the implementation. This discards any existing CFLAGS
set in make.conf or similar.
</flag>
</use>
<upstream>
<remote-id type="github">BLAKE2/libb2</remote-id>
</upstream>
</pkgmetadata>