diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-21 05:47:48 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-21 05:47:48 +0800 |
commit | feb11084c5f57787899e3182b3a00c71e9176261 (patch) | |
tree | 3bcedf8754b75c4ed18c99c152b7c1aaf2ed970a /archivers | |
parent | b131d773be1001282b90b8eb229c87c908984b97 (diff) | |
download | marcuscom-ports-feb11084c5f57787899e3182b3a00c71e9176261.tar marcuscom-ports-feb11084c5f57787899e3182b3a00c71e9176261.tar.gz marcuscom-ports-feb11084c5f57787899e3182b3a00c71e9176261.tar.bz2 marcuscom-ports-feb11084c5f57787899e3182b3a00c71e9176261.tar.lz marcuscom-ports-feb11084c5f57787899e3182b3a00c71e9176261.tar.xz marcuscom-ports-feb11084c5f57787899e3182b3a00c71e9176261.tar.zst marcuscom-ports-feb11084c5f57787899e3182b3a00c71e9176261.zip |
Force fileroller to depend on gtar since that's really the version of tar
it expects. Bad things happen if gtar is present on the system, and
we've hacked fileroller to use our version of tar.
Going the mandatory gtar route will make things easier to maintain on
systems with both gtar and BSD tar.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3685 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/file-roller/Makefile | 3 | ||||
-rw-r--r-- | archivers/file-roller/files/patch-src_fr-command-tar.c | 72 | ||||
-rw-r--r-- | archivers/fileroller/Makefile | 3 | ||||
-rw-r--r-- | archivers/fileroller/files/patch-src_fr-command-tar.c | 72 |
4 files changed, 6 insertions, 144 deletions
diff --git a/archivers/file-roller/Makefile b/archivers/file-roller/Makefile index 5c077194e..8f4fafdd2 100644 --- a/archivers/file-roller/Makefile +++ b/archivers/file-roller/Makefile @@ -7,6 +7,7 @@ PORTNAME= fileroller PORTVERSION= 2.9.91 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= archivers gnome MASTER_SITES= ${MASTER_SITE_GNOME} @@ -17,6 +18,8 @@ DIST_SUBDIR= gnome2 MAINTAINER= gnome@FreeBSD.org COMMENT= An archive manager for zip files, tar, etc +RUN_DEPENDS= gtar:${PORTSDIR}/archivers/gtar + USE_BZIP2= yes INSTALLS_OMF= yes USE_X_PREFIX= yes diff --git a/archivers/file-roller/files/patch-src_fr-command-tar.c b/archivers/file-roller/files/patch-src_fr-command-tar.c deleted file mode 100644 index 72e95a4fa..000000000 --- a/archivers/file-roller/files/patch-src_fr-command-tar.c +++ /dev/null @@ -1,72 +0,0 @@ ---- src/fr-command-tar.c.orig Thu Nov 18 16:07:02 2004 -+++ src/fr-command-tar.c Thu Nov 18 16:11:03 2004 -@@ -114,6 +114,10 @@ - return g_strdup (f_start); - } - -+static char *months[] = { -+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", -+ "Nov", "Dec" -+}; - - static void - process_line (char *line, -@@ -122,28 +126,37 @@ - FileData *fdata; - FRCommand *comm = FR_COMMAND (data); - char **fields; -- int date_idx; -- char *field_date, *field_time, *field_size, *field_name; -+ int i; -+ struct tm tm = {0, }; -+ char **time_fields; -+ const char *field_name; - - g_return_if_fail (line != NULL); - - fdata = file_data_new (); - -- date_idx = file_list__get_index_from_pattern (line, "%n%n%n%n-%n%n-%n%n %n%n:%n%n"); -+ fields = split_line (line, 7); - -- field_size = file_list__get_prev_field (line, date_idx, 1); -- fdata->size = atol (field_size); -- g_free (field_size); -- -- field_date = file_list__get_next_field (line, date_idx, 1); -- field_time = file_list__get_next_field (line, date_idx, 2); -- fdata->modified = mktime_from_string (field_date, field_time); -- g_free (field_date); -- g_free (field_time); -+ fdata->size = atol (fields[2]); -+ 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 */ - -- field_name = tar_get_last_field (line, date_idx, 3); -+ field_name = get_last_field (line, 8); - fields = g_strsplit (field_name, " -> ", 2); - - if (fields[1] == NULL) { -@@ -162,7 +175,6 @@ - if (fields[1] != NULL) - fdata->link = g_strdup (fields[1]); - g_strfreev (fields); -- g_free (field_name); - - fdata->name = g_strdup (file_name_from_path (fdata->full_path)); - fdata->path = remove_level_from_path (fdata->full_path); diff --git a/archivers/fileroller/Makefile b/archivers/fileroller/Makefile index 5c077194e..8f4fafdd2 100644 --- a/archivers/fileroller/Makefile +++ b/archivers/fileroller/Makefile @@ -7,6 +7,7 @@ PORTNAME= fileroller PORTVERSION= 2.9.91 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= archivers gnome MASTER_SITES= ${MASTER_SITE_GNOME} @@ -17,6 +18,8 @@ DIST_SUBDIR= gnome2 MAINTAINER= gnome@FreeBSD.org COMMENT= An archive manager for zip files, tar, etc +RUN_DEPENDS= gtar:${PORTSDIR}/archivers/gtar + USE_BZIP2= yes INSTALLS_OMF= yes USE_X_PREFIX= yes diff --git a/archivers/fileroller/files/patch-src_fr-command-tar.c b/archivers/fileroller/files/patch-src_fr-command-tar.c deleted file mode 100644 index 72e95a4fa..000000000 --- a/archivers/fileroller/files/patch-src_fr-command-tar.c +++ /dev/null @@ -1,72 +0,0 @@ ---- src/fr-command-tar.c.orig Thu Nov 18 16:07:02 2004 -+++ src/fr-command-tar.c Thu Nov 18 16:11:03 2004 -@@ -114,6 +114,10 @@ - return g_strdup (f_start); - } - -+static char *months[] = { -+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", -+ "Nov", "Dec" -+}; - - static void - process_line (char *line, -@@ -122,28 +126,37 @@ - FileData *fdata; - FRCommand *comm = FR_COMMAND (data); - char **fields; -- int date_idx; -- char *field_date, *field_time, *field_size, *field_name; -+ int i; -+ struct tm tm = {0, }; -+ char **time_fields; -+ const char *field_name; - - g_return_if_fail (line != NULL); - - fdata = file_data_new (); - -- date_idx = file_list__get_index_from_pattern (line, "%n%n%n%n-%n%n-%n%n %n%n:%n%n"); -+ fields = split_line (line, 7); - -- field_size = file_list__get_prev_field (line, date_idx, 1); -- fdata->size = atol (field_size); -- g_free (field_size); -- -- field_date = file_list__get_next_field (line, date_idx, 1); -- field_time = file_list__get_next_field (line, date_idx, 2); -- fdata->modified = mktime_from_string (field_date, field_time); -- g_free (field_date); -- g_free (field_time); -+ fdata->size = atol (fields[2]); -+ 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 */ - -- field_name = tar_get_last_field (line, date_idx, 3); -+ field_name = get_last_field (line, 8); - fields = g_strsplit (field_name, " -> ", 2); - - if (fields[1] == NULL) { -@@ -162,7 +175,6 @@ - if (fields[1] != NULL) - fdata->link = g_strdup (fields[1]); - g_strfreev (fields); -- g_free (field_name); - - fdata->name = g_strdup (file_name_from_path (fdata->full_path)); - fdata->path = remove_level_from_path (fdata->full_path); |