commit:     8d68b319a21d850d0080ac3c17a1d498bc224ac0
Author:     NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Sat Apr 13 00:16:56 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 13 06:13:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d68b319

app-arch/7zip: fix #929025, add some comments

Closes: https://bugs.gentoo.org/929025
Signed-off-by: NRK <nrk <AT> disroot.org>
Closes: https://github.com/gentoo/gentoo/pull/36230
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-arch/7zip/7zip-23.01.ebuild                        | 16 ++++++++--------
 app-arch/7zip/files/7zip-23.01-respect-build-env.patch |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/app-arch/7zip/7zip-23.01.ebuild b/app-arch/7zip/7zip-23.01.ebuild
index 631aad045b4c..cd0af0601e23 100644
--- a/app-arch/7zip/7zip-23.01.ebuild
+++ b/app-arch/7zip/7zip-23.01.ebuild
@@ -8,12 +8,12 @@ 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 used for docs
+# linux-x64 tarball is only used for docs
 SRC_URI="
        mirror://sourceforge/sevenzip/7-Zip/${PV}/7z${NO_DOT_PV}-src.tar.xz
        
mirror://sourceforge/sevenzip/7-Zip/${PV}/7z${NO_DOT_PV}-linux-x64.tar.xz
 "
-S="${WORKDIR}/CPP/7zip"
+S="${WORKDIR}"
 
 LICENSE="LGPL-2 BSD rar? ( unRAR )"
 SLOT="0"
@@ -63,16 +63,18 @@ pkg_setup() {
 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
-
-       sed -i -e 's/-Werror //g' ./7zip_gcc.mak || die "Error removing -Werror"
 }
 
 src_compile() {
-       pushd "./Bundles/Alone2" || die "Unable to switch directory"
+       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}
@@ -102,8 +104,6 @@ src_compile() {
 }
 
 src_install() {
-       dobin "./Bundles/Alone2/b/${bdir}/7zz"
-
-       pushd "${WORKDIR}" || die "Unable to switch directory"
+       dobin "./CPP/7zip/Bundles/Alone2/b/${bdir}/7zz"
        einstalldocs
 }

diff --git a/app-arch/7zip/files/7zip-23.01-respect-build-env.patch 
b/app-arch/7zip/files/7zip-23.01-respect-build-env.patch
index c897cf625931..a5871db9159c 100644
--- a/app-arch/7zip/files/7zip-23.01-respect-build-env.patch
+++ b/app-arch/7zip/files/7zip-23.01-respect-build-env.patch
@@ -5,8 +5,8 @@ Bug: https://bugs.gentoo.org/913188
 Bug: https://bugs.gentoo.org/913189
 
 
---- a/7zip_gcc.mak
-+++ b/7zip_gcc.mak
+--- a/CPP/7zip/7zip_gcc.mak
++++ b/CPP/7zip/7zip_gcc.mak
 @@ -87,14 +87,14 @@ SHARED_EXT=.dll
  LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC)
  else

Reply via email to