1 |
commit: ab103bbf57bbbe62466583af03b900f1c3d5f2ee |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 19 12:10:32 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 30 09:54:24 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab103bbf |
7 |
|
8 |
app-arch/tar: Always install as gtar, make tar a symlink to it |
9 |
|
10 |
For better compatibility with systems that do not use GNU userland, |
11 |
install GNU tar as `gtar` rather than `tar`, and make `tar` a symlink |
12 |
to the former. This replaces the prior inconsistent logic that |
13 |
installed `gtar` symlink on Prefix only. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/877645 |
16 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
|
19 |
app-arch/tar/tar-1.34-r1.ebuild | 84 +++++++++++++++++++++++++++++++++++++++++ |
20 |
1 file changed, 84 insertions(+) |
21 |
|
22 |
diff --git a/app-arch/tar/tar-1.34-r1.ebuild b/app-arch/tar/tar-1.34-r1.ebuild |
23 |
new file mode 100644 |
24 |
index 000000000000..d197850acc05 |
25 |
--- /dev/null |
26 |
+++ b/app-arch/tar/tar-1.34-r1.ebuild |
27 |
@@ -0,0 +1,84 @@ |
28 |
+# Copyright 1999-2022 Gentoo Authors |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+ |
31 |
+EAPI=7 |
32 |
+ |
33 |
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/tar.asc |
34 |
+inherit verify-sig |
35 |
+ |
36 |
+DESCRIPTION="Use this to make tarballs :)" |
37 |
+HOMEPAGE="https://www.gnu.org/software/tar/" |
38 |
+SRC_URI="mirror://gnu/tar/${P}.tar.xz |
39 |
+ https://alpha.gnu.org/gnu/tar/${P}.tar.xz" |
40 |
+SRC_URI+=" verify-sig? ( |
41 |
+ mirror://gnu/tar/${P}.tar.xz.sig |
42 |
+ https://alpha.gnu.org/gnu/tar/${P}.tar.xz.sig |
43 |
+ )" |
44 |
+ |
45 |
+LICENSE="GPL-3+" |
46 |
+SLOT="0" |
47 |
+if [[ -z "$(ver_cut 3)" ]] || [[ "$(ver_cut 3)" -lt 90 ]] ; then |
48 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
49 |
+fi |
50 |
+IUSE="acl minimal nls selinux xattr" |
51 |
+ |
52 |
+RDEPEND=" |
53 |
+ acl? ( virtual/acl ) |
54 |
+ selinux? ( sys-libs/libselinux ) |
55 |
+" |
56 |
+DEPEND="${RDEPEND} |
57 |
+ xattr? ( elibc_glibc? ( sys-apps/attr ) ) |
58 |
+" |
59 |
+BDEPEND=" |
60 |
+ nls? ( sys-devel/gettext ) |
61 |
+ verify-sig? ( sec-keys/openpgp-keys-tar ) |
62 |
+" |
63 |
+ |
64 |
+src_configure() { |
65 |
+ local myeconfargs=( |
66 |
+ --bindir="${EPREFIX}"/bin |
67 |
+ --enable-backup-scripts |
68 |
+ --libexecdir="${EPREFIX}"/usr/sbin |
69 |
+ $(use_with acl posix-acls) |
70 |
+ $(use_enable nls) |
71 |
+ $(use_with selinux) |
72 |
+ $(use_with xattr xattrs) |
73 |
+ ) |
74 |
+ |
75 |
+ FORCE_UNSAFE_CONFIGURE=1 econf "${myeconfargs[@]}" |
76 |
+} |
77 |
+ |
78 |
+src_install() { |
79 |
+ default |
80 |
+ |
81 |
+ # a nasty yet required piece of baggage |
82 |
+ exeinto /etc |
83 |
+ doexe "${FILESDIR}"/rmt |
84 |
+ |
85 |
+ mv "${ED}"/usr/sbin/backup{,-tar} || die |
86 |
+ mv "${ED}"/usr/sbin/restore{,-tar} || die |
87 |
+ |
88 |
+ if use minimal ; then |
89 |
+ find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \ |
90 |
+ -type f -a '!' '(' -name tar -o -name tar ')' \ |
91 |
+ -delete || die |
92 |
+ fi |
93 |
+ |
94 |
+ # autoconf looks for gtar before tar (in configure scripts), hence |
95 |
+ # in Prefix it is important that it is there, otherwise, a gtar from |
96 |
+ # the host system (FreeBSD, Solaris, Darwin) will be found instead |
97 |
+ # of the Prefix provided (GNU) tar |
98 |
+ # rename tar to gtar, and make tar a symlink |
99 |
+ mv "${ED}"/bin/{,g}tar || die |
100 |
+ dosym gtar /bin/tar |
101 |
+ |
102 |
+ if ! use minimal; then |
103 |
+ mv "${ED}"/usr/sbin/{,g}rmt || die |
104 |
+ dosym grmt /usr/sbin/rmt |
105 |
+ fi |
106 |
+ |
107 |
+ mv "${ED}"/usr/share/man/man1/{,g}tar.1 || die |
108 |
+ dosym gtar.1 /usr/share/man/man1/tar.1 |
109 |
+ mv "${ED}"/usr/share/man/man8/{,g}rmt.8 || die |
110 |
+ dosym grmt.8 /usr/share/man/man8/rmt.8 |
111 |
+} |