mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-21 06:36:45 +02:00
64 lines
1.8 KiB
Text
64 lines
1.8 KiB
Text
# Maintainer: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
|
|
pkgname=7zip
|
|
pkgver=24.09
|
|
_pkgver=${pkgver//./}
|
|
pkgrel=0
|
|
pkgdesc="File archiver with a high compression ratio"
|
|
url="https://7-zip.org/"
|
|
arch="all"
|
|
license="LGPL-2.0-only"
|
|
makedepends="make build-base"
|
|
subpackages="$pkgname-doc"
|
|
source="https://7-zip.org/a/7z$_pkgver-src.tar.xz
|
|
7-zip-flags.patch
|
|
7-zip-musl.patch
|
|
"
|
|
builddir="$srcdir"
|
|
|
|
provides="7zip-virtual p7zip=$pkgver-r$pkgrel"
|
|
replaces="p7zip"
|
|
provider_priority=100
|
|
|
|
patch_args="-p1 --binary"
|
|
|
|
build() {
|
|
cd CPP/7zip/Bundles/Alone2
|
|
mkdir -p b/g
|
|
# TODO: enable asm (requires jwasm or uasm)
|
|
# DISABLE_RAR: RAR codec is non-free
|
|
# -D_GNU_SOURCE: broken sched.h defines
|
|
make -f ../../cmpl_gcc.mak \
|
|
CC="${CC:-cc} $CFLAGS $LDFLAGS -D_GNU_SOURCE" \
|
|
CXX="${CXX:-c++} $CXXFLAGS $LDFLAGS -D_GNU_SOURCE" \
|
|
DISABLE_RAR=1
|
|
}
|
|
|
|
check() {
|
|
# no proper test suite so just try to compress and decompress some files
|
|
rm -rf "$builddir"/tmp
|
|
cd "$builddir"
|
|
mkdir tmp
|
|
|
|
CPP/7zip/Bundles/Alone2/b/g/7zz a tmp/7z$_pkgver-src.7z Asm C CPP DOC
|
|
cd tmp
|
|
../CPP/7zip/Bundles/Alone2/b/g/7zz x 7z$_pkgver-src.7z
|
|
|
|
# check if extracted result is identical
|
|
diff -r ../Asm Asm
|
|
diff -r ../C C
|
|
diff -r ../CPP CPP
|
|
diff -r ../DOC DOC
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 CPP/7zip/Bundles/Alone2/b/g/7zz "$pkgdir"/usr/bin/7zz
|
|
ln -s 7zz "$pkgdir"/usr/bin/7z
|
|
|
|
install -Dm644 "$builddir"/DOC/* -t "$pkgdir"/usr/share/doc/$pkgname/
|
|
}
|
|
|
|
sha512sums="
|
|
461b702eb275655ebda70e128a5e184d15d2b0556f11ab1b409c0ff8a1e9c5d64761bdfb1685c5a0278534024a1e4ce46e4443d55cae373e487dc9ae180ef310 7z2409-src.tar.xz
|
|
1bacb622842e48b12e7d0557b2cae11aa2a51119308857bfd3479e11d13410b7bbde2fdee74a3645459cf2ca9a9a98c56bde82beee79ec59a46a2f406f7310f5 7-zip-flags.patch
|
|
dd5c38548c348a850d6e82ed42ba2bdc4b9e363fa946e67158a1f042179d8155a8837c89d732f748ffd1ba948bf2b7cd456f6db50e122ebbd7ba9c8a1cd7b04b 7-zip-musl.patch
|
|
"
|