diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2020-07-03 08:47:10 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2020-07-03 08:52:55 -0400 |
commit | 5a1586848baca789fa347ed10c39dea5c8b4be7f (patch) | |
tree | 5779a6646599b680733522a8ce9892c8bc5b8f47 /net-libs | |
parent | app-text/texlive: remove cjk-latex (diff) | |
download | gentoo-5a1586848baca789fa347ed10c39dea5c8b4be7f.tar.gz gentoo-5a1586848baca789fa347ed10c39dea5c8b4be7f.tar.bz2 gentoo-5a1586848baca789fa347ed10c39dea5c8b4be7f.zip |
net-libs/mbedtls: version bump to 2.16.7 and 2.23.0
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/mbedtls/Manifest | 2 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.16.7.ebuild | 94 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.23.0.ebuild | 94 |
3 files changed, 190 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest index 403c222c2c1f..89246f269a35 100644 --- a/net-libs/mbedtls/Manifest +++ b/net-libs/mbedtls/Manifest @@ -1,2 +1,4 @@ DIST mbedtls-2.16.6.tar.gz 2603563 BLAKE2B a4011bb2b7e3eca554cded05c4650fc16b48d86ae1ac7fefe29df6b29e38c1e76c880f082be83759b4dddd96f831a1238c2df41671bd9794b028402b3dd63f60 SHA512 a4c2e70c0cc6b1f1571a9f2ec27ede2620eb1937361599cab0e05b807068397d25695d5cd23931fd0f4cc051de6367c2b6c77f3507ed8b33cd492589c51eebac +DIST mbedtls-2.16.7.tar.gz 2658294 BLAKE2B cb53ac0c8896ce0dcc2b54edf4964267bf27057fead00f82f15de0ead786efcb4ba7e554e1c06ccb8a0f9fdedd512d94dce74a7a6e093c0a488ef257ded1458a SHA512 57374061ec8ec7cbb745aa08235d17d4566435c7ad861c0a9fdc8957e09c1ea6619f0deb8a22040fa3674d0fab58ca353879eac1388e710c81840a7ae1225b9f DIST mbedtls-2.22.0.tar.gz 3822997 BLAKE2B 0857479e89f9850f611cb8c946c489f715a83edba88673b874cd3e6530a7f72c48671e02435087a48aa9a550d0901a5fd2990f9b3a4d69edceecf1fa01772ab6 SHA512 391b99a59ed4edf9625e71e610ea71c6cefa4ea1210d306eb595d85f7408d5decf5fc995d4a411698f1536651ee1230b305dd354df15dbeef9469aa6a7980e09 +DIST mbedtls-2.23.0.tar.gz 3877508 BLAKE2B 501aee4ec19d9b52f4c3e56b821a00ff592c28ed188f9f192e83a6cd777428eafdc6b2cba3eef20bff5e1b9dc3abd43fbd4f102529ef920e11663703799f4626 SHA512 c2a04f659bf63522f10f6660c2d196d7f39a057ff5a382734ba3b839f463ead4e5c9bc0d21fb909d56fcd2ee4c711248be14861f388cd383385484d364247634 diff --git a/net-libs/mbedtls/mbedtls-2.16.7.ebuild b/net-libs/mbedtls/mbedtls-2.16.7.ebuild new file mode 100644 index 000000000000..bb6b5856b8b4 --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.16.7.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils 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/12" # slot for libmbedtls.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-utils_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-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_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-utils_src_test +} + +multilib_src_install() { + cmake-utils_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 +} diff --git a/net-libs/mbedtls/mbedtls-2.23.0.ebuild b/net-libs/mbedtls/mbedtls-2.23.0.ebuild new file mode 100644 index 000000000000..0cd3b924ce01 --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.23.0.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils 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/13" # slot for libmbedtls.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-utils_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-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_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-utils_src_test +} + +multilib_src_install() { + cmake-utils_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 +} |