1
0

Compare commits

..

17 Commits

11 changed files with 269 additions and 2 deletions

View File

@@ -0,0 +1,109 @@
# Copyright 2023-2024 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://7-zip.org/a/7z${NO_DOT_PV}-src.tar.xz
https://7-zip.org/a/7z${NO_DOT_PV}-linux-x64.tar.xz
"
S="${WORKDIR}"
LICENSE="LGPL-2 BSD rar? ( unRAR )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="uasm jwasm rar"
REQUIRED_USE="?? ( uasm jwasm )"
DOCS=( readme.txt History.txt License.txt )
HTML_DOCS=( MANUAL )
DEPEND="${RDEPEND}"
BDEPEND="
uasm? ( dev-lang/uasm )
jwasm? ( dev-lang/jwasm )
"
PATCHES=(
"${FILESDIR}/${P}-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
emake ${args[@]}
popd > /dev/null || die "Unable to switch directory"
}
src_install() {
dobin "./CPP/7zip/Bundles/Alone2/b/${bdir}/7zz"
einstalldocs
}

2
app-arch/7zip/Manifest Normal file
View File

@@ -0,0 +1,2 @@
DIST 7z2407-linux-x64.tar.xz 1554932 BLAKE2B 9229fdac09148c50032656743aba0f8ce1ec06b7fd2dad2c693dc299c5f83fc093ba047e9c3c3971bf4cc9387b0db52c84167202ed7fcecfcc6f5bc508d04ada SHA512 31b5bb832e73f3c2fd0437873fe6130b8d1bd1bea8320d1b27d06bf40dd737758732eb3664fab2c36417b96ffc5daca6607b6f1aefdaa9e697122da60e37a728
DIST 7z2407-src.tar.xz 1488556 BLAKE2B 42b4f9553aaa4797e80a2d50073ff0e77b5261e50766f8c596a632fb013ac1514a2963f27b924485f07728d13a4536c69911867e3728e8f8604ec25fc4c6824e SHA512 0299e5c1e1dfd33ecf22077f812da1f25bf2146a713c7a7e2498d639520f21f029e853914e66a84d1edfc5d721e1f3d914a3171ab336a406a94bc82d5b2d8e5d

View File

@@ -0,0 +1,44 @@
Respect build environment settings
Bug: https://bugs.gentoo.org/913186
Bug: https://bugs.gentoo.org/913188
Bug: https://bugs.gentoo.org/913189
--- a/CPP/7zip/7zip_gcc.mak
+++ b/CPP/7zip/7zip_gcc.mak
@@ -103,14 +103,14 @@ SHARED_EXT=.dll
LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC)
else
SHARED_EXT=.so
-LDFLAGS = -shared -fPIC $(LDFLAGS_STATIC)
+LDFLAGS = -shared -fPIC $(G_LDFLAGS) $(LDFLAGS_STATIC)
CC_SHARED=-fPIC
endif
else
-LDFLAGS = $(LDFLAGS_STATIC)
+LDFLAGS = $(LDFLAGS_STATIC) $(G_LDFLAGS)
# -z force-bti
# -s is not required for clang, do we need it for GCC ???
@@ -169,7 +169,7 @@ endif
-CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) -o $@
+CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) $(G_CFLAGS) -o $@
ifdef IS_MINGW
@@ -209,7 +209,7 @@ CXX_WARN_FLAGS =
#-Wno-invalid-offsetof
#-Wno-reorder
-CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) $(CXX_INCLUDE_FLAGS) -o $@
+CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) $(CXX_INCLUDE_FLAGS) $(G_CXXFLAGS) -o $@
STATIC_TARGET=
ifdef COMPL_STATIC

View File

@@ -1 +1 @@
DIST borgbackup-2.0.0b8.tar.gz 3255734 BLAKE2B 727dc2087e34f1e5753d8cc10864a122f4f5f61bec3fd1118b0e426ded11e852713ffe37f4a06f95588be726c1d4c075fedf551c555531305f63c3c0786c4ead SHA512 7be2100c545cf9b42fd146bc6bcb1622694bae455c30f91436a4c1d7cf194962c02d3671674fcc739e2f5bca9ec600b879742fcec139e923021ba49a61ba2df2
DIST borgbackup-2.0.0b14.tar.gz 2682414 BLAKE2B e6d4ab3e65428135ff42b10c8fe589f2bb02340da23ad37042c4d3a643a9c7ff1846a3cdd1b48fff62190bfe891e8a6c0454de3508e080f59c512add4f12d10e SHA512 bddeeae0862cf887a7ecb231c62e86d135f2a30cb55d97f63ac4c5d791aa5bb28cc912174a6b854d294c73ef8132f06366d292a409987dff3a358fcf92e35a81

View File

