Diff gnupg-2.2.41 with a gnupg-2.4.2-r1

/usr/portage/app-crypt/gnupg/gnupg-2.4.2-r1.ebuild 2023-10-09 14:52:28.232368318 +0300
23 23

  
24 24
LICENSE="GPL-3+"
25 25
SLOT="0"
26
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"
27
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server"
26
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
27
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
28 28
RESTRICT="!test? ( test )"
29
REQUIRED_USE="test? ( tofu )"
29 30

  
30 31
# Existence of executables is checked during configuration.
31 32
# Note: On each bump, update dep bounds on each version from configure.ac!
32 33
DEPEND="
33 34
	>=dev-libs/libassuan-2.5.0
34
	>=dev-libs/libgcrypt-1.8.0:=
35
	>=dev-libs/libgpg-error-1.38
36
	>=dev-libs/libksba-1.3.5
35
	>=dev-libs/libgcrypt-1.9.1:=
36
	>=dev-libs/libgpg-error-1.46
37
	>=dev-libs/libksba-1.6.3
37 38
	>=dev-libs/npth-1.2
38 39
	>=net-misc/curl-7.10
39 40
	sys-libs/zlib
40 41
	bzip2? ( app-arch/bzip2 )
41 42
	ldap? ( net-nds/openldap:= )
42
	readline? ( sys-libs/readline:= )
43
	readline? ( sys-libs/readline:0= )
43 44
	smartcard? ( usb? ( virtual/libusb:1 ) )
44
	ssl? ( >=net-libs/gnutls-3.0:= )
45
	tofu? ( >=dev-db/sqlite-3.7 )
45
	tofu? ( >=dev-db/sqlite-3.27 )
46
	tpm? ( >=app-crypt/tpm2-tss-2.4.0:= )
47
	ssl? ( >=net-libs/gnutls-3.0:0= )
46 48
"
47 49
RDEPEND="
48 50
	${DEPEND}
......
65 67

  
66 68
PATCHES=(
67 69
	"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
70
	"${FILESDIR}"/${PN}-2.4.2-fix-emacs.patch
68 71
)
69 72

  
70 73
src_prepare() {
71 74
	default
72 75

  
76
	GNUPG_SYSTEMD_UNITS=(
77
		dirmngr.service
78
		dirmngr.socket
79
		gpg-agent-browser.socket
80
		gpg-agent-extra.socket
81
		gpg-agent.service
82
		gpg-agent.socket
83
		gpg-agent-ssh.socket
84
	)
85

  
86
	cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die
87

  
73 88
	# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
74 89
	# idea borrowed from libdbus, see
75 90
	#   https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
......
77 92
	# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
78 93
	# which in turn requires discovery in Autoconf, something that upstream deeply resents.
79 94
	sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
80
		-i doc/examples/systemd-user/gpg-agent-ssh.socket || die
95
		-i "${T}"/gpg-agent-ssh.socket || die
81 96
}
82 97

  
83 98
my_src_configure() {
......
92 107
		$(use_enable test all-tests)
93 108
		$(use_enable test tests)
94 109
		$(use_enable tofu)
110
		$(use_enable tofu keyboxd)
111
		$(use_enable tofu sqlite)
112
		$(usex tpm '--with-tss=intel' '--disable-tpm2d')
95 113
		$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
96 114
		$(use_enable wks-server wks-tools)
97 115
		$(use_with ldap)
......
108 126
		--with-mailprog=/usr/libexec/sendmail
109 127

  
110 128
		--disable-ntbtls
111
		--enable-gpg
112 129
		--enable-gpgsm
113 130
		--enable-large-secmem
114 131

  
......
153 170
my_src_install() {
154 171
	emake DESTDIR="${D}" install
155 172

  
156
	use tools && dobin \
157
		tools/{gpg-zip,gpgconf,gpgsplit,gpg-check-pattern} \
158
		tools/make-dns-cert
173
	use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert
159 174

  
160 175
	dosym gpg /usr/bin/gpg2
161 176
	dosym gpgv /usr/bin/gpgv2
......
172 187
	einstalldocs
173 188

  
174 189
	use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot}
175

  
176 190
	use doc && dodoc doc/*.png
177 191

  
178
	systemd_douserunit doc/examples/systemd-user/*.{service,socket}
192
	# Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed.
193
	dodoc "${FILESDIR}"/README-systemd
194
	systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}"
179 195
}
Thank you!