Diff libgcrypt-1.9.4-r2 with a libgcrypt-1.10.1-r2

/usr/portage/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild 2023-10-09 14:52:29.516368351 +0300
4 4
EAPI=7
5 5

  
6 6
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
7
inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig
7
inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig
8 8

  
9 9
DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
10 10
HOMEPAGE="https://www.gnupg.org/"
......
13 13

  
14 14
LICENSE="LGPL-2.1 MIT"
15 15
SLOT="0/20" # subslot = soname major version
16
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
17
IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc static-libs"
16
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
17
IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +getentropy static-libs"
18 18

  
19 19
# Build system only has --disable-arm-crypto-support right now
20 20
# If changing this, update src_configure logic too.
......
30 30
	cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
31 31
"
32 32

  
33
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
33
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]
34
	getentropy? (
35
		kernel_linux? (
36
			elibc_glibc? ( >=sys-libs/glibc-2.25 )
37
			elibc_musl? ( >=sys-libs/musl-1.1.20 )
38
		)
39
	)"
34 40
DEPEND="${RDEPEND}"
35 41
BDEPEND="doc? ( virtual/texi2dvi )
36 42
	verify-sig? ( sec-keys/openpgp-keys-gnupg )"
......
38 44
PATCHES=(
39 45
	"${FILESDIR}"/${PN}-multilib-syspath.patch
40 46
	"${FILESDIR}"/${PN}-powerpc-darwin.patch
41
	"${FILESDIR}"/${PN}-1.9.4-arm-neon-compile-fix.patch
47
	"${FILESDIR}"/${PN}-1.10.1-fix-no-asm-hppa.patch
42 48
	"${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
43 49
)
44 50

  
......
46 52
	/usr/bin/libgcrypt-config
47 53
)
48 54

  
55
pkg_pretend() {
56
	if [[ ${MERGE_TYPE} == buildonly ]]; then
57
		return
58
	fi
59
	if use kernel_linux && use getentropy; then
60
		unset KV_FULL
61
		get_running_version
62
		if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then
63
			eerror "The getentropy function requires the getrandom syscall."
64
			eerror "This was introduced in Linux 3.17."
65
			eerror "Your system is currently running Linux ${KV_FULL}."
66
			eerror "Disable the 'getentropy' USE flag or upgrade your kernel."
67
			die "Kernel is too old for getentropy"
68
		fi
69
	fi
70
}
71

  
72
pkg_setup() {
73
	:
74
}
75

  
49 76
src_prepare() {
50 77
	default
51 78
	eautoreconf
......
114 141
		GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
115 142
	)
116 143

  
144
	if use kernel_linux; then
145
		# --enable-random=getentropy requires getentropy/getrandom.
146
		# --enable-random=linux enables legacy code that tries getrandom
147
		# and falls back to reading /dev/random.
148
		myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) )
149
	fi
150

  
117 151
	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
118 152
		$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
119 153
}
Thank you!