From 9033c9230b8c6a3b6f21713229a128c91714be56 Mon Sep 17 00:00:00 2001 From: Martin Matouš Date: Mon, 28 Aug 2023 05:10:31 +0200 Subject: app-arch/7zip: new package, add 23.01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Matouš --- app-arch/7zip/7zip-23.01.ebuild | 63 +++++++++++++++++++++++++++++++++++++++++ app-arch/7zip/Manifest | 1 + app-arch/7zip/metadata.xml | 19 +++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 app-arch/7zip/7zip-23.01.ebuild create mode 100644 app-arch/7zip/Manifest create mode 100644 app-arch/7zip/metadata.xml (limited to 'app-arch') diff --git a/app-arch/7zip/7zip-23.01.ebuild b/app-arch/7zip/7zip-23.01.ebuild new file mode 100644 index 000000000..191ccaaee --- /dev/null +++ b/app-arch/7zip/7zip-23.01.ebuild @@ -0,0 +1,63 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +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" + +IUSE="asm" +SLOT="0" +KEYWORDS="~amd64" + +S="${WORKDIR}/CPP/7zip/" +RESTRICT="mirror" + +RDEPEND="" +DEPEND="${RDEPEND}" +BDEPEND="asm? ( dev-lang/jwasm )" + +pkg_setup() { + # instructions in DOC/readme.txt, Compiling 7-Zip for Unix/Linux + # TLDR; every combination of options (clang|gcc)+(asm/noasm) + # has a dedicated makefile & builddir + mfile="cmpl" + if tc-is-clang; then + mfile="${mfile}_clang" + bdir=c + elif tc-is-gcc; then + mfile="${mfile}_gcc" + bdir=g + else + die "Unsupported compiler: $(tc-getCC)" + fi + if use asm ; then + mfile="${mfile}_x64" + bdir="${bdir}_x64" + fi + export mfile="${mfile}.mak" + export bdir +} + +src_prepare() { + default + sed -i -e 's/-Werror //g' ./7zip_gcc.mak || die "Error removing -Werror" + sed -i -e 's/$(LFLAGS_STRIP)//g' ./7zip_gcc.mak \ + || die "Error removing hardcoded strip" +} + +src_compile() { + pushd "./Bundles/Alone2" || die "Unable to switch directory" + # USE_JWASM=1 - if asm: use JWasm assembler instead of Asmc (not a gentoo package) + emake DISABLE_RAR=1 USE_JWASM=1 --file "../../${mfile}" + popd > /dev/null || die "Unable to switch directory" +} + +src_install() { + dobin "./Bundles/Alone2/b/${bdir}/7zz" +} diff --git a/app-arch/7zip/Manifest b/app-arch/7zip/Manifest new file mode 100644 index 000000000..0f23ebee4 --- /dev/null +++ b/app-arch/7zip/Manifest @@ -0,0 +1 @@ +DIST 7zip-23.01.tar.xz 1378588 BLAKE2B 348484b24b39db70e513fe50d79954ea0e2dd669f83e3601fa796c8f0ca4734132ca20fac8cda9b8ba550bad9146627fc0ae07056abb99028ef6d825b6a533bd SHA512 e39f660c023aa65e55388be225b5591fe2a5c9138693f3c9107e2eb4ce97fafde118d3375e01ada99d29de9633f56221b5b3d640c982178884670cd84c8aa986 diff --git a/app-arch/7zip/metadata.xml b/app-arch/7zip/metadata.xml new file mode 100644 index 000000000..099821269 --- /dev/null +++ b/app-arch/7zip/metadata.xml @@ -0,0 +1,19 @@ + + + + + Use dev-lang/jwasm to include optimized code + + + m@matous.dev + Martin Matouš + + + + Igor Pavlov + + sevenzip + https://www.7-zip.org/history.txt + https://sourceforge.net/p/sevenzip/bugs/ + + -- cgit v1.2.3-65-gdbad