From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-admin/durep/Manifest | 8 ++ app-admin/durep/durep-0.9-r4.ebuild | 33 ++++++++ app-admin/durep/files/durep-0.9-dirhandle.patch | 31 +++++++ app-admin/durep/files/durep-0.9-gigabyte.patch | 17 ++++ .../durep/files/durep-0.9-r4-color-output.patch | 98 ++++++++++++++++++++++ app-admin/durep/metadata.xml | 6 ++ 6 files changed, 193 insertions(+) create mode 100644 app-admin/durep/Manifest create mode 100644 app-admin/durep/durep-0.9-r4.ebuild create mode 100644 app-admin/durep/files/durep-0.9-dirhandle.patch create mode 100644 app-admin/durep/files/durep-0.9-gigabyte.patch create mode 100644 app-admin/durep/files/durep-0.9-r4-color-output.patch create mode 100644 app-admin/durep/metadata.xml (limited to 'app-admin/durep') diff --git a/app-admin/durep/Manifest b/app-admin/durep/Manifest new file mode 100644 index 000000000000..d3cf284740ec --- /dev/null +++ b/app-admin/durep/Manifest @@ -0,0 +1,8 @@ +AUX durep-0.9-dirhandle.patch 848 SHA256 4fbdd5659421f39e689f070278e619327beeb4b4ad286ebcf195c8e498c7d3b5 SHA512 8e887393bab2c011cdf9ae096fc4f8b077c02c471203768c9f51b59df0a36f94aad797ffc017cf03ab0ddd2eed5e290d3ec65c90774bebacb5c35673ac3f176d WHIRLPOOL 7c2083a22ac52563735f1d616c96207d5e92abb1ad56fae8d127188568db8a3b27b54d4d168d7bcc822bbc72074628ef0ffff563c80a300080599aa371a61c10 +AUX durep-0.9-gigabyte.patch 327 SHA256 2d953915390811eb1e9cf3470760a5c03012956dafa07b32effb1a3e524a64ad SHA512 2bb28c5956cc6f8b301890f82eb86255f84ed6f93d1dc61e96bacb840ae0181feed76e992bca86249e9003701666784fdf7a40331c6c1731c55b3e3d2a4897b8 WHIRLPOOL f3922aea532fd14c9cd164ffe6245b6d64667c16d22795c85950ab6e8ff75e6989ba1dcbc85bf91545ca8aab17222041b3ec205a16d874211399cf33d0e1b385 +AUX durep-0.9-r4-color-output.patch 3477 SHA256 5d8eda3ced6776725b6843861db9fcb73158b98858ae2a33ecda7585f39c5dca SHA512 18bd766f706bf2036b1da35c0daf1add0adb6603a6cd0c68277efff8e1f2f8224cc2d79ca6c4afc70db9a01b5eec8a4ca7899c7c92b0bd38f709e7736731937a WHIRLPOOL 05170473d8b0700e10e66030e7741fe7fbaf497a642cf496c275c8c649143837d70f65c16c7d98b8c81bf6d773ab5f8b0805664b5691d34ba36cb8cbb5ad202e +DIST durep-0.9.tar.gz 13713 SHA256 71605ebc4d25f6452e2aaa0119e9a6b7e753fe46ec2999e17311389a03016825 SHA512 a8a58cf4a77fa43e06eb22ce70e566fe9c5dd6921677dbe4691a6dd95e2fad3735778a9858e3b80957ba6efd20293fcd2ba4ddc9cfe29f5813997de0f9c96b6d WHIRLPOOL a64f822cae74934e45eb9c5acf87f708feb84854f6912a6c9342ffb79cee9569d4685fbe09f78144404695995dc454e25603cd2720e1618cfdf98376e907c18f +EBUILD durep-0.9-r4.ebuild 746 SHA256 296dc826f3bf59e35f94b33b83f05a9936c25ae3f0393950ecd3971751f6eaa8 SHA512 73458ffd706804959eddaabc0a06b879562e0855a4b75d47a8dcee0b1c24109740efede4d6c846192b6fe6b9ecea00306fe86abdf83261658f337da00b1fc138 WHIRLPOOL e7611dc2ef1ec5796e957963ef509caaaabe2dadd46683719e5ded29d8114f01079b30edd0e19adda4dfef506709dd3020bb75196f4c9a49c9637dfc87db65cc +MISC ChangeLog 2770 SHA256 65ff84acc37436ba901355abeff9891482403204f31a9d9bc6322ff94c78aeb6 SHA512 79409697f9b21a6d40353b3d17859da7f4b54e2f598bab08934b8ad45ad514b282dd1f864fc7f4f86cc46a26392035f9dd769db30bbd3daea3afe11eea8f0dd4 WHIRLPOOL 42dd2b351f7ca02cebe2f2361ff46d81e00eb9cc0eea1961410676e8fc2f6b689a63b634379e7e21983ced8d209347dd6016a1866e4bd2dfa08a033eff72aa43 +MISC ChangeLog-2015 2951 SHA256 c47ff28ab16e2d753be61a562acf3446e1be3fb1171c541a6fa39d819bf63f1a SHA512 7afa44ac913de3025112cfff8dea40871dcee802d8e577d64a6f00842c55cd7611062285347c6dbb8d9104bf4b6e2d4ef1a82611ee3b760e526502fda672f63d WHIRLPOOL 194d92a70c33d74b6c482b73f1d7a229441682ec88120bf4085a4bf03b16a7d16b40dc306ca2ffa7e7914f79ba6f8b692d912aa9325ccdf24d523381133d243b +MISC metadata.xml 267 SHA256 4bb73a10b6399693ead0865a1a131e315c633d95dcc1b94e78d70ecd8642d51d SHA512 cbdeb6992e6acb977746b55685ae3d60dcf00915b48002a5e7eb47830207e7cad52ae212cd8831282274c454e45faa65422dcd5ac50185f429642fb34818609c WHIRLPOOL 2ee03e7b264415bdf06492b893d030aa247b1c21a696a3f44193be4bdcd02988b2bf928304e9a51070669ec4c80fbc7b908a2e4f059d16daae2b1e4e5c572029 diff --git a/app-admin/durep/durep-0.9-r4.ebuild b/app-admin/durep/durep-0.9-r4.ebuild new file mode 100644 index 000000000000..8a1b40e1159e --- /dev/null +++ b/app-admin/durep/durep-0.9-r4.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 +inherit eutils + +DESCRIPTION="A perl script designed for monitoring disk usage in a more visual way than du" +HOMEPAGE="https://gentoo.org" +SRC_URI="http://www.hibernaculum.net/download/${P}.tar.gz" + +LICENSE="Artistic" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +DEPEND="dev-lang/perl" +RDEPEND="${DEPEND} + dev-perl/MLDBM + virtual/perl-Getopt-Long + virtual/perl-Term-ANSIColor" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gigabyte.patch \ + "${FILESDIR}"/${PF}-color-output.patch \ + "${FILESDIR}"/${P}-dirhandle.patch +} + +src_install() { + dobin durep + doman durep.1 + dodoc BUGS CHANGES README THANKS + dohtml -A cgi *.cgi *.css *.png +} diff --git a/app-admin/durep/files/durep-0.9-dirhandle.patch b/app-admin/durep/files/durep-0.9-dirhandle.patch new file mode 100644 index 000000000000..ee2930622370 --- /dev/null +++ b/app-admin/durep/files/durep-0.9-dirhandle.patch @@ -0,0 +1,31 @@ +--- durep 2007-09-08 11:44:05.000000000 -0500 ++++ durep.new 2008-12-15 10:04:14.907825184 -0600 +@@ -175,6 +175,7 @@ + my $coalesced_size = 0; + my $node = {}; + my $temp; ++ my $dirhandle; + + $node->{ID} = $next_id++; + if(defined $parent) { +@@ -196,9 +197,9 @@ + + $node->{TYPE} &= $TYPE_COLLAPSED unless $store; + +- opendir(DIR, $dir) or warn "Unable to open dir '$dir': $!\n" and return $node; ++ opendir($dirhandle, $dir) or warn "Unable to open dir '$dir': $!\n" and return $node; + +- foreach(readdir(DIR)) { ++ foreach(readdir($dirhandle)) { + @stats = lstat "$dir/$_" or warn "Unable to lstat '$dir/$_': $!\n" and next; + + $node->{MTIME} = $stats[9] if($_ eq "."); +@@ -247,7 +248,7 @@ + $file_count++; + $node->{FCOUNT}++; + } +- closedir(DIR); ++ closedir($dirhandle); + + if($coalesced_count) { + if($store) { diff --git a/app-admin/durep/files/durep-0.9-gigabyte.patch b/app-admin/durep/files/durep-0.9-gigabyte.patch new file mode 100644 index 000000000000..315cb1c7c813 --- /dev/null +++ b/app-admin/durep/files/durep-0.9-gigabyte.patch @@ -0,0 +1,17 @@ +fix `durep -hs 1g` output + +Patch by Stephen Tallowitz + +http://bugs.gentoo.org/108942 + +--- durep ++++ durep +@@ -468,7 +468,7 @@ + elsif ($temp =~ m/^[mM]/) { + return $size * 1048576; + } +- elsif ($temp =~ m/^[mM]/) { ++ elsif ($temp =~ m/^[gG]/) { + return $size * 1048576 * 1024; + } + return $size; diff --git a/app-admin/durep/files/durep-0.9-r4-color-output.patch b/app-admin/durep/files/durep-0.9-r4-color-output.patch new file mode 100644 index 000000000000..6b8956199406 --- /dev/null +++ b/app-admin/durep/files/durep-0.9-r4-color-output.patch @@ -0,0 +1,98 @@ +--- durep ++++ durep +@@ -14,6 +14,8 @@ + ############################################################################# + + use Getopt::Long; ++use feature 'switch'; ++use Term::ANSIColor qw(:constants); + use File::Basename; + use MLDBM qw(DB_File Storable); + use Fcntl; +@@ -27,6 +29,7 @@ + our ($root_node, $filesystem_id, @stats); + our ($opt_help, $opt_version, $opt_textdepth, $opt_hidesize, $opt_showdate, $opt_nosort, $opt_quiet); + our ($opt_savefile, $opt_loadfile, $opt_desc, $opt_collate); ++our ($opt_nocolor); + our ($opt_files, $opt_onefilesystem, $opt_collapsepath, $opt_excludepath, $opt_coalescefiles); + our ($root_dir, $file_count, $dir_count, $next_id); + our ($TYPE_FILE, $TYPE_DIR, $TYPE_EMPTY, $TYPE_COALESCED, $TYPE_COLLAPSED); +@@ -56,6 +59,8 @@ + "d|desc=s" => \$opt_desc, + "c|collate=s" => \$opt_collate, + ++ "nc|nocolor" => \$opt_nocolor, ++ + "f|files" => \$opt_files, + "x|one-file-system" => \$opt_onefilesystem, + "cp|collapse-path=s" => \$opt_collapsepath, +@@ -332,13 +337,58 @@ + printf(" [%s%s] ", "#" x $numofchars, " " x (30-$numofchars)); + printf("%6.2f%% ", $percent); + printf("%s ", shortDate($entry->{MTIME})) if $opt_showdate; +- printf("%s%s\n", $entry->{NAME}, $entry->{TYPE} & $TYPE_DIR ? "/" : ""); ++ ++ printColor( $entry ) unless ( $opt_nocolor ); ++ printNoColor( $entry ) if ( $opt_nocolor ); + if($entry->{TYPE} & $TYPE_DIR) { + printDir($entry, $indent+1) if(!defined $opt_textdepth || ($opt_textdepth > $indent+1)); + } + } + } + ++sub printColor { ++ my $entry = shift; ++ ++ my @tmp = split /\./, $entry->{NAME}; ++ ++ if ( $entry->{TYPE} & $TYPE_DIR ) { ++ print BLUE, BOLD, $entry->{NAME}."/\n", RESET ++ } ++ else { ++ given ($tmp[$#tmp]) { ++ #executable (bright green) ++ when([ qw(cmd exe com btm bat sh csh) ]) { ++ print BOLD, GREEN, $entry->{NAME}."\n", RESET ++ } ++ #archives / compressed (bright red) ++ when([ qw(tar tgz arj taz lzh zip z Z gz bz2 tbz2 tz deb rpm rar ace zoo cpio 7z rz) ]) { ++ print BOLD, RED, $entry->{NAME}."\n", RESET ++ } ++ #image formats ++ when([ qw(jpg jpeg gif bmp ppm tga xbm xpm tif tiff png mng xcf pcx mpg mpeg m2v avi mkv ++ ogm mp4 mp4v mov qt wmv asf rm rmvb flc fli gl dl) ]) { ++ print BOLD, MAGENTA, $entry->{NAME}."\n", RESET ++ } ++ #misc. ++ when([ qw(pdf ps txt patch diff log tex doc) ]) { ++ print GREEN, $entry->{NAME}."\n", RESET ++ } ++ when([ qw(mp3 wav mid midi au ogg flac aac) ]) { ++ print CYAN, $entry->{NAME}."\n", RESET ++ } ++ default { ++ print $entry->{NAME}."\n", RESET ++ } ++ } ++ } ++} ++ ++sub printNoColor { ++ my $entry = shift; ++ ++ printf("%s%s\n", $entry->{NAME}, $entry->{TYPE} & $TYPE_DIR ? "/" : ""); ++} ++ + sub processSizeOption { + my ($size, $temp); + +@@ -438,6 +488,9 @@ + -d, --desc= give description of save file + -c, --collate= collate save files in dir for web report + ++Color Option: ++ -nc, --nocolor no color output ++ By default durep color outpu + Inclusion Options: + -f, --files do not descend into subdirs, only report files + -x, --one-file-system do not traverse file systems diff --git a/app-admin/durep/metadata.xml b/app-admin/durep/metadata.xml new file mode 100644 index 000000000000..a1d1cac5ab79 --- /dev/null +++ b/app-admin/durep/metadata.xml @@ -0,0 +1,6 @@ + + + + + A perl script designed for monitoring disk usage. Similar to du + -- cgit v1.2.3