@@ -31,7 +31,7 @@ RDEPEND="
app-arch/zstd
virtual/acl
dev-python/pyfuse3[${PYTHON_USEDEP}]
~dev-python/msgpack-1.0.7[${PYTHON_USEDEP}]
~dev-python/msgpack-1.1.0[${PYTHON_USEDEP}]
dev-python/xxhash[${PYTHON_USEDEP}]
dev-python/argon2-cffi[${PYTHON_USEDEP}]
dev-libs/openssl:0=

View File

@@ -0,0 +1 @@
DIST svt-av1-3.1.0.tar.gz 10908555 BLAKE2B d0d34561fc571d5ea236db05f0df6edc9f327373172ae2c6f8b2593ac7f7bc1fe3c547bed19a6b411eb55e43c018c580a278510b42c09010cb33b9771dda00dc SHA512 c2c87a211da67142b72f8fd02ee790a9343751688655e72f5762ce73734a3b971c6937414bdeefb1dc00ad02ff406bf90c9af4a59fe84d2b675f23b51ba07b52

View File

@@ -0,0 +1,42 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib flag-o-matic
DESCRIPTION="Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder)"
HOMEPAGE="https://gitlab.com/AOMediaCodec/SVT-AV1"
_PV="${PV/_rc/-rc}"
if [[ ${PV} = 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/AOMediaCodec/SVT-AV1.git"
else
SRC_URI="https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v${_PV}/SVT-AV1-v${_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
S="${WORKDIR}/SVT-AV1-v${_PV}"
fi
# Also see "Alliance for Open Media Patent License 1.0"
LICENSE="BSD-2 Apache-2.0 BSD ISC LGPL-2.1+ MIT"
SLOT="0"
BDEPEND="amd64? ( dev-lang/yasm ) dev-libs/cpuinfo"
multilib_src_configure() {
append-ldflags -Wl,-z,noexecstack
local mycmakeargs=(
# Tests require linking against https://github.com/Cidana-Developers/aom/tree/av1-normative ?
# undefined reference to `ifd_inspect'
# https://github.com/Cidana-Developers/aom/commit/cfc5c9e95bcb48a5a41ca7908b44df34ea1313c0
-DBUILD_TESTING=OFF
-DCMAKE_OUTPUT_DIRECTORY="${BUILD_DIR}"
)
[[ ${ABI} != amd64 ]] && mycmakeargs+=( -DCOMPILE_C_ONLY=ON )
cmake_src_configure
}

View File

@@ -0,0 +1 @@
DIST progress-0.17.tar.gz 60357 BLAKE2B 27cabd25698ef634630cf61bbeb93b7c0a1defe1f06367ab58555fd02bd45d89576b178f9425169289f19b67b45de3d6b506e8322c23d26c66f91db6b109bd4a SHA512 9c9cb276063069501677457d4808b5386e9d7b21d11bdae5cf5d07fdecaf444199ad27fe0718ec5567dd2388bcb2156fe1ef99ece471173c480e7395965f19f1

View File

@@ -0,0 +1,29 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
DESCRIPTION="Coreutils Viewer: show progress for cp, rm, dd, and so forth"
HOMEPAGE="https://github.com/Xfennec/progress"
SRC_URI="https://github.com/Xfennec/progress/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
RDEPEND="sys-libs/ncurses:="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
src_prepare() {
default
tc-export CC
}
src_install() {
emake PREFIX="${ED}/usr" install
dodoc README.md
}

1
sys-fs/ddrescue/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST ddrescue-1.28.tar.lz 93823 BLAKE2B 8c212f0d495e0df8e0398b97730c812ea9ccb77bd42e730198222e9918e3652fc52d932449b1e0dc9bdd453a123e2450c962e33e98d9845ce81b9a934a5bbdaa SHA512 ad3df2361b3b0228e2875792e0f6b301dc4d9cefd3f4fcdbce180a53c32924ee026bd27397b8efc94f40ee10f5f9d453fa72bd19203b6cb90208881e287e2c46

View File

@@ -0,0 +1,38 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs flag-o-matic unpacker
DESCRIPTION="Copy data from one file or block device to another with read-error recovery"
HOMEPAGE="https://www.gnu.org/software/ddrescue/ddrescue.html"
SRC_URI="mirror://gnu/${PN}/${P}.tar.lz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux"
IUSE="static"
BDEPEND="$(unpacker_src_uri_depends)"
src_configure() {
use static && append-ldflags -static
# not a normal configure script
econf \
--prefix="${EPREFIX}"/usr \
CXX="$(tc-getCXX)" \
CPPFLAGS="${CPPFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}"
}
src_test() {
./testsuite/check.sh "${S}"/testsuite || die
}
src_install() {
emake DESTDIR="${D}" install install-man
einstalldocs
}