From 5c985b11c354d64e99978681c61f581923bc5a50 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Thu, 16 Dec 2021 11:03:16 -0500 Subject: app-arch/7-zip: upgrade to 21.06 --- app-arch/7-zip/7-zip-21.04_beta-r1.ebuild | 71 ------------------------------- app-arch/7-zip/7-zip-21.06.ebuild | 70 ++++++++++++++++++++++++++++++ app-arch/7-zip/Manifest | 2 +- app-arch/7-zip/files/7-zip-flags.patch | 39 ++++------------- 4 files changed, 80 insertions(+), 102 deletions(-) delete mode 100644 app-arch/7-zip/7-zip-21.04_beta-r1.ebuild create mode 100644 app-arch/7-zip/7-zip-21.06.ebuild (limited to 'app-arch') diff --git a/app-arch/7-zip/7-zip-21.04_beta-r1.ebuild b/app-arch/7-zip/7-zip-21.04_beta-r1.ebuild deleted file mode 100644 index 6c7a6c3..0000000 --- a/app-arch/7-zip/7-zip-21.04_beta-r1.ebuild +++ /dev/null @@ -1,71 +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" -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}" - CFLAGS_WARN_WALL="-Wall -Wextra" - ) - if use asm; then - myemakeargs+=(USE_ASM=1 MY_ASM=uasm) - if use amd64; then - myemakeargs+=(IS_X64=1) - elif use arm64; then - myemakeargs+=(IS_ARM64=1) - elif use x86; then - myemakeargs+=(IS_X86=1) - fi - 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/7-zip-21.06.ebuild b/app-arch/7-zip/7-zip-21.06.ebuild new file mode 100644 index 0000000..2934c65 --- /dev/null +++ b/app-arch/7-zip/7-zip-21.06.ebuild @@ -0,0 +1,70 @@ +# 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}" + ) + if use asm; then + myemakeargs+=(USE_ASM=1 MY_ASM=uasm) + if use amd64; then + myemakeargs+=(IS_X64=1) + elif use arm64; then + myemakeargs+=(IS_ARM64=1) + elif use x86; then + myemakeargs+=(IS_X86=1) + fi + 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 8f18d25..eb7491c 100644 --- a/app-arch/7-zip/Manifest +++ b/app-arch/7-zip/Manifest @@ -1 +1 @@ -DIST 7z2104-src.7z 1210452 BLAKE2B 6863221c213f887e4ce82866e256316a4d5b11da0c8b1cced88c592230a8e9fde84cf9de255e9ec61f1fde376532b1e67faaf317761dd9da159550a255fcc5ea SHA512 83381c7c7d73abe067be18787c0e14dabb056c0bbddb2bf4ae5810bef501cdb398a8625dec742cfa6fcfcd27a164ea2303cbf25d1b2fe4fbc1932948a3ee0e8d +DIST 7z2106-src.7z 1215031 BLAKE2B c66d29224e3cab210a9d575b1954d63499cf0eea7c04a5fa339498aca292aa6b2198024de380c25a16c88953fdae2e94ed9760350464f808b3d69dfbdae5aea8 SHA512 2ad05eaf14770584d7e6111734c7c239ab0163f9fd9b0cc5473fa33d5c882b0493331dd0f851af5e8be2b7d1eaede2f96f30f8e777b05d17c46a0121ff8211ec diff --git a/app-arch/7-zip/files/7-zip-flags.patch b/app-arch/7-zip/files/7-zip-flags.patch index 372819d..963037c 100644 --- a/app-arch/7-zip/files/7-zip-flags.patch +++ b/app-arch/7-zip/files/7-zip-flags.patch @@ -1,12 +1,12 @@ diff -ru a/CPP/7zip/7zip_gcc.mak b/CPP/7zip/7zip_gcc.mak ---- a/CPP/7zip/7zip_gcc.mak 2021-07-16 08:23:49.524088300 -0400 -+++ b/CPP/7zip/7zip_gcc.mak 2021-08-14 14:43:34.618587556 -0400 -@@ -13,13 +13,13 @@ +--- a/CPP/7zip/7zip_gcc.mak 2021-11-20 04:00:00.000000000 -0500 ++++ b/CPP/7zip/7zip_gcc.mak 2021-12-16 11:01:16.236763027 -0500 +@@ -14,13 +14,13 @@ ifneq ($(CC), xlc) -CFLAGS_WARN_WALL = -Wall -Werror -Wextra -+CFLAGS_WARN_WALL = -Wall -Wextra -Wno-misleading-indentation ++CFLAGS_WARN_WALL = -Wall -Wextra endif # for object file @@ -17,33 +17,12 @@ diff -ru a/CPP/7zip/7zip_gcc.mak b/CPP/7zip/7zip_gcc.mak -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ -fPIC -@@ -62,17 +62,17 @@ - - ifdef IS_MINGW - SHARED_EXT=.dll --LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC) -+MY_LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC) - else - SHARED_EXT=.so --LDFLAGS = -shared -fPIC $(LDFLAGS_STATIC) -+MY_LDFLAGS = -shared -fPIC $(LDFLAGS_STATIC) - CC_SHARED=-fPIC - endif - - - else - --LDFLAGS = $(LDFLAGS_STATIC) -+MY_LDFLAGS = $(LDFLAGS_STATIC) - # -s is not required for clang, do we need it for GGC ??? - # -s - -@@ -156,7 +156,7 @@ +@@ -162,7 +162,7 @@ + $(O): $(MY_MKDIR) $(O) +-LFLAGS_ALL = -s $(MY_ARCH_2) $(LDFLAGS) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2) ++LFLAGS_ALL = $(MY_ARCH_2) $(LDFLAGS) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2) $(PROGPATH): $(OBJS) -- $(CXX) -o $(PROGPATH) -s $(MY_ARCH_2) $(LDFLAGS) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2) -+ $(CXX) -o $(PROGPATH) $(MY_ARCH_2) $(LDFLAGS) $(MY_LDFLAGS) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2) - - # -s strips debug sections from executable in GCC + $(CXX) -o $(PROGPATH) $(LFLAGS_ALL) -- cgit v1.2.3-70-g09d2