From b4aa8a16d26a2fd3fdaa796b316eb92588989df0 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Sat, 13 Nov 2021 20:30:37 -0500 Subject: app-arch/7-zip: update, add asm --- app-arch/7-zip/7-zip-21.03_beta-r1.ebuild | 49 ---------------------- app-arch/7-zip/7-zip-21.04_beta.ebuild | 69 +++++++++++++++++++++++++++++++ app-arch/7-zip/Manifest | 2 +- 3 files changed, 70 insertions(+), 50 deletions(-) delete mode 100644 app-arch/7-zip/7-zip-21.03_beta-r1.ebuild create mode 100644 app-arch/7-zip/7-zip-21.04_beta.ebuild (limited to 'app-arch/7-zip') diff --git a/app-arch/7-zip/7-zip-21.03_beta-r1.ebuild b/app-arch/7-zip/7-zip-21.03_beta-r1.ebuild deleted file mode 100644 index 295b6de..0000000 --- a/app-arch/7-zip/7-zip-21.03_beta-r1.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic - -MY_PV=${PV%%_*} -MY_PV=${MY_PV//./} - -DESCRIPTION="File archiver with a high compression ratio" -HOMEPAGE="https://7-zip.org/" -SRC_URI="https://7-zip.org/a/7z${MY_PV}-src.7z" - -LICENSE="LGPL-2.1+" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -DEPEND="" -RDEPEND="${DEPEND}" -BDEPEND="|| ( virtual/7z app-arch/libarchive app-arch/unar )" - -S=${WORKDIR}/7z${MY_PV}-src - -PATCHES=( ${FILESDIR}/7-zip-flags.patch ) - -src_unpack() { - if command -v 7z >/dev/null 2>&1; then - 7z x "${DISTDIR}/7z${MY_PV}-src.7z" -o"$S" || die - elif command -v bsdtar >/dev/null 2>&1; then - mkdir "$S" || die - bsdtar -C "$S" -xf "${DISTDIR}/7z${MY_PV}-src.7z" || die - elif command -v unar >/dev/null 2>&1; then - unar -d "$S" "${DISTDIR}/7z${MY_PV}-src.7z" || die - else - die "no 7z unpacker found" - fi -} - -src_compile() { - cd CPP/7zip/Bundles/Alone2 - make -f ../../cmpl_gcc.mak -} - -src_install() { - dobin CPP/7zip/Bundles/Alone2/b/g/7zz - dosym 7zz /usr/bin/7z - dodoc DOC/* -} diff --git a/app-arch/7-zip/7-zip-21.04_beta.ebuild b/app-arch/7-zip/7-zip-21.04_beta.ebuild new file mode 100644 index 0000000..ee18d6b --- /dev/null +++ b/app-arch/7-zip/7-zip-21.04_beta.ebuild @@ -0,0 +1,69 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic + +MY_PV=${PV%%_*} +MY_PV=${MY_PV//./} + +DESCRIPTION="File archiver with a high compression ratio" +HOMEPAGE="https://7-zip.org/" +SRC_URI="https://7-zip.org/a/7z${MY_PV}-src.7z" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+asm" + +BDEPEND=" + || ( virtual/7z app-arch/libarchive app-arch/unar ) + asm? ( + amd64? ( dev-lang/uasm ) + arm64? ( dev-lang/uasm ) + x86? ( dev-lang/uasm ) + ) +" + +S=${WORKDIR}/7z${MY_PV}-src + +PATCHES=( ${FILESDIR}/7-zip-flags.patch ) + +src_unpack() { + if command -v 7z >/dev/null 2>&1; then + 7z x "${DISTDIR}/7z${MY_PV}-src.7z" -o"$S" || die + elif command -v bsdtar >/dev/null 2>&1; then + mkdir "$S" || die + bsdtar -C "$S" -xf "${DISTDIR}/7z${MY_PV}-src.7z" || die + elif command -v unar >/dev/null 2>&1; then + unar -d "$S" "${DISTDIR}/7z${MY_PV}-src.7z" || die + else + die "no 7z unpacker found" + fi +} + +src_compile() { + cd CPP/7zip/Bundles/Alone2 || die + local myemakeargs=( + CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}" + CXX="$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS}" + MY_ASM=uasm + CFLAGS_WARN_WALL="-Wall -Wextra" + ) + if use amd64; then + myemakeargs+=(IS_X64=1 USE_ASM=1) + elif use arm64; then + myemakeargs+=(IS_ARM64=1 USE_ASM=1) + elif use x86; then + myemakeargs+=(IS_X86=1 USE_ASM=1) + fi + mkdir -p b/g || die + emake -f ../../cmpl_gcc.mak "${myemakeargs[@]}" +} + +src_install() { + dobin CPP/7zip/Bundles/Alone2/b/g/7zz + dosym 7zz /usr/bin/7z + dodoc DOC/* +} diff --git a/app-arch/7-zip/Manifest b/app-arch/7-zip/Manifest index a855961..8f18d25 100644 --- a/app-arch/7-zip/Manifest +++ b/app-arch/7-zip/Manifest @@ -1 +1 @@ -DIST 7z2103-src.7z 1191375 BLAKE2B 002c20cbe0a47fbfce4c10f985972bf316d1e23c46e1047fbe98a9d4d27f1679d402cd6952c587fd6f78dd260896037896c328df9ae8a07865756c4693e93ad6 SHA512 6b2c00418333eb9a4f9d2ca23391dd644ed838b02832326a4c77065f762942d5daaa468f7330a8197b354a90aaf44f01d9412debb905f490351b54f63a3246df +DIST 7z2104-src.7z 1210452 BLAKE2B 6863221c213f887e4ce82866e256316a4d5b11da0c8b1cced88c592230a8e9fde84cf9de255e9ec61f1fde376532b1e67faaf317761dd9da159550a255fcc5ea SHA512 83381c7c7d73abe067be18787c0e14dabb056c0bbddb2bf4ae5810bef501cdb398a8625dec742cfa6fcfcd27a164ea2303cbf25d1b2fe4fbc1932948a3ee0e8d -- cgit v1.2.3-70-g09d2