summaryrefslogtreecommitdiff
path: root/app-arch
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-27 03:04:42 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-27 03:04:42 -0500
commitc6e6588bafac78d585ece24e4dabdf99f3af211d (patch)
treee68bccff68681d3201cf21c1a5682ad5abbfd4f3 /app-arch
parent8a7e9bb6193b9b54ffb149bdf92c9689a3798e00 (diff)
downloadbaldeagleos-repo-c6e6588bafac78d585ece24e4dabdf99f3af211d.tar.gz
baldeagleos-repo-c6e6588bafac78d585ece24e4dabdf99f3af211d.tar.xz
baldeagleos-repo-c6e6588bafac78d585ece24e4dabdf99f3af211d.zip
Adding metadata
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/7zip/7zip-26.02.ebuild118
-rw-r--r--app-arch/7zip/Manifest2
2 files changed, 120 insertions, 0 deletions
diff --git a/app-arch/7zip/7zip-26.02.ebuild b/app-arch/7zip/7zip-26.02.ebuild
new file mode 100644
index 000000000000..645205bd4674
--- /dev/null
+++ b/app-arch/7zip/7zip-26.02.ebuild
@@ -0,0 +1,118 @@
+# Copyright 2023-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edos2unix flag-o-matic toolchain-funcs
+
+NO_DOT_PV=$(ver_rs 1- '')
+DESCRIPTION="Free file archiver for extremely high compression"
+HOMEPAGE="https://www.7-zip.org/ https://sourceforge.net/projects/sevenzip/"
+# linux-x64 tarball is only used for docs
+SRC_URI="
+ https://github.com/ip7z/7zip/releases/download/${PV}/7z${NO_DOT_PV}-src.tar.xz
+ https://github.com/ip7z/7zip/releases/download/${PV}/7z${NO_DOT_PV}-linux-x64.tar.xz
+"
+S="${WORKDIR}"
+
+LICENSE="LGPL-2 BSD rar? ( unRAR )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="uasm jwasm rar +symlink"
+REQUIRED_USE="?? ( uasm jwasm )"
+
+DOCS=( readme.txt History.txt License.txt )
+HTML_DOCS=( MANUAL )
+
+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"
+)
+
+# TODO(NRK): also build and install the library
+# TODO(NRK): make it so this package can be used as a drop-in replacement
+# for app-arch/p7zip ??
+
+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 jwasm || use uasm ; then
+ mfile="${mfile}_x64"
+ bdir="${bdir}_x64"
+ fi
+ export mfile="${mfile}.mak"
+ export bdir
+}
+
+src_prepare() {
+ # patch doesn't deal with CRLF even if file+patch match
+ # not even with --ignore-whitespace, --binary or --force
+ pushd "./CPP/7zip" || die "Unable to switch directory"
+ edos2unix ./7zip_gcc.mak ./var_gcc{,_x64}.mak ./var_clang{,_x64}.mak
+ sed -i -e 's/-Werror //g' ./7zip_gcc.mak || die "Error removing -Werror"
+ popd >/dev/null || die "Unable to switch directory"
+
+ default
+}
+
+src_compile() {
+ pushd "./CPP/7zip/Bundles/Alone2" || die "Unable to switch directory"
+
+ # avoid executable stack when using uasm/jwasm, harmless otherwise
+ append-ldflags -Wl,-z,noexecstack
+ export G_CFLAGS=${CFLAGS}
+ export G_CXXFLAGS=${CXXFLAGS}
+ export G_LDFLAGS=${LDFLAGS}
+
+ local args=(
+ -f "../../${mfile}"
+ CC=$(tc-getCC)
+ CXX=$(tc-getCXX)
+ )
+ # NOTE: makefile doesn't check the value of DISABLE_RAR_COMPRESS, only
+ # whether it's defined or not. so in case user has `rar` enabled
+ # DISABLE_RAR_COMPRESS (and DISABLE_RAR) needs to stay undefined.
+ if ! use rar; then
+ # disables non-free rar code but allows listing and extracting
+ # non-compressed rar archives
+ args+=( DISABLE_RAR_COMPRESS=1 )
+ fi
+ if use jwasm; then
+ args+=( USE_JWASM=1 )
+ elif use uasm; then
+ args+=( MY_ASM=uasm )
+ fi
+
+ mkdir -p "${bdir}" || die # Bug: https://bugs.gentoo.org/933619
+ emake ${args[@]}
+ popd > /dev/null || die "Unable to switch directory"
+}
+
+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
+}
diff --git a/app-arch/7zip/Manifest b/app-arch/7zip/Manifest
index 97ab7dbe1e4d..6817956388af 100644
--- a/app-arch/7zip/Manifest
+++ b/app-arch/7zip/Manifest
@@ -4,3 +4,5 @@ DIST 7z2600-linux-x64.tar.xz 1572504 BLAKE2B 5d60d86dbdbe4fa0bfb5029e7c5edef4656
DIST 7z2600-src.tar.xz 1538112 BLAKE2B 4ac1ecf98aa3bdcc968a75e250b467b0c38eb27dd6752fdc7c025d6d1b73cca648a12ba8a26691443cf929c22ef560c211959693f82acdff5d27cf0f8d159645 SHA512 2374b3d90388838391ef35a95a81e97639478598011d46adee9ddb84ed8c287fad47f6d2d794c22b0fc5c1f7dec4bfaaa25b6e747c5e78100eb63818fe85b897
DIST 7z2601-linux-x64.tar.xz 1572208 BLAKE2B 265cd7632a6f1ce67eb98586ebb105719d68151ab484070909b78eefbb62c344ca179a26f41aa98e126e76cf4531b8607e23aaf94f78e1a89354726254bfdc7e SHA512 e58d85db51a2c71f79645b2615c098b23ecf2abd4b2e97eed914cd4e18aaf9a86a169e7b55d72c55df3d34cb88944b99a8e0936ab4d5192ee3c334072e597f2e
DIST 7z2601-src.tar.xz 1543032 BLAKE2B 3bbe07755814a8760cfb99a0b7200d7fba5dae9704b144bc84e9f571a938c9225775d880a971190a0b2f643434ccb96865552167b65b818086ad69f4925a17fd SHA512 fd5e6228020e1e3cc51f85b917e61c5583d307ff23b182a42de9faf7f1dda09c70fd228072e82074e81e43639c6ea7045ebd38fb90f437efc5ebff9c5323fcf9
+DIST 7z2602-linux-x64.tar.xz 1571416 BLAKE2B 2f83d967b3a16d4aaf3a96ba7c242ff7fe3d9628a7a556f797ec509fe12a1e08b9b453f571fa2911a941244fb6482b99b294770736debfaeaa1b966003973e57 SHA512 1f8d3c90287f006501ed06da6e22687267e95b39a92267220ed5d2f218e950e5cecbb410aefef3c92a067857943f417767f410b07d74c0caa2b86f37b05d2a1e
+DIST 7z2602-src.tar.xz 1543480 BLAKE2B 26fb72ffef65c316ff97959981e4f8eb4dbbd5ac09900d3c6ab880347ff23cc781f4b4196f138e8c558afa5c1fd738feebc73299f6be70d9787dfc9ffa9afc69 SHA512 85449360904b295cb47a86597cca5e6623f4119e4e5ad3491d67bea8cd416bad68c4bfb69b9ec521ccee6e431a080d9e8aa8f5eecb69d8305c66973048e56a16