From ca0a6e4f8f6a07f81cf53850f5054dbbb036e915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Fri, 24 Aug 2012 13:42:26 +0400 Subject: [PATCH] Xarchiver --- app-arch/xarchiver/Manifest | 7 + .../xarchiver-0.5.2-add-to_escaped_path.patch | 20 ++ .../xarchiver-0.5.2-add_xz_support.patch | 314 ++++++++++++++++++ ...hiver-0.5.2-drag-n-drop_escaped_path.patch | 15 + .../files/xarchiver-0.5.2-stack-smash.patch | 20 ++ app-arch/xarchiver/metadata.xml | 6 + app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild | 56 ++++ 7 files changed, 438 insertions(+) create mode 100644 app-arch/xarchiver/Manifest create mode 100644 app-arch/xarchiver/files/xarchiver-0.5.2-add-to_escaped_path.patch create mode 100644 app-arch/xarchiver/files/xarchiver-0.5.2-add_xz_support.patch create mode 100644 app-arch/xarchiver/files/xarchiver-0.5.2-drag-n-drop_escaped_path.patch create mode 100644 app-arch/xarchiver/files/xarchiver-0.5.2-stack-smash.patch create mode 100644 app-arch/xarchiver/metadata.xml create mode 100644 app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild diff --git a/app-arch/xarchiver/Manifest b/app-arch/xarchiver/Manifest new file mode 100644 index 000000000..347346046 --- /dev/null +++ b/app-arch/xarchiver/Manifest @@ -0,0 +1,7 @@ +AUX xarchiver-0.5.2-add-to_escaped_path.patch 834 SHA256 8ce446cb7de71cb59de3d25e809abae4c28a7970dab3e096cb687011c2071cf6 SHA512 54d705aadbecae22083dd31c55831d9059d2ce3c5f98755c7708d858b31aaa3b17f2444e853b3f7b20ba6c0f253ad700e29f0a367ec56b9048ce135884701a7f WHIRLPOOL a10c8aeaffd9a9f8d06fe8e7c47bb648f447e18df5d0fc7d8ab9299857efe6312aac809ca344b46e1bc90a651d5f979c0f18c1a113a73ad140da1f5c21bfb9be +AUX xarchiver-0.5.2-add_xz_support.patch 14741 SHA256 ee5c761073b0065fa62e11302e5f7c81a90d5c896b8bcdadbc0753531fd15a02 SHA512 4047c107956a24a68cd53312a989a9d953c06f8eff4db44367ad4c682c3fd157e481eec5f0ed9027df0a54fe729a4bbbaedc47b00bdea0436334c433af54d6d4 WHIRLPOOL 3e1855b18275f88d5ef156ae02b2dfade901567379c8ff635596093163dd5d6052d6b631fd466fed3229b27cd0082b985b3110075901bb7845450cfa38d32527 +AUX xarchiver-0.5.2-drag-n-drop_escaped_path.patch 795 SHA256 7aa83e3eceae9cf5947d2b1f9fa91bc78b62465d8a743eb0b0b2c1538fa72332 SHA512 3410de95f2650f83f65db06658327e46daa67d4ae1c694e46b2d3623a8b9255c6bedf4ed3a57ea0ef45bcf345fc66fd941d56e15e935bf91d7bd38bb02f054b0 WHIRLPOOL 27bab71b86e21ea3a6a6fdbba849da303d96ef6e6b88d846709c0f0bad4f7ed24d1eb0f79387e1636d76c8c3f95f67fa05febb1bea6eebe0c09810451782644e +AUX xarchiver-0.5.2-stack-smash.patch 581 SHA256 2032d3a7cdafc23b2577a6798af5ca93a913ff2a10ac4cf5adaf176433e9e424 SHA512 dc60b4c8425435eb94e0f6e683ed307ab4068afac7ad62fcdf28ef1b7f0396eeea556db22614d46667db02c261648f7b34f99e2514fc37fe3f66aa59d70689b0 WHIRLPOOL 694db7c0e69d5017811703f3d8df371bfe793d6a64671062474049ab0fd03d5cf18f7dfd81a0aa0a185e27a5a575ce18e3886241227a825a13443e4e100a67f2 +DIST xarchiver-0.5.2.tar.bz2 755418 SHA256 cea932ff9d505969201fd502470bbebbc5726ab3d6765e142fc8295aa677ad2a SHA512 05235f364cfb8f5acc1d3dbb5c581c0d55f72dbc08fd4bc166649740d78e7c76c87b61e64ce5651011a3c1cace369ffd24cd3b1759620be629f9abb6dc29bc5f WHIRLPOOL 97967e6c5d4c19a2b65fd08cdeb15cf649cace15bcf91d49c9e3c1e0cbbfe622851141410f198fd2708d2fc391443cd705f30239f4bb2dfd208f67093624a4b2 +EBUILD xarchiver-0.5.2-r4.ebuild 1462 SHA256 3dfe53bb0b0ea2c3b8a8e1502fb6f1164b53cc13e7f7fbf3fa7291e8d2fd58ff SHA512 aac6137a82ba5664184bb2023e8df5b89e73c3e15818d0862728da4bf9ad01ddf9fbfeaf4411100a4350f0554ee99fd9383f7aa363aa90733d0192de1d4ae4f3 WHIRLPOOL 54eecca688edb0c9cdb01e0c8cdbccb559ea0e0075fd8aeb8d30e81bd20b19eaf11c2e509a801ec520ef6e78674c09d763051dfe1a1d0d28393e82fbb0e6780a +MISC metadata.xml 282 SHA256 e4c094365dccc476d8033116d416b8c037c870c34df1b13260dca4552b0826eb SHA512 dfd9387fafdec97766a9914a13091b9af56db9134ac0be59302e84703aa21f4344029dc205e4567305a49eb031784d58fa36c8d51ee3666d5e86f62bed67ccf0 WHIRLPOOL 14109a702dc1d738ca84022a51042622d0966748069c9203a60c74eac7e7b8e01ec7c2763b4c30d308557ffde90b93b6a91315b10a25779fd882aaf4deeaf35a diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-add-to_escaped_path.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-add-to_escaped_path.patch new file mode 100644 index 000000000..cd899051e --- /dev/null +++ b/app-arch/xarchiver/files/xarchiver-0.5.2-add-to_escaped_path.patch @@ -0,0 +1,20 @@ +diff --git a/src/main.c b/src/main.c +index 6e835cb..47bdc7b 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -193,13 +193,13 @@ int main (int argc, char **argv) + g_free(_current_dir); + GSList *files = NULL; + _current_dir = g_path_get_basename(add_files); +- files = g_slist_append(files,xa_escape_filename(_current_dir,"$'`\"\\!?* ()[]&|:;<>#")); ++ files = g_slist_append(files,xa_escape_filename(_current_dir,"$|;<>#")); + g_free(_current_dir); + g_free(add_files); + for (x = 1; x< argc; x++) + { + _current_dir = g_path_get_basename(argv[x]); +- files = g_slist_append(files,xa_escape_filename(_current_dir,"$'`\"\\!?* ()[]&|:;<>#")); ++ files = g_slist_append(files,xa_escape_filename(_current_dir,"$|;<>#")); + g_free (_current_dir); + } + xa_execute_add_commands(archive,files,NULL); diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-add_xz_support.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-add_xz_support.patch new file mode 100644 index 000000000..09361138b --- /dev/null +++ b/app-arch/xarchiver/files/xarchiver-0.5.2-add_xz_support.patch @@ -0,0 +1,314 @@ +Patch from: http://slackbuilds.org/repository/13.1/system/xarchiver/ + +Not submitted upstream because the upstream author rewrote the code. So, this +patch may be dropped when/if upstream releases a new version + +diff -Nur xarchiver-0.5.2.orig/src/add_dialog.c xarchiver-0.5.2/src/add_dialog.c +--- xarchiver-0.5.2.orig/src/add_dialog.c 2008-11-10 04:41:31.000000000 -0600 ++++ xarchiver-0.5.2/src/add_dialog.c 2009-11-30 13:17:54.983349491 -0600 +@@ -209,7 +209,7 @@ + else + gtk_widget_set_size_request (add_dialog->dialog1,530,420); + +- if (archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA || archive->type == XARCHIVETYPE_LZOP) ++ if (archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA || archive->type == XARCHIVETYPE_XZ || archive->type == XARCHIVETYPE_LZOP) + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(add_dialog->filechooserwidget1),FALSE); + else + gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(add_dialog->filechooserwidget1),TRUE); +@@ -222,7 +222,7 @@ + else + gtk_widget_set_sensitive(add_dialog->store_path,TRUE); + /* 7z doesn't appear to let the user chooses if storing full paths */ +- if (archive->type == XARCHIVETYPE_7ZIP || archive->type == XARCHIVETYPE_LZOP || archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA) ++ if (archive->type == XARCHIVETYPE_7ZIP || archive->type == XARCHIVETYPE_LZOP || archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || archive->type == XARCHIVETYPE_LZMA || archive->type == XARCHIVETYPE_XZ ) + { + flag = FALSE; + } +@@ -244,7 +244,7 @@ + flag = TRUE; + gtk_widget_set_sensitive(add_dialog->solid_archive,flag); + +- if (archive->type != XARCHIVETYPE_TAR && archive->type != XARCHIVETYPE_TAR_GZ && archive->type != XARCHIVETYPE_TAR_LZMA && archive->type != XARCHIVETYPE_TAR_BZ2 && archive->type != XARCHIVETYPE_TAR_LZOP) ++ if (archive->type != XARCHIVETYPE_TAR && archive->type != XARCHIVETYPE_TAR_GZ && archive->type != XARCHIVETYPE_TAR_LZMA && archive->type != XARCHIVETYPE_TAR_XZ && archive->type != XARCHIVETYPE_TAR_BZ2 && archive->type != XARCHIVETYPE_TAR_LZOP) + { + flag = TRUE; + if (archive->type == XARCHIVETYPE_7ZIP) +@@ -306,7 +306,7 @@ + g_signal_connect (G_OBJECT (add_dialog->compression_value),"value-changed",G_CALLBACK (fix_adjustment_value), NULL); + gtk_tooltips_set_tip (add_dialog->option_tooltip,add_dialog->compression_scale, compression_msg, NULL ); + +- if (archive->type == XARCHIVETYPE_TAR || archive->type == XARCHIVETYPE_TAR_GZ || archive->type == XARCHIVETYPE_TAR_LZMA || archive->type == XARCHIVETYPE_TAR_BZ2 || archive->type == XARCHIVETYPE_TAR_LZOP) ++ if (archive->type == XARCHIVETYPE_TAR || archive->type == XARCHIVETYPE_TAR_GZ || archive->type == XARCHIVETYPE_TAR_LZMA || archive->type == XARCHIVETYPE_TAR_XZ || archive->type == XARCHIVETYPE_TAR_BZ2 || archive->type == XARCHIVETYPE_TAR_LZOP) + flag = FALSE; + else + flag = TRUE; +diff -Nur xarchiver-0.5.2.orig/src/archive.h xarchiver-0.5.2/src/archive.h +--- xarchiver-0.5.2.orig/src/archive.h 2008-11-07 02:49:41.000000000 -0600 ++++ xarchiver-0.5.2/src/archive.h 2009-11-30 13:17:54.984326164 -0600 +@@ -30,6 +30,7 @@ + XARCHIVETYPE_BZIP2, + XARCHIVETYPE_GZIP, + XARCHIVETYPE_LZMA, ++ XARCHIVETYPE_XZ, + XARCHIVETYPE_LZOP, + XARCHIVETYPE_RAR, + XARCHIVETYPE_RPM, +@@ -37,6 +38,7 @@ + XARCHIVETYPE_TAR_BZ2, + XARCHIVETYPE_TAR_GZ, + XARCHIVETYPE_TAR_LZMA, ++ XARCHIVETYPE_TAR_XZ, + XARCHIVETYPE_TAR_LZOP, + XARCHIVETYPE_ZIP, + XARCHIVETYPE_LHA, +diff -Nur xarchiver-0.5.2.orig/src/bzip2.c xarchiver-0.5.2/src/bzip2.c +--- xarchiver-0.5.2.orig/src/bzip2.c 2008-11-10 05:17:48.000000000 -0600 ++++ xarchiver-0.5.2/src/bzip2.c 2009-11-30 13:17:54.984326164 -0600 +@@ -54,6 +54,15 @@ + archive->extract = extract[archive->type]; + xa_open_tar_compressed_file(archive); + } ++ else if (g_str_has_suffix(archive->escaped_path,".tar.xz") || g_str_has_suffix (archive->escaped_path,".txz")) ++ { ++ archive->type = XARCHIVETYPE_TAR_XZ; ++ archive->format = "TAR.XZ"; ++ archive->delete = delete[archive->type]; ++ archive->add = add[archive->type]; ++ archive->extract = extract[archive->type]; ++ xa_open_tar_compressed_file(archive); ++ } + else if (g_str_has_suffix(archive->escaped_path,".tar.lzop") || + g_str_has_suffix (archive->escaped_path,".tzo") || + g_str_has_suffix(archive->escaped_path,".tar.lzo")) +@@ -85,6 +94,12 @@ + executable = "lzma "; + len = 5; + } ++ else if (archive->type == XARCHIVETYPE_XZ) ++ { ++ archive->format = "XZ"; ++ executable = "xz "; ++ len = 5; ++ } + else if (archive->type == XARCHIVETYPE_LZOP) + { + archive->format = "LZOP"; +@@ -163,6 +178,8 @@ + command = g_strconcat(tar," tfjv ",archive->escaped_path,NULL); + else if (archive->type == XARCHIVETYPE_TAR_LZMA) + command = g_strconcat(tar," tv --use-compress-program=lzma -f ",archive->escaped_path,NULL); ++ else if (archive->type == XARCHIVETYPE_TAR_XZ) ++ command = g_strconcat(tar," tv --use-compress-program=xz -f ",archive->escaped_path,NULL); + else if (archive->type == XARCHIVETYPE_TAR_LZOP) + command = g_strconcat(tar," tv --use-compress-program=lzop -f ",archive->escaped_path,NULL); + /* else fail? */ +@@ -205,6 +222,11 @@ + executable = "lzma "; + len = 5; + } ++ else if (archive->type == XARCHIVETYPE_XZ) ++ { ++ executable = "xz "; ++ len = 5; ++ } + else if (archive->type == XARCHIVETYPE_LZOP) + { + executable = "lzop "; +diff -Nur xarchiver-0.5.2.orig/src/extract_dialog.c xarchiver-0.5.2/src/extract_dialog.c +--- xarchiver-0.5.2.orig/src/extract_dialog.c 2008-11-10 04:28:11.000000000 -0600 ++++ xarchiver-0.5.2/src/extract_dialog.c 2009-11-30 13:17:54.985326653 -0600 +@@ -815,6 +815,11 @@ + archive->type = XARCHIVETYPE_TAR_LZMA; + archive->extract = extract[XARCHIVETYPE_TAR_LZMA]; + } ++ else if (g_str_has_suffix(archive->escaped_path,".tar.xz")|| g_str_has_suffix (archive->escaped_path,".txz")) ++ { ++ archive->type = XARCHIVETYPE_TAR_XZ; ++ archive->extract = extract[XARCHIVETYPE_TAR_XZ]; ++ } + else if (g_str_has_suffix(archive->escaped_path,".tar.lzop") || + g_str_has_suffix (archive->escaped_path,".tzo") || + g_str_has_suffix(archive->escaped_path,".tar.lzo")) +diff -Nur xarchiver-0.5.2.orig/src/main.c xarchiver-0.5.2/src/main.c +--- xarchiver-0.5.2.orig/src/main.c 2008-11-10 05:21:43.000000000 -0600 ++++ xarchiver-0.5.2/src/main.c 2009-11-30 13:17:54.986351656 -0600 +@@ -296,9 +296,10 @@ + open_archive[XARCHIVETYPE_BZIP2] = &xa_open_bzip2_lzma; + open_archive[XARCHIVETYPE_GZIP] = &xa_open_gzip; + open_archive[XARCHIVETYPE_LZMA] = &xa_open_bzip2_lzma; ++ open_archive[XARCHIVETYPE_XZ] = &xa_open_bzip2_lzma; + open_archive[XARCHIVETYPE_RAR] = &xa_open_rar; + open_archive[XARCHIVETYPE_RPM] = &xa_open_rpm; +- open_archive[XARCHIVETYPE_TAR] = open_archive[XARCHIVETYPE_TAR_BZ2] = open_archive[XARCHIVETYPE_TAR_GZ] = open_archive[XARCHIVETYPE_TAR_LZMA] = open_archive[XARCHIVETYPE_TAR_LZOP] = &xa_open_tar; ++ open_archive[XARCHIVETYPE_TAR] = open_archive[XARCHIVETYPE_TAR_BZ2] = open_archive[XARCHIVETYPE_TAR_GZ] = open_archive[XARCHIVETYPE_TAR_LZMA] = open_archive[XARCHIVETYPE_TAR_XZ] = open_archive[XARCHIVETYPE_TAR_LZOP] = &xa_open_tar; + open_archive[XARCHIVETYPE_ZIP] = &xa_open_zip; + open_archive[XARCHIVETYPE_LHA] = &xa_open_lha; + open_archive[XARCHIVETYPE_LZOP] = &xa_open_bzip2_lzma; +@@ -310,6 +311,7 @@ + delete[XARCHIVETYPE_BZIP2] = 0; + delete[XARCHIVETYPE_GZIP] = 0; + delete[XARCHIVETYPE_LZMA] = 0; ++ delete[XARCHIVETYPE_XZ] = 0; + delete[XARCHIVETYPE_RAR] = &xa_rar_delete; + delete[XARCHIVETYPE_RPM] = 0; + delete[XARCHIVETYPE_TAR] = delete[XARCHIVETYPE_TAR_BZ2] = delete[XARCHIVETYPE_TAR_GZ] = delete[XARCHIVETYPE_TAR_LZMA] = delete[XARCHIVETYPE_TAR_LZOP] = &xa_tar_delete; +@@ -325,7 +327,7 @@ + add[XARCHIVETYPE_BZIP2] = add[XARCHIVETYPE_GZIP] = add[XARCHIVETYPE_LZMA] = &xa_tar_add; + add[XARCHIVETYPE_RAR] = &xa_rar_add; + add[XARCHIVETYPE_RPM] = 0; +- add[XARCHIVETYPE_TAR] = add[XARCHIVETYPE_TAR_BZ2] = add[XARCHIVETYPE_TAR_GZ] = add[XARCHIVETYPE_TAR_LZMA] = add[XARCHIVETYPE_TAR_LZOP] = &xa_tar_add; ++ add[XARCHIVETYPE_TAR] = add[XARCHIVETYPE_TAR_BZ2] = add[XARCHIVETYPE_TAR_GZ] = add[XARCHIVETYPE_TAR_LZMA] = add[XARCHIVETYPE_TAR_XZ] = add[XARCHIVETYPE_TAR_LZOP] = &xa_tar_add; + add[XARCHIVETYPE_ZIP] = &xa_zip_add; + add[XARCHIVETYPE_LHA] = &xa_lha_add; + add[XARCHIVETYPE_LZOP] = &xa_tar_add; +@@ -337,7 +339,7 @@ + extract[XARCHIVETYPE_BZIP2] = extract[XARCHIVETYPE_GZIP] = extract[XARCHIVETYPE_LZMA] = &xa_tar_extract; + extract[XARCHIVETYPE_RAR] = &xa_rar_extract; + extract[XARCHIVETYPE_RPM] = &xa_rpm_extract; +- extract[XARCHIVETYPE_TAR] = extract[XARCHIVETYPE_TAR_BZ2] = extract[XARCHIVETYPE_TAR_GZ] = extract[XARCHIVETYPE_TAR_LZMA] = extract[XARCHIVETYPE_TAR_LZOP] = &xa_tar_extract; ++ extract[XARCHIVETYPE_TAR] = extract[XARCHIVETYPE_TAR_BZ2] = extract[XARCHIVETYPE_TAR_GZ] = extract[XARCHIVETYPE_TAR_LZMA] = extract[XARCHIVETYPE_TAR_XZ] = extract[XARCHIVETYPE_TAR_LZOP] = &xa_tar_extract; + extract[XARCHIVETYPE_ZIP] = &xa_zip_extract; + extract[XARCHIVETYPE_LHA] = &xa_lha_extract; + extract[XARCHIVETYPE_LZOP] = &xa_tar_extract; +@@ -348,7 +350,7 @@ + test[XARCHIVETYPE_DEB] = test[XARCHIVETYPE_BZIP2] = test[XARCHIVETYPE_GZIP] = test[XARCHIVETYPE_LZMA] = 0; + test[XARCHIVETYPE_RAR] = &xa_rar_test; + test[XARCHIVETYPE_RPM] = 0; +- test[XARCHIVETYPE_TAR] = test[XARCHIVETYPE_TAR_BZ2] = test[XARCHIVETYPE_TAR_GZ] = test[XARCHIVETYPE_TAR_LZMA] = test[XARCHIVETYPE_TAR_LZOP] = 0; ++ test[XARCHIVETYPE_TAR] = test[XARCHIVETYPE_TAR_BZ2] = test[XARCHIVETYPE_TAR_GZ] = test[XARCHIVETYPE_TAR_LZMA] = test[XARCHIVETYPE_TAR_XZ] = test[XARCHIVETYPE_TAR_LZOP] = 0; + test[XARCHIVETYPE_ZIP] = &xa_zip_test; + test[XARCHIVETYPE_LHA] = &xa_lha_test; + test[XARCHIVETYPE_LZOP] = 0; +@@ -392,6 +394,14 @@ + g_free (absolute_path); + } + ++ absolute_path = g_find_program_in_path("xz"); ++ if ( absolute_path ) ++ { ++ ArchiveType = g_list_append(ArchiveType, "xz"); ++ ArchiveSuffix = g_list_append(ArchiveSuffix, "*.xz"); ++ g_free (absolute_path); ++ } ++ + absolute_path = g_find_program_in_path("lzop"); + if ( absolute_path ) + { +@@ -460,6 +470,11 @@ + ArchiveType = g_list_append(ArchiveType, "tar.lzma"); + ArchiveSuffix = g_list_append(ArchiveSuffix, "*.tlz"); + } ++ if ( g_list_find ( ArchiveType , "xz") ) ++ { ++ ArchiveType = g_list_append(ArchiveType, "tar.xz"); ++ ArchiveSuffix = g_list_append(ArchiveSuffix, "*.txz"); ++ } + if ( g_list_find ( ArchiveType , "lzo") ) + { + ArchiveType = g_list_append(ArchiveType, "tar.lzo"); +@@ -528,6 +543,8 @@ + archive->type = XARCHIVETYPE_TAR_GZ; + else if ( g_str_has_suffix ( archive->escaped_path , ".tar.lzma") || g_str_has_suffix ( archive->escaped_path , ".tlz") ) + archive->type = XARCHIVETYPE_TAR_LZMA; ++ else if ( g_str_has_suffix ( archive->escaped_path , ".tar.xz") || g_str_has_suffix ( archive->escaped_path , ".txz") ) ++ archive->type = XARCHIVETYPE_TAR_XZ; + else if ( g_str_has_suffix ( archive->escaped_path , ".tar.lzo") || + g_str_has_suffix ( archive->escaped_path , ".tzo") || + g_str_has_suffix ( archive->escaped_path , ".tar.lzop")) +diff -Nur xarchiver-0.5.2.orig/src/new_dialog.c xarchiver-0.5.2/src/new_dialog.c +--- xarchiver-0.5.2.orig/src/new_dialog.c 2008-11-11 02:28:46.000000000 -0600 ++++ xarchiver-0.5.2/src/new_dialog.c 2009-11-30 13:17:54.987349701 -0600 +@@ -202,6 +202,8 @@ + type = XARCHIVETYPE_GZIP; + else if (strcmp ( ComboArchiveType,"lzma") == 0) + type = XARCHIVETYPE_LZMA; ++ else if (strcmp ( ComboArchiveType,"xz") == 0) ++ type = XARCHIVETYPE_XZ; + else if (strcmp ( ComboArchiveType,"lzo") == 0) + type = XARCHIVETYPE_LZOP; + else if (strcmp ( ComboArchiveType,"rar") == 0) +@@ -214,6 +216,8 @@ + type = XARCHIVETYPE_TAR_GZ; + else if (strcmp ( ComboArchiveType,"tar.lzma") == 0) + type = XARCHIVETYPE_TAR_LZMA; ++ else if (strcmp ( ComboArchiveType,"tar.xz") == 0) ++ type = XARCHIVETYPE_TAR_XZ; + else if (strcmp ( ComboArchiveType,"tar.lzo") == 0) + type = XARCHIVETYPE_TAR_LZOP; + else if (strcmp ( ComboArchiveType,"jar") == 0 || strcmp ( ComboArchiveType,"zip") == 0 ) +diff -Nur xarchiver-0.5.2.orig/src/tar.c xarchiver-0.5.2/src/tar.c +--- xarchiver-0.5.2.orig/src/tar.c 2008-11-10 04:28:34.000000000 -0600 ++++ xarchiver-0.5.2/src/tar.c 2009-11-30 13:19:34.037344951 -0600 +@@ -242,6 +242,17 @@ + files->str , NULL ); + break; + ++ case XARCHIVETYPE_TAR_XZ: ++ if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) ) ++ xa_add_delete_bzip2_gzip_lzma_compressed_tar (files,archive,1); ++ else ++ command = g_strconcat (tar, " ", ++ archive->add_recurse ? "" : "--no-recursion ", ++ archive->remove_files ? "--remove-files " : "", ++ "--use-compress-program=xz -cvvf ",archive->escaped_path, ++ files->str , NULL ); ++ break; ++ + case XARCHIVETYPE_TAR_LZOP: + if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) ) + xa_add_delete_bzip2_gzip_lzma_compressed_tar (files,archive,1); +@@ -449,6 +460,10 @@ + executable = "lzma -f "; + filename = "dummy.lzma"; + break; ++ case XARCHIVETYPE_TAR_XZ: ++ executable = "xz -f "; ++ filename = "dummy.xz"; ++ break; + case XARCHIVETYPE_TAR_LZOP: + executable = "lzop -f "; + filename = "dummy.lzo"; +diff -Nur xarchiver-0.5.2.orig/src/window.c xarchiver-0.5.2/src/window.c +--- xarchiver-0.5.2.orig/src/window.c 2008-11-11 02:31:45.000000000 -0600 ++++ xarchiver-0.5.2/src/window.c 2009-11-30 13:17:54.990326583 -0600 +@@ -1125,6 +1125,8 @@ + xx = XARCHIVETYPE_GZIP; + else if (memcmp ( magic,"\x5d\x00\x00\x80",4) == 0) + xx = XARCHIVETYPE_LZMA; ++ else if (memcmp ( magic,"\xFD7zXZ\x00\0x00",3) || memcmp ( magic, "\xFD7zXZ\x00\0x10",3) == 0) ++ xx = XARCHIVETYPE_XZ; + else if (memcmp ( magic,"\211LZO",4) == 0) + xx = XARCHIVETYPE_LZOP; + else if (memcmp ( magic,"\xed\xab\xee\xdb",4) == 0) +@@ -1462,6 +1464,7 @@ + case XARCHIVETYPE_GZIP: + case XARCHIVETYPE_BZIP2: + case XARCHIVETYPE_LZMA: ++ case XARCHIVETYPE_XZ: + case XARCHIVETYPE_LZOP: + case XARCHIVETYPE_RPM: + pos = 3; +@@ -1481,6 +1484,7 @@ + case XARCHIVETYPE_TAR_GZ: + case XARCHIVETYPE_TAR_BZ2: + case XARCHIVETYPE_TAR_LZMA: ++ case XARCHIVETYPE_TAR_XZ: + case XARCHIVETYPE_TAR_LZOP: + case XARCHIVETYPE_TAR: + case XARCHIVETYPE_ZIP: +@@ -1525,6 +1529,7 @@ + case XARCHIVETYPE_GZIP: + case XARCHIVETYPE_BZIP2: + case XARCHIVETYPE_LZMA: ++ case XARCHIVETYPE_XZ: + case XARCHIVETYPE_LZOP: + case XARCHIVETYPE_RPM: + pos = 3; +@@ -1544,6 +1549,7 @@ + case XARCHIVETYPE_TAR_GZ: + case XARCHIVETYPE_TAR_BZ2: + case XARCHIVETYPE_TAR_LZMA: ++ case XARCHIVETYPE_TAR_XZ: + case XARCHIVETYPE_TAR_LZOP: + case XARCHIVETYPE_TAR: + case XARCHIVETYPE_ZIP: diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-drag-n-drop_escaped_path.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-drag-n-drop_escaped_path.patch new file mode 100644 index 000000000..ff0d928b9 --- /dev/null +++ b/app-arch/xarchiver/files/xarchiver-0.5.2-drag-n-drop_escaped_path.patch @@ -0,0 +1,15 @@ +http://bugzilla.xfce.org/show_bug.cgi?id=5187 +http://bugs.gentoo.org/show_bug.cgi?id=262519 + +--- src/window.c ++++ src/window.c +@@ -1724,6 +1724,9 @@ + gtk_tree_selection_selected_foreach (selection,(GtkTreeSelectionForeachFunc) xa_concat_selected_filenames,&names); + archive->full_path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (extract_window->extract_full)); + archive->overwrite = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (extract_window->overwrite_check)); ++ gchar *unescaped_extraction_path = archive->extraction_path; ++ archive->extraction_path = xa_escape_filename(unescaped_extraction_path, "$'`\"\\!?* ()[]&|:;<>#"); ++ g_free(unescaped_extraction_path); + (*archive->extract) (archive,names); + + g_list_foreach (row_list,(GFunc) gtk_tree_path_free,NULL); diff --git a/app-arch/xarchiver/files/xarchiver-0.5.2-stack-smash.patch b/app-arch/xarchiver/files/xarchiver-0.5.2-stack-smash.patch new file mode 100644 index 000000000..66104822e --- /dev/null +++ b/app-arch/xarchiver/files/xarchiver-0.5.2-stack-smash.patch @@ -0,0 +1,20 @@ +--- xarchiver-0.5.2-old/src/window.c 2008-11-11 09:31:45.000000000 +0100 ++++ xarchiver-0.5.2/src/window.c 2009-01-25 16:26:07.000000000 +0100 +@@ -1447,7 +1447,7 @@ + GtkTreeIter iter; + gint n_elem = 0,pos = 0,dirs = 0; + unsigned long int total_size = 0; +- unsigned long int size = 0; ++ guint64 size = 0; + XEntry *entry = NULL; + + path = gtk_tree_path_new_first(); +@@ -1517,7 +1517,7 @@ + GtkTreeModel *model; + gint selected = 0,pos = 0,dirs = 0; + unsigned long int total_size = 0; +- unsigned long int size = 0; ++ guint64 size = 0; + XEntry *entry; + + switch (archive->type) diff --git a/app-arch/xarchiver/metadata.xml b/app-arch/xarchiver/metadata.xml new file mode 100644 index 000000000..e3645219c --- /dev/null +++ b/app-arch/xarchiver/metadata.xml @@ -0,0 +1,6 @@ + + + +xfce +Archive manager for 7zip, arj, bzip2, gzip, iso, rar, lha, deb, rpm, tar and zip formats. + diff --git a/app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild b/app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild new file mode 100644 index 000000000..bba919a65 --- /dev/null +++ b/app-arch/xarchiver/xarchiver-0.5.2-r4.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-arch/xarchiver/xarchiver-0.5.2-r3.ebuild,v 1.6 2012/05/03 01:58:53 jdhore Exp $ + +EAPI=4 +inherit xfconf + +DESCRIPTION="a GTK+ based and advanced archive manager that can be used with Thunar" +HOMEPAGE="http://xarchiver.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm hppa ~ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux" +IUSE="debug" + +RDEPEND=">=dev-libs/glib-2.16 + >=x11-libs/gtk+-2.10:2" +DEPEND="${RDEPEND} + dev-util/intltool + virtual/pkgconfig" + +pkg_setup() { + PATCHES=( + "${FILESDIR}"/${P}-stack-smash.patch + "${FILESDIR}"/${P}-add_xz_support.patch + "${FILESDIR}"/${P}-drag-n-drop_escaped_path.patch + "${FILESDIR}"/${P}--add-to_escaped_path.patch + ) + + XFCONF=( + $(xfconf_use_debug) + ) + + DOCS=( AUTHORS ChangeLog NEWS README TODO ) +} + +src_prepare() { + sed -i -e '/COPYING/d' doc/Makefile.in || die + xfconf_src_prepare +} + +src_install() { + xfconf_src_install DOCDIR="${ED}/usr/share/doc/${PF}" +} + +pkg_postinst() { + xfconf_pkg_postinst + elog "You need external programs for some formats, including" + elog "7zip - app-arch/p7zip" + elog "arj - app-arch/unarj app-arch/arj" + elog "lha - app-arch/lha" + elog "lzop - app-arch/lzop" + elog "rar - app-arch/unrar app-arch/rar" + elog "zip - app-arch/unzip app-arch/zip" +}