summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2020-06-10 21:26:23 +0200
committerLars Wendler <polynomial-c@gentoo.org>2020-07-24 12:28:05 +0200
commitc5d4f58c114d6a52db7a73c5493b0e82e5119ed7 (patch)
tree12192466f319774a9cc1977b65eab833f5188abc /app-arch
parentpackage.mask: last-rite dev-util/cutter (diff)
downloadgentoo-c5d4f58c114d6a52db7a73c5493b0e82e5119ed7.tar.gz
gentoo-c5d4f58c114d6a52db7a73c5493b0e82e5119ed7.tar.bz2
gentoo-c5d4f58c114d6a52db7a73c5493b0e82e5119ed7.zip
app-arch/zip: EAPI 7
Closes: https://bugs.gentoo.org/724200 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/16171 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/zip/files/zip-3.0-format-security.patch4
-rw-r--r--app-arch/zip/files/zip-3.0-natspec.patch28
-rw-r--r--app-arch/zip/files/zip-3.0-no-crypt.patch8
-rw-r--r--app-arch/zip/files/zip-3.0-pic.patch4
-rw-r--r--app-arch/zip/files/zip-3.0-zipnote-freeze.patch14
-rw-r--r--app-arch/zip/zip-3.0-r4.ebuild66
6 files changed, 95 insertions, 29 deletions
diff --git a/app-arch/zip/files/zip-3.0-format-security.patch b/app-arch/zip/files/zip-3.0-format-security.patch
index 1edc2d6a1b88..63188b5063cb 100644
--- a/app-arch/zip/files/zip-3.0-format-security.patch
+++ b/app-arch/zip/files/zip-3.0-format-security.patch
@@ -1,5 +1,5 @@
---- zip.c
-+++ zip.c
+--- a/zip.c
++++ b/zip.c
@@ -1028,7 +1028,7 @@
for (i = 0; i < sizeof(text)/sizeof(char *); i++)
diff --git a/app-arch/zip/files/zip-3.0-natspec.patch b/app-arch/zip/files/zip-3.0-natspec.patch
index 1dfce09d1331..29ed4827e3ce 100644
--- a/app-arch/zip/files/zip-3.0-natspec.patch
+++ b/app-arch/zip/files/zip-3.0-natspec.patch
@@ -14,8 +14,8 @@ https://bugs.gentoo.org/show_bug.cgi?id=275244
pva@gentoo.org
=== modified file 'fileio.c'
---- fileio.c 2010-12-22 13:02:43 +0000
-+++ fileio.c 2010-12-22 13:03:00 +0000
+--- a/fileio.c
++++ b/fileio.c
@@ -929,7 +929,7 @@
}
if ((zname = in2ex(iname)) == NULL)
@@ -27,8 +27,8 @@ pva@gentoo.org
#else
=== modified file 'globals.c'
---- globals.c 2010-12-22 13:02:43 +0000
-+++ globals.c 2010-12-22 13:03:00 +0000
+--- a/globals.c
++++ b/globals.c
@@ -32,7 +32,7 @@
int scanimage = 1; /* 1=scan through image files */
#endif
@@ -40,8 +40,8 @@ pva@gentoo.org
int filesync = 0; /* 1=file sync, delete entries not on file system */
=== modified file 'unix/Makefile'
---- unix/Makefile 2010-12-22 13:02:43 +0000
-+++ unix/Makefile 2010-12-22 15:43:40 +0000
+--- a/unix/Makefile
++++ b/unix/Makefile
@@ -38,7 +38,7 @@
MANFLAGS = 644
@@ -73,8 +73,8 @@ pva@gentoo.org
zipsplit$E: $(OBJS)
=== modified file 'unix/osdep.h'
---- unix/osdep.h 2010-12-22 13:02:43 +0000
-+++ unix/osdep.h 2010-12-22 15:45:29 +0000
+--- a/unix/osdep.h
++++ b/unix/osdep.h
@@ -78,3 +78,6 @@
#if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)
# define USE_EF_UT_TIME
@@ -84,8 +84,8 @@ pva@gentoo.org
+# define OS_CODE 0xb00
=== modified file 'unix/unix.c'
---- unix/unix.c 2010-12-22 13:02:43 +0000
-+++ unix/unix.c 2010-12-22 13:03:00 +0000
+--- a/unix/unix.c
++++ b/unix/unix.c
@@ -14,6 +14,11 @@
#include <time.h>
@@ -153,8 +153,8 @@ pva@gentoo.org
#else
=== modified file 'zip.c'
---- zip.c 2010-12-22 13:02:43 +0000
-+++ zip.c 2010-12-22 13:03:00 +0000
+--- a/zip.c
++++ b/zip.c
@@ -2025,6 +2025,7 @@
#endif /* ?MACOS */
{"J", "junk-sfx", o_NO_VALUE, o_NOT_NEGATABLE, 'J', "strip self extractor from archive"},
@@ -183,8 +183,8 @@ pva@gentoo.org
case o_ll:
=== modified file 'zipnote.c'
---- zipnote.c 2010-12-22 13:02:43 +0000
-+++ zipnote.c 2010-12-22 15:42:45 +0000
+--- a/zipnote.c
++++ b/zipnote.c
@@ -21,6 +21,11 @@
#include "revision.h"
#include <signal.h>
diff --git a/app-arch/zip/files/zip-3.0-no-crypt.patch b/app-arch/zip/files/zip-3.0-no-crypt.patch
index 2858b51ec2c9..9a1302c1be02 100644
--- a/app-arch/zip/files/zip-3.0-no-crypt.patch
+++ b/app-arch/zip/files/zip-3.0-no-crypt.patch
@@ -4,8 +4,8 @@ forward ported from zip-2.32
http://bugs.gentoo.org/238398
---- zip.c
-+++ zip.c
+--- a/zip.c
++++ b/zip.c
@@ -3452,6 +3452,9 @@ char **argv; /* command line tokens */
/* Key not yet specified. If needed, get/verify it now. */
@@ -24,8 +24,8 @@ http://bugs.gentoo.org/238398
}
if (key) {
/* if -P "" could get here */
---- zipcloak.c
-+++ zipcloak.c
+--- a/zipcloak.c
++++ b/zipcloak.c
@@ -744,6 +744,28 @@ struct option_struct far options[] = {
int main OF((void));
diff --git a/app-arch/zip/files/zip-3.0-pic.patch b/app-arch/zip/files/zip-3.0-pic.patch
index b4c53de694f7..69e0445f9646 100644
--- a/app-arch/zip/files/zip-3.0-pic.patch
+++ b/app-arch/zip/files/zip-3.0-pic.patch
@@ -1,8 +1,8 @@
if our toolchain generates PIC by default, then do not use the hand written
assembly files as none of it is PIC friendly.
---- unix/configure
-+++ unix/configure
+--- a/unix/configure
++++ b/unix/configure
@@ -29,6 +29,9 @@
echo Check if we can use asm code
OBJA=""
diff --git a/app-arch/zip/files/zip-3.0-zipnote-freeze.patch b/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
index cfe78f0a100a..28f47d039b8e 100644
--- a/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
+++ b/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
@@ -1,6 +1,6 @@
diff -dupr zip30-old/fileio.c zip30/fileio.c
---- zip30-old/fileio.c 2008-05-28 20:13:24.000000000 +0200
-+++ zip30/fileio.c 2012-06-12 17:30:29.794547493 +0200
+--- a/fileio.c
++++ b/fileio.c
@@ -3502,7 +3502,7 @@ zwchar *local_to_wide_string(local_strin
if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) {
ZIPERR(ZE_MEM, "local_to_wide_string");
@@ -11,9 +11,9 @@ diff -dupr zip30-old/fileio.c zip30/fileio.c
/* in case wchar_t is not zwchar */
diff -dupr zip30-old/zipfile.c zip30/zipfile.c
---- zip30/zipfile.c 2008-07-01 00:15:30.000000000 +0200
-+++ zip30/zipfile.c 2012-06-10 01:59:42.571706181 +0200
-@@ -5406,6 +5406,8 @@ int putlocal(z, rewrite)
+--- a/zipfile.c
++++ b/zipfile.c
+@@ -5406,7 +5406,9 @@ int putlocal(z, rewrite)
if (z->flg & UTF8_BIT) {
/* If this flag is set, then restore UTF-8 as path name */
use_uname = 1;
@@ -34,8 +34,8 @@ diff -dupr zip30-old/zipfile.c zip30/zipfile.c
add_Unicode_Path_cen_extra_field(z);
}
diff -dupr zip30/zipnote.c zip30/zipnote.c
---- zip30/zipnote.c 2008-05-08 04:17:08.000000000 +0200
-+++ zip30/zipnote.c 2012-06-10 02:33:36.372663528 +0200
+--- a/zipnote.c
++++ b/zipnote.c
@@ -575,6 +575,13 @@ char **argv; /* command line
strcpy(z->iname, a+2);
#endif
diff --git a/app-arch/zip/zip-3.0-r4.ebuild b/app-arch/zip/zip-3.0-r4.ebuild
new file mode 100644
index 000000000000..a86ba0299f41
--- /dev/null
+++ b/app-arch/zip/zip-3.0-r4.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs flag-o-matic
+
+MY_P="${PN}${PV//.}"
+DESCRIPTION="Info ZIP (encryption support)"
+HOMEPAGE="http://www.info-zip.org/"
+SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux"
+IUSE="bzip2 crypt natspec unicode"
+
+DEPEND="${RDEPEND}"
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ natspec? ( dev-libs/libnatspec )"
+BDEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${P}"-no-crypt.patch #238398
+ "${FILESDIR}/${P}"-pic.patch
+ "${FILESDIR}/${P}"-exec-stack.patch #122849
+ "${FILESDIR}/${P}"-build.patch #200995
+ "${FILESDIR}/${P}"-zipnote-freeze.patch #322047
+ "${FILESDIR}/${P}"-format-security.patch #512414
+)
+
+src_prepare() {
+ default
+ use natspec && eapply "${FILESDIR}/${PN}"-3.0-natspec.patch #275244
+}
+
+src_configure() {
+ append-cppflags \
+ -DLARGE_FILE_SUPPORT \
+ -DUIDGID_NOT_16BIT \
+ -D$(usex bzip2 '' NO)BZIP2_SUPPORT \
+ -D$(usex crypt '' NO)CRYPT \
+ -D$(usex unicode '' NO)UNICODE_SUPPORT
+ # Third arg disables bzip2 logic as we handle it ourselves above.
+ sh ./unix/configure "$(tc-getCC)" "-I. -DUNIX ${CFLAGS} ${CPPFLAGS}" "${T}" || die
+ if use bzip2 ; then
+ sed -i -e "s:LFLAGS2=:&'-lbz2 ':" flags || die
+ fi
+}
+
+src_compile() {
+ emake \
+ CPP="$(tc-getCPP)" \
+ -f unix/Makefile generic
+}
+
+src_install() {
+ dobin zip zipnote zipsplit
+ doman man/zip{,note,split}.1
+ if use crypt ; then
+ dobin zipcloak
+ doman man/zipcloak.1
+ fi
+ dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt
+}