aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Matouš <m@matous.dev>2023-08-28 05:10:31 +0200
committerMartin Matouš <m@matous.dev>2023-08-28 05:10:31 +0200
commit9033c9230b8c6a3b6f21713229a128c91714be56 (patch)
treeaae614c37352732a6c736f0a13b66f16ab3d527b /app-arch
parentapp-forensics/mvt: fix missing dependencies: ahocorasick, appdirs (diff)
downloadguru-9033c9230b8c6a3b6f21713229a128c91714be56.tar.gz
guru-9033c9230b8c6a3b6f21713229a128c91714be56.tar.bz2
guru-9033c9230b8c6a3b6f21713229a128c91714be56.zip
app-arch/7zip: new package, add 23.01
Signed-off-by: Martin Matouš <m@matous.dev>
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/7zip/7zip-23.01.ebuild63
-rw-r--r--app-arch/7zip/Manifest1
-rw-r--r--app-arch/7zip/metadata.xml19
3 files changed, 83 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="asm">Use <pkg>dev-lang/jwasm</pkg> to include optimized code</flag>
+ </use>
+ <maintainer type="person">
+ <email>m@matous.dev</email>
+ <name>Martin Matouš</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <name>Igor Pavlov</name>
+ </maintainer>
+ <remote-id type="sourceforge">sevenzip</remote-id>
+ <changelog>https://www.7-zip.org/history.txt</changelog>
+ <bugs-to>https://sourceforge.net/p/sevenzip/bugs/</bugs-to>
+ </upstream>
+</pkgmetadata>