summaryrefslogtreecommitdiff
path: root/app-arch/xar
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-18 23:39:27 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-18 23:39:27 +0000
commit753ad9170f0d68e7f525f1931bc6ebf359268b29 (patch)
tree208258cffcd127cab6f00c68d89307e03cd0aa82 /app-arch/xar
parent9897403e8218123dc1c8d3797b083652f08779a9 (diff)
gentoo auto-resync : 18:02:2024 - 23:39:27
Diffstat (limited to 'app-arch/xar')
-rw-r--r--app-arch/xar/Manifest3
-rw-r--r--app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch24
-rw-r--r--app-arch/xar/xar-1.8.0.0.498.ebuild89
3 files changed, 116 insertions, 0 deletions
diff --git a/app-arch/xar/Manifest b/app-arch/xar/Manifest
index 4414d09d44b6..f14d53ad3436 100644
--- a/app-arch/xar/Manifest
+++ b/app-arch/xar/Manifest
@@ -5,6 +5,9 @@ AUX xar-1.8-safe_dirname.patch 392 BLAKE2B 8bf3e2104fb4249ca9ba313f7ae1d6fc03a6d
AUX xar-1.8.0.0.452-linux.patch 2763 BLAKE2B 1d8d5739c16a7693771303bf4e5f04c1f2a676e38b95cdff7c4c338a776acdba7da9199a2a7021df783ef5cb1a746758aa2c7b10ee6f0f616526c9c15e3209d3 SHA512 1296805ba982d44f6654966ebb69a64e82e6085523c76244a94b025530456db22b9b163814b4202ff21e16aadd68a5817b52771133b41ab985a23e8872c25b4e
AUX xar-1.8.0.0.487-non-darwin.patch 227 BLAKE2B fccac30a036a8bfcab111a39f002422e0092f41c3a385ae897ce7a939ff0b8ae0dfc18e274092a92a60d0d730ae075832106a4a108d9e8fe6c8479d747012c4b SHA512 440ffddf277c9e5a3227dee5b07f007a2a88d561b7a0fe0f40a8e2885fd75e8a762ad19be7943d6007691b62c7fe48d31d58a1370845ecd3affd338248c239db
AUX xar-1.8.0.0.487-variable-sized-object.patch 617 BLAKE2B 4ec24b45a81d05635f3ec62faeb1919a50d7528bfaeb6766d133b56fca2cf97162e788fed34a2b5dc1d2699edbb6484b9dcee375772c396476f72bcd58e1523d SHA512 3cb5361a4a097c777107da7d69740749b4fa07f868dc87bff703520e116cf72dc2b0d661d6c3ed17856068362cc3900805242fb2db72e7eca1c2822debe4ce33
+AUX xar-1.8.0.0.498-impl-decls.patch 736 BLAKE2B fe419205fe171274a6531f2f5428828fb61b47bcb523660ec8c9811debb2ec6c14accda16f0b74766301b4e0978ca571fc6de202e2a4060a46ab1b477863793d SHA512 96a5cad424ca8f23c36dba34eb36015582b0d0f4ababebe06e6edf50c6c9d1ca59066dddd0f33f31a494b86d54650c02c13757e0881f75dee75890175dbefead
DIST xar-487.100.1.tar.gz 224108 BLAKE2B 2fa5c44b46a9e37e49be03d05d6d06ab706b5205d857e6d6f24954160dbf5fc91fbec848053cb2d0a11505e5f7c37f8331ac126d65eb91b08e302a28db12acc0 SHA512 a45d1327ac5c6dc6f1cdb359e7e487fd91cea82a446157b65da34f0481cd58bbe03b0e005643087c802962e89316a1c816e2c6b625f1259b10a52bbf902f79e6
+DIST xar-498.tar.gz 224373 BLAKE2B 56dfae475f23384b57492d6a5e141a4c93f7b0238de04be8bbcde63fe7ca0a9beb137b5b9052b165717cd2afae4ddfe5005e65ba16d1821c42e036a9ef9d0e04 SHA512 ecd6186e42ff3005296d94ce01d7fbea04814f26afe1df0449ffa522009ec85beafc71e25931b215910c159a2440565e7dd31a6a7c50389a50a1368bd5ff5f75
EBUILD xar-1.8.0.0.487.100.1.ebuild 2740 BLAKE2B b1fc4c2fa425f79abd0342a1469b05b815b227d31ced4d5d2efe2704651db99407e8000c663b1b9539371c826c75ff4b417bb5a3d2db2d93ec143125c6eece77 SHA512 943a870505e0c4833267e99918eba635d213ef9243b2bf31d61afb55e35cce5e542e6712230e459f51609071358a563ce61468a040b3d4014a5def5bf8522d82
+EBUILD xar-1.8.0.0.498.ebuild 2796 BLAKE2B bd86ee1dcc6eb645091e90ed4ec36bb408a8b5230148a0b4850745cf2676889e64dba275bc1fa83bef7f1f899b66dfba1ecb58bb7b598179bc8eed256832ca38 SHA512 f0aff9b54f19a661312f35c7d49216b5be0313a2994848af105aa2b2a397cb0cc6ffd906ed2b5a0a70b5875891541a39b10073e8c5d867b02ae60ea081d74d2b
MISC metadata.xml 896 BLAKE2B 6276428173e9e59e3bd792a6df84b865eb695bf2591a8586b9903d1eb275af3a10d2295c9e37f452e911aa771f30a902c7b1361c83a1c5280f442a6652437c59 SHA512 7088753baae558cf466eb6a3af584d406ea09c5065f235d1e44d891731055fb88acd8957e764554b41d86d8fbf7cea21deaacdd2b38d9f8b05744202252ec271
diff --git a/app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch b/app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch
new file mode 100644
index 000000000000..8c37a6c9cfbc
--- /dev/null
+++ b/app-arch/xar/files/xar-1.8.0.0.498-impl-decls.patch
@@ -0,0 +1,24 @@
+include stdlib.h for free and strtol
+silence format warning
+
+--- a/lib/ext2.c
++++ b/lib/ext2.c
+@@ -41,6 +41,7 @@
+ #include "asprintf.h"
+ #endif
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include "xar.h"
+ #include "arcmod.h"
+--- a/lib/ea.c
++++ a/lib/ea.c
+@@ -67,7 +67,7 @@
+ xar_prop_setvalue(XAR_EA(ret)->prop, NULL);
+ XAR_PROP(XAR_EA(ret)->prop)->attrs = xar_attr_new();
+ XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->key = strdup("id");
+- asprintf((char **)&XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->value, "%lld", XAR_FILE(f)->nexteaid++);
++ asprintf((char **)&XAR_ATTR(XAR_PROP(XAR_EA(ret)->prop)->attrs)->value, PRId64, XAR_FILE(f)->nexteaid++);
+
+ xar_prop_pset(f, XAR_EA(ret)->prop, "name", name);
+
diff --git a/app-arch/xar/xar-1.8.0.0.498.ebuild b/app-arch/xar/xar-1.8.0.0.498.ebuild
new file mode 100644
index 000000000000..80225ab0a44a
--- /dev/null
+++ b/app-arch/xar/xar-1.8.0.0.498.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic toolchain-funcs multilib-minimal
+
+APPLE_PV=$(ver_cut 5-) # 498: macOS 13.3 and up
+DESCRIPTION="An easily extensible archive format"
+HOMEPAGE="https://github.com/apple-oss-distributions/xar"
+SRC_URI="https://github.com/apple-oss-distributions/xar/archive/xar-${APPLE_PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+
+DEPEND="
+ elibc_musl? ( sys-libs/fts-standalone )
+ kernel_linux? ( virtual/acl )
+ dev-libs/openssl:0=[${MULTILIB_USEDEP}]
+ app-arch/bzip2[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ dev-libs/libxml2[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.1-ext2.patch
+ "${FILESDIR}"/${PN}-1.8-safe_dirname.patch
+ "${FILESDIR}"/${PN}-1.8-arm-ppc.patch
+ "${FILESDIR}"/${PN}-1.8-openssl-1.1.patch
+ "${FILESDIR}"/${PN}-1.8.0.0.452-linux.patch
+ "${FILESDIR}"/${PN}-1.8.0.0.487-non-darwin.patch
+ "${FILESDIR}"/${PN}-1.8.0.0.487-variable-sized-object.patch
+ "${FILESDIR}"/${PN}-1.8.0.0.498-impl-decls.patch
+)
+
+S=${WORKDIR}/${PN}-${PN}-${APPLE_PV}/${PN}
+
+src_prepare() {
+ default
+
+ # make lib headers available (without installing first?)
+ cd "${S}"/include || die
+ mv ../lib/*.h . || die
+
+ # strip RPATH pointing to ED
+ cd "${S}"/src || die
+ sed -i -e 's/@RPATH@//' Makefile.inc.in || die
+
+ # avoid GNU make (bug?) behaviour of removing xar.o as intermediate
+ # file, this doesn't happen outside portage, but it does from the
+ # ebuild env, causing the install phase to re-compile xar.o and link
+ # the executable
+ echo ".PRECIOUS: @objroot@src/%.o" >> Makefile.inc.in || die
+
+ # drop Darwin specific reliance on CommonCrypto Framework, for it
+ # depends on what version of Darwin we're on, and it is much simpler
+ # to just use openessl instead, which we maintain and control
+ cd "${S}" || die
+ sed -i -e 's/__APPLE__/__NO_APPLE__/' \
+ include/archive.h \
+ lib/hash.c \
+ || die
+
+ # fix branding somewhat
+ sed -i -e "/XAR_VERSION/s|%s|%s (Gentoo ${PVR})|" src/xar.c || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ append-libs $($(tc-getPKG_CONFIG) --libs openssl)
+ use elibc_musl && append-libs $($(tc-getPKG_CONFIG) --libs fts-standalone)
+ append-cflags -Wno-unused-result # allow to see real problems
+ ECONF_SOURCE=${S} \
+ econf --disable-static
+ # botched check, fix it up
+ if use kernel_SunOS ; then
+ sed -i -e '/HAVE_SYS_ACL_H/s:^\(.*\)$:/* \1 */:' include/config.h || die
+ fi
+ # allow xar/xar.h to be found
+ ( cd include && ln -s . xar )
+}
+
+multilib_src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}