Diff mbedtls-2.28.1 with a mbedtls-3.2.1

/usr/portage/net-libs/mbedtls/mbedtls-3.2.1.ebuild 2023-10-09 14:52:34.592368479 +0300
11 11
S=${WORKDIR}/${PN}-${P}
12 12

  
13 13
LICENSE="Apache-2.0"
14
SLOT="0/7.14.1" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so}
15
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
16
IUSE="cmac cpu_flags_x86_sse2 doc havege programs static-libs test threads zlib"
14
SLOT="0/12.18.4" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so}
15
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
16
IUSE="cpu_flags_x86_sse2 doc programs static-libs test threads"
17 17
RESTRICT="!test? ( test )"
18 18

  
19 19
RDEPEND="
20 20
	programs? (
21 21
		dev-libs/openssl:0=
22
	)
23
	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
22
	)"
24 23
DEPEND="${RDEPEND}
25 24
	doc? ( app-doc/doxygen media-gfx/graphviz )
26 25
	test? ( dev-lang/perl )"
......
30 29
	# check that config.h syntax is the same at version bump
31 30
	sed -i \
32 31
		-e "s://#define ${myopt}:#define ${myopt}:" \
33
		include/mbedtls/config.h || die
32
		include/mbedtls/mbedtls_config.h || die
34 33
}
35 34

  
36 35
src_prepare() {
37
	use cmac && enable_mbedtls_option MBEDTLS_CMAC_C
38 36
	use cpu_flags_x86_sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2
39
	use zlib && enable_mbedtls_option MBEDTLS_ZLIB_SUPPORT
40
	use havege && enable_mbedtls_option MBEDTLS_HAVEGE_C
41 37
	use threads && enable_mbedtls_option MBEDTLS_THREADING_C
42 38
	use threads && enable_mbedtls_option MBEDTLS_THREADING_PTHREAD
43 39

  
......
47 43
multilib_src_configure() {
48 44
	local mycmakeargs=(
49 45
		-DENABLE_PROGRAMS=$(multilib_native_usex programs)
50
		-DENABLE_ZLIB_SUPPORT=$(usex zlib)
51 46
		-DUSE_STATIC_MBEDTLS_LIBRARY=$(usex static-libs)
52 47
		-DENABLE_TESTING=$(usex test)
53 48
		-DUSE_SHARED_MBEDTLS_LIBRARY=ON
......
65 60
}
66 61

  
67 62
multilib_src_test() {
68
	# psa isn't ready yet, it might be in 3.x(?) but certainly not
69
	# at the moment.
63
	# psa isn't ready yet, even in 3.0.0.
70 64
	# bug #718390
71 65
	local myctestargs=(
72 66
		-E "(psa_crypto|psa_its-suite)"
Thank you!