diff options
Diffstat (limited to 'net-libs/mbedtls')
-rw-r--r-- | net-libs/mbedtls/Manifest | 4 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.28.1.ebuild | 102 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-3.2.1.ebuild | 96 |
3 files changed, 202 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest index 052979645ccf..35b86be5fd45 100644 --- a/net-libs/mbedtls/Manifest +++ b/net-libs/mbedtls/Manifest @@ -1,7 +1,11 @@ DIST mbedtls-2.16.12.tar.gz 2702190 BLAKE2B 3cbe0bcfd0eca279d9b4b3816416b8e778f0aa38d368d810701e65140f0d1524afabe4fd1a1a65297f872a7dfafb7d2feeb7382fe8ea2b180f24551ceac53c26 SHA512 40c4487cc40afcf929bc7158d735a869ebada41c811f63a10d74e9b9644960e2a0aeb7c7c9841c0aef815425990847d47e7f42f9bafe0b2a959e769e3d74ebe9 DIST mbedtls-2.28.0.tar.gz 3712239 BLAKE2B 1141465bc5b73e7fd94bbd02c79290093fd075626be93aea839a54ebff81fb00917f0a4fe7911fee983a36147fa4922d258714a330b40b0da4764a3b2419df8b SHA512 2ddc161caeebe8bf1e8cf23c398f65ceff699eb6487a7bcaf6a665879aac5458e21e26b06370085cbdae6ce6b5394afece656aa6307bbb3f5b701bcb41f3dd64 +DIST mbedtls-2.28.1.tar.gz 3914438 BLAKE2B 85969895b50b63537438e0b67e1dec97a0ee4ac188c55ebcb109d5e0cc8f4a3f66f016b2ac5f920d7b10f094c9626029d19ab86be0cb5941224a7f3eed2dcc06 SHA512 cc75027ebbefb4ba1aecdc386cf6b60cceeceda79a474ff5ba67411e41aac9fc2c43c2fb0158be667f1b91e6c19082e17e4e61409acc1498b568f5efc7b00a2c DIST mbedtls-3.1.0.tar.gz 3766628 BLAKE2B a52e8fb9a3b88c1cf7cb0c8f5598f90a1c9ca05dbc399432293c3acb77aaf0a1b92a9792bda986b47e925736b21c83de1c891b21d45fd2dc8cb5d7d1b09168e7 SHA512 c374fafad89f8793ed1a302634a403b855317d9759377d4bade13c61857d0317a2fc144ab3a9aaee52901ff7a3c4b4b0e7e81ebe5510ab4d228103def01ae628 +DIST mbedtls-3.2.1.tar.gz 4097571 BLAKE2B 4f33172c9c7a3ffbad6600c41d9b574a79e512ec417c3ec90a04085cce393456e8502e94150094bc80a217c352c8148d67bdab1bf0cb311c8dc88d653475a003 SHA512 e7f1726d2cdae6c580d588b40c8a51b9e353786efdd2e50fd1c11c7f46a2b6fe2622cfe2ee5cf998ec762b5ebf8f4720cfc1a1ecaebc497489f9d6a263a83523 EBUILD mbedtls-2.16.12.ebuild 2646 BLAKE2B d3ec300834294fa08d45e57f47f970f3c69b903ceea0b83a9a65ad19ae79570f94876583c39e1a88269f6a08c768524c1c4a1261bffc77ad46189f4d4152b81c SHA512 07c7991767aaee6d291ae6dc313eb49d9344aca3b9cd9aa76cd5110d3a71f394074cb6f83b6e785c2eedaf5f63d4a491280a4a9533a678a62627202c5293cabb EBUILD mbedtls-2.28.0-r1.ebuild 2720 BLAKE2B 781b05a071956af3239ce4de1a6de608019154aa60160baffe16e16cadafc0df6a0ec051147651a795c3a6b42fdf95f5aea10e4df0adc7751163c12fe723f4ab SHA512 f8b02c202c3a59d345be3109a1d7cff9ced43977ef207f30d8c09d4a1191fed238c76f892651b1b698ab115580b5e8031587b3df0a629c59a0d26d1764c0e5c6 +EBUILD mbedtls-2.28.1.ebuild 2727 BLAKE2B 2f1efed1ef2849c1f4a88f9a59ad9c984c76940459d7d6847168b7e9f3413f7cffb2b2b5b43763d3e366fcce1c786f9ee4946bd447bf9077c4603ec2ad858265 SHA512 92c5c1baf45956c27e02eaf3455aa7496b640fafdfd5cfeded68f14cefa738cf69f09d72aa6fa583a1f42d2d5a64b95152c5d3cdbac8a675ee951289cfb25024 EBUILD mbedtls-3.1.0.ebuild 2416 BLAKE2B 1f10d91faee5f4d8db8a3dd82da4308e156a280ffd1860764726189212cda26f5d4c8f71abf2de81002c16b5335f39ba5a08605c9eb023668cb25b7b6bb6add1 SHA512 95baf23bb04e80b76c4a394d30712a28dd7575b68aa84730b9293733492dc463b6b3533c620608551828d3c48c39a2b7eccf7832ac4e59afffb06b0b550285fa +EBUILD mbedtls-3.2.1.ebuild 2416 BLAKE2B e1ec53b24f5af4e5af4470e7163599b454944b207573d2ee551422cbc862e1c9216b3688330f71f28d39fc1906ce6351b92755b4b28c125f79dd958365220555 SHA512 21bbdcb3c0f4366ca2859e1ea799f9a85e3c98768eaf387c5861856a4e621204653452ee64ef4eff26dffcc767902092ba2bfba909cff42e468161b3f5f48814 MISC metadata.xml 847 BLAKE2B a79da594cc8f9491335ebef15bdbf2255e1d02780d3434779f51ccb8dcc319c350205dd6eee75143e50c79c987c50045db374442425a2cf582faf1e5c0ad8b92 SHA512 574394f0955d67f13524a5ea411249dd63e6b313f144e0f6b2e2b44bb0d6d311e93fd44a386174dc8f2f4960105e396b74f60e7c2fd1dea3ac3b493a862820a4 diff --git a/net-libs/mbedtls/mbedtls-2.28.1.ebuild b/net-libs/mbedtls/mbedtls-2.28.1.ebuild new file mode 100644 index 000000000000..fdc66cd3d99e --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.28.1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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/7.14.1" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so} +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="cmac cpu_flags_x86_sse2 doc havege programs static-libs test threads zlib" +RESTRICT="!test? ( test )" + +RDEPEND=" + programs? ( + dev-libs/openssl: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 cmac && enable_mbedtls_option MBEDTLS_CMAC_C + 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)" + -DMBEDTLS_FATAL_WARNINGS=OFF # Don't use -Werror, #744946 + ) + + cmake_src_configure +} + +multilib_src_compile() { + cmake_src_compile + use doc && multilib_is_native_abi && cd "${S}" && emake apidoc +} + +multilib_src_test() { + # psa isn't ready yet, it might be in 3.x(?) but certainly not + # at the moment. + # bug #718390 + local myctestargs=( + -E "(psa_crypto|psa_its-suite)" + ) + + 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 +} diff --git a/net-libs/mbedtls/mbedtls-3.2.1.ebuild b/net-libs/mbedtls/mbedtls-3.2.1.ebuild new file mode 100644 index 000000000000..dea83674c2e2 --- /dev/null +++ b/net-libs/mbedtls/mbedtls-3.2.1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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/12.18.4" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so} +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="cpu_flags_x86_sse2 doc programs static-libs test threads" +RESTRICT="!test? ( test )" + +RDEPEND=" + programs? ( + dev-libs/openssl:0= + )" +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/mbedtls_config.h || die +} + +src_prepare() { + use cpu_flags_x86_sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2 + 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) + -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)" + -DMBEDTLS_FATAL_WARNINGS=OFF # Don't use -Werror, #744946 + ) + + cmake_src_configure +} + +multilib_src_compile() { + cmake_src_compile + use doc && multilib_is_native_abi && cd "${S}" && emake apidoc +} + +multilib_src_test() { + # psa isn't ready yet, even in 3.0.0. + # bug #718390 + local myctestargs=( + -E "(psa_crypto|psa_its-suite)" + ) + + 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 +} |