overlay/app-arch/7-zip/7-zip-23.01.ebuild
Jared Allard c0d6f5971d
feat: automatic updates and elint (#1)
Adds an automatic updater to handle updating ebuilds in this repository
based on the latest version available on the remote.

Also puts `elint` in this repo since I've been working on this one more
than the former.
2024-02-18 17:52:09 -08:00

59 lines
1.1 KiB
Bash

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
DESCRIPTION="A file archiver with a high compression ratio"
HOMEPAGE="https://7-zip.org"
SRC_URI="mirror://sourceforge/project/sevenzip/7-Zip/${PV}/7z$(ver_rs 1 '')-src.tar.xz"
RESTRICT="primaryuri"
S="${WORKDIR}"
LICENSE="LGPL-2.1 BSD rar? ( unRAR )"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE="asm rar static"
RDEPEND=""
DEPEND="${RDEPEND}"
BDEPEND="
asm? ( dev-lang/asmc )
"
DOCS=(
DOC/7zC.txt
DOC/7zFormat.txt
DOC/lzma.txt
DOC/Methods.txt
DOC/readme.txt
DOC/src-history.txt
)
src_prepare() {
sed -e 's: -\(O2\|s\) ::' -i CPP/7zip/7zip_gcc.mak
default
}
src_compile() {
local myemakeargs=(
CFLAGS_BASE2="${CFLAGS}"
CXXFLAGS_BASE2="${CXXFLAGS}"
CFLAGS_WARN_WALL='-Wall -Wextra'
IS_X64=1
USE_ASM=$(usex asm 1 '')
COMPL_STATIC=$(usex static 1 '')
O="${S}"
DISABLE_RAR=$(usex rar '' 1)
)
tc-env_build emake \
-C CPP/7zip/Bundles/Alone2 \
-f makefile.gcc \
"${myemakeargs[@]}"
}
src_install() {
dobin 7zz$(usex static 's' '')
einstalldocs
}