Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 918634 - app-arch/7zip: add rar useflag
Summary: app-arch/7zip: add rar useflag
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GURU project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-26 23:17 UTC by NRK
Modified: 2024-02-27 06:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NRK 2023-11-26 23:17:31 UTC
The 7zip package currently doesn't support rar (unlike p7zip package) due to disabling rar unconditionally in the ebuild:

	emake DISABLE_RAR=1 [...]

It should utilize useflags and let the user enable rar support.

Note: I tried to do this myself by patching the ebuild but the resulting 7zz binary was still unable to decompress a rar archive.

	@@ -9,9 +9,9 @@ NO_DOT_PV=$(ver_rs 1- '')
	 DESCRIPTION="A free file archiver for extremely high compression"
	 HOMEPAGE="https://www.7-zip.org/ https://sourceforge.net/projects/sevenzip/"
	 SRC_URI="https://sourceforge.net/projects/sevenzip/files/7-Zip/${PV}/7z${NO_DOT_PV}-src.tar.xz/download -> ${PN}-${PV}.tar.xz"
	-LICENSE="LGPL-2 BSD"
	+LICENSE="LGPL-2 BSD rar? ( unRAR )"
	 
	-IUSE="asm"
	+IUSE="asm rar"
	 SLOT="0"
	 KEYWORDS="~amd64"
	 
	@@ -62,7 +62,8 @@ src_compile() {
	 	export G_CXXFLAGS=${CXXFLAGS}
	 	export G_LDFLAGS=${LDFLAGS}
	 	# USE_JWASM=1 - if asm: use JWasm assembler instead of Asmc (not a gentoo package)
	-	emake DISABLE_RAR=1 USE_JWASM=1 --file "../../${mfile}"
	+	emake DISABLE_RAR=$(usex rar 0 1) DISABLE_RAR_COMPRESS=$(usex rar 0 1) \
	+		USE_JWASM=1 --file "../../${mfile}"
	 	popd > /dev/null || die "Unable to switch directory"
	 }
Comment 1 Larry the Git Cow gentoo-dev 2024-02-27 06:31:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4d2e32a01b4ae0007af77d3114864276f25ae424

commit 4d2e32a01b4ae0007af77d3114864276f25ae424
Author:     NRK <nrk@disroot.org>
AuthorDate: 2024-02-24 13:32:34 +0000
Commit:     NRK <nrk@disroot.org>
CommitDate: 2024-02-26 17:45:01 +0000

    app-arch/7zip: add rar support
    
    Closes: https://bugs.gentoo.org/918634
    Signed-off-by: NRK <nrk@disroot.org>

 app-arch/7zip/7zip-23.01.ebuild | 26 ++++++++++++++++++++++----
 app-arch/7zip/metadata.xml      |  7 ++++---
 2 files changed, 26 insertions(+), 7 deletions(-)