76 lines
1.9 KiB
Bash
76 lines
1.9 KiB
Bash
# Template file for '7zip'
|
|
pkgname=7zip
|
|
version=24.07
|
|
revision=1
|
|
short_desc="File archiver with a high compression ratio"
|
|
maintainer="Roberto Ricci <io@r-ricci.it>"
|
|
license="LGPL-2.1-or-later, BSD-3-Clause"
|
|
homepage="https://www.7-zip.org"
|
|
changelog="https://www.7-zip.org/history.txt"
|
|
distfiles="https://www.7-zip.org/a/7z${version//./}-src.tar.xz"
|
|
checksum=d1b0874a3f1c26df21c761a4a30691dc1213e8577f18ee78326c14ca4d683e2b
|
|
alternatives="
|
|
7z:7z:/usr/bin/7zip
|
|
7z:7za:/usr/bin/7zip
|
|
7z:7zr:/usr/bin/7zip
|
|
7z:7zz:/usr/bin/7zip"
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
# missing pthread_attr_setaffinity_np()
|
|
CFLAGS+=" -DZ7_AFFINITY_DISABLE"
|
|
CXXFLAGS+=" -DZ7_AFFINITY_DISABLE"
|
|
fi
|
|
|
|
do_build() {
|
|
cd "${wrksrc}/CPP/7zip/Bundles/Alone2"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
aarch64*) _7z_makefile="../../cmpl_gcc_arm64.mak";;
|
|
*) _7z_makefile="../../cmpl_gcc.mak";;
|
|
esac
|
|
|
|
for opts in "O=b/norar DISABLE_RAR_COMPRESS=1" "O=b/rar"; do
|
|
make "$makejobs" -f "$_7z_makefile" \
|
|
CC="$CC" CXX="$CXX" \
|
|
VOID_CFLAGS="$CFLAGS" VOID_CXXFLAGS="$CXXFLAGS" \
|
|
VOID_LDFLAGS="$LDFLAGS" VOID_CPPFLAGS="$CPPFLAGS" \
|
|
$opts
|
|
done
|
|
}
|
|
|
|
do_install() {
|
|
vbin "${wrksrc}/CPP/7zip/Bundles/Alone2/b/norar/7zz" 7zip
|
|
vlicense "${wrksrc}/DOC/License.txt"
|
|
}
|
|
|
|
7zip-unrar_package() {
|
|
license+=", custom:freeware"
|
|
repository=nonfree
|
|
short_desc+=" - RAR support"
|
|
alternatives="
|
|
7z:7z:/usr/bin/7zip-unrar
|
|
7z:7za:/usr/bin/7zip-unrar
|
|
7z:7zr:/usr/bin/7zip-unrar
|
|
7z:7zz:/usr/bin/7zip-unrar"
|
|
|
|
pkg_install() {
|
|
vbin "${wrksrc}/CPP/7zip/Bundles/Alone2/b/rar/7zz" 7zip-unrar
|
|
vlicense "${wrksrc}/DOC/License.txt"
|
|
}
|
|
}
|
|
|
|
p7zip_package() {
|
|
build_style=meta
|
|
depends=7zip
|
|
short_desc="Command-line version of the 7zip compressed file archive"
|
|
short_desc+=" (transitional dummy package)"
|
|
}
|
|
|
|
p7zip-unrar_package() {
|
|
build_style=meta
|
|
repository=nonfree
|
|
depends=7zip-unrar
|
|
short_desc="Command-line version of the 7zip compressed file archive - RAR support"
|
|
short_desc+=" (transitional dummy package)"
|
|
}
|