diff options
Diffstat (limited to 'net-libs/mbedtls')
-rw-r--r-- | net-libs/mbedtls/Manifest | 4 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.16.9.ebuild | 94 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.25.0.ebuild | 95 |
3 files changed, 193 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest index 50bade2c8dcc..839bf03a6fff 100644 --- a/net-libs/mbedtls/Manifest +++ b/net-libs/mbedtls/Manifest @@ -1,5 +1,9 @@ DIST mbedtls-2.16.8.tar.gz 2662927 BLAKE2B 80dabffe644c792ce8a317629950bee71a2376be8f84de29d5cb92047ee433347e7e91be513d638b2954c0c7b2393eaef81b7d449753efffab25694b8a8b52d5 SHA512 645d58d42594a2b547b904634acc1e7e8583465e075c190183e1179638f05e1f8f5c56561ab172fed8dcec4a1742429663abdfdc25d607410ea64a35fbb22168 +DIST mbedtls-2.16.9.tar.gz 2668396 BLAKE2B c637509e8960916bea714b0558b729bf43544d64a560b2e76beba78f8d1355e982f0112bd9e5dd5a14698fa8292d23ed0f41670b220d48d26d6b5a17884481d4 SHA512 f72538851c7a24ac14b5c153220260a49a083bfff44a52e9c1e77c51109bac779b5b4caac21f995176fe8f9d27843f3495692d6c7e9dc733cbcec896823ff0e0 DIST mbedtls-2.24.0.tar.gz 3912697 BLAKE2B 4355fb4db90e3d72e73adcd8ee96c7db2809154c08a00c1a3a8a8f8d6360689f17317a6dd3564c85e1fadece1a49f1ce30561ad21faf48a5bab78e223f2cd070 SHA512 5437ea57eb8b8af9446a796876aa2bfe3c59c88f926b1638c7e8a021a8bef9f4bc6cb1b254e7387e2afe095bd27c518060719726bbaf5478582a56c34315cfb8 +DIST mbedtls-2.25.0.tar.gz 3994272 BLAKE2B 27a326ba08c341ed47ce280401a4b73606138aa8946fd8d8df5d084496eecc6eadf4eedd65270725a360d4b171c86cefeccb6b1515847587f0f11ed15b7dda9b SHA512 78e68dd9a2939fb9e40d796dcc2de36671c900921eac800688bfc3b5f47fda88be2eb4c7dcb34a01628983cd66323b15606ef2a29e7cbfda0d86aa3f6c948647 EBUILD mbedtls-2.16.8.ebuild 2498 BLAKE2B 3bc8c2d29f0b7c6c1e053d9a9580c2f20328308a70cc9e2f3028937de615c3d08f617597133296a006707093829d19c28a613d1e8d57f18d91ef5e4e8d068542 SHA512 36107a890ef9ebb8dde5596bd3d8fd0a660149adca8f8fcea8a0eb733e0422305ad38bdb35afd2e4ae6ec489a1885a37c3e2bf5b11e2de879c50a337d0a6338f +EBUILD mbedtls-2.16.9.ebuild 2504 BLAKE2B ff6d66f0ab34e7a3b0b1ebff01a54c331ab83d75ed52b53b73be1fe0963c1d396746a47a71490d968733b47926537ba0aa3ec86bee3baf3a02dddfa3626c2242 SHA512 7ba7912b12300c3774b6b467169d042e40977ca4eb1bbba99913298e111d467bb7496f7af825215beb8b3565ddac501778360233a5c269b88510103e68838e30 EBUILD mbedtls-2.24.0.ebuild 2558 BLAKE2B 3c800e117bdf590f4b2b36ed8cfe1100bdd3e5a7f30f1c0b75d8a87df0564b9d48ac54a4004a9aa106ddac89e1d0d38889d1a12f15cdfe8dd73044431bfbeb80 SHA512 efd6824356a5fc621fcf8b6f7c0937721fe8c044a5c49bbf965ee09f339aa0cbe8b38efa2cf65e87ba7d6f8f89188a45a6df95a8a08abfe024a55ce879b87ad7 +EBUILD mbedtls-2.25.0.ebuild 2564 BLAKE2B ceba3ed755c845206d9c167207b6f18206450c40f90a385ee9e0f61feba88418d6ac244b4d19bde43449ce8389b8c5cbb825013bc9baf3af8ce6a76aab7326f1 SHA512 f44df9b8e6ff0599a6701b60005d245cb3b37e50f267e6a78036b558dcff2a57f7d6a489b5e688dc2db46736e7993fb4eb1f6666a4c4abe56bdd2d3e38018462 MISC metadata.xml 749 BLAKE2B ae622270ab3325ba6eb31b2699f2a470f348a4c7fa45dd1d11c7e022ded38bc57acb1357082fd57cf951b0422e0b5e08157acc6ebe841db9a5ef23ba9a3d9df9 SHA512 b1d9eb197d6c904a964bc21fadb939a2cdffaab0990c2254ed57e4dcf123353762c860ce36109072a192b3b31dec25b9c1236d209f42b2e95bcedb1e9342e3e5 diff --git a/net-libs/mbedtls/mbedtls-2.16.9.ebuild b/net-libs/mbedtls/mbedtls-2.16.9.ebuild new file mode 100644 index 000000000000..324eaa4202fa --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.16.9.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 +} diff --git a/net-libs/mbedtls/mbedtls-2.25.0.ebuild b/net-libs/mbedtls/mbedtls-2.25.0.ebuild new file mode 100644 index 000000000000..c1bb84ede013 --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.25.0.ebuild @@ -0,0 +1,95 @@ +# 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/6.13.1" # 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)" + -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() { + 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 +} |