summaryrefslogtreecommitdiff
path: root/net-libs/mbedtls
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-08 12:03:01 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-08 12:03:01 +0100
commit522fa4e6f267ba688a264ceec8d6c79663b61219 (patch)
tree67895f3a8243148309fbd841dabba28c37f4ed4a /net-libs/mbedtls
parent32c16465e56b0122cf6e5a4625e9c7b56b107b07 (diff)
gentoo auto-resync : 08:10:2023 - 12:03:01
Diffstat (limited to 'net-libs/mbedtls')
-rw-r--r--net-libs/mbedtls/Manifest4
-rw-r--r--net-libs/mbedtls/mbedtls-2.28.5.ebuild109
-rw-r--r--net-libs/mbedtls/mbedtls-3.5.0.ebuild103
3 files changed, 216 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest
index a3c1ca4b8fc7..1513e23373e6 100644
--- a/net-libs/mbedtls/Manifest
+++ b/net-libs/mbedtls/Manifest
@@ -1,5 +1,9 @@
DIST mbedtls-2.28.1.tar.gz 3914438 BLAKE2B 85969895b50b63537438e0b67e1dec97a0ee4ac188c55ebcb109d5e0cc8f4a3f66f016b2ac5f920d7b10f094c9626029d19ab86be0cb5941224a7f3eed2dcc06 SHA512 cc75027ebbefb4ba1aecdc386cf6b60cceeceda79a474ff5ba67411e41aac9fc2c43c2fb0158be667f1b91e6c19082e17e4e61409acc1498b568f5efc7b00a2c
+DIST mbedtls-2.28.5.tar.gz 4005000 BLAKE2B 755287e1a1e0be5d193a8a184a9ae3ab2b6c216235657f7f2e422fe06226cd4c7d11811bcb53519018137e7ed838b241704c955872e28f133bb17a5f42222acb SHA512 339911d244b4e6e4d77b344c796f018d9ad4c56249530b8a56e0dc305ddf30bc709dca96a19c5a06710e92d167ef22893e9e17e20837e9daee0d0be00a8ccae9
DIST mbedtls-3.2.1.tar.gz 4097571 BLAKE2B 4f33172c9c7a3ffbad6600c41d9b574a79e512ec417c3ec90a04085cce393456e8502e94150094bc80a217c352c8148d67bdab1bf0cb311c8dc88d653475a003 SHA512 e7f1726d2cdae6c580d588b40c8a51b9e353786efdd2e50fd1c11c7f46a2b6fe2622cfe2ee5cf998ec762b5ebf8f4720cfc1a1ecaebc497489f9d6a263a83523
+DIST mbedtls-3.5.0.tar.gz 5614026 BLAKE2B 958825f59bb7f269c81042da66a1cd1d12ac799b599613582da591d455dc159aa344370bae8c0436e33c293bd69b1ae9266d2788a0bacd58f0ae8247bafb7f3d SHA512 87b58f698bb740aecb639155ac1248674d2b15ee7fa0eb01136f8fe476ddce0069589a13d532f38ee6db8285abed25570d2bcf55148c2324d8277048a93aacdd
EBUILD mbedtls-2.28.1.ebuild 2720 BLAKE2B 9eb6fdd05100c85e3eee67c35ea6a32dcf35f864760891845158d58987e28bd255d0c431533e3a5f0655d62c85b23be0833a915b8bafbdcd0b48a1ff30d9c2fc SHA512 b3d181116d8cd08a108bff77c67824bb91666dec81d648aacf342d1b8f124518014cfbe918ed6762f01e4b2b7566863ddc7fb2e944d2ef6cf961cb02c43e02e9
+EBUILD mbedtls-2.28.5.ebuild 2738 BLAKE2B 7abac124046e31d8d0574deb80477f4ddd7616edac8e1cf4c8792b42065fce324982543c176c1e250a2ca46e99f3720d19a0394fbcd0f3a43572512536a142ab SHA512 1b196dd6921d90756441f34c2336d3349c7d15ce7ad3eec7efabbc69a511723e53eee392a2e33b1964f18a53a55db0b57a1789061ca33c7576f7485d9406e68e
EBUILD mbedtls-3.2.1.ebuild 2416 BLAKE2B e1ec53b24f5af4e5af4470e7163599b454944b207573d2ee551422cbc862e1c9216b3688330f71f28d39fc1906ce6351b92755b4b28c125f79dd958365220555 SHA512 21bbdcb3c0f4366ca2859e1ea799f9a85e3c98768eaf387c5861856a4e621204653452ee64ef4eff26dffcc767902092ba2bfba909cff42e468161b3f5f48814
+EBUILD mbedtls-3.5.0.ebuild 2427 BLAKE2B 5f382ecdcaa3030396dce6cb0f3af5729af4fd4ecca749bb3cce6030b11ef83ef59e681aa6fd4305a9c16b8ec583f3a4740ce9db9a66780d63094774da6ded42 SHA512 9c380468ad471ab735d70f2e99bba85edee463ff247fc619098b1503228b837aceb15bfb14869b7482a14acf547b0f093498927d8592933bcc681ef0829777ab
MISC metadata.xml 762 BLAKE2B a26d735045051649101684a2a76c9ae5541eb910b257c8024b794ff4c07b03dc014c92e6b4aeae8c1967d620878259cf7f15716148ca6f2bd58a3686bca54bda SHA512 f68756f7973b13899757de58860ac24fb1794cf885d65814b77fc895787e78a61cee2569124c1ba552dea4b97d43a0cfe1a300cc263c04cccab10a4307cc6b78
diff --git a/net-libs/mbedtls/mbedtls-2.28.5.ebuild b/net-libs/mbedtls/mbedtls-2.28.5.ebuild
new file mode 100644
index 000000000000..5572ea122e71
--- /dev/null
+++ b/net-libs/mbedtls/mbedtls-2.28.5.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2023 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/Mbed-TLS/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:=
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ 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 && emake -C "${S}" apidoc
+}
+
+multilib_src_test() {
+ # psa isn't ready yet, it might be in 3.x(?) but certainly not
+ # at the moment.
+ # bug #718390
+ CMAKE_SKIP_TESTS=(
+ 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.5.0.ebuild b/net-libs/mbedtls/mbedtls-3.5.0.ebuild
new file mode 100644
index 000000000000..c9e64588eeee
--- /dev/null
+++ b/net-libs/mbedtls/mbedtls-3.5.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2023 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/Mbed-TLS/mbedtls/archive/${P}.tar.gz"
+S="${WORKDIR}"/${PN}-${P}
+
+LICENSE="Apache-2.0"
+SLOT="0/15.20.6" # 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:=
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ 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 && emake -C "${S}" apidoc
+}
+
+multilib_src_test() {
+ # psa isn't ready yet, even in 3.0.0.
+ # bug #718390
+ CMAKE_SKIP_TESTS=(
+ 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
+}