diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2002-10-11 16:15:30 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2002-10-11 16:15:30 +0000 |
commit | 134eff421047abe34ceda42e9d129035297d7329 (patch) | |
tree | 775a9ffe9f706d1861664247548114ac9a4a201f /archivers | |
parent | d6f3daa08db9d57a69b0a5d35b157386a87ef07c (diff) | |
download | ports-134eff421047abe34ceda42e9d129035297d7329.tar.gz ports-134eff421047abe34ceda42e9d129035297d7329.zip |
Notes
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/file-roller/Makefile | 1 | ||||
-rw-r--r-- | archivers/file-roller/files/patch-src_fr-command-tar.c | 55 | ||||
-rw-r--r-- | archivers/fileroller/Makefile | 1 | ||||
-rw-r--r-- | archivers/fileroller/files/patch-src_fr-command-tar.c | 55 |
4 files changed, 112 insertions, 0 deletions
diff --git a/archivers/file-roller/Makefile b/archivers/file-roller/Makefile index c86dfc75a592..8a722d9f794e 100644 --- a/archivers/file-roller/Makefile +++ b/archivers/file-roller/Makefile @@ -7,6 +7,7 @@ PORTNAME= fileroller PORTVERSION= 2.1.0 +PORTREVISION= 1 CATEGORIES= archivers gnome MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/archivers/file-roller/files/patch-src_fr-command-tar.c b/archivers/file-roller/files/patch-src_fr-command-tar.c new file mode 100644 index 000000000000..6ae5fcfa32bf --- /dev/null +++ b/archivers/file-roller/files/patch-src_fr-command-tar.c @@ -0,0 +1,55 @@ +--- src/fr-command-tar.c.orig Fri Aug 9 09:10:51 2002 ++++ src/fr-command-tar.c Fri Oct 11 12:14:40 2002 +@@ -117,7 +117,7 @@ + { + int i; + char *field; +- int n = 6; ++ int n = 8; + + n--; + field = eat_spaces (line); +@@ -129,6 +129,10 @@ + return field; + } + ++static char *months[] = { ++ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", ++ "Nov", "Dec" ++}; + + static void + process_line (char *line, +@@ -138,15 +142,30 @@ + FRCommand *comm = FR_COMMAND (data); + char **fields; + char *name_field; ++ int i; ++ struct tm tm = {0, }; ++ char **time_fields; + + g_return_if_fail (line != NULL); + + fdata = file_data_new (); + +- fields = split_line (line, 5); ++ fields = split_line (line, 7); + fdata->size = atol (fields[2]); +- fdata->modified = mktime_from_string (fields[3], fields[4]); ++ for (i = 0; i < 12; i++) { ++ if (!strncmp(fields[3], months[i], 3)) break; ++ } ++ tm.tm_mon = i; ++ tm.tm_year = atoi (fields[6]) - 1900; ++ tm.tm_mday = atoi (fields[4]); ++ time_fields = g_strsplit(fields[5], ":", 2); ++ tm.tm_hour = atoi (time_fields[0]); ++ tm.tm_min = atoi (time_fields[1]); ++ tm.tm_sec = 0; ++ tm.tm_isdst = -1; ++ fdata->modified = mktime(&tm); + g_strfreev (fields); ++ g_strfreev (time_fields); + + /* Full path */ + diff --git a/archivers/fileroller/Makefile b/archivers/fileroller/Makefile index c86dfc75a592..8a722d9f794e 100644 --- a/archivers/fileroller/Makefile +++ b/archivers/fileroller/Makefile @@ -7,6 +7,7 @@ PORTNAME= fileroller PORTVERSION= 2.1.0 +PORTREVISION= 1 CATEGORIES= archivers gnome MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/archivers/fileroller/files/patch-src_fr-command-tar.c b/archivers/fileroller/files/patch-src_fr-command-tar.c new file mode 100644 index 000000000000..6ae5fcfa32bf --- /dev/null +++ b/archivers/fileroller/files/patch-src_fr-command-tar.c @@ -0,0 +1,55 @@ +--- src/fr-command-tar.c.orig Fri Aug 9 09:10:51 2002 ++++ src/fr-command-tar.c Fri Oct 11 12:14:40 2002 +@@ -117,7 +117,7 @@ + { + int i; + char *field; +- int n = 6; ++ int n = 8; + + n--; + field = eat_spaces (line); +@@ -129,6 +129,10 @@ + return field; + } + ++static char *months[] = { ++ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", ++ "Nov", "Dec" ++}; + + static void + process_line (char *line, +@@ -138,15 +142,30 @@ + FRCommand *comm = FR_COMMAND (data); + char **fields; + char *name_field; ++ int i; ++ struct tm tm = {0, }; ++ char **time_fields; + + g_return_if_fail (line != NULL); + + fdata = file_data_new (); + +- fields = split_line (line, 5); ++ fields = split_line (line, 7); + fdata->size = atol (fields[2]); +- fdata->modified = mktime_from_string (fields[3], fields[4]); ++ for (i = 0; i < 12; i++) { ++ if (!strncmp(fields[3], months[i], 3)) break; ++ } ++ tm.tm_mon = i; ++ tm.tm_year = atoi (fields[6]) - 1900; ++ tm.tm_mday = atoi (fields[4]); ++ time_fields = g_strsplit(fields[5], ":", 2); ++ tm.tm_hour = atoi (time_fields[0]); ++ tm.tm_min = atoi (time_fields[1]); ++ tm.tm_sec = 0; ++ tm.tm_isdst = -1; ++ fdata->modified = mktime(&tm); + g_strfreev (fields); ++ g_strfreev (time_fields); + + /* Full path */ + |