summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-10-30 05:33:27 +0000
committerMike Frysinger <vapier@gentoo.org>2005-10-30 05:33:27 +0000
commit5bee5b267de09767d1857ec739af6d866a48551d (patch)
tree5faa10cfacc78188f859c2fbd4b66f8394617ded /app-arch
parentold (diff)
downloadhistorical-5bee5b267de09767d1857ec739af6d866a48551d.tar.gz
historical-5bee5b267de09767d1857ec739af6d866a48551d.tar.bz2
historical-5bee5b267de09767d1857ec739af6d866a48551d.zip
Old ebuild wasnt applying all patches, so fix that, clean up build process, and add support for detecting errors when an LHA archive has CRC errors.
Package-Manager: portage-2.0.53_rc6
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/lha/ChangeLog12
-rw-r--r--app-arch/lha/Manifest10
-rw-r--r--app-arch/lha/files/digest-lha-114i-r51
-rw-r--r--app-arch/lha/files/lha-114i-build.patch50
-rw-r--r--app-arch/lha/files/lha-114i-detect-cmd-extract-fail.patch150
-rw-r--r--app-arch/lha/lha-114i-r5.ebuild39
6 files changed, 260 insertions, 2 deletions
diff --git a/app-arch/lha/ChangeLog b/app-arch/lha/ChangeLog
index 730d97dc3ec8..140a962fa138 100644
--- a/app-arch/lha/ChangeLog
+++ b/app-arch/lha/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-arch/lha
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/lha/ChangeLog,v 1.23 2005/01/01 11:47:30 eradicator Exp $
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/lha/ChangeLog,v 1.24 2005/10/30 05:33:27 vapier Exp $
+
+*lha-114i-r5 (30 Oct 2005)
+
+ 30 Oct 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/lha-114i-build.patch,
+ +files/lha-114i-detect-cmd-extract-fail.patch, +lha-114i-r5.ebuild:
+ Old ebuild wasnt applying all patches, so fix that, clean up build process,
+ and add support for detecting errors when an LHA archive has CRC errors.
01 Nov 2004; Mamoru KOMACHI <usata@gentoo.org> lha-114i-r4.ebuild:
Stable on ppc-macos.
diff --git a/app-arch/lha/Manifest b/app-arch/lha/Manifest
index a68755868ef9..f72cbde569c6 100644
--- a/app-arch/lha/Manifest
+++ b/app-arch/lha/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 e470eb5963d8ee09bfd2727eeb56bba2 ChangeLog 3054
MD5 0ca54fececc10dcda9d3e9f649102c78 files/digest-lha-114i-r5 59
MD5 2be58a222a07490e0347f138f65c97d4 files/lha-114i-build.patch 1341
@@ -8,3 +11,10 @@ MD5 a1ef659783bc7224c48dbc07cf436788 files/lha-114i-sec.patch 1621
MD5 f44e42e6131c63f0e2e67e49732b6e57 files/lha-114i-sec2.patch 5754
MD5 d409c5c0a2b75a477e7baa7ebc62a559 files/lha-114i-symlink.patch 228
MD5 87f8394a1eaec58d059d1283e326daac lha-114i-r5.ebuild 1107
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDZFs+gIKl8Uu19MoRAnYgAJ9ge/iE8+AU14oaU1T2Gw01qhKuAACaA4IV
+RdZKdfcrtbgZ8991ErJZWhQ=
+=9zmV
+-----END PGP SIGNATURE-----
diff --git a/app-arch/lha/files/digest-lha-114i-r5 b/app-arch/lha/files/digest-lha-114i-r5
new file mode 100644
index 000000000000..44da31fd5180
--- /dev/null
+++ b/app-arch/lha/files/digest-lha-114i-r5
@@ -0,0 +1 @@
+MD5 5225884d557b91f04124693e2c5c9e94 lha-114i.tar.gz 64608
diff --git a/app-arch/lha/files/lha-114i-build.patch b/app-arch/lha/files/lha-114i-build.patch
new file mode 100644
index 000000000000..23d241ff73ed
--- /dev/null
+++ b/app-arch/lha/files/lha-114i-build.patch
@@ -0,0 +1,50 @@
+--- Makefile
++++ Makefile
+@@ -23,14 +23,15 @@
+ MACHINE = -DSYSTIME_HAS_NO_TM -DEUC -DSYSV_SYSTEM_DIR -DMKTIME
+
+ #OPTIMIZE = -O2 -fstrength-reduce -fomit-frame-pointer
+-OPTIMIZE = -O2 -DSUPPORT_LH7 -DMKSTEMP
++OPTIMIZE = $(CFLAGS) -DSUPPORT_LH7 -DMKSTEMP
+
+-BINDIR = /usr/local/bin
+-MANDIR = /usr/local/man
+-MANSECT = n
++DESTDIR =
++BINDIR = /usr/bin
++MANDIR = /usr/share/man/ja
++MANSECT = 1
+
+ INSTALL = install
+-INSTALLBIN = -s -m 755
++INSTALLBIN = -m 755
+ INSTALLMAN = -m 644
+
+ SUBDIRS = src man
+@@ -42,6 +43,7 @@
+ LIBRARYOBJS = patmatch$(O)
+
+ MYMAKEFLAGS = 'BINDIR=$(BINDIR)' 'MANDIR=$(MANDIR)' 'MANSECT=$(MANSECT)'\
++ 'DESTDIR=$(DESTDIR)' \
+ 'INSTALL=$(INSTALL)' 'INSTALLBIN=$(INSTALLBIN)' 'INSTALLMAN=$(INSTALLMAN)'\
+ 'CC=$(CC)' 'SWITCHES=$(SWITCHES)' 'O=$(O)' 'LIBRARYOBJS=$(LIBRARYOBJS)' \
+ 'OPTIMIZE=$(OPTIMIZE)' 'MACHINE=$(MACHINE)'
+--- man/Makefile
++++ man/Makefile
+@@ -11,7 +11,7 @@
+ $(NROFF) -man lha.n > lha.man
+
+ install:
+- $(INSTALL) $(INSTALLMAN) lha.n $(MANDIR)/man$(MANSECT)/lha.$(MANSECT)
++ $(INSTALL) -D $(INSTALLMAN) lha.n $(DESTDIR)$(MANDIR)/man$(MANSECT)/lha.$(MANSECT)
+
+ clean:
+ rm -f *~
+--- src/Makefile
++++ src/Makefile
+@@ -49,4 +49,4 @@
+ rm -f core *.o lha.tar lha.tar.Z *~ \#* *.orig
+
+ install:
+- $(INSTALL) $(INSTALLBIN) lha $(BINDIR)/lha
++ $(INSTALL) -D $(INSTALLBIN) lha $(DESTDIR)$(BINDIR)/lha
diff --git a/app-arch/lha/files/lha-114i-detect-cmd-extract-fail.patch b/app-arch/lha/files/lha-114i-detect-cmd-extract-fail.patch
new file mode 100644
index 000000000000..72373162a510
--- /dev/null
+++ b/app-arch/lha/files/lha-114i-detect-cmd-extract-fail.patch
@@ -0,0 +1,150 @@
+Make sure that a corrupt archive file will return failure when we try
+and extract it
+
+patch by Mike Frysinger <vapier@gentoo.org>
+
+--- lha-114i/src/lha.h
++++ lha-114i/src/lha.h
+@@ -231,5 +231,6 @@
+ extern long copyfile();
+
+-extern void cmd_list(), cmd_extract(), cmd_add(), cmd_delete();
++extern void cmd_list(), cmd_add(), cmd_delete();
++extern int cmd_extract();
+
+ extern boolean ignore_directory;
+--- lha-114i/src/lharc.c
++++ lha-114i/src/lharc.c
+@@ -431,5 +431,5 @@
+ switch (cmd) {
+ case CMD_EXTRACT:
+- cmd_extract();
++ return cmd_extract();
+ break;
+ case CMD_ADD:
+--- lha-114i/src/lhext.c
++++ lha-114i/src/lhext.c
+@@ -175,5 +175,5 @@
+
+ /* ------------------------------------------------------------------------ */
+-static void
++static int
+ extract_one(afp, hdr)
+ FILE *afp; /* archive file */
+@@ -226,5 +226,5 @@
+ if (methods[method] == NULL) {
+ error("Unknown method skiped ...", name);
+- return;
++ return 1;
+ }
+ if (bcmp(hdr->method, methods[method], 5) == 0)
+@@ -255,5 +255,5 @@
+ fgetc(afp);
+ }
+- return;
++ return 0;
+ }
+
+@@ -279,5 +279,5 @@
+ up_flag = inquire_extract(name);
+ if (up_flag == FALSE && force == FALSE) {
+- return;
++ return 0;
+ }
+ }
+@@ -288,5 +288,5 @@
+ if (quiet != TRUE)
+ printf("%s : Skipped...\n", name);
+- return;
++ return 0;
+ }
+ }
+@@ -298,5 +298,5 @@
+ fgetc(afp);
+ }
+- return;
++ return 0;
+ }
+
+@@ -318,10 +318,12 @@
+
+ if (!fp)
+- return;
++ return 0;
+ }
+
+ errno = 0;
+- if (hdr->has_crc && crc != hdr->crc)
++ if (hdr->has_crc && crc != hdr->crc) {
+ error("CRC error", name);
++ return 1;
++ }
+ }
+ else if ((hdr->unix_mode & UNIX_FILE_TYPEMASK) == UNIX_FILE_DIRECTORY
+@@ -333,5 +335,5 @@
+ if (quiet != TRUE)
+ printf("EXTRACT %s (directory)\n", name);
+- return;
++ return 0;
+ }
+ /* NAME has trailing SLASH '/', (^_^) */
+@@ -348,5 +350,5 @@
+ up_flag = inquire_extract(name);
+ if (up_flag == FALSE && force == FALSE) {
+- return;
++ return 0;
+ }
+ } else {
+@@ -355,5 +357,5 @@
+ if (quiet != TRUE)
+ printf("%s : Skipped...\n", bb1);
+- return;
++ return 0;
+ }
+ }
+@@ -375,9 +377,9 @@
+ sprintf(buf, sizeof(buf), "%s -> %s", bb1, bb2);
+ warning("Can't make Symbolic Link", buf);
+- return;
++ return 0;
+ #endif
+ } else { /* make directory */
+ if (!output_to_stdout && !make_parent_path(name))
+- return;
++ return 0;
+ }
+ }
+@@ -389,4 +391,6 @@
+ if (!output_to_stdout)
+ adjust_info(name, hdr);
++
++ return 0;
+ }
+
+@@ -394,5 +398,5 @@
+ /* EXTRACT COMMAND MAIN */
+ /* ------------------------------------------------------------------------ */
+-void
++int
+ cmd_extract()
+ {
+@@ -400,4 +404,5 @@
+ long pos;
+ FILE *afp;
++ int ret = 0;
+
+ /* open archive file */
+@@ -412,5 +417,5 @@
+ if (need_file(hdr.name)) {
+ pos = ftell(afp);
+- extract_one(afp, &hdr);
++ ret += extract_one(afp, &hdr);
+ fseek(afp, pos + hdr.packed_size, SEEK_SET);
+ } else {
+@@ -428,5 +433,5 @@
+ fclose(afp);
+
+- return;
++ return ret;
+ }
+
diff --git a/app-arch/lha/lha-114i-r5.ebuild b/app-arch/lha/lha-114i-r5.ebuild
new file mode 100644
index 000000000000..4d214e429cd4
--- /dev/null
+++ b/app-arch/lha/lha-114i-r5.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/lha/lha-114i-r5.ebuild,v 1.1 2005/10/30 05:33:27 vapier Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Utility for creating and opening lzh archives"
+HOMEPAGE="http://www2m.biglobe.ne.jp/~dolphin/lha/lha-unix.htm"
+SRC_URI="http://www2m.biglobe.ne.jp/~dolphin/lha/prog/${P}.tar.gz"
+
+LICENSE="lha"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc-macos ppc64 s390 sparc x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-malloc.patch
+ epatch "${FILESDIR}"/${P}-sec.patch
+ epatch "${FILESDIR}"/${P}-sec2.patch
+ epatch "${FILESDIR}"/${P}-symlink.patch
+ epatch "${FILESDIR}"/${P}-dir_length_bounds_check.patch
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-detect-cmd-extract-fail.patch
+}
+
+src_compile() {
+ use ppc-macos && append-flags -DHAVE_NO_LCHOWN
+ emake || die
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+ use linguas_jp || rm -r "${D}"/usr/share/man
+ dodoc *.txt *.euc *.eng
+}