aboutsummaryrefslogtreecommitdiff
blob: 468cb4ef628f3919c36a0e094adefc30eef17ae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

src_configure() {
	append-ldflags -static

	local myconf=(
		--enable-static-rnd=linux
		--disable-dev-random
		--disable-asm
		--disable-selinux-support
		--disable-gnupg-iconv
		--disable-card-support
		--disable-agent-support
		--disable-bzip2
		--disable-exec
		--disable-photo-viewers
		--disable-keyserver-helpers
		--disable-ldap
		--disable-hkp
		--disable-finger
		--disable-generic
		--disable-mailto
		--disable-keyserver-path
		--disable-dns-srv
		--disable-dns-cert
		--disable-nls
		--disable-threads
		--disable-regex
		--disable-optimization
		--with-included-zlib
		--without-capabilities
		--without-tar
		--without-ldap
		--without-libcurl
		--without-mailprog
		--without-libpth-prefix
		--without-libiconv-prefix
		--without-libintl-prefix
		--without-zlib
		--without-bzip2
		--without-libusb
		--without-readline
		CC_FOR_BUILD="$(tc-getBUILD_CC)"
	)

	gkconf "${myconf[@]}"
}

src_install() {
	default

	rm -rf \
		"${D}"/usr/bin/gpgsplit \
		"${D}"/usr/bin/gpgv \
		"${D}"/usr/share

	"${STRIP}" --strip-all "${D}"/usr/bin/gpg \
		|| die "Failed to strip '${D}/usr/bin/gpg'!"

	# For backward compatibility
	mkdir "${D}"/bin || die "Failed to create '${D}/bin'!"

	ln -s ../usr/bin/gpg "${D}"/bin/gpg \
		|| die "Failed to create symlink '${D}/bin/gpg' to '${D}/usr/bin/gpg'!"
}