summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Redaelli <drizzt@gentoo.org>2007-07-14 14:51:34 +0000
committerTimothy Redaelli <drizzt@gentoo.org>2007-07-14 14:51:34 +0000
commite995dc6267b12936ea6b05057d313fdd4c50891b (patch)
tree6f19ef02e84aa590dd0b57e4ae1cd5bc910885ad /app-arch/unarj
parentAdd ~ia64 (diff)
downloadgentoo-2-e995dc6267b12936ea6b05057d313fdd4c50891b.tar.gz
gentoo-2-e995dc6267b12936ea6b05057d313fdd4c50891b.tar.bz2
gentoo-2-e995dc6267b12936ea6b05057d313fdd4c50891b.zip
Version bump:
Add ~x86-fbsd keyword with a patch by gechi.it (Portage version: 2.1.3_rc7)
Diffstat (limited to 'app-arch/unarj')
-rw-r--r--app-arch/unarj/ChangeLog11
-rw-r--r--app-arch/unarj/files/digest-unarj-2.653
-rw-r--r--app-arch/unarj/files/unarj-2.63a-sanitation.patch133
-rw-r--r--app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch9
-rw-r--r--app-arch/unarj/files/unarj-2.65-sanitation.patch29
-rw-r--r--app-arch/unarj/unarj-2.63a-r2.ebuild4
-rw-r--r--app-arch/unarj/unarj-2.65.ebuild33
7 files changed, 201 insertions, 21 deletions
diff --git a/app-arch/unarj/ChangeLog b/app-arch/unarj/ChangeLog
index 1d073042d0a0..78a1ff1d4d9e 100644
--- a/app-arch/unarj/ChangeLog
+++ b/app-arch/unarj/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-arch/unarj
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/unarj/ChangeLog,v 1.21 2007/03/09 20:09:03 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/unarj/ChangeLog,v 1.22 2007/07/14 14:51:34 drizzt Exp $
+
+*unarj-2.65 (14 Jul 2007)
+
+ 14 Jul 2007; Timothy Redaelli <drizzt@gentoo.org>
+ +files/unarj-2.63a-sanitation.patch, +files/unarj-2.65-gentoo-fbsd.patch,
+ files/unarj-2.65-sanitation.patch, unarj-2.63a-r2.ebuild,
+ +unarj-2.65.ebuild:
+ Version bump:
+ Add ~x86-fbsd keyword with a patch by gechi.it
09 Mar 2007; Jeroen Roovers <jer@gentoo.org> unarj-2.63a-r2.ebuild:
Stable for HPPA (xarchiver, perhaps bug #157879).
diff --git a/app-arch/unarj/files/digest-unarj-2.65 b/app-arch/unarj/files/digest-unarj-2.65
new file mode 100644
index 000000000000..12cc8ad9b44f
--- /dev/null
+++ b/app-arch/unarj/files/digest-unarj-2.65
@@ -0,0 +1,3 @@
+MD5 a35c9a969cfdbb621b2084dce65fda70 unarj-2.65.tgz 21568
+RMD160 54760b2896c29b35fd0af8a136e3412c2b2142f5 unarj-2.65.tgz 21568
+SHA256 092869f3b4d4943b3d999db4f266f39ab9e474f2984b813b20735283af068304 unarj-2.65.tgz 21568
diff --git a/app-arch/unarj/files/unarj-2.63a-sanitation.patch b/app-arch/unarj/files/unarj-2.63a-sanitation.patch
new file mode 100644
index 000000000000..e8b36f050815
--- /dev/null
+++ b/app-arch/unarj/files/unarj-2.63a-sanitation.patch
@@ -0,0 +1,133 @@
+Index: unarj-2.65/sanitize.c
+===================================================================
+--- /dev/null
++++ unarj-2.65/sanitize.c
+@@ -0,0 +1,81 @@
++/*
++ * Path sanitation code by Ludwig Nussel <ludwig.nussel@suse.de>. Public Domain.
++ */
++
++#include "unarj.h"
++
++#include <string.h>
++#include <limits.h>
++#include <stdio.h>
++
++#ifndef PATH_CHAR
++#define PATH_CHAR '/'
++#endif
++#ifndef MIN
++#define MIN(x,y) ((x)<(y)?(x):(y))
++#endif
++
++/* copy src into dest converting the path to a relative one inside the current
++ * directory. dest must hold at least len bytes */
++void copy_path_relative(char *dest, char *src, size_t len)
++{
++ char* o = dest;
++ char* p = src;
++
++ *o = '\0';
++
++ while(*p && *p == PATH_CHAR) ++p;
++ for(; len && *p;)
++ {
++ src = p;
++ p = strchr(src, PATH_CHAR);
++ if(!p) p = src+strlen(src);
++
++ /* . => skip */
++ if(p-src == 1 && *src == '.' )
++ {
++ if(*p) src = ++p;
++ }
++ /* .. => pop one */
++ else if(p-src == 2 && *src == '.' && src[1] == '.')
++ {
++ if(o != dest)
++ {
++ char* tmp;
++ *o = '\0';
++ tmp = strrchr(dest, PATH_CHAR);
++ if(!tmp)
++ {
++ len += o-dest;
++ o = dest;
++ if(*p) ++p;
++ }
++ else
++ {
++ len += o-tmp;
++ o = tmp;
++ if(*p) ++p;
++ }
++ }
++ else /* nothing to pop */
++ if(*p) ++p;
++ }
++ else
++ {
++ size_t copy;
++ if(o != dest)
++ {
++ --len;
++ *o++ = PATH_CHAR;
++ }
++ copy = MIN(p-src,len);
++ memcpy(o, src, copy);
++ len -= copy;
++ src += copy;
++ o += copy;
++ if(*p) ++p;
++ }
++ while(*p && *p == PATH_CHAR) ++p;
++ }
++ o[len?0:-1] = '\0';
++}
+Index: unarj-2.65/unarj.c
+===================================================================
+--- unarj-2.65.orig/unarj.c
++++ unarj-2.65/unarj.c
+@@ -235,6 +235,8 @@ static UCRC crctable[UCHAR_MAX + 1];
+
+ /* Functions */
+
++void copy_path_relative(char *dest, char *src, size_t len);
++
+ static void
+ make_crctable()
+ {
+@@ -738,11 +740,11 @@ extract()
+
+ no_output = 0;
+ if (command == 'E')
+- strncopy(name, &filename[entry_pos], sizeof(name));
++ copy_path_relative(name, &filename[entry_pos], sizeof(name));
+ else
+ {
+ strcpy(name, DEFAULT_DIR);
+- strncopy(name+strlen(name), filename, sizeof(name)-strlen(name));
++ copy_path_relative(name+strlen(name), filename, sizeof(name)-strlen(name));
+ }
+
+ if (host_os != OS)
+Index: unarj-2.65/Makefile
+===================================================================
+--- unarj-2.65.orig/Makefile
++++ unarj-2.65/Makefile
+@@ -6,8 +6,8 @@ CC = gcc
+ CFLAGS = -O2 -Wall -ansi -pedantic -DUNIX
+ INSTALLDIR=/usr/local/bin
+
+-unarj: unarj.o decode.o environ.o
+- $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o
++unarj: unarj.o decode.o environ.o sanitize.o
++ $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o sanitize.o
+ strip unarj
+
+ clean:
+@@ -19,3 +19,4 @@ install:
+ unarj.o: unarj.c unarj.h Makefile
+ environ.o: environ.c unarj.h Makefile
+ decode.o: decode.c unarj.h Makefile
++sanitize.o: sanitize.c unarj.h Makefile
diff --git a/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch
new file mode 100644
index 000000000000..755b9b696cc9
--- /dev/null
+++ b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch
@@ -0,0 +1,9 @@
+--- environ.c 2007-06-19 12:44:09 +0200
++++ environ.c.new 2007-06-19 12:44:37 +0200
+@@ -437,7 +437,6 @@
+ #endif
+
+ extern struct tm *localtime();
+-extern time_t time();
+ extern char *strcpy();
+ extern voidp *malloc(); \ No newline at end of file
diff --git a/app-arch/unarj/files/unarj-2.65-sanitation.patch b/app-arch/unarj/files/unarj-2.65-sanitation.patch
index e8b36f050815..f37784ed2491 100644
--- a/app-arch/unarj/files/unarj-2.65-sanitation.patch
+++ b/app-arch/unarj/files/unarj-2.65-sanitation.patch
@@ -111,23 +111,16 @@ Index: unarj-2.65/unarj.c
}
if (host_os != OS)
-Index: unarj-2.65/Makefile
-===================================================================
---- unarj-2.65.orig/Makefile
-+++ unarj-2.65/Makefile
-@@ -6,8 +6,8 @@ CC = gcc
- CFLAGS = -O2 -Wall -ansi -pedantic -DUNIX
- INSTALLDIR=/usr/local/bin
+--- unarj-2.65.orig/Makefile Mon Nov 29 16:47:24 2004
++++ unarj-2.65/Makefile Mon Nov 29 22:46:56 2004
+@@ -9,7 +9,9 @@
+
+ decode.o: decode.c unarj.h
--unarj: unarj.o decode.o environ.o
-- $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o
-+unarj: unarj.o decode.o environ.o sanitize.o
-+ $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o sanitize.o
- strip unarj
+-OBJS = unarj.o decode.o environ.o
++sanitize.o: sanitize.c unarj.h
++
++OBJS = unarj.o decode.o environ.o sanitize.o
- clean:
-@@ -19,3 +19,4 @@ install:
- unarj.o: unarj.c unarj.h Makefile
- environ.o: environ.c unarj.h Makefile
- decode.o: decode.c unarj.h Makefile
-+sanitize.o: sanitize.c unarj.h Makefile
+ unarj: $(OBJS)
+ $(CC) $(LDFLAGS) $(OBJS) -o unarj
diff --git a/app-arch/unarj/unarj-2.63a-r2.ebuild b/app-arch/unarj/unarj-2.63a-r2.ebuild
index 15b162502724..e27d66cec311 100644
--- a/app-arch/unarj/unarj-2.63a-r2.ebuild
+++ b/app-arch/unarj/unarj-2.63a-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/unarj/unarj-2.63a-r2.ebuild,v 1.14 2007/03/09 20:09:03 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/unarj/unarj-2.63a-r2.ebuild,v 1.15 2007/07/14 14:51:34 drizzt Exp $
inherit eutils
@@ -18,7 +18,7 @@ src_unpack() {
cd ${S}
sed -i "/^CFLAGS/s:-O2:${CFLAGS}:" Makefile
epatch ${FILESDIR}/unarj-2.65-CAN-2004-0947.patch
- epatch ${FILESDIR}/unarj-2.65-sanitation.patch
+ epatch ${FILESDIR}/${P}-sanitation.patch
sed -i -e 's@strip unarj@@' Makefile
}
diff --git a/app-arch/unarj/unarj-2.65.ebuild b/app-arch/unarj/unarj-2.65.ebuild
new file mode 100644
index 000000000000..2956a804f104
--- /dev/null
+++ b/app-arch/unarj/unarj-2.65.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/unarj/unarj-2.65.ebuild,v 1.1 2007/07/14 14:51:34 drizzt Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Utility for opening arj archives"
+HOMEPAGE="http://www.arjsoftware.com/"
+SRC_URI="mirror://freebsd/ports/local-distfiles/ache/${P}.tgz"
+
+LICENSE="arj"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-CAN-2004-0947.patch
+ epatch "${FILESDIR}"/${P}-sanitation.patch
+ epatch "${FILESDIR}"/${P}-gentoo-fbsd.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake || die
+}
+
+src_install() {
+ dobin unarj || die 'dobin failed'
+ dodoc unarj.txt technote.txt || die 'dodoc failed'
+}