Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/xar/files/, app-arch/xar/
Date: Sun, 31 Oct 2021 15:38:35
Message-Id: 1635694708.4ede8ab96576f84e157697d1c8af5f4131e732af.grobian@gentoo
1 commit: 4ede8ab96576f84e157697d1c8af5f4131e732af
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 31 15:38:02 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 31 15:38:28 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ede8ab9
7
8 app-arch/xar-1.8.0.0.452: version bump to macOS 11 version
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 app-arch/xar/Manifest | 1 +
14 app-arch/xar/files/xar-1.8.0.0.452-linux.patch | 72 ++++++++++++++++++++++
15 .../{xar-1.8-r3.ebuild => xar-1.8.0.0.452.ebuild} | 44 ++++++++-----
16 3 files changed, 101 insertions(+), 16 deletions(-)
17
18 diff --git a/app-arch/xar/Manifest b/app-arch/xar/Manifest
19 index ca6f1ec9cfa..73ada38ef97 100644
20 --- a/app-arch/xar/Manifest
21 +++ b/app-arch/xar/Manifest
22 @@ -1,2 +1,3 @@
23 DIST xar-400.tar.gz 213319 BLAKE2B 55b8695313a1a5ae778b62791f716af00edba7e7b01500eac4b951e04cf7b18e84e0d508ac5471996796e5ab59e4628a4f85a63a5929b372555e28b222c77ab1 SHA512 c54850d5443c776f18d788bf7d026b3b08274ee71321d1615238c9fa2d20cc0b21f3f298364b0d0eecd98ce2a6efc8d5039cabd5a21c2419c430d90db004d159
24 DIST xar-417.1.tar.gz 219350 BLAKE2B 2ca073e52b8d7a12c3d33fb65ccaf0984b912f42e4e9dc52bcaec7af41bafcc530cd055da16646113fb24ee046122425a66351f88279ef79a0f0b2b04ae51f9a SHA512 4c3c61f5289d0b2e380cbde772b383da369ca8ad046f5d779e02f59300288c90c5e31d105a2c01ac17dc719b8b46b55d8d36a8b3b20360f315766fce92dec762
25 +DIST xar-452.tar.gz 220690 BLAKE2B 9728c73734a4bcb31e6e72d3d1a6735d5c78e384e15415641c4f40068f2da9498e9808cc36df6eaf7d3addf8be6d9eb90bdfa2900321e4dbe482156075bcdcd7 SHA512 d6ae9e5687020d20ec12579178f84c852fd485c52cff0ad23b7b31d2eabbde8c7fc85ab33e82eb81a5ddb59df4c26b756894be85061195cd191ab32be1f56b10
26
27 diff --git a/app-arch/xar/files/xar-1.8.0.0.452-linux.patch b/app-arch/xar/files/xar-1.8.0.0.452-linux.patch
28 new file mode 100644
29 index 00000000000..8cbe48acc44
30 --- /dev/null
31 +++ b/app-arch/xar/files/xar-1.8.0.0.452-linux.patch
32 @@ -0,0 +1,72 @@
33 +--- a/configure.ac
34 ++++ b/configure.ac
35 +@@ -199,7 +199,16 @@
36 +
37 + AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[#include <sys/types.h>
38 + #include <sys/param.h>
39 +-#include <sys/mount.h>])
40 ++#include <sys/mount.h>
41 ++#include <sys/vfs.h>])
42 ++AC_CHECK_MEMBERS([struct statfs.f_iosize],,,[#include <sys/types.h>
43 ++#include <sys/param.h>
44 ++#include <sys/mount.h>
45 ++#include <sys/vfs.h>])
46 ++AC_CHECK_MEMBERS([struct statfs.f_bsize],,,[#include <sys/types.h>
47 ++#include <sys/param.h>
48 ++#include <sys/mount.h>
49 ++#include <sys/vfs.h>])
50 + AC_CHECK_MEMBERS([struct statvfs.f_fstypename],,,[#include <sys/statvfs.h>])
51 + AC_CHECK_MEMBERS([struct stat.st_flags])
52 +
53 +--- a/lib/util.c
54 ++++ b/lib/util.c
55 +@@ -40,6 +40,7 @@
56 + #include <sys/types.h>
57 + #include <sys/mount.h>
58 + #include <sys/param.h>
59 ++#include <sys/vfs.h>
60 + #include <arpa/inet.h>
61 + #include <string.h>
62 + #include <unistd.h>
63 +@@ -467,6 +467,14 @@
64 + return tmp;
65 + }
66 +
67 ++#ifndef HAVE_STRUCT_STATFS_F_IOSIZE
68 ++# ifdef HAVE_STRUCT_STATFS_F_BSIZE
69 ++# define f_iosize f_bsize
70 ++# else
71 ++# error need a field to get optimal transfer block size
72 ++# endif
73 ++#endif
74 ++
75 + size_t xar_optimal_io_size_at_path(const char *path)
76 + {
77 + // Start at 1MiB
78 +@@ -491,6 +491,7 @@
79 + fs_iosize = optimal_rsize;
80 + }
81 +
82 ++#ifdef MNT_LOCAL
83 + // If we're a remote filesystem, never let us go below the optimal size above of 1MiB
84 + // NFS is horrible and lies that the optimal size is 512 bytes.
85 + // Whereas SMB in my testing returns 7MiBs (far more practicle)
86 +@@ -503,6 +504,7 @@
87 + }
88 + }
89 + else
90 ++#endif
91 + {
92 + optimal_rsize = fs_iosize;
93 + }
94 +--- a/include/config.h.in
95 ++++ b/include/config.h.in
96 +@@ -15,6 +15,8 @@
97 + #undef HAVE_STRUCT_STAT_ST_FLAGS
98 + #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME
99 + #undef HAVE_STRUCT_STATFS_F_FSTYPENAME
100 ++#undef HAVE_STRUCT_STATFS_F_IOSIZE
101 ++#undef HAVE_STRUCT_STATFS_F_BSIZE
102 + #undef HAVE_SYS_ACL_H
103 + #undef HAVE_LIBUTIL_H
104 + #undef HAVE_LIBPTHREAD
105
106 diff --git a/app-arch/xar/xar-1.8-r3.ebuild b/app-arch/xar/xar-1.8.0.0.452.ebuild
107 similarity index 62%
108 rename from app-arch/xar/xar-1.8-r3.ebuild
109 rename to app-arch/xar/xar-1.8.0.0.452.ebuild
110 index c7375f6ef61..4324f627e65 100644
111 --- a/app-arch/xar/xar-1.8-r3.ebuild
112 +++ b/app-arch/xar/xar-1.8.0.0.452.ebuild
113 @@ -1,10 +1,10 @@
114 # Copyright 1999-2021 Gentoo Authors
115 # Distributed under the terms of the GNU General Public License v2
116
117 -EAPI=6
118 -inherit flag-o-matic toolchain-funcs multilib-minimal multilib
119 +EAPI=7
120 +inherit autotools flag-o-matic toolchain-funcs multilib-minimal multilib
121
122 -APPLE_PV=417.1
123 +APPLE_PV=$(ver_cut 5) # 452: macOS 11.0.1 and up
124 DESCRIPTION="An easily extensible archive format"
125 HOMEPAGE="https://opensource.apple.com/source/xar/"
126 SRC_URI="https://opensource.apple.com/tarballs/xar/xar-${APPLE_PV}.tar.gz"
127 @@ -12,27 +12,24 @@ SRC_URI="https://opensource.apple.com/tarballs/xar/xar-${APPLE_PV}.tar.gz"
128 LICENSE="BSD-2"
129 SLOT="0"
130 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
131 -IUSE="kernel_Darwin"
132
133 -RDEPEND="
134 - !kernel_Darwin? (
135 - !kernel_SunOS? ( virtual/acl )
136 - dev-libs/openssl:0=[${MULTILIB_USEDEP}]
137 - )
138 +DEPEND="
139 + elibc_musl? ( sys-libs/fts-standalone )
140 + kernel_linux? ( virtual/acl )
141 + dev-libs/openssl:0=[${MULTILIB_USEDEP}]
142 app-arch/bzip2[${MULTILIB_USEDEP}]
143 sys-libs/zlib[${MULTILIB_USEDEP}]
144 dev-libs/libxml2[${MULTILIB_USEDEP}]
145 "
146 -DEPEND="
147 - ${RDEPEND}
148 - virtual/pkgconfig
149 -"
150 +RDEPEND="${DEPEND}"
151 +BDEPEND="virtual/pkgconfig"
152
153 PATCHES=(
154 "${FILESDIR}"/${PN}-1.6.1-ext2.patch
155 "${FILESDIR}"/${PN}-1.8-safe_dirname.patch
156 "${FILESDIR}"/${PN}-1.8-arm-ppc.patch
157 "${FILESDIR}"/${PN}-1.8-openssl-1.1.patch
158 + "${FILESDIR}"/${PN}-1.8.0.0.452-linux.patch
159 )
160
161 S=${WORKDIR}/${PN}-${APPLE_PV}/${PN}
162 @@ -53,13 +50,28 @@ src_prepare() {
163 # ebuild env, causing the install phase to re-compile xar.o and link
164 # the executable
165 echo ".PRECIOUS: @objroot@src/%.o" >> Makefile.inc.in || die
166 +
167 + # drop Darwin specific reliance on CommonCrypto Framework, for it
168 + # depends on what version of Darwin we're on, and it is much simpler
169 + # to just use openessl instead, which we maintain and control
170 + cd "${S}" || die
171 + sed -i -e 's/__APPLE__/__NO_APPLE__/' \
172 + include/archive.h \
173 + lib/hash.c \
174 + || die
175 +
176 + # fix branding somewhat
177 + sed -i -e "/XAR_VERSION/s|%s|%s (Gentoo ${PVR})|" src/xar.c || die
178 +
179 + eautoreconf
180 }
181
182 multilib_src_configure() {
183 - use kernel_Darwin || append-libs $($(tc-getPKG_CONFIG) --libs openssl)
184 + append-libs $($(tc-getPKG_CONFIG) --libs openssl)
185 + use elibc_musl && append-libs $($(tc-getPKG_CONFIG) --libs fts-standalone)
186 + append-cflags -Wno-unused-result # allow to see real problems
187 ECONF_SOURCE=${S} \
188 - econf \
189 - --disable-static
190 + econf --disable-static
191 # botched check, fix it up
192 if use kernel_SunOS ; then
193 sed -i -e '/HAVE_SYS_ACL_H/s:^\(.*\)$:/* \1 */:' include/config.h || die