diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | gcc-12.patch | 17 |
3 files changed, 26 insertions, 4 deletions
@@ -1,12 +1,14 @@ pkgbase = 7-zip pkgdesc = File archiver with a high compression ratio pkgver = 21.07 - pkgrel = 1 + pkgrel = 2 url = https://www.7-zip.org arch = x86_64 license = LGPL makedepends = uasm source = https://7-zip.org/a/7z2107-src.7z + source = gcc-12.patch sha256sums = d1074d56f415aab99d99e597a7b66dc455dba6349ae8a4c89df76475b6a1284c + sha256sums = e4d34366e091b8404dd04f02bcad46518d2930ec0b4a420e1316db020234b085 pkgname = 7-zip @@ -2,18 +2,21 @@ pkgname=7-zip pkgver=21.07 -pkgrel=1 +pkgrel=2 pkgdesc="File archiver with a high compression ratio" url="https://www.7-zip.org" license=(LGPL) arch=(x86_64) makedepends=(uasm) -source=(https://7-zip.org/a/7z2107-src.7z) -sha256sums=('d1074d56f415aab99d99e597a7b66dc455dba6349ae8a4c89df76475b6a1284c') +source=(https://7-zip.org/a/7z2107-src.7z + gcc-12.patch) +sha256sums=('d1074d56f415aab99d99e597a7b66dc455dba6349ae8a4c89df76475b6a1284c' + 'e4d34366e091b8404dd04f02bcad46518d2930ec0b4a420e1316db020234b085') prepare() { sed -i 's|MY_ASM = asmc|MY_ASM = uasm|g' CPP/7zip/7zip_gcc.mak sed -i 's|LFLAGS_ALL = -s $(MY_ARCH_2) $(LDFLAGS) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2)|LFLAGS_ALL = -s $(MY_ARCH_2) $(LDFLAGS) -Wl,-z,noexecstack $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2)|g' CPP/7zip/7zip_gcc.mak + patch -Np1 -i ../gcc-12.patch } build() { diff --git a/gcc-12.patch b/gcc-12.patch new file mode 100644 index 000000000000..18f76e4a689d --- /dev/null +++ b/gcc-12.patch @@ -0,0 +1,17 @@ +--- a/C/LzmaEnc.c 2021-11-18 19:00:00.000000000 +0100 ++++ b/C/LzmaEnc.c 2022-05-12 20:59:51.038852048 +0200 +@@ -2993,12 +2993,13 @@ +
+ nowPos64 = p->nowPos64;
+ RangeEnc_Init(&p->rc);
+- p->rc.outStream = &outStream.vt;
+
+ if (desiredPackSize == 0)
+ return SZ_ERROR_OUTPUT_EOF;
+
++ p->rc.outStream = &outStream.vt;
+ res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
++ p->rc.outStream = NULL;
+
+ *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
+ *destLen -= outStream.rem;
|