app-arch/7zip: add symlink useflag

goal is to allow packages which only use the 7z/7zr/7za binaries
to be able to depend on 7zip[symlink] rather than p7zip. this is
a step towards replacing the unmaintained p7zip.

Bug: https://bugs.gentoo.org/942397
Signed-off-by: NRK <nrk@disroot.org>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NRK
2025-03-14 17:05:07 +00:00
committed by Sam James
parent 222f1517ae
commit 4dc57a07f0
2 changed files with 10 additions and 2 deletions

View File

@@ -18,18 +18,20 @@ S="${WORKDIR}"
LICENSE="LGPL-2 BSD rar? ( unRAR )"
SLOT="0"
KEYWORDS="amd64 arm64 ~ppc ~ppc64 ~riscv"
IUSE="uasm jwasm rar"
IUSE="uasm jwasm rar symlink"
REQUIRED_USE="?? ( uasm jwasm )"
DOCS=( readme.txt History.txt License.txt )
HTML_DOCS=( MANUAL )
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/xz-utils[extra-filters(+)]
uasm? ( dev-lang/uasm )
jwasm? ( dev-lang/jwasm )
"
RDEPEND="
symlink? ( !app-arch/p7zip )
"
PATCHES=(
"${FILESDIR}/${PN}-24.05-respect-build-env.patch"
@@ -107,5 +109,10 @@ src_compile() {
src_install() {
dobin "./CPP/7zip/Bundles/Alone2/b/${bdir}/7zz"
if use symlink; then
dosym 7zz /usr/bin/7z
dosym 7zz /usr/bin/7za
dosym 7zz /usr/bin/7zr
fi
einstalldocs
}

View File

@@ -16,6 +16,7 @@
<flag name="rar">Enable support for non-free rar decoder</flag>
<flag name="uasm">Use <pkg>dev-lang/uasm</pkg> to include optimized code</flag>
<flag name="jwasm">Use <pkg>dev-lang/jwasm</pkg> to include optimized code (doesn't support AES)</flag>
<flag name="symlink">Install additional symlink to 7z, 7za and 7zr</flag>
</use>
<upstream>
<maintainer>