diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2021-03-13 11:24:46 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2021-03-13 11:24:59 -0500 |
commit | 3f6c0258b47021a1bce96c3412dc868144a2d429 (patch) | |
tree | f4130cf8548582446289df584c39629af713955c /net-libs/mbedtls/mbedtls-2.16.10.ebuild | |
parent | media-sound/strawberry: Removed old (diff) | |
download | gentoo-3f6c0258b47021a1bce96c3412dc868144a2d429.tar.gz gentoo-3f6c0258b47021a1bce96c3412dc868144a2d429.tar.bz2 gentoo-3f6c0258b47021a1bce96c3412dc868144a2d429.zip |
net-libs/mbedtls: version bump to 2.16.10, 2.26.0
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'net-libs/mbedtls/mbedtls-2.16.10.ebuild')
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.16.10.ebuild | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/net-libs/mbedtls/mbedtls-2.16.10.ebuild b/net-libs/mbedtls/mbedtls-2.16.10.ebuild new file mode 100644 index 000000000000..324eaa4202fa --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.16.10.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake multilib-minimal + +DESCRIPTION="Cryptographic library for embedded systems" +HOMEPAGE="https://tls.mbed.org/" +SRC_URI="https://github.com/ARMmbed/mbedtls/archive/${P}.tar.gz" +S=${WORKDIR}/${PN}-${P} + +LICENSE="Apache-2.0" +SLOT="0/3.12.0" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so} +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="cpu_flags_x86_sse2 doc havege libressl programs -static-libs test threads zlib" +RESTRICT="!test? ( test )" + +RDEPEND=" + programs? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen media-gfx/graphviz ) + test? ( dev-lang/perl )" + +enable_mbedtls_option() { + local myopt="$@" + # check that config.h syntax is the same at version bump + sed -i \ + -e "s://#define ${myopt}:#define ${myopt}:" \ + include/mbedtls/config.h || die +} + +src_prepare() { + use cpu_flags_x86_sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2 + use zlib && enable_mbedtls_option MBEDTLS_ZLIB_SUPPORT + use havege && enable_mbedtls_option MBEDTLS_HAVEGE_C + use threads && enable_mbedtls_option MBEDTLS_THREADING_C + use threads && enable_mbedtls_option MBEDTLS_THREADING_PTHREAD + + cmake_src_prepare +} + +multilib_src_configure() { + local mycmakeargs=( + -DENABLE_PROGRAMS=$(multilib_native_usex programs) + -DENABLE_ZLIB_SUPPORT=$(usex zlib) + -DUSE_STATIC_MBEDTLS_LIBRARY=$(usex static-libs) + -DENABLE_TESTING=$(usex test) + -DUSE_SHARED_MBEDTLS_LIBRARY=ON + -DINSTALL_MBEDTLS_HEADERS=ON + -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" + ) + + cmake_src_configure +} + +multilib_src_compile() { + cmake_src_compile + use doc && multilib_is_native_abi && cd "${S}" && emake apidoc +} + +multilib_src_test() { + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}/library" \ + cmake_src_test +} + +multilib_src_install() { + cmake_src_install +} + +multilib_src_install_all() { + use doc && HTML_DOCS=( apidoc ) + + einstalldocs + + if use programs ; then + # avoid file collisions with sys-apps/coreutils + local p e + for p in "${ED}"/usr/bin/* ; do + if [[ -x "${p}" && ! -d "${p}" ]] ; then + mv "${p}" "${ED}"/usr/bin/mbedtls_${p##*/} || die + fi + done + for e in aes hash pkey ssl test ; do + docinto "${e}" + dodoc programs/"${e}"/*.c + dodoc programs/"${e}"/*.txt + done + fi +} |