summaryrefslogtreecommitdiffstats
path: root/archivers
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-02-01 16:14:47 +0000
committerache <ache@FreeBSD.org>2001-02-01 16:14:47 +0000
commite4b7f96093d4427a2cab602ac515d557b00cedd3 (patch)
treef9ac06fa2ee40876b54b653fef2abdf1bf536663 /archivers
parentc50f42f0fa23254d6aab40193524e22a7ff63fd7 (diff)
downloadFreeBSD-ports-e4b7f96093d4427a2cab602ac515d557b00cedd3.zip
FreeBSD-ports-e4b7f96093d4427a2cab602ac515d557b00cedd3.tar.gz
Create intermediate directories
PR: 24766 Submitted by: Roman Shterenzon <roman@xpert.com>
Diffstat (limited to 'archivers')
-rw-r--r--archivers/unarj/Makefile1
-rw-r--r--archivers/unarj/files/patch-ab55
2 files changed, 56 insertions, 0 deletions
diff --git a/archivers/unarj/Makefile b/archivers/unarj/Makefile
index 5897840..97e7c87 100644
--- a/archivers/unarj/Makefile
+++ b/archivers/unarj/Makefile
@@ -7,6 +7,7 @@
PORTNAME= unarj
PORTVERSION= 2.43
+PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= ftp://ftp.kiarchive.ru/pub/unix/arcers/
EXTRACT_SUFX= .tgz
diff --git a/archivers/unarj/files/patch-ab b/archivers/unarj/files/patch-ab
new file mode 100644
index 0000000..1442f03
--- /dev/null
+++ b/archivers/unarj/files/patch-ab
@@ -0,0 +1,55 @@
+diff -urN unarj-2.43/unarj.c unarj-2.43.new/unarj.c
+--- unarj.c.orig Mon Sep 29 14:00:24 1997
++++ unarj.c Tue Aug 8 15:57:58 2000
+@@ -42,7 +42,8 @@
+ * 02/17/93 R. Jung Added archive modified date support.
+ * 01/22/94 R. Jung Changed copyright message.
+ * 07/29/96 R. Jung Added "/" to list of path separators.
+- *
++ * 08/08/00 P. Knirsch Added subdirectory creation for the x command. Also
++ * fixed some compiler warnings.
+ */
+
+ #include "unarj.h"
+@@ -51,6 +52,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <sys/stat.h>
++#include <sys/types.h>
++#include <fcntl.h>
++#include <unistd.h>
+ #else /* !MODERN */
+ extern void free();
+ extern void exit();
+@@ -712,6 +717,8 @@
+ extract()
+ {
+ char name[FNAME_MAX];
++ char dir[FNAME_MAX];
++ char *pos;
+
+ if (check_flags())
+ {
+@@ -730,6 +737,21 @@
+
+ if (host_os != OS)
+ default_case_path(name);
++
++
++ /*
++ 8/8/2000 Phil Knirsch: Bugfix to create subdirectories. Unarj didn't
++ do this for a long time, so it's finally fixed.
++ */
++ pos = strchr(name, PATH_CHAR);
++
++ while (pos != NULL)
++ {
++ strncpy(dir, name, pos-name);
++ dir[pos-name] = '\0';
++ mkdir(dir, 0777);
++ pos = strchr(pos+1, PATH_CHAR);
++ }
+
+ if (file_exists(name))
+ {
OpenPOWER on IntegriCloud