aboutsummaryrefslogtreecommitdiff
path: root/archivers/unzoo
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2006-11-24 23:49:46 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2006-11-24 23:49:46 +0000
commit470f75f1f8375d26795078ddbbd5f5e0133f9c10 (patch)
tree34dfb284fc2fc00a37da7b5ea0f53491eba7e3dd /archivers/unzoo
parentb5d6bf4db4155febd14797e55beef26a05449220 (diff)
downloadports-470f75f1f8375d26795078ddbbd5f5e0133f9c10.tar.gz
ports-470f75f1f8375d26795078ddbbd5f5e0133f9c10.zip
Provide a patch that moves 'found_trav' variable initialisations to the start
of code blocks to drop gcc 3.2 dependency on 4.x. Bump PORTREVISION. PR: 105832 Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru>
Notes
Notes: svn path=/head/; revision=178007
Diffstat (limited to 'archivers/unzoo')
-rw-r--r--archivers/unzoo/Makefile4
-rw-r--r--archivers/unzoo/files/patch-unzoo.c48
2 files changed, 49 insertions, 3 deletions
diff --git a/archivers/unzoo/Makefile b/archivers/unzoo/Makefile
index 13781aae7d93..8a2de1846d69 100644
--- a/archivers/unzoo/Makefile
+++ b/archivers/unzoo/Makefile
@@ -7,7 +7,7 @@
PORTNAME= unzoo
PORTVERSION= 4.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL}
DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
@@ -19,8 +19,6 @@ PATCH_DIST_STRIP= -p1
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= A zoo archive extractor
-USE_GCC= 3.2+
-
EXTRA_DEFINES= -DSYS_IS_UNIX -DSYS_HAS_MKDIR
MAN1= unzoo.1
diff --git a/archivers/unzoo/files/patch-unzoo.c b/archivers/unzoo/files/patch-unzoo.c
new file mode 100644
index 000000000000..c111a57e6c0e
--- /dev/null
+++ b/archivers/unzoo/files/patch-unzoo.c
@@ -0,0 +1,48 @@
+--- unzoo.c.orig Sat Nov 25 00:53:57 2006
++++ unzoo.c Sat Nov 25 01:00:42 2006
+@@ -2590,20 +2590,20 @@
+ /* but only if the user did not request otherwise */
+
+ /* building the universal path of this member */
++ int found_trav = 0;
+ char patu [sizeof(Entry.diru) + sizeof(Entry.namu) + 2];
+ strcpy( patu, Entry.diru );
+ if ( strlen(patu) && patu[strlen(patu)-1] != '/') strcat( patu, "/" );
+ strcat( patu, (Entry.lnamu ? Entry.namu : Entry.nams) );
+
+- int found_trav = 0;
+
+ if ( strstr( patu, "/../" )) {
+- found_trav = 1;
+
+ /* remove "/../" from the path */
+ char tmp [sizeof(patu)];
+ char *p;
+ char *q;
++ found_trav = 1;
+ memset(tmp, 0, sizeof(tmp));
+ q = patu;
+
+@@ -2625,10 +2625,10 @@
+ printf("unzoo: skipped \"/../\" path component(s) in '%s'\n", Entry.patl);
+ }
+ if ( *patu == '/' && !strlen( pre ) ) {
+- found_trav = 1;
+
+ char *p = malloc(sizeof(patu));
+ char *q = p;
++ found_trav = 1;
+ memset(p, 0, sizeof(patu));
+ strcpy(p, patu);
+ while ( q[0] == '/' ) q++;
+@@ -2638,9 +2638,9 @@
+ printf("unzoo: skipped root directory path component in '%s'\n", patl);
+ }
+ if ( !strncmp( patu, "../", 3 )) {
+- found_trav = 1;
+
+ char tmp [sizeof(patu)];
++ found_trav = 1;
+ memset(tmp, 0, sizeof(tmp));
+ strcpy(tmp, patu + 3);
+ strcpy(patu, tmp